October 23, 20223 yr I've recently had a 5kW Sunsynk inverter installed. I've read a number of posts on this forum about attaching devices to Sunsynk inverters via RS485 and using Modbus to get sensor data, but I didn't want to have to install any extra hardware at the inverter when it already has a Wifi dongle that it uses to transmit sensor data over the internet. So I've been playing around with intercepting the data it sends. It's unencrypted (so now the NSA and everyone else knows every time I boil the kettle) and uncompressed, and I've been able to reverse engineer a fair number of the fields by plotting them and matching up to graphs in the data logger app. It's at the point where I'm dumping measurements into Influxdb and making a dashboard in Grafana. I'm building it in a modular way so that it should be easy to add MQTT support later. When I've got something that's actually usable I'll post an update here with a link to Github, but I'm not quite there yet. The downsides are that I haven't found any clear correspondence between the position of the fields in the packets and the Modbus register numbers, and it only sends telemetry once every 5 minutes. My questions so far: Has anyone already done the reverse-engineering, and worked out where all the fields are? Some will take me more time, and others I'll never be able to figure out with my own setup e.g. because I don't have a generator attached. Do any of the other Sunsync-related projects use Influxdb? If so I'll try to use the same schema so that dashboards can be interchangeable. Is there a way to use TCP/IP over the Wifi dongle to query sensors e.g. Modbus over TCP/IP? I've tried connecting to the standard port for that and it doesn't respond.
October 23, 20223 yr Hi @bmerry Nowadays there are a number of ways that you can get data from your inverter into Home Assistant 1. Using Home Assistant & Node Red you can query the RS485 ports either via a direct USB-RS485 connection or via a Modbus-TCPIP gateway (the first way that was worked out to query the inverter directly). Node Red captures the data from the Inverter to MQTT & Influx DB which can then be read by Home Assistant, Grafana etc. @Bloubul7 's initial post that started the whole thing 🙂 2. You can also query again using a modbus-TCPIP gateway or directly using a USB-RS485 adapter from Home Assistant using KellerZA's addon for Home. Assistant https://github.com/kellerza/sunsynk 3. Using ESPHome and a ESP32 with a RS485 to TTL board you can query the inverter directly and get the data into Home Assistant/MQTT that way 4. Stephan Joubert did a Home Assistant Plugin that allows a connection to the inverter using the Solarman Dongle for data https://github.com/StephanJoubert/home_assistant_solarman 5. There has been some talk regards the Sunsynk Dongle, not sure how any of the guys have got into getting data from it but there are a number of possibilities involving either pulling data from the dongle as is or alternatively reflashing it with ESPhome or other software to pull the data into Home Assistant that way. Good luck 🙂
October 23, 20223 yr Author Thanks @Sc00bs. I'm essentially doing option 5 at the moment (dongle as is). The dongle has no branding at all but the QR code points to a Sunsynk page, so I assume it's a Sunsynk dongle. I'm not using Home Assistant (I'm not even exactly sure what it is), just Influxdb and Grafana: I'm not familiar with MQTT, Home Assistant or Node Red and how exactly they relate to Influxdb (and each other). If I want to see what schema is being used with Influxdb so that I can do something compatible, where would be a good place to look? By schema I mean both the names given to the specific sensors and the measurement, tag and field names in the table.
October 24, 20223 yr There is a Modbus reference document that details all the queries that can be made to the inverter. You can find it in the original post by Bloubul7 referenced above. Home assistant basically brings all the IOT devices into one interface that is easier to manage using integrations into the various platforms. Using Home Assistant you can set up automations based on values coming from your inverter to control smart IOT switches on various platforms. There is some overlap between Home Assistant/Node Red/MQTT/InfluxDB/Grafana etc so if you are prepared to get under the bonnet you can probably get one platform to do what you want. My suggestion would be however to install Home Assistant along with the integration no.4. You will get all the values that you want and then have a look into the automations that you can do in Home Assistant, opens up a whole load of possibilities. There are a lot of Youtube videos on Home Assistant that I am sure you will find interesting. Sounds like you have a Solarman Dongle as I don't think the Sunsynk one has a QR code on it. The Solarman dongle has a +- 10 minute delay on data appearing on the web interface to the inverter, the Sunsynk one is more responsive. This is the Sunsynk Dongle
October 24, 20223 yr Author And the bit of cardboard that came with it looks like this. Like I say, no branding at all, and a product number that has zero hits. The picture above is a bit hard to see past all the cabling, but it looks like a similar shape to the picture of the Sunsynk logger you posted.
October 24, 20223 yr Author Based on the appearance, it might be http://e-linter.com/smart-energy/magpie or something similar. The FAQ for that product claims it uses TLS, whereas mine is not doing any encryption, so it's probably not exactly the same.
November 6, 20223 yr Author I've posted a very early version of my work on Github: https://github.com/bmerry/sunsniff. If anyone is interested, give it a go and let me know if it works for you.
November 12, 20223 yr I am busy with home assistant/node red pulling all the data off the sunsynk data logger website. Everything looking good and am busy figuring out how to change invertor settings.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.