Getting Data from Solis Inverter

Yes the addon im using grabs the data directly from soliscloud website over the api.
The api is not deprecated, as theres a new feature since a few weeks, where you can create your own api key and dont have to ask support for it.

But because of the problems im encountering with this way of getting data, i want to change it to local.

1 Like

I can’t get into my data stick at the moment - it is very unstable, only works for minutes every few hours. There is a manual setting page in there somewhere (you will just have to look) for the internal server that responds to Modbus calls over TCP. You need to ensure that is running, and note the server port being used.

I experimented with the following HA setting as proof of concept.

modbus:
  - name: "solis"
    delay: 5
    timeout: 5
    type: tcp
    host: 192.168.0.182
    port: 30003
    sensors:
      - name: "HA meter Volt"
        unit_of_measurement: V
        address: 33251
        slave: 1
        count: 1
        input_type: input
        data_type: uint16
        device_class: voltage
        state_class: measurement
        scan_interval: 30
        scale: 0.1
        precision: 1

host - IP address of stick
port - server port setting on stick

This was experimentation, most of the options are unnecessary.

Thank you.

do you have a list with all the registers?
Or is it the list in post 30 of you with a fixed offset?

The Solis register list is out there on the web if you search for it. No guarantee that the register list will match a particular model though.
I understand that Ginlong will provide the ‘read only’ registers if you ask. Write registers are another matter.

We are being herded like sheep into the cloud. When the flock is big enough we’ll be charged for continuing access.

Enjoy free data whilst you can - however you manage to get it.

Tony

I’ve gone down a different path that seems to be fairly straightforward, in my opinion, and is working flawlessly since I configured it.

I purchased a Protoss-PE11-H RS485 to Wired Ethernet Bridge from AliExpress for £16.

I suspect that the WiFi version would also work, but I prefer wired reliability.

I purchased the famous German RS-485 plug that fits the Solis inverter, which it does, and followed the wiring guide as shown in the listing. I confirmed the 5V and Gnd rails with a multimeter.

I configured the PE11 to modus, 9600 baud, 8 bits, 1 stop, no parity. As well as a TCP server on port 502.

Then in home assistant the following

modbus:
  - name: "Solis_Inverter"
    type: tcp
    host: 192.168.1.24
    port: 502
    sensors:
      - name: Solis_Watts
        data_type: uint32
        slave: 1
        address: 3004
        input_type: input
        count: 2
        unit_of_measurement: W
        state_class: measurement
        scan_interval: 20
      - name: Solis_today_kwh
        data_type: uint16
        slave: 1
        address: 3014
        input_type: input
        count: 1
        unit_of_measurement: kWh
        state_class: total_increasing
        scan_interval: 60
        scale: 0.1
        precision: 1
      - name: Solis_yesterday_kwh
        data_type: uint16
        slave: 1
        address: 3015
        input_type: input
        count: 1
        unit_of_measurement: kWh
        state_class: measurement
        scan_interval: 3600
        scale: 0.1
        precision: 1
      - name: Solis_total_energy
        data_type: uint32
        slave: 1
        address: 3008
        input_type: input
        count: 2
        unit_of_measurement: kWh
        state_class: total_increasing
        scan_interval: 300
      - name: Solis_total_energy_this_month
        data_type: uint32
        slave: 1
        address: 3010
        input_type: input
        count: 2
        unit_of_measurement: kWh
        state_class: total_increasing
        scan_interval: 300
      - name: Solis_total_energy_last_month
        data_type: uint32
        slave: 1
        address: 3012
        input_type: input
        count: 2
        unit_of_measurement: kWh
        state_class: measurement
        scan_interval: 3600
      - name: Solis_total_energy_this_year
        data_type: uint32
        slave: 1
        address: 3016
        input_type: input
        count: 2
        unit_of_measurement: kWh
        state_class: total_increasing
        scan_interval: 300
      - name: Solis_temp
        data_type: uint16
        slave: 1
        address: 3041
        input_type: input
        count: 1
        unit_of_measurement: C
        state_class: measurement
        scan_interval: 120
        scale: 0.1
        precision: 1
      - name: Solis_grid_freq
        data_type: uint16
        slave: 1
        address: 3042
        input_type: input
        count: 1
        unit_of_measurement: Hz
        state_class: measurement
        scan_interval: 60
        scale: 0.01
        precision: 2
      - name: Solis_grid_current
        data_type: uint16
        slave: 1
        address: 3038
        input_type: input
        count: 1
        unit_of_measurement: A
        state_class: measurement
        scan_interval: 60
        scale: 0.1
        precision: 1
      - name: Solis_grid_voltage
        data_type: uint16
        slave: 1
        address: 3035
        input_type: input
        count: 1
        unit_of_measurement: V
        state_class: measurement
        scan_interval: 60
        scale: 0.1
        precision: 1

I have also written values to the inverter using nodeRed as it is just easier to do that way. Happy to share that example if required.

Using this example, it is cheap only required 1 device with no modification, no python, no coding, no resister fiddling. Most importantly no cloud, and update frequencies that you control. One of the key things was setting the input_type to input and not holding as that dictates the function code 3 vs 4 which matters a lot.

Hope this helps someone.

4 Likes

Actually if you have a solis wifi logger you can use this https://github.com/StephanJoubert/home_assistant_solarman to get the values locally as well via modbus.
Would be helpful if you share the wiring diagram for the rs485 round connector too.

I did not post it as it is not my image to copy. It is available in the ebay listing for the connector though. I will ask him if I can copy it and repost it here.

pin 1 : 5V
pin 2 : GND
pin 3 : RS485+
pin 4 : RS485-

1 Like

I’ve been occupied with the new install which is not without its issues, and a heads up, the nice pureenergy app only works with AC batteries. Be warned!

I’ve been studying this in great detail and am stuck on “dual masters”. Your comment quoted above would seem to suggest that this is exactly the situation you will end up with if you dispense with the very expensive white box.

I believe that I will end up taking the modbus from the wifi stick either with a connecter which you show, or having a responsible adult solder it.

Will I then have dual masters when I connect to Home Assistant and will it cause me issues?

I would be incredibly grateful for another of your full explanations.

Tony

You will only have dual masters on the physical RS485 bus if you try and keep both the data logging stick (working) and try to wire-patch to another device like HA via an RS485 adaptor at the same time. Issues with two masters are likely to be collisions on the bus, and the wrong master seeing a response meant for the other, which can lead to odd readings when reading a register (not great) and the potential for odd writes if you try and write to a register (definitely not good). My ‘dual master’ module does monitor the traffic, and it suggests that the stick only talks to the inverter every 5 minutes. This may be low as my stick is not working properly. With Node-RED on HA I am polling a few registers every 20 seconds, so conflict could be a risk that is acceptable to some.

One alternative is to find (if it exists) the internal Modbus server (slave) on the stick. My model has one, and I can (when it works) connect Modbus over TCP to this - and the stick then acts both as a master client to the inverter and a (repeating) server slave to my HA master. Unfortunately the more recent models, particularly the WIFI ones, don’t seem to have this option (or it is hidden too well).

I have an old Solis (Solarman) LAN type data logging stick. This bit of kit sends my data to somewhere in China giving me the (free at the moment) privilege of being able to get it back on my smartphone app. Advantages - it was there, it requires no thought or work, it was ‘free’ (included in the installation), it holds my data forever, and it provides some neat and useful presentation, history, and analysis.

Disadvantages - it does not work properly, I cannot replace it (even with a newer model I have bought, the swap-over does not work), and anyone with access to my data can work out when I get up and use the toaster, when I turn my lights on, do the washing, and when I go on holiday. Someone, in China, probably knows more about my domestic energy consumption and patterns that anyone at my UK utility supply company… Smart Meters? Not that smart.

I have sorted the ‘two master’ issue - it is an expensive option and requires yet another power supply (I am burning around 60 watts on my inverter and kit 24/7, add that up and it is a nasty 500 kWh annually). It also adds complexity to the mix and, whilst I believe it is all working, it would be better to simply chuck the data logging stick away, and go for a direct Inverter to RS485 adaptor connection. I can even use the nice plug provided on the end of the redundant data logging stick.

What will I loose?
In the event that Solis care to support my inverter and offer a remote firmware update via my stick I would have to download and do the update using another special stick (one that is only sold to installers).

Now that I have direct connection to the inverter via Modbus, I have most of what Solis provide, and pushing this into HA gives me the visibility and short-term data analysis. Longer term data storage I don’t have, but I could sort this out. I also have nabu casa connection, so I can get to HA on my smartphone when on holiday and via this see what my inverter is up to. I can even control it when away, which is more than I can do with the Solis kit.

The big issue for me is that, for some reason, my stick no longer connects to the cloud properly and spends most of its time being unavailable - to anything. Being unable to get anywhere with fixing this issue, abandoning the stick seems quite a sensible approach.

End result:
Inverter RS485 Comms Socket → cannibalised stick plug → bit of wire → RS485 Modbus serial to Modbus TCP adaptor → LAN → HA → happiness without Solis Data Logging Stick

So, I only really need one RS485 port for connecting to the Inverter, and one RS232 port for connecting to the Pylontech via the console port. Everything else is extra.

1 Like

Thank you

I get it.

I want of course what I cant have - stick and RS485 without the expensive white box.

But I now understand why I cant have it, and about dual masters.

Thank you for yet another detailed response.

Tony

What model inverter do you have?

I would be very interested in your nodeRED flows for writing. I have gone down the exact same route hardware wise as yourself.

I’m not an experienced Node-red user, but I find making logic in HAAS very tedious and ineffective.

[{"id":"dae48a4adc25160a","type":"tab","label":"Solar","disabled":false,"info":"","env":[]},{"id":"257abe6c0a5907e2","type":"junction","z":"dae48a4adc25160a","x":140,"y":340,"wires":[["90614ad5a674692c","fbb05aa007462456"]]},{"id":"9995ae81a37d9dae","type":"ha-entity","z":"dae48a4adc25160a","name":"Low Power Solar","server":"d7bd0613.794c78","version":2,"debugenabled":false,"outputs":2,"entityType":"switch","config":[{"property":"name","value":"Low_power_solar"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":true,"outputPayload":"true","outputPayloadType":"bool","x":130,"y":180,"wires":[["5461e6b90ab63e7c","9ec2556140e57470"],["c7303b2ce79047a5","b2bc0cd9d3731f54"]]},{"id":"5461e6b90ab63e7c","type":"modbus-getter","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"3051","quantity":"1","server":"839d6faa3b9316ef","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":340,"y":140,"wires":[["92291737d89d8fcc"],[]]},{"id":"92291737d89d8fcc","type":"function","z":"dae48a4adc25160a","name":"set to 50%","func":"var pwrMsg = {};\nvar gridMsg = {}; \n\nif (msg.payload[0] > 6000)\n{\n    node.warn(\"output set to 60%\");\n    pwrMsg.payload = { value: 6000, 'fc': 6, 'unitid': 1, 'address': 3051, 'quantity': 1 };\n    gridMsg.payload = { value: 52, 'fc': 6, 'unitid': 1, 'address': 3067, 'quantity': 1 }; \n    return [pwrMsg, gridMsg];\n}\n","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":120,"wires":[["5364e6d4aafc542b"],["5364e6d4aafc542b"]]},{"id":"d643f2a283e32b10","type":"function","z":"dae48a4adc25160a","name":"set to 110%","func":"var pwrMsg = {};\nvar gridMsg = {};\n\nif (msg.payload[0] < 11000) {\n    node.warn(\"output set to 110%\");\n    pwrMsg.payload = { value: 11000, 'fc': 6, 'unitid': 1, 'address': 3051, 'quantity': 1 };\n    gridMsg.payload = { value: 53, 'fc': 6, 'unitid': 1, 'address': 3067, 'quantity': 1 };\n    return [pwrMsg, gridMsg];\n}\n\n","outputs":2,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":220,"wires":[["5364e6d4aafc542b"],["5364e6d4aafc542b"]]},{"id":"c7303b2ce79047a5","type":"modbus-getter","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"3051","quantity":"1","server":"839d6faa3b9316ef","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":340,"y":200,"wires":[["d643f2a283e32b10"],[]]},{"id":"5364e6d4aafc542b","type":"modbus-flex-write","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"server":"839d6faa3b9316ef","emptyMsgOnFail":false,"keepMsgProperties":false,"x":750,"y":160,"wires":[["6caf2b56548b9338"],[]]},{"id":"90614ad5a674692c","type":"modbus-getter","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"3067","quantity":"1","server":"839d6faa3b9316ef","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":340,"y":360,"wires":[["cc6fd2526d5e451a"],[]]},{"id":"cc6fd2526d5e451a","type":"function","z":"dae48a4adc25160a","name":"Sort Grid Standard","func":"if (msg.payload[0] == 52) {\n    msg.payload = \"G98\";\n} else if (msg.payload[0] == 53) {\n    msg.payload = \"G99\";\n} else {\n    msg.payload = \"error\";\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":340,"wires":[["d2a4ec41e3cf64a7"]]},{"id":"fbb05aa007462456","type":"modbus-getter","z":"dae48a4adc25160a","name":"","showStatusActivities":false,"showErrors":false,"logIOActivities":false,"unitid":"1","dataType":"HoldingRegister","adr":"3051","quantity":"1","server":"839d6faa3b9316ef","useIOFile":false,"ioFile":"","useIOForPayload":false,"emptyMsgOnFail":false,"keepMsgProperties":true,"x":340,"y":420,"wires":[["6990b2096f6560d0"],[]]},{"id":"6990b2096f6560d0","type":"function","z":"dae48a4adc25160a","name":"Sort Power Level","func":"msg.payload = (msg.payload[0] / 100); \nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":590,"y":420,"wires":[["4ed266f81e8320a8"]]},{"id":"d2a4ec41e3cf64a7","type":"ha-entity","z":"dae48a4adc25160a","name":"solis_grid_standard","server":"d7bd0613.794c78","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"solis_grid_standard"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":""},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":810,"y":340,"wires":[[]]},{"id":"4ed266f81e8320a8","type":"ha-entity","z":"dae48a4adc25160a","name":"solis_power_limit","server":"d7bd0613.794c78","version":2,"debugenabled":false,"outputs":1,"entityType":"sensor","config":[{"property":"name","value":"solis_power_limit"},{"property":"device_class","value":""},{"property":"icon","value":""},{"property":"unit_of_measurement","value":"%"},{"property":"state_class","value":""},{"property":"last_reset","value":""}],"state":"payload","stateType":"msg","attributes":[],"resend":true,"outputLocation":"payload","outputLocationType":"none","inputOverride":"allow","outputOnStateChange":false,"outputPayload":"","outputPayloadType":"str","x":810,"y":420,"wires":[[]]},{"id":"6caf2b56548b9338","type":"delay","z":"dae48a4adc25160a","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":true,"allowrate":false,"outputs":1,"x":960,"y":220,"wires":[["257abe6c0a5907e2"]]},{"id":"9ec2556140e57470","type":"debug","z":"dae48a4adc25160a","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":220,"y":60,"wires":[]},{"id":"b2bc0cd9d3731f54","type":"debug","z":"dae48a4adc25160a","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":240,"y":260,"wires":[]},{"id":"d7bd0613.794c78","type":"server","name":"Home Assistant","version":2,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30},{"id":"839d6faa3b9316ef","type":"modbus-client","name":"Solis","clienttype":"tcp","bufferCommands":true,"stateLogEnabled":false,"queueLogEnabled":false,"failureLogEnabled":true,"tcpHost":"192.168.1.24","tcpPort":"502","tcpType":"DEFAULT","serialPort":"/dev/ttyUSB","serialType":"RTU-BUFFERD","serialBaudrate":"9600","serialDatabits":"8","serialStopbits":"1","serialParity":"none","serialConnectionDelay":"100","serialAsciiResponseStartDelimiter":"0x3A","unit_id":1,"commandDelay":1,"clientTimeout":1000,"reconnectOnTimeout":true,"reconnectTimeout":2000,"parallelUnitIdsAllowed":true}]

This is the flow that I use. This checks some variables in HAAS then allows you to switch Grid standard from G98 to G99 and limit the power output of the inverter.

Weirdly these settings are not persistent over nighttime. ie. the next day it has forgotten about them, which also happens if you set them via the panel at the front. I’ve not investigated this at the moment, it was more a proof of principle. However, setting up the modes instance and reading values was fairly straight forward.

If you are having trouble, show me what you are doing and I can try to help.

Have you got HASS working from the TCP/Serial device?

A

Just found this community, hope I can get into this API or the WiFi data.

I have the solis inverter and the wifi dongle from installation. I can see the device on my network but if I try and access the standard creds dont work (Admin:admin).

I am happy to eavesdrop the traffic or use other techniques to get more data.

My other project would be to repurpose one of my raspberry pi’s and use ct to measure the regular house power, however I want to explore the inverter option first in case this is enough to get at the core data?

TIA
G

Solis inverters have available a mass of data, including domestic load, grid power, solar power etc.

There are several approaches to getting data out of a Solis inverter, and you should be able to make at least one work. Current methods with varying success using the stick itself include re-directing the ‘server A/B’ output or using the stick internal Modbus server.

All very much dependent on which model of Solis inverter (hybrid models are very different)
which stick type (LAN / WiFi are very different) and which version (hardware and firmware vary considerably - by model, age, and country location where sold).

First you need to get at the stick internal web setting page, which is at stick IP address port 80, and by default admin/admin. Who first setup your stick, you or an installer? Has your installer changed the stick account settings I wonder? Solis seem to encourage installers to set up the stick so that they also have access for monitoring customer’s systems (something I avoided letting my installer do by setting the stick and cloud account myself).

Which WiFi stick model do you have - the latest Gen3 with the external lights and reset button?
Is your Solis cloud account working OK with updates from the stick every five minutes?
Can you see your stick on your cloud account (which should show you your stick serial number)?

1 Like

I have the S6-GR1P3.6K and a Wi-Fi data logging stick. I can use their cloud app and view basic data.

The dongle is S3-wifi-ST. Yes the interval 5 mins ok, wondering if there is more to glean from it.

The cloud has the data from the stick and this can be accessed by an API. The data there is updated every 5 mins.

The inverter has all the data, and with a working approach, can provide data on a more frequent basis.

Modes of access into the stick include scraping the status page (limit info), listening to the server A/B, and accessing the internal server via Modbus.

This is the latest WiFi dongle. I don’t have any experience with this. However, as a first step access into the stick settings page will be required.

It may well be that the S3-WiFi-ST does not have a settings page.

Thanks @Biscuit the installer fella must have changed the default creds. I suppose I could ask them to see what that is.

I am happy to use some python or other alternative hacks, but dont fancy messing with the RS232 wired option if I dont have to.

Thought I’d report back given I have everything working now on my hybrid Solis inverter (no battery or data stick of any kind yet):

The box was installed by my solar installers, they had centred the energy meter with some spacers which I removed to add the PW11 Wi-Fi to modbus bridge in. It’s the high voltage one meaning it doesn’t need a separate DC power supply, just wired into the same 6A circuit powering the meter. (The meter installed there by the way has a CT clamp on my home’s grid connection and uses some CAN or modbus protocol to deliver that measurement (grid export/import) to the Solis inverter)

I configured the PW11 - note, DHCP wasn’t working reliably on my network and every hour the PW11 kept getting assigned a different IP address, so I configured a static one - and away we went.

(Ignore the kW scale, I’ve just changed it to kW but this is displaying an older day that was measured in W)

HA is now querying the addresses I need successfully - I might move it to NodeRED once I start writing to the registers (I’ve done this for my underfloor heating Modbus TCP) but we’ll see when the battery arrives.

Thanks all for the help @Biscuit and others.