Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Solar PV Monitoring/Automation Thread

145791071

Comments

  • Registered Users, Registered Users 2 Posts: 793 ✭✭✭reklamos


    I have these defined in my code already in registers.py file and puliing all that data.

    https://github.com/NosIreland/solismon3




  • Registered Users Posts: 6,161 ✭✭✭championc


    I've started to use API calls to turn on or off the MyEnergi devices. I turn on my Zappi if my batteries reach 85% and turn it off if the batteries drop to 80%. I'm now using ECO mode (and NOT ECO+), which will keep a minimum 1.4kW going into the car when charging, rather than it potentially knocking on and off when the odd clouds roll in.

    I turn the Eddi on if the batteries hit 98%. I saw that with LiFePO4, the charging rate got reduced shortly after hitting 98% and it was then ending up exporting while trying to charge the final 2%.

    I have an AC battery setup, but if you have a Hybrid, you could also start your Zappi charging on ECO Mode if maybe generation exceeds x.xxkW. This way, the car will charge with 1.4kW and the batteries will possibly get charge too - rather than needing to wait until your batteries get close to 100%

    Commands

    /cgi-zappi-mode-Z{zappi_serial_no}-X-0-0-0000

    The X values are 1 for fast, 2 for Eco, 3 for Eco+ and 4 for stop.

    /cgi-eddi-mode-E{eddi_serial_no}-X

    The X values are 0 for stop and 1 for start.



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,192 Mod ✭✭✭✭Jonathan


    Are you calling API directly? I'm using pymyenergi which is a nice library around it.

    https://github.com/CJNE/pymyenergi



  • Registered Users, Registered Users 2 Posts: 2,365 ✭✭✭SD_DRACULA




  • Registered Users Posts: 6,161 ✭✭✭championc


    Using a simple http Get to the server your hub is linked to. So

    https://s18.myenergi.net/cgi............

    The username is your hub serial number and your password will be the password linked to it.



  • Advertisement
  • Registered Users Posts: 3 Fiona ryan2


    First time user here so apologies! System only in a day. I was wondering if anyone can explain the current grid power information to me? I know we use a lot of energy in our house but the 617.5 kwh energy bought presumably does not relate to the usage from my house in one day? Thanks!




  • Registered Users, Registered Users 2 Posts: 2,365 ✭✭✭SD_DRACULA


    I had this too, and the reason was that the firmware on the solis wifi stick was too old.

    I spoke to my installer and he go onto solis and they performed the update, that fixed it.

    Try that



  • Registered Users, Registered Users 2 Posts: 6,242 ✭✭✭Ubbquittious


    I made a MPPT charge controller last year, decided to dig it up again now the sun is shining a bit more & improve the firmware a bit. It has a Sigfox module for telemetry & i finally got around to making a web page for it


    http://37.187.225.62:8123/kts.html


    It isnt generating much now because the battery is full & panel is in a terrible location but I will mount it in a proper spot soon



  • Registered Users, Registered Users 2 Posts: 6,242 ✭✭✭Ubbquittious




  • Registered Users Posts: 529 ✭✭✭The devils



    Update...must have box enabled 👍


    Finally got shelly pm1.

    Toggle on/off works fine, however the schedule dosent work for me ?


    That was the diagram I followed


    Not sure if I'm missing something simple here?

    Post edited by The devils on


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,365 ✭✭✭SD_DRACULA


    Guys I have this thing happening that is driving me crazy. I am pulling a few solis register via python and pymodbusv5 method, however everytime I restart home assistant it breaks all of those value by adding wrong data from yesterday and I have no idea how to fix that.

    See these little spikes:

    This breaks the energy dashboard values basically and I have to go in sql and fix that which is getting old fast.

    See below for the code, it ain't pretty but I'm still testing it out for now:

    """ A basic client demonstrating how to use pysolarmanv5."""
    from pysolarmanv5.pysolarmanv5 import PySolarmanV5
    from paho.mqtt import client as mqtt_client
    import time
    
    
    class Register:
      def __init__(self, number, quantity, scale, topic, haName):
        self.number = number
        self.quantity = quantity
        self.scale = scale
        self.topic = topic
        self.haName = haName
    
    broker = '192.168.0.100'
    port = 1883
    topic = "home/solar/consumption/today_energy"
    client_id = 'solis_test'
    username = 'homeassistant'
    password = 'xxx' 
    
    
    def connect_mqtt():
        def on_connect(client, userdata, flags, rc):
            if rc == 0:
                print("Connected to MQTT Broker!")
            else:
                print("Failed to connect, return code %d\n", rc)
        # Set Connecting Client ID
        client = mqtt_client.Client(client_id)
        client.username_pw_set(username, password)
        client.on_connect = on_connect
        client.connect(broker, port)
        return client
    
    
    def publish(client):
        msg_count = 0
        modbus = PySolarmanV5(
            "192.168.0.200", 12345678, port=8899, mb_slave_id=1, verbose=1
        )
        
        registers = []
        registers.append(Register(33163, 1, 0.1, 'home/solar/battery/charged_today', 'Solar Battery Charged Today'))
        registers.append(Register(33167, 1, 0.1, 'home/solar/battery/discharged_today', 'Solar Battery Discharged Today'))
        registers.append(Register(33179, 1, 0.1, 'home/solar/consumption/today_energy', 'Energy Consumption Today'))
        registers.append(Register(33171, 1, 0.1, 'home/solar/grid/today_import', 'Grid Import Today'))
        registers.append(Register(33175, 1, 0.1, 'home/solar/grid/today_export', 'Grid Export Today'))
    
    
        for reg in registers:
            #"""Query single input register, result as an int"""
            #print(modbus.read_input_register_formatted(register_addr=reg.number, quantity=reg.quantity, scale=reg.scale))
            register = modbus.read_input_register_formatted(register_addr=reg.number, quantity=reg.quantity, scale=reg.scale)
            if(reg.scale == 0.1):
                msg = format(register, '.1f')
            else:
                msg = format(register, '.0f')
            result = client.publish(reg.topic, msg)
            # result: [0, 1]
            status = result[0]
            if status == 0:
                print(f"Send `{msg}` to topic `{topic}`")
            else:
                print(f"Failed to send message to topic {topic}")
            msg_count += 1
    
    
    def run():
        client = connect_mqtt()
        client.loop_start()
        publish(client)    
    
    
    if __name__ == "__main__":
        run()    
    

    It happens like clockwork on every restart of the HA server



  • Registered Users, Registered Users 2 Posts: 3,971 ✭✭✭mp3guy


    Have you checked where the old data is showing up first? Is it coming out the first time you read the modbus? Or is it only appearing on the HA end?



  • Registered Users, Registered Users 2 Posts: 2,365 ✭✭✭SD_DRACULA


    Baffling as to why it happens, I had turned off my other nodered mqtt stuff just in case it was affecting it and I still saw it after restart.

    I do know that this only happens when I have the python script running and not when pulling data from nodered and solis cloud.

    Not sure where those mqtt values are lingering, any suggestions where to track it on HA side?

    I just noticed this in mqtt explorer:


    These are the dodgy values (from yesterday) and every time I open mqtt explorer I see the wrong values until the update comes from the python script, strange AF



  • Registered Users, Registered Users 2 Posts: 793 ✭✭✭reklamos


    This could be because of retain flag was set at one time for this message. Once it is set it will keep it. In mqtt explorer look for 'RETAINED' on topic and remove it.

    Check if you have it set anywhere(it could be code, HA, nodered etc), it could be that is is set by default(I think HA does it) and remove it from there.



  • Registered Users, Registered Users 2 Posts: 2,365 ✭✭✭SD_DRACULA


    I worked it out at 1am last night 😂

    It was the RETAIN being set to TRUE on my nodered stuff but not on the python side, so whenever a new client would connect it would send that old value it had until a new came in

    Once I set it to true on python side it stopped doing it. I knew it was something silly.



  • Registered Users Posts: 468 ✭✭thebackbar


    hi folks, i've been using home assistant for the last few years, and now i'm looking at installing pv panels, battery and a eddi diverter.

    In terms of ease of ha automation what brands should i be looking at ? It seems most people have a solis diverter ?



  • Registered Users, Registered Users 2 Posts: 3,971 ✭✭✭mp3guy


    SolarEdge and SolaX are super easy, can be done without manual MODBUS / RS485 hacking.



  • Registered Users Posts: 861 ✭✭✭tails_naf


    I have home assistant running on a virtual machine on a Linux box, as that was the recommended way to get a supervised install. Does anyone here run it on a Rpi, or directly on Linux, and if so do you have the supervised install? I don't really like using the vm as it takes up loads of disk space and crashes sometimes....



  • Registered Users, Registered Users 2 Posts: 3,971 ✭✭✭mp3guy


    I run it in a docker container on a vanilla Ubuntu install. Easy to update.



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,192 Mod ✭✭✭✭Jonathan


    Running it on a RPi3 I had spare. Might consider moving to a RPi CM4 board with NMVe once the supply issues abate.



  • Advertisement
  • Registered Users Posts: 861 ✭✭✭tails_naf


    Is it supervised? If so, could you link the docker commands you used?



  • Registered Users Posts: 861 ✭✭✭tails_naf


    I have a spare rpi3 knocking about. Do you have any reliability issues with the sd card? I've had some wear out quickly and it sucks to loose everything.



  • Moderators, Science, Health & Environment Moderators Posts: 4,719 Mod ✭✭✭✭Tree


    I'm running on a pi3, would definitely prefer a pi4 but they're rarer than hen's teeth. I got one of those category A2 SD cards made for running applications from (memoryc, arrived next business day).



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,192 Mod ✭✭✭✭Jonathan


    No issues with SD card yet, but only a matter of time. Have a daily backup of config synced to another machine for when it does happen. A proper SSD will solve that though. Just can't get my hands on any RPi4s at moment.

    As for the install, I'm just using HAOS: https://www.home-assistant.io/installation/raspberrypi

    I went that route as I didn't want the hassle of trying to figure out what update broke what. I have enough of that in the day job 😂



  • Registered Users, Registered Users 2 Posts: 2,365 ✭✭✭SD_DRACULA


    Yeah using an rpi4 with an SSD here and daily backups to google drive, nothing to lose that way.

    Or you could go with the HA amber official kits https://www.crowdsupply.com/nabu-casa/home-assistant-yellow

    I think you can get them with the cm4 included.

    I used this https://rpilocator.com/ to source some pi zero 2s recently, just follow them on twitter and be ready to jump once you get the notifications.



  • Registered Users Posts: 189 ✭✭connesha


    Am running supervised in a docker container on Ubuntu. On a NUC (Celeron) with SSD. Finding it snappy, quick to reboot, etc. Power consumption coming in at 4 to 5w.

    HA config in GitHub (git integration with StudioCodeServer is pretty nice). Haven't DB backup in place yet.



  • Registered Users Posts: 861 ✭✭✭tails_naf


    Nice. Can you give me a link to the one you have. Was thinking ssd in raid config would be good. Could eve stream media perhaps.



  • Registered Users Posts: 189 ✭✭connesha


    Sure, I got this:

    https://www.elara.ie/productdetail.aspx?productcode=MMECB55116

    https://www.elara.ie/productdetail.aspx?productcode=MME342C121

    https://www.elara.ie/productdetail.aspx?productcode=MME342B782

    Got the larger SSD as may use it as a fileserver at a later point. Can save 30e going smaller.

    Running Ubuntu 20.04

    Haven’t used it for media serving, so can’t comment there


    There are good ones on adverts from time-to-time. There weren’t any convenient at the time I needed, so went new.

    But, there’s an i7 there now, with SSD and Mem. I’d probably have taken that, had it been available when I was looking:

    https://www.adverts.ie/other-computers/intel-i7-tiny-pc-nuc5i7ryh/26382601



  • Registered Users Posts: 129 ✭✭fael


    I looked at a NUC, but decided to go with an Odroid N2+ instead. It had Home Assistant pre-installed. Just works out of the box. 64 GB eMMC and 4GB ram, slightly overspecced on what HA introduced themselves with the HA Blue (also Odroid based).

    Ships from NL, so no customs charges. It's close to €200 all-in.

    ODROID N2+ (4GB RAM) with Home Assistant Bundle - Standard Edition



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 3,971 ✭✭✭mp3guy


    Can't stand RPi or anything equivalent for HA, dog slow to restart and you'll be doing that a lot when you're configuring things.



Advertisement