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 all,
Vanilla are planning an update to the site on April 24th (next Wednesday). It is a major PHP8 update which is expected to boost performance across the site. The site will be down from 7pm and it is expected to take about an hour to complete. We appreciate your patience during the update.
Thanks all.

Solar PV Monitoring/Automation Thread

2456769

Comments

  • Registered Users 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 Posts: 1,724 ✭✭✭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 Posts: 1,724 ✭✭✭tnegun


    Just seeing the timeout let me check connectivity!!



  • Registered Users Posts: 1,724 ✭✭✭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 Posts: 1,724 ✭✭✭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,095 Mod ✭✭✭✭Jonathan




  • Registered Users Posts: 2,473 ✭✭✭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 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,095 Mod ✭✭✭✭Jonathan


    Indeed. I only noticed that after I posted it 😂



  • Registered Users Posts: 6,439 ✭✭✭SouthWesterly


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



  • Advertisement
  • Registered Users Posts: 1,724 ✭✭✭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 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 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: 5,755 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,095 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: 5,755 Mod ✭✭✭✭graememk


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



  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,095 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: 5,755 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 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,095 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
  • Registered Users Posts: 793 ✭✭✭reklamos


    You are right got confused here as was trying to apply logic :)



  • Moderators, Home & Garden Moderators Posts: 5,755 Mod ✭✭✭✭graememk


    If I was to poke all the ports from 1 to x? How high should I go. 50k? 😂

    Will scan the holding registers too see what sticks.



  • Registered Users Posts: 793 ✭✭✭reklamos




  • Moderators, Home & Garden Moderators Posts: 5,755 Mod ✭✭✭✭graememk


    Hmm it doesn't work when I go full ham on it. Maybe some ddos prevention on it.

    But I've got most of my values pinned down now though anyway. I don't think I'm missing anything. (Not that I need it either just fun)


    Oh @tnegun is yours a 4G or 5G inverter?



  • Registered Users Posts: 6,439 ✭✭✭SouthWesterly


    Is it possible to do this without being a programmer?

    Did some coding years ago and absolutely hated it.

    What hardware would I need to buy?



  • Moderators, Home & Garden Moderators Posts: 5,755 Mod ✭✭✭✭graememk


    Yours is goodwe?

    You could start with just a PC/Laptop with Python installed. But not sure how plug and play it is.

    But yeah it's gonna be quite hands on right now, I can talk to my inverter, and get some information from it, and can figure out what most of the values mean.

    (It's the best way to actually learn to code when you need to do something)



  • Registered Users Posts: 793 ✭✭✭reklamos


    It all depends what you want out get out of it. Don't have to be programmer(I am not programmer myself) just need PC/Laptop. Install HASS and play around with it. There are good guides/manuals online with massive community. As with any DIY, we do it because a solution either does not exist or it is much cheaper. The other major benefit, you can do it the way you want it.



  • Registered Users Posts: 793 ✭✭✭reklamos


    Since you have the registers now you can create/modify registers list and start sending data to mqtt/hass or if want fancy dashboards prometheus/grafana.



  • Registered Users Posts: 1,724 ✭✭✭tnegun


    Mines a 4G I've been out during daylight hours the last two days so haven't gotten to do much since finding the registers and back to work tomorrow so will be a while before I get back to it :(



  • Advertisement
  • Moderators, Home & Garden Moderators Posts: 5,755 Mod ✭✭✭✭graememk


    The irony is that I can already do that as I have an emontx and a CT on the feed from the inverter. Being recorded into emoncms. But having the DC stats will be useful.

    Will be looking into prometheus/grafana.. (need to figure out what they actually are)

    Also need to figure out how to integrate it in my system. Mqtt prob, either triggered in node red or something.



Advertisement