Back to Moixa Battery Index | http://graham.auld.me.uk | E-Mail me |
GitHub - no project here yet |
If you're on the latest firmware and the Grid and PV meters are no longer configured then you won't get data from them on D-Bus or MQTT or Modbus or the GUI. You'll know if you are in this situation by looking at the gui
In the old days - great, Grid is actually grid, AC Loads is your home load, PV is your solar input
Now, no PV on screen, Grid will actually be battery in/out on AC, AC Loads will show nothing
The data for Grid and PV actually comes from an external Modbus connected meter, in my system it's an Eastron SDM630 installed in my distribution unit, this has current clamps for Grid and PV. Physically the databus from this meter is wired back to the RS485 (C1) port ,which is duplicated in the unlabelled port on the top of the unit. (The duplication appears to be so that in a 4 kWh battery they can internally wire the generation meter to that top port and provide an easy termination port for installers to fit the externally mounted Grid/PV meter without interfering with the connection of that internal meter.
The top unlabelled port and RS485 (C1) are connected internally to /dev/ttyUSB0 and read by /usr/bin/plan-executor. This single application appears to run the main control loop that reads meters and commands the Charger/Inverter. By linking the A and B data lines (the top two pins on the ports) the MODBUS read requests and replies will be available on RS485 (C2) - internally this is /dev/ttyUSB2 (top port). All we then need is a little bit of software to read that data, chuck it out onto the D-Bus. The standard internal software will then make that D-Bus info available on either MQTT or Modbus for your external use.
To get the software working...
Note, the latest version generates virtual entries for the grid and pv metering too - this fixes the Victron gui so it works properly
dbus-spy is how we look at what's on the D-Bus - type dbus-spy and on pressing enter it will load up a list of known services. Use the cursor keys to navigate, up down the list and right to enter a node, left to come back out of it 'q' to exit
In the services list we have com.victron.