Getting Data from Solis Inverter

Mine is a LAN stick - I “thought” the WiFi one was similar (depending on firmware version) except for the extra WiFi settings pages?

Hi,
I have the LAN stick and it’s totally unreliable. After some time, it just stops sending data. I have to pull the network cable and reconnect for it to come alive again. I was wondering if the wifi stick was any better, but apparently not. It’s already my second LAN stick (I believed the first one was broken since it showed the same behaviour).

The wifi stick doesn’t have that manual tab at all, there’s few settings on that page, and on the config_hide page you can basically override the server URL.

I have found web interface of stick locks up if the server B settings aren’t “compatible” (nothing listening etc) but even when that happened it was still sending data to ginlong website.

Only way to reset was to unplug stick from inverter (as that’s where it’s powered from) which gave a short window to access web interface and perform a factory reset.

Doesn’t work on mine, but might be worth trying the firmware upgrade

I alread pulled the stick from the inverter but it doesn’t change the behaviour. When it locks up, it also stops reporting to the cloud.

I would definitely suggest a factory reset via web interface if you haven’t already

Hey guys anyone have a way to easily identify what all the json data from the m.ginglong.com, it’s coming back like this:

_st: "1"
1af: "231.00"
1ag: "0.00"
1ah: "0.00"
1ai: "2.10"
1aj: "0.00"
1ak: "0.00"
1ao: "0"
1ar: "50.01"
1aw: "31.70"
ah: "18313"
2tm: "99"
ze: 2021-05-25T19:44:49.000Z
zf: "103643354"
zg: "FA,CA"
2tp: "0"
zh: "47.88.8.200:10000"
zi: "02"
ap: "0000"
aq: "0000"
zk: "1"
ar: "0000"
2tt: "52.10"
zl: "0"
as: "0000"
1bc: "663.00"
2tu: "10.10"
at: "0000"
1bd: "29.80"
1be: "676.8000000000003"
2tv: "100.00"
1ru: "0"
1bf: "676.8000000000003"
2tw: "100.00"

Anyone have a mapping of the values?

1 Like

I would suggest capturing it for a few days and putting into a spreadsheet - you’ll then be able to see trends to help identify what’s what.

Eg values that fluctuate up and down, values that are static, values that only increase, values that reset between sundown and sunup etc.

That is how I identified the data in the server B output.

1 Like

Checkout this project, I’ve been using it (albeit slightly modified to grab some extra values) to scrape the ginlong json data, there are some values already mapped but I took the extra mappings from the json data, there is a section in the json that maps those keys to something more useful.

This is fantastic - but you wouldn’t happen to stumble upon a solution for us WIFI-stick users?
I only have the following settings:
image
(the IP address is correct by the way)
and I have the following status:
image

I have setup the node-red flow and the entities are waiting to be fed.

Any help would be GREATLY appreciated!

4 Likes

I’d like to second this. Am stuck in the same boat, with a WIFI Stick setup. THanks for posting this

Hey @abinitio1980 , needless to say this is fantastic.
It did work for me - but only for a day or so? Maybe the stick upgraded their firmware or something, and now it send incompatible data? Who knows. My version right now is “ME-121001-V1.0.6(202006160928)”, don’t know what it was before.
It certainly appears that the data is incompatible; now it seems to send packets of 14 and 248 bytes length, so the flow ignores either.

So I wrote a program to receive data packets and a) log them to the console, b) write them to a file and c) retransmit them somewhere else (right now, the flow); mostly to log the data to file for further analysis. Also created a docker container for it for easier installation.

It seems to me a better coordination in decoding the data format is needed. It took me hours of Googling to find previous solutions (graham0’s and this one), and neither work for me anymore.
Maybe we should establish a proper documentation project, in order to maintain the offset/data field mapping in a more general form than python code or a node flow.
I’ll probably start one for what I find out about my current data; sadly I’m not really good at analysing this kind of binary data. If anyone feels like they can and want to contribute, let me know.

Hi @abinitio1980 I followed your “manual” and everything works fine. All sensors are showing in HA. THX.
The only regret is not being able to get the data in the new Energy tab. I’d guess that’s only for Integrations? It’s a shame, having the data but not able to enjoy the 2021.8 Energy update…

You need to adjust your nodes (eg. DailyGeneration) to contain the fields necessary for it to be recognized as “long term statistics” (Sensor Entity | Home Assistant Developer Docs).
I think the most important one is state_class: total_increasing. I wasn’t entirely sure what fields are needed exactly, so I just added all of them (eg native_unit_of_measurement and native_value). You can leave out last_reset, that’s calculated automatically when the value decreases for a total_increasing sensor.

Hi!

Thanks for this post. This is the first time that it almost seems that I got data from my inverter.

My setup → Pi, Home assistant, LAN stick, listeningport 9999. (server B setup as in posts before)

I’ve created the custom components, installed nodered, imported the flow so far so good.

Now I got an error at the extracting data flow. It says error parsing the message and I’m stuck. The sensors show op in the overview but have the value unknown. How can I troubleshoot this?

I have got an csv file with unknown solis messages. So it seems to have a connection.

Thanks for your help.
FrankProcessing: UnknownSolisMessages.csv…

The first number is probably a time stamp, of some sort. They increase in increments of about 150,000. How that translates to actual times depends upon the date of “zero” and the scale. To know that, you’ll need to know the time it takes for a new entry to show up.

One of the non-changing numbers will be the id of the inverter. Somewhere in there will probably be a kWh total (either of the life of the inverter or for the day). It will be a column that never decreases, and, to differentiate that for the current-power measurement, you’ll need to take some readings while the sun is going down or has set, as the current-power reading will be decreasing at that point. Unlike the time measurement, the number for kWh might exactly match what’s displayed on your inverter (if it has a screen).

The current-power reading, of course, will start going down after mid-day and should be zero at night.

I’d have to see more readings to get some idea of what other fields might be.

Hello! I am very new to all of this - got my Home Assistant Blue last week and just today finally up and running with my Solis Inverter data logging stick inputting data via Node-Red.

Had a new Solis hybrid inverter and Pylontech batteries installed last October - have been trying to get connected to them since! Project 1 - read from Pylontech (done via software on console port). Project 2 - read from Solis Inverter via data logging stick (now done). Project 3 - directly read Pylontech into Home Assistant (ongoing). Project 4 - connect to inverter via Modbus. Project 5 pull together display and control on house display (this where Home Assistant comes in). Project 6 - automate.

For the Solis Hybrid Inverter, proof of concept was done on a Raspberry Pi using Node-Red, and the hard part has been decoding the data message. For anyone interested, here is my current take on the data format. I have a LAN stick (which indeed exposes internal server B in the ‘manual setting’ page). I am using UDP not TPC to avoid timeout locking up the ports. Pointing the secondary server B to my Home Assistant IP/port with a Node Red listener, the messages can be read and parsed. Decoding was ‘Bletchley Park’ time and effort, fortunately over the year end so I could see the year totals and month totals roll over. After much checking back and forth, I believe I have 45 data values identified, with another 17 values to go, and lots more ‘holes’ out of a possible 100 missing.
Data messages for me are: - 14 bytes (probably a handshake with the cloud), 130 bytes (some data but almost incomprehensible at the moment). This may tie up with the 135 byte “communication” display on the inverter advanced information screen. Any ideas anyone? And - the valuable 250 byte message as follows:

Solis Inverter data logger message (for hybrid model with LAN data logging stick)
Message length 250 bytes: (message 14 bytes, message 130 bytes still to decode!)

Start:
<1byte 0xA5>
Header (13 bytes):
<1byte data length> <3byte flags> <2byte counter> <4byte logger serial number> <3byte flags>
Time data fields:
<4byte datestamp1 (running seconds)> <2byte data logger seconds> <2byte null> <3byte datastamp2 (‘restart’)> <2byte ?> <2byte message counter> <2byte null>
Inverter:
<16byte serial number ASCI + " ">
Data:
100 x 2byte values. Mostly unsigned integer little endian, with factor determined by inspection
offset / value
48: Inverter operating temperature
50: PV 1 voltage
52: PV 2 voltage
54: PV 1 current
56: PV 2 current
58: Inverter AC bus current (phase 1 - assume ph2/3 follow)
64: Inverter AC voltage (phase 1 - assume ph2/3 follow)
70: AC frequency (assume inverter, not meter)
72: ?unknown
74: ?signed integer flag (0/-1)
76: Yield today
78: Total Yield
88: ?
108: Solar Power watts
112: Yield this month
116: Yield last month
120: Yield yesterday
122: Yield this year
126: ?
130: ?
134: ?
138: ? - max inverter current? my model is 4.6kW so 100 amps?
140: date YY
142: date MM
144: date DD
146: time hh
148: time mm
150: time ss
152: Meter grid voltage
154: Meter grid current (don’t believe this value)
156: signed integer - power from/to grid (import is -ve)
158: signed integer flag 0/-1 (import is -1)
160: ?
162: Inverter Battery Voltage
164: Inverter Battery Current (I find this is incorrect - use BMS values)
166: ?
168: Voltage (think this is backup critical load)?
170: Current (ditto)?
172: BMS reported battery SOC
174: BMS SOH
176: BMS battery voltage
178: BMS battery current (agrees with what Pylontech is pushing out)
180: BMS recommended charge current
182: BMS recommended discharge current
188: Load power watts
190: ?
192: Total energy to battery
196: Energy to battery today
198: Energy to battery this month
200: Total energy from battery
204: Energy from battery today
206: ?
208: Total energy imported
212: Energy imported today
214: Total energy exported?
218: Energy exported today?
220: Total energy consumed (load)
224: Energy consumed today (load)
226: ?
229: Model number <1byte read as Hex>
230: Firmware version <3byte read as little endian Hex>
234: ?
244: ?

Ending: <1byte check digit?> <1byte 0x15>

I am missing:

  • any fields for phase 2 and 3 (U/V/W) as this is only domestic 1phase
  • most of the export values - only pushed out 1kWh for testing purposes so far as I have batteries!
  • any error/status fields - no problems with battery or inverter (so far…) so I assume error flags are all ‘0’
  • power meter values for apparent power/reactive power/ power factor etc. Solis cloud has them, so how are they getting from my inverter to the cloud?

Note:

  • almost all data items are little endian. eg the data logger serial number is 32 byte unsigned integer (read 4 bytes backwards, concatenate to hex, turn into decimal - bingo!)
  • the two timestamps are seconds from 1 Jan 1970. Adding both gives “now”, but I am finding that the ‘running time’ is actually going slow and loosing a few seconds every day, suggesting that the running time field is being incremented, and the ‘last reset’ date is actually back-calculated from now-running. Strange.

Hope this is of use to someone - and if anyone can fill in more of the blanks for me, great!

2 Likes

Thanks for sharing the node-red flow. I’ve configured it but seeing a different message length to what you have. From what I can see in node-red the length is 146 bytes each time rather than the 259 the flow expects. I’ve followed the same monitoring stick config as you used. Any tips on why I’d be seeing a smaller message length?

I too have attempted to utilise abinitio1980’s Node-Red flow but cannot get it working
I have a standard Solis Inverter (not hybrid) with a WiFi stick so do not have as many settings I can change as the LAN stick users appear to have
I have seen the listening node show a connection a couple of times but after about 10 seconds it changes from “1 connections” back to “0 connections”
Has anyone had success with a WiFi stick connected to a standard inverter that can offer assistance

Hi everyone, my first post on here and just got HA running on my NAS under a VM. I’m having PV installed in a couple of months with a Solis Hybrid 5G inverter & Pylontech batteries. My aim is to get all the relevant data into the HA energy dashboard in real time. Additionally the ability to command the inverter with some HA automation like solar prediction to control grid import/charing to maximise efficiency.

Having read countless threads on various forums I am a bit confused so any wisdom would be very much appreciated.

Options and questions:

  1. Some people are screen scraping data from the Solis cloud website, 6 minute delay, and read only, so no ability to command the inverter. I’m discounting this.

  2. What hardware? Someone took their wifi data logger apart to splice in a USB connection to a Raspberry Pie. Soldering adapters via [USB] (https://smile.amazon.co.uk/gp/product/B08CGXBSTF/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1) / convertors… Is this really needed?

Guessing having the LAN data logger plugged in the RS485 isn’t sufficient to receive and send data/commands? MQTT bridge cable? And another option found was serial/MQTT. Confused.

  1. MODBUS / MQTT / Reading & Writing Registers… I’m guessing this is how the data is captured and interpreted into HA? Then there’s some Python code into the mix, not sure what’s needed.

  2. NodeRed - I think the flow of logic from the inverter is: RS485-LAN module → HA NodeRed instance → HA dashboard. But how any of the above plays into this, I’m not sure.

  3. Are there any predefined templates/integrations for all this? I know every element can be bespoke, but anything would be a start. Found some sensor integration.

  4. Solis LAN or wifi stick? From what i’ve read on this thread, wifi isn’t great?

  5. Apart from the Solis inverter and data logging stick, do I need other hardware/adapters?

  6. Having telemetry in HA energy dashboards would be great and some have succeeded! eg: dashboard

I know its supposed to be a fun learning opportunity, just need to get the ball rolling with a nudge in the correct direction as I’m not sure if I’m reading older forum posts to get data into HA via their own dashboard or if a lot of this isn’t needed since HA released the Energy dashboard integrations.

I will start with reading all of @abinitio1980 posts and would really appreciate a steer from those of you that have some/all of this working.

Thanks!

1 Like