Getting Data from Solis Inverter

Short questions - long answers…

The data sticks are made by Solarman, which makes solar logging and monitoring software for a wide range of manufacturers. There are many physical models, many firmware releases, and many communication protocols. Solis simply badge engineer.

The sticks vary over time, but also by location, so what you can buy here in the UK will be different to what anyone in Australia gets.

Via the (difficult to source) plug/socket arrangement, the sticks act as a client (master) to the inverter internal server (slave) and pulls data, presumably on a regular basis (done over one centimetre of serial Modbus). The stick has a server A, pointing to Solarman/Solis cloud, which responds to the Cloud client - the protocol, now version 5, is apparently complex, with bi-directional handshakes that must be matched exactly otherwise nothing happens. Something like stick calls cloud, cloud calls back, stick sends data. Most sticks have two such servers, and with varying degrees of success the second (alternative) server can/cannot be setup to point to anything. Ironically this ‘server’ pushes data of its own accord, when servers should actually respond to a client request. My guess is that this setup was non standard and has been effectively deprecated. Data logging to the cloud/anything is always a problem since the cloud should do the polling, but the stick here wants to push data…

Various posts (on many platforms) have posted their model numbers, so I am aware of several different boards, firmware, and some of the ‘features’. To save me typing it all out again I point you to my earlier post in this very thread →

The salient features to look for on your stick are:

  • the status page, showing power etc, which can be scraped if you so wish
  • a second / alternative server, which can be set to push data or to be polled using Protocol v4 or v5
  • a hidden config page with further options
  • settings for the stick’s own internal Modbus server

I can only experiment with my first stick, but I know that it has server A pointing to the cloud, server B pointing to my HA, and another internal server that I can send Modbus requests to. The status page does not work, issues I believe with this old stick not coping with the later Hybrid (battery) Solis inverter.

My best suggestion - don’t bother.
You almost certainly won’t be able to find an earlier or even a particular model. I tried. I ordered from several UK solar ‘suppliers’. Two took my money on the e-shop and I have neither seen nor heard anything since. Caveat Emptor - I should have done my due diligence first, one shop owner has been taking thousands from online orders while fending off repeated attempts to strike off his ltd company.

I am only running the stick for the value of the long term data analysis I get from Solis cloud. I really should turn off the server B as I no longer use it. It was there when I first started, it required no hardware to work, it was a great exercise to learn Node-RED, and it was a real pain trying to decipher the protocol.

My old LAN stick is very different to the WIFI versions. The progression of the various stick versions appears to be moving towards one standard WIFI model, using a full handshake protocol, and with all extra options fully hidden from view. LAN stick versions are just WIFI ones with a port-out between the board and where the WIFI module would be.

Personally, I think the Server B option is no longer viable. If you can find the internal Modbus server, then that is the way forward, as it requires no further hardware and manages running both stick to cloud and stick to HA / Node-RED via Modbus.

What is that old saying? You should Solis Data Logging Stick it where…

Got it thanks

I just found out, i have the same stick as you.
LAN with serial number 19 13
Firmware ME-121001-V1.0.6(202011261020)

Can you share your homeassistant settings for the modbus connection?

I tried feeding homeassistant with this hacs addon:

But its very unreliable for me and only works for a day and after that it only works again after a restart of homeassistant

The HACS addon you refer to appears to use a direct API call to Solis Cloud, and has nothing to do with the data logging stick (as far as I can tell). Some integrations do this by using the cloud username and password - I have not tried this method.
Solis Cloud was significantly updated and moved to a new platform at the start of this year, and I did read somewhere that the Solis API feature has been deprecated, which may explain why such integrations now have issues.

For Modbus, I use Node-RED rather than HA as I have found this easier to work with (HA has to be completely restarted every time I make just one change to the config…). Since my stick no longer functions most of the time, I am not using the stick internal Modbus server but rather piggy backing on to the direct Modbus RS485 port out of the inverter.

Yes, getting data out of a Solis inverter is not easy

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