Idea

beaugunderson avatar image
beaugunderson suggested

SwiftBar + Modbus = I always know my capacity and runtime

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:

1710807830168.png

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

Modbus TCPjavascript
1710807830168.png (119.1 KiB)
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

No Comments

Your Opinion Counts

Share your great idea, or help out by voting for other people's ideas.