Wrote a little script using node.js to display my usage, runtime, and capacity in my menu bar. I live on an RV and while boondocking it is very useful to understand how much power I'm using throughout the workday.
The result looks like this:
I'm on macOS and display the resulting data using SwiftBar, which takes the output of shell scripts and puts it into your menu bar.
It's probably not immediately usable without modification but figured I would share because it will probably help others who want to use JavaScript + ModBus with their own Victron gear.
As a bonus there are two additional scripts for turning on and turning off the inverter. I had to create these to turn on/off my inverter when my Cerbo GX screen was fritzing out (as they often seem to do, at least as judging by all the forum posts about it).
The code is available here:
https://github.com/beaugunderson/victron-modbus