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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Solar PV Monitoring/Automation Thread

  • 28-12-2021 1:51am
    #1
    Moderators, Education Moderators, Home & Garden Moderators Posts: 8,260 Mod ✭✭✭✭Jonathan


    Starting a new thread as this was getting lost in the Hints, Tips & Troubleshooting thread.

    Post details of your integration with Home Assistant etc.



«13456744

Comments

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


    Many inverters use the Solarman (IGEN Tech) WiFi Kit data logging stick for monitoring and data collection. Manufacturers using this approach for (at least some of) their devices include Solis (Ginlong), Omnik, Hosola, Goodwe, Solax, Samil and Sofar.

    The data logging device polls the inverter using Modbus over RS-485 at fixed intervals and sends the data to the Solarman portal where it can be viewed through their app or website. This portal is branded for each Manufacturer, but examples include Solis Cloud etc.

    Various methods of scraping the Solarman portal have been developed but this is not a good approach for a number of reasons;

    • Fragile
    • Not real-time (polling only at 6 min intervals by default)
    • Read-only (Cannot make any configuration changes to the inverter)

    It is possible to disconnect the data logging stick from the RS-485 port completely and interact directly with the inverter, but then you have no data being sent to the Solarman portal and the app etc becomes redundant.


    After a bit of Googling I discovered that the Solarman data logging stick can be supplied with Modbus RTU requests in a specific format on a specific TCP port which will then be run against the inverter and the result returned. This has a number of advantages;

    • More accessible (no hardware modifications required)
    • Real-time polling
    • Doesn't interfere with Solarman portal
    • Read and write support (make configuration changes to your inverter remotely)

    In order to simply this process, I wrote a Python module which handles the Solarman protocol side of things, and exposes an interface similar to that of a Modbus library.

    The code is available on GitHub:

    https://github.com/jmccrohan/pysolarmanv5

    This can be used to build integrations with Home Assistant, or indeed standalone automations. Examples would be to set a particular battery SOC for a grid charge based on the weather forecast etc.


    I'm only new to Home Assistant myself, so interested to hear what others have done.

    Post edited by Jonathan on


  • Registered Users, Registered Users 2 Posts: 2,596 ✭✭✭ECO_Mental


    Good timing as of literally 10 minutes ago I got the Solis cloud integration working on my home assistant...... I am totally new to HA as I only got RPI 4B off Santa a few days and have been messing around it since. Had to download HACS etc etc to get it working but eventually I did. What you are proposing does seem a bit more technical but I had to start somewhere, I have no fancy graphs on my dashboard or anything yet but the most important part is getting that data down and into HA.

    I might look into your direct connection over the coming days.

    This is what I have implemented fro github

    https://github.com/hultenvp/solis-sensor



    6.1kWp south facing, South of Cork City



  • Moderators, Home & Garden Moderators Posts: 6,626 Mod ✭✭✭✭graememk


    As my batteries and inverter are separate,

    Im using an EmonTX (so i can have 4 cts) with wifi and a Rpi2 running emoncms (also hosts the MQTT broker)

    https://shop.openenergymonitor.com/emontx-wifi-adapter-1/

    For control, I only need to control my storage inverter, the ME3000sp, Communication is done via Sofar2MQTT https://github.com/cmcgerty/Sofar2mqtt

    That is picked up in node Red where its handled and reposted to the emonCMS (mainly for SOC for my webapps)

    A second flow does the automation/schedule for the ME3000. The main things I set is the Overnight charge %, and overnight (ie nightrate discharge %)

    The nightrate discharge % is for the summer months where otherwise I have seen it rocking to nightrate at 70% battery, So i let it discharge overnight to a certain %.

    Currently i have solar predictions from forecast.solar but no automation yet,

    All controlled from a node red ui.

    I also have an EmonEVSE to charge the car... on the rare days its actually home during the day. - that is fed a value over mqtt that can track the solar like a zappi, but I dont have to wait until the battery is full.

    There is another node red flow that tweaks the excess value to limit the house battery charge depending on the SOC of the battery. eg if the battery is at 90 % it will up the amount of power available to the emonevse, thus slowing the charge to the batteries.

    I'm planning on replacing my immersion switch with a wifi controlled one, putting a CT on the immersion and just having a dumb "diverter" when the panels are belting out the power in the summer (and batteries are either at a high SOC or charging at greater than 2kw)

    I have dabbled with HA but its just HA core in a Truenas jail. (Might just load up a VM for it for the whole manged one).



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


    Here is my monitoring/automation

    Inverter:

    v1 wrote the code to scrape Solis Cloud. This was providing data to Prometheus/Grafana and also pushing to Mosquitto MQTT. In HASS configured sensors just to pull metrics that I needed. As the data was aggregated and delayed 15-30mins I moved onto v2

    v2 wrote code to pull data directly from rs485 port on Inverter but also had relay that was switching between my modbus device and wifi stick, as there can be only one master on the bus at a given time. This also enabled me to modify settings on Inverter remotely through modbus. I was using nodeRed for that. Again the data was provided to Prometheus/Grafana and also pushing to Mosquitto MQTT. This worked well for more than half a year but then @Jonathan posted his code so moved to v3

    v3 used code from @Jonathan and merged it with my v3. That meant I can pull data directly from wifi stick and there is also possibility to remotely control the Inverter.

    Battery:

    For batteries I've built serial monitor on top of esp8266 and pull data from master Pylon battery. This gives me detailed information each battery/cell etc. All of this is sent to Prometheus/Grafana. I have no real use for this data in HASS

    All above give me a lot of metrics in Prometheus use for longterm storage and dashboard in Grafana. Data is beautiful :)

    In August HASS has added Energy monitor. Which is ok but leaves much more to be desired. The data that I collect allows me to use it but I am only testing it and will see if I will keep it.

    What I have found is a custom card that allows to visualize power and this is the one that I started using but still needs tweaking. Here is the screenshot of my wall mounted tabled and on the right it has live data what Solar is doing.

    At the moment I do not do any automation on Solar side as I have 24hour electricity plan but that is about to change next month.

    Apart from solar my whole house is being monitored and automated. Here is a list of things that I remember :)

    Lights in some areas are powered on/off based on time of the date and triggered by motion or door sensors

    Lights have different modes and light temperature settings in room.

    FishTank lights and brightness.

    Each room has temperature&humidity sensor and automatic TRV. Gas boiler is turned on based on set room temperature, which differs depending on house occupancy, time of the day etc. Also boiler is configured to keep certain water temperature again based on house occupancy, time of the day etc.

    Bathroom/shower fans are controlled based on humidity levels

    Voc&Co2 monitors in main rooms.

    There are automatic switches with power monitors to ensure that no devices are left in standby for long time.

    TV/HiFi systems are also controlled via HASS. Your phone is your remote.

    Brightness level of 2 lights and also HiFi volume level can be controlled with Aqara cube

    Have 2 LAN cameras integrated to HASS and also started testing frigate for object detection with Google coral TPU

    Xmas lights controlled by HASS :)

    In summer I monitor temperature&humidity and activates airpumps for plants depending on solar level and battery voltage on my shed.

    For controls there are phones(everyone has one) and also old tablets mounted on the walls.

    I'm sure there is something else but cannot remember now. The whole brain of this is running in my home lab in containers. As mentioned already I use HASS, nodered(automations), prometheus, grafana, mosquito and there are some other containers that provide metrics or do some specific tasks.

    What I do not have is Alexa or Google home and have no intention of getting this. I prefer to have everything self hosted and keep control :)



  • Registered Users, Registered Users 2 Posts: 2,596 ✭✭✭ECO_Mental


    I have a lot to learn.....😥😥here is me happy and proud I got to pull my data off the Solis cloud

    Thats first dashboard look great well done

    6.1kWp south facing, South of Cork City



  • Advertisement
  • Moderators, Home & Garden Moderators Posts: 6,626 Mod ✭✭✭✭graememk


    The first step is the hardest.. these weren't built in a day.

    Just an indication of the possibilities!



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


    It is a rabbit hole once you get hooked on it. As @graememk said there multiple possibilities.

    For anyone starting with HASS and raspberry pi, lease do yourself a favor and do not use sd card. HASS is pretty big and once you start adding sensor it starts writing/reading a lot. SD card are not design for such application and sooner or later will fail. Use SSD drive, they are cheap now.

    I have published early draft version of Solis monitoring code that is based on @Jonathan code. I have been running it for a week or so and it is stable enough but I am sure there will be issues. :) It can be used to present metrics to Prometheus and publish to MQTT or just publish to MQTT which I think most will use for HASS. Let me know if you have trouble running it and I will try to help.



  • Moderators, Home & Garden Moderators Posts: 6,626 Mod ✭✭✭✭graememk


    Other home automation I have is tado for the heating+ a rpi controlling the pump on my solid fuel stove.

    On the lookout for an outside temperature monitor that I can pull into mqtt.

    Started poking the API for my car too.



  • Registered Users, Registered Users 2 Posts: 1,640 ✭✭✭THE ALM


    Happy festive season to all.

    Running a combination of Loxone, Hassio and Loxberry.

    All lighting (hue), Sonos, heating runs on Loxone with various humidity and temp sensors in all the rooms for heating control which is done through various shelly relays (standard oil boiler with pumps for heating and hot water) and 1-wire sensors.

    Most of the lighting in controlled by motion sensors or sunset timers. Retractive switches or wireless loxone air are used to control most things in the house from light, heating, music, sockets etc.

    Like above I pull the data from solis into hassio using the custom integration in hacs and then use mqtt to push this data to loxone which I can then use for various automations if it sees too much is being exported back to the grid, although with a zappi and eddi most excess is used anyway.

    Hassio and loxberry and mainly used as a bridge for anything that can't be directly controlled though loxone.

    If I can get the data directly from the inverter, through modbus/RS485, to loxone this would be my next task so reklamos and Jonathan's work might be something to look at although above my knowledge for now.



  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    Hi @reklamos thanks for your work on this integration. I'm trying to get your code running and have installed the dependencies. I can hack python code together but wouldn't be an expert by any means! Anyway I've got your script running and it's executing the while loop but returning an error every time I've extracted what I think are the important bits

    Message: 'Cannot read registers 33022 length 19'

    Arguments: ('IllegalDataAddressError()',)

    umodbus.exceptions.IllegalDataAddressError: The data address received in the request is not an allowable address for the server

    I've tried excluding the 33022 register from register.py but the error just moves to the next one. A tcpdump shows it is successfully connecting to the Inverter/logger on port 8899 but it's not getting the answer it expects?




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


    Have you got your data logger serial number set correctly? The pysolarmanv5 library could do with more error checking. I'll add some as time allows.

    Try using the example program to confirm that all is working. The example registers are actually Solis hybrid registers, so it should work out of the box with just changing your IP and S/N.



  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    I think so I changed the serial no to test that and it returned a CRC error, my inverter is a non hybrid Solis 3.6kW 5G so might not return all those registers? The example failed with a similar error. The data address received in the request is not an allowable address for the server.




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


    6 registers starting from 33022 should read fine as this where inverter date/time is stored. As you get response and it is not CRC, it looks like your serial is valid.

    Try to read a single register like:

    print(modbus.read_input_registers(register_addr=33022, quantity=1))

    or

    print(modbus.read_input_registers(register_addr=33049, quantity=1))

    Also use other numbers from 30000-39999, use single first. See if you can get something out.



  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    Will do and thanks for the help. It will have to be tomorrow now as the inverter has shutdown!



  • Registered Users, Registered Users 2 Posts: 203 ✭✭harderthanf


    The amount of dashboards I have setup, over the years, to monitor my solar setup is ridiculous. At first I was using modbus direct to my SMA SunnyBoy and populating a local sql database. I got the Myenergi setup this summer and I have added that integration to my home assistant. However, I still grab the data myself, using the myenergi API and populate a local db.

    I used to have all sorts on the dashboard but as I have wallpenal tables around the house the rest of the non-nerds found the screen too busy. So I have settled on this. The € value of the electricity and EV costs are being pulled via a rest sensor I have setup on another box. The db has the unit cost, discount, pso, standing charge etc so it's all calculated (and editable) to give the correct total. It's easy to see how much things are and how much the EV is costing to juice.

    No batteries - yet!

    I have loads of lights and smart sockets. All the wallpanels are on smart sockets, and the tablets use mqtt to send update to home assistant. One automation I have is when the battery level of the wallpanels get below 20% I switch the plugin on, above 85% and it switches off.

    Loads of contact sensors and motions sensors. e.g when the attic door is open the lights in attic comes on - off when closed.

    Motion sensors in hall and landing - lights come on depending on sun elevation then switch off when no motion after 2 mins etc.

    Some location awareness - if any comes home and it's dark the outside lights will come on (if off)

    Integration with Nest for home assistant control.

    Some nice Android TV integrations - e.g when we're watching a show or movie my downloader application pauses (as the disk i/o isn't amazing). When watching movie and play is pressed and it's night time, the sitting light dim - they come back on when pause or stop is selected.

    Heating on in morning (if workday) and temp below certain value

    5 Reolink cameras all to a dashboard in HA

    All the TV and Amps are controlled via HA too.

    Loads of other stuff - bloody hell I've spent a stupid amount of time on HA!


    Below is my energy / weather screen.




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


    Back at PC now so had a look at those verbose logs in more detail. You have your profile on private so I can't PM, but can you confirm if your data logger S/N begins with 406 and ends (last three digits) in a combination of two of those three digits?

    Can you also confirm what firmware version your data logger is running? Mine is running MW_08_512_0501_1.82.

    It is possible that the Modbus pass-through functionality is not implemented in older logger firmware versions. If you are on an older firmware version, you could try to contact Solis support to look for an upgrade. Alternatively, you could try setting a Remote Server B (point it at a local machine as UDP and listen on that port). The newer firmware versions removed that Remote Server B (still there, but no longer works).

    Actually, that CRC check is within the uModbus library. Pysolarmanv5 also does a CRC check on the V5 frame reponse and will throw a V5FrameError if it fails, but as of right now, I need to do more reverse engineering to figure out how I can confirm a valid modbus reply before offloading to uModbus to decode. Can you PM me some verbose logs reading the two sets of timestamp registers (33022 and 43000) if you can please. Hard to spot a pattern from just my own data. Thanks.



  • Moderators, Home & Garden Moderators Posts: 6,626 Mod ✭✭✭✭graememk


    I also have a non hybrid 4g inverter. I'll have a poke at it.

    (I'm wonder is it because it's a standard inverter not a hybrid)

    Will be tomorrow or Sunday as I have to do it during the day as the inverter shuts off at night



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


    As the inverter is 5G, the stick should be the newer one. Mine is actually older and starts with 401. I am attaching the output of 33022 and 43000. The error he is getting 'The data address received in the request is not an allowable address for the server' is coming fro umodbus.




  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun



    Happy New Year all :) The logger serial no is in that format and the logger firmware is MW3_15_0501_1.18. I'll generate and send you those logs now too and I've changed my profile so I think should be able to receive PMs now too.



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


    Thanks for this. It appears that the Modbus frame in the V5 reply is always preceded by 0x61. I'll add that into the validation later.



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    I've opened a ticket and emailed Solis support to request firmware updates for the logger and inverter. I tried the remote server option, adding my laptop then running a tcpdump shows nothing is received from the logger over 10 minutes. I tried the different registers too all with the same result. My logger could be an old one as it took 3 attempts to get it going here and the solution was to replace the first logger so I've no idea where it came from and could have been in the bottom of a drawer somewhere!




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


    Digging a little deeper, it seems that your data logger is working fine, and is passing the Modbus through correctly. It seems the Modbus error code is actually coming from the Inverter itself. See decoded Modbus below.


    I wonder is there a different set of registers used for the non-hybrid Solis inverters?


    01 Slave address 0x01 (1)

    84 Error code0x80 + 0x04 (4) - Read Input Registers

    02 Exception code[02] ILLEGAL DATA ADDRESS

    C2 C1 CRC0xC2C1 (49857)



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


    It looks to me a protocol version problem. Here are wifi the firmware versions:

    MW3_15_0501_1.18 @tnegun

    MW_08_512_0501_1.82 @Jonathan

    MW_08_512_0501_1.89 @reklamos

    1.18 looks like V4 or maybe even V3



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


    @tnegun Found a different set of Soils registers. Try reading register 1078. Does it contain kWh generated today? Similarly 1075 should contain AC power in W. Both of those are Input Registers (Modbus Function Code 04).



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


    Maybe try to loop through all registers? To cut down the noise set verbose=0

    Here is for all input registers,

    print('Started')
    for x in range(30000, 39999):
        try:
            print('!!!!!!!!!!!FOUND!!!!!!!!!!!', x, modbus.read_input_registers(register_addr=x, quantity=1))
        except:
            continue
    print('Finished')
    

    Here is for holding registers

    print('Started')
    for x in range(40000, 49999):
        try:
            print('!!!!!!!!!!!FOUND!!!!!!!!!!!', x, modbus.read_holding_registers(register_addr=x, quantity=1))
        except:
            continue
    print('Finished')
    

    It will only print output when it starts/finishes or when it finds a register. Otherwise it will be empty screen. Start it and leave it running, it will take a while but maybe it will find something. You can also break into smaller batches as at the moment the range is set to 10k



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


    I think the previous generation (or maybe just non-hybrid) inverters use a completely different range for their registers. See link: https://www.aggsoft.com/serial-data-logger/tutorials/modbus-data-logging/ginlong-solis-pv.htm



  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    Same error back for registers 1075 and 1078, no registers found iterating through them all I've attached the script I ran in case I did something wrong but it completes successfully very quickly and just outputs Started and Finished one line after another.




  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    I just tried from register 1000-4000 but nothing came back :(



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


    Your for loop is outside main(), so it never gets run. 🙂



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


    Also trying to read holding registers with function 3

    @tnegun replace all client_example.py with below, add your IP and Serial. Run it and leave for good while. It will do input and holding registers.

    """ A basic client demonstrating how to use pysolarmanv5."""
    from pysolarmanv5.pysolarmanv5 import PySolarmanV5
    
    
    def main():
        """Create new PySolarman instance, using IP address and S/N of data logger
    
        Only IP address and S/N of data logger are mandatory parameters. If port,
        mb_slave_id, and verbose are omitted, they will default to 8899, 1 and 0
        respectively.
        """
        modbus = PySolarmanV5(
            "192.168.1.55", 123456789, port=8899, mb_slave_id=1, verbose=0
        )
    
        """Query six input registers, results as a list"""
        print('Started Input Registers')
        for x in range(30000, 39999):
            try:
                print('!!!!!!!!!!!FOUND!!!!!!!!!!!', x, modbus.read_input_registers(register_addr=x, quantity=1))
            except:
                continue
        print('Finished Input')
    
    
        print('Started Holding Registers')
        for x in range(40000, 49999):
            try:
                print('!!!!!!!!!!!FOUND!!!!!!!!!!!', x, modbus.read_holding_registers(register_addr=x, quantity=1))
            except:
                continue
        print('Finished Holding Registers')
    
    if __name__ == "__main__":
        main()
    




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


    Yes, it seems that the registers are different for this version. I've got the same error when I try to read 30000 to 30100. So if @tnegun loops through all as in my previous post we may find them and if we lucky enough they only be shifted by number of positions. Otherwise it will require some reverse engineering to find what is what.



  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    Still something not right with the script I think. Looks like its not starting the for loops as I don't see the opening print? After about 30 seconds I get the error out below. I'm going to try from a different machine tomorrow as I'm running out of daylight here!


    python3 discover_reg.py

    Traceback (most recent call last):

     File "/Users/peter/github/pysolarmanv5/examples/discover_reg.py", line 35, in <module>

       main()

     File "/Users/peter/github/pysolarmanv5/examples/discover_reg.py", line 12, in main

       modbus = PySolarmanV5(

     File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pysolarmanv5/pysolarmanv5.py", line 38, in __init__

       self.sock = self._create_socket()

     File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pysolarmanv5/pysolarmanv5.py", line 135, in _create_socket

       sock = socket.create_connection((self.address, self.port), self.socket_timeout)

     File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 843, in create_connection

       raise err

     File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/socket.py", line 831, in create_connection

       sock.connect(sa)

    socket.timeout: timed out



  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    Just seeing the timeout let me check connectivity!!



  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    That was it and it's running now. I fat-fingered the network address 20 years in networking and I still miss that and would be embarrassed to admit how much time it has cost me/my employers over the years!!!



  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    Getting somewhere now! Nothing was found for registers 30000-49999 so I changed the range to 1000-4000 and from 2999 to 3510 returned successfully most just returned a [0] but 30-40 of these returned some data.



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




  • Registered Users, Registered Users 2 Posts: 2,596 ✭✭✭ECO_Mental


    Got my first HA dashboard up and running and got a few cards to work, its basic but it works... Just ordered a Shelly EM so I can measure my total energy usage and export as I have no exposure to this at the moment.

    Directly downloading the inverter data is a bit above my pay grade at the moment. I was chuffed with myself to get HASS to scrape the data from the website as it is.



    6.1kWp south facing, South of Cork City



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


    The low number registers are usually coils and only store 1 bit which is either 0 or 1. So they are not really useful as it is just state on/off, true/false. But keep scanning maybe you will get something.

    This looks the same what we have already. It provides offset but no function. When you add function 3 for input registers in front, we get the same registers just shifted by 1.



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


    Indeed. I only noticed that after I posted it 😂



  • Posts: 0 [Deleted User]


    What kind, of set up so I need for a goodwe standard inverter?



  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,770 ✭✭✭tnegun


    I was out for the morning so didn't get to do too much with this but a quick look suggests these are the correct registers. I've attached the detected registers in case its of any use to anyone!




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


    oh this looks promising so 2999 to 3004 stores inverter date stamp.

    !!!!!!!!!!!FOUND!!!!!!!!!!! 2999 [22] year

    !!!!!!!!!!!FOUND!!!!!!!!!!! 3000 [1] month

    !!!!!!!!!!!FOUND!!!!!!!!!!! 3001 [2] day

    !!!!!!!!!!!FOUND!!!!!!!!!!! 3002 [10] hour

    !!!!!!!!!!!FOUND!!!!!!!!!!! 3003 [52] minute

    !!!!!!!!!!!FOUND!!!!!!!!!!! 3004 [39] seconds

    Then there are these ranges which potential storing valuable data: 3006-3008, 3051-3067, 3089-3106, 2070-3146, 3304. Now this is not going to be exact science and will require reverse engineering. So first get your totals(today, yesterday, this month/year, last month/year, etc.) and see if any of them match number in any of the registers.



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


    So the script should run with goodwe also as per link. Just try the example and read single holding register 33022. If you lucky you get response back if not you can try scanning the range(see my posts earlier).

    Also I see there is HASS integration for goodwe. You can try that.



  • Moderators, Home & Garden Moderators Posts: 6,626 Mod ✭✭✭✭graememk


    Havent played with python in a while. and done it before I lost daylight gonna take that as a win! thanks for your scanning script.

    Mines a 4g inverter. SW version...

    dongle version 1.0.23

    So got the same dump as tnegun but things are in different places!

    todays yield is 2.6kwh, and total for the year is 6496kwh. inverter went in mid jan, Not sure what it counts as a year.

    Generation when this dump was taken was 20w.

    Also spotted what i think is string 1 voltage, current, and string 2 voltage current

    https://docs.google.com/spreadsheets/d/1i9QrXKcHJxoOx86cRZsjISJVB-bIUTn1T-oDdsw8VVM/



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


    Email Solis support and they will provide you with the list of Modbus registers for your inverter (or at least they did for me). They will only send you details of the input registers though. The holding registers are in a separate document which requires an NDA.

    Failing that, sniff the RS485 bus to see how the data logger is getting the data from the inverter.



  • Moderators, Home & Garden Moderators Posts: 6,626 Mod ✭✭✭✭graememk


    If its not a hybrid, is there anything to actually control?



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


    Probably not. Maybe remote on/off. Mine is a hybrid so the remote charging times is why I wanted the holding registers.



  • Moderators, Home & Garden Moderators Posts: 6,626 Mod ✭✭✭✭graememk


    through sheer guess work @tnegun ive been able to figure out all the useful stuff from my inverter.

    Looks like yours has different registers. But by polling it a few times, and comparing it with the actual solarman stuff It should be able to figure it out.

    anything that could have a decimal are all multiplied by 10 to ensure that its always an interger/whole number.


    Also any tips in starting off with home assistant? It does look pretty. Does it have its own db for logging stuff or do I need to have that also.



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


    Looks like Solis consistently inconsistent in their modbus implementation. @graememk I see you have figured out a good amount of registers already. As for control I think you should be able to control the things that you can directly on inverter itself. I just do not know if there is much to control on non-hybrid ones. @Jonathan are you sure that Solis provides input registers? These are the ones that you can actually make damage with where as holding ones are read only. Keep on scanning guys we will get something out of them :)



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


    The Modbus nomenclature is confusing. The holding registers are the configurable read/write registers (function codes 3 and 6). The input registers are the read-only, information providing registers (function code 4). The register range for each is inverted (FC 4 for range 3xxxx, FC 3 for range 4xxxx).




  • Advertisement
Advertisement