access the JSON/Rest APIs that Solarman now provide - and you will see everything your inverter sees - BUT these are only updated every 6 minutes when the inverters upload to the internet
Build a RS485/Modbus interface in place of/piggback on your wireless dongle and query everthing to your hearts content
@craigcurtin I need your expertise for my setup.
I have managed to connect a USB RS485 cable to my logger by soldering the A/B/GND wires coming from the usb adapter to the pins highlighted on the logger, using a 6 core alarm cable (using 3 wires)
Then connected the RS485 adapter to my HA rpi4 and I can now read data both from the wifi logger and from HA.
Problem is that now the data on SolisCloud (coming from the logger) is wrong and only once I try to read from the USB adapter while the logger is also connected.
You can see bogus data collected above and I assume this is because of the logger tripping over the rs485 adapter.
Are you having these problems? Termination/resistors required?
Read somewhere to only use twisted pair cable only (I didn’t)
Any suggestions? Do I have a ground loop?
I would not think a ground loop - what address have you set on your RS485 adapter ? The inverter is address 1 (and has to be) and the Wireless dongle is (off the top of my head) address 0
I am away for the next week so will only have intermittent access to reply etc
Thank you - I have used this code to successfully interrogate the status page of our inverter logger [also my first HA coding, albeit copy and paste].
However, the current power is misleading as during the day it appears to show the power generated by the PV panels (number matches ‘generation power’ in the Solis app). During the evening/night is shows the power being drawn from the batteries to power the baseline consumption in the house (number matches ‘consumption’ in the Solis app).
At first these appear to be confusing if not conflicting, but I guess this number is simply the power exiting the inverter from the battery/panels side towards the grid/house side, without indicating which is which. Hence we need the more detailed data being sent to the website.
The power for the day appears to function fine.
If you do not have a battery then scraping this page may work more effectively for you.
I have contacted Solis support asking for an API, but do not hold out much hope (and am unsure what to do with it if they send one)
As the destination server for the wifi dongle is a solarman site (according to this Solis page), I am wondering if their API might work, but again am unsure how to tie that in to HA.
Fall back may be emonpi, or Shelley EV, though not sure if either will be able to give battery status.
If anyone has made further progress then advice would be welcome. TIA
[Firmware: MW_08_512_0501_1.82, Web version 1.0.23]
Thanks - I think I saw that one on my travels whilst investigating. The problem (as I understood) was that you had to make your Ginlong page(s) public and I am not ready for that if there is a way to avoid it.
It seems to have been superceded anyway as last Sunday they moved platform from m.ginlong.com to Soliscloud so we may need to start again. Has anyone else seen this?
I also received an API from them for Soliscloud which may prove helpful and I am trying to get my head around that (my programming skills are rusty)
(they also managed to lose my data/configuration so I am currently trying to get that back and migrated without having to return to the installers and further delay)
Nope they do not need to be public - you are just accessing the Rest.API that returns a JSON stream The Docker image i linked to just pumps that out as an MQTT stream.
The Soliscloud stuff is just the Solarman site rebadged (they sell this to most of the 2nd tier manufacturers) -so the API is the same across all of them
Essentially
Login and get token
Enumerate your plant (mine has 3 inverters for insance)
Enumerate the returned devices to return the metrics you are interested in.
Hi - I have finally managed to get back to this project. Thanks for the extra info.
This looks ideal and probably would have worked - except that Solis have now updated their system to soliscloud.com (away from m.ginlong.com where old login does not work any more)
Now using HA 2021.10.6. - I have put the files in the places recommended and set the configuration to point to the new website.
When restarting I get the following: Platform error sensor.solis - Integration ‘solis’ not found.
Resolved my issue with the Github API call to m.ginlong.com
Solis/Ginlong unilaterally moved my plant to soliscloud, removing the old one from m.ginlong.com
I had to re-create the plant back on m.ginlong.com in order to get this integration to work.
In doing so, it generated a new plant ID, and so the plant ID I had tried from soliscloud was invalid - i.e. double check the plant ID in m.ginlong.com if you also have a soliscloud.com account.
I may also be relevant that I
restarted HA after placing the files in the solis subfolder to custom_components but before adding the settings to configuration.yaml
I also placed the file custom_components.json in the config folder at same level as configuration.yaml (not mentioned on Github doc page) - this may or may not be relevant
Then I restarted it again after adding the settings to configuration.yaml
I thought I’d have another bash at extracting data directly from my Solis 4G Inverter
as I hadn’t had a go in ages and I like to think my skills with Home Assistant have improved SLIGHTLY
So I’ve one again tried just about every method mentioned on this thread and they all seem to have the same sticking point
One example here from Node-Red
Node-Red reports “TypeError: Cannot read properties of null (reading ‘1’)”
It gives this error for all 3 of the grab nodes
This is an entry from 1 of the grab nodes which pretty much maches the info I get if I log into the inverter from my web browser then select “inspect”
var parts = msg.payload.match(/webdata_now_p\s=\s"(\d+)"/); msg.payload = { value: parts[1], }; return msg;
I can log into the inverter via its web address
I have the HACS “Ginlong Solis PV portal integration” working Ok but I don’t like relying on a cloud and it only reports about every 6 minutes which I dont like
I’ve also tried severl different REST sensor methods in my config.yaml without success
Can anyone offer any assistance with this issue please
I became so frustrated with the woeful Solis website & instructions etc that I just bought a Shelly EM c/w a CT sensor and use that to measure generation. Potentially less accurate, but at least it works!