question

ksaltman avatar image
ksaltman asked

Add RV-C tank sensor to CCGX via Node-red

Hi,

I have an RPi connected to my RV-C network and to my CerboGX, (using D-bus TCP interface) and it is working great! Thanks heaps to Victron for the contrib to Node-Red. Your support is amazing!

On the RV-C side I get the tank sensor updates and can display the levels on my Node-Red Dashboard and monitor to send out SMS alerts if certain tank levels are reached. Also works great!

I would like to be able to add the tank sensor output to the CerboGX dashboard but since the tank sensors are on the RV-C side, the CerboGX and therefor the NR tank node doesn't see them.

How can I add the tanks via Node-Red or otherwise so they appear on the CerboGX screen?

Note I am comfortable with NR, MQTT and most things Raspberry Pi OS but lack an understanding of the VE d-bus, reading or updating. As a side note I sure would like a pointer to how to interact with the d-bus which maybe relevant to this project or perhaps would be for another day.

Thanks in advance for any thoughts on how to do this.

Node-RED
2 |3000

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

2 Answers
gone-sailing avatar image
gone-sailing answered ·

Since you are into NodeRed, you might want to look into Victron's GX dbus-mqtt interface. This interface sits on top of the dbus api and makes it easy to read and write values into the GX dbus. which in turns publishes to VRM. If you want to add your own sensor devices and publish values you can use the dbus-mqtt-devices driver that I have written and shared with the community. Even if you don't use the dbus api directly, it is worth familiarising yourself with what it does.

dbus-mqtt https://github.com/victronenergy/dbus-mqtt

dbus-mqtt-devices https://github.com/freakent/dbus-mqtt-devices

dbus-api: https://github.com/victronenergy/venus/wiki/dbus-api


2 comments
2 |3000

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

ksaltman avatar image ksaltman commented ·
Hi Gone-sailing,


Thanks for the reply and pointers. I did see the dbus-MQTT driver you published. Thanks for that too. I started looking at it and at first glance wasn’t sure how I would implement it in my setup.

Would I need to install and run it on my CerboGX or on the RPi3b that I use to interface with the RV-C network which is where I get the currently tank levels into NR.

I think I need to do a little reading of the references you provided before I can decide how best to implement it but on the surface it does look like what I need.

If you happen to have a NR sample flow using what you’ve done I’m sure that would also be extremely helpful.

As always TIA.

0 Likes 0 ·
ksaltman avatar image ksaltman commented ·
Hi Gone-Sailing,


Somehow my comment to your post yesterday didn’t post….

Thanks for your reply with the links. I have some reading to do.

In the mean time can you tell me where I would run dbus-mqtt-devices service. Would it be on the CerboGX or the RPi connected to the RV-C network. I can’t work that out.

Thanks

0 Likes 0 ·
bathnm avatar image
bathnm answered ·

@ksaltman VenusOS since the V2.90 release has some support for RV-C. See the blog post on V2.90 here.

Simplest solution is to get a CAN HAT for the RPI, connect the CAN interface to the RV-C Network and then set the protocol on the VenusOS to RV-C.

The blog says it does support tank sensors and very popular ones at the ‘Garnett SeeLevels’. As RV-C is based on standard messages any RV-C Tank sensor should be detectable and data displayed on the VenusOS.

1 comment
2 |3000

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

ksaltman avatar image ksaltman commented ·
Hi Bathnm,


Thanks for the reply but I’m a little confused.

I have a RPI3b with a CAN Hat which is connected to an RV-C port on my Firefly Control System. I also have a CerboGX which is where I want the tank levels to be displayed.

On the RPi3b device I run Node-red which does lots of things for me. It is loosely built around the Open Source Coachnet software originally released by Tiffin and gives me full access to all devices on the Firefly Control System through the RV-C (i.e. CAN bus) including Lights, Shades, HVAC, Water pump etc etc.

On the NR Dashboard I’m able to display both the Firefly data and the status of the Victron gear I have. I can also bridge Zigbee devices into the NR system using Zigbee2Mqtt. It can also respond to voice commands from Alexa and provide voice response using the same. Add GPS and SQLite and the options are endless.

That all said how do you propose I use the RPi in this setup to get tank levels from the RV-C network onto the CerboGX Touch70 screen?

Thanks in advance as always.

0 Likes 0 ·