Getting Data from Solis Inverter

Background:
I started late last year after my new Solar PV system was installed, and I went for the ‘server B’ option as my stick can do that, and it worked without hardware. Lots of learning about Node-RED. After that I wanted to connect to my Pylontech US3000C, so I used their BatteryView software and MultiSIBControl to connect, first to the RS232 console port, then to the RS485 port as well. This required the adaptors and physical connections. Over time I gradually worked my way through both comms ports/protocols connecting directly to Node-RED.
Then it was Modbus, and I decided that I would also try the CANbus line. Why not - it is there.

Answers:
Good luck with the WIFI stick!

The CAN connection is passive, but the data is fast, accurate, and straight from the ‘horses mouth’. I get to see exactly what the inverter is being told, and as my Solis decides to change some of the battery BMS data (battery in/out power being 96 watts when the Pylontech says 24 watts - work that one out), I wanted to be absolutely sure I knew what my battery units were saying.
The other port data is delayed, and yes the data does differ between the RS485 and console ports.

The CAN bus is the only coms link battery to inverter in my setup, and is one-way from battery to inverter. The RS485 comms ports can be used to talk to some inverters, but are mostly used to connect battery stacks, and work on a completely different approach / protocol. In the latest series you can have up to 16 Pylontech batteries link connected as one stack, the master unit connected to the inverter. Multiple stacks are then connected to the first stack, linked with the RS485 ports.

The CAN bus is a two-wire high speed ‘shout when you want’ system used in cars, with everything just connected in parallel. Absolutely essential NOT to break the battery-inverter connection, but I just linked the line through a network socket and tied in my adaptor. There is no master in a CAN bus.

I wrote up the entire CAN project on here, not that I think it is of much interest to anyone, but you can find ALL the details here

https://community.home-assistant.io/t/reading-can-bus-communication-between-pylontech-battery-and-solis-inverter/420788

Modbus:
The simple place to start is ‘read only’, and this can be done in place of the stick, alongside the stick, or via the stick (if you can find the internal Modbus server). Reading in HA is possible, but I prefer to work in Node-RED. Once I had the reading sorted, I moved onto the control. I have an almost working control system based on the UK Octopus Energy outgoing price, able to switch the inverter to charge the battery / sell the excess / dump and sell charge etc. This has to be done with some care - I have manual control set up so I can remotely change time (inverter internal time walks) the charging time and control settings, the SOC, and the master control flag to change the mode. I have extensively experimented with automatic control but find the Modbus write is not 100% reliable (for me) so I do everything manually and visually check the outcome.

From my Modbus register reading, all done in Node-RED, I push any values I want to HA using the entity node. This gives me a very rich dashboard with state and history. At the moment I do very little control, and this is done by using the Node-RED dashboard, but I have Node-RED dashboard set up in the side menu bar, so effectively everything from HA screen.

As for the registers - there is information out there, and I have found almost everything I needed either via searches or by informed experimentation. However, given the consideration of ‘disclosure’ and ‘safety’ I am not willing to on-publish what is proprietary information, and I don’t trust my own code with my own inverter so why should you? Accidently writing the wrong value to a register can have serious and expensive implications.