question

kreeker avatar image
kreeker asked

How to visualize multiple Cerbos in Node-RED?

Hello Victron Community.

So i have been tasked with hooking up our Cerbo GX devices that are scattered around the country (they are connected to the internet obviously) to a single PC that visualises all their information (kinda like SCADA).
I wanted to use in-built Node-RED, but then i understood that this way i will be only able to get data from 1 Cerbo per 1 Node-RED server/screen - the one im currently logged on at https://venus.local:1881.

So my question is: how can i get data from multiple Cerbos to my Node-RED server and visualize them all there?

I couldn't find any 'connect to cerbo' or 'poll a cerbo' node built-in for that.


Visualization of that i need below:

nodedashboard.png


cerbo gxNode-REDremote console
nodedashboard.png (27.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.

2 Answers
nickdb avatar image
nickdb answered ·

There is a VRM API node, so you could just extract what you need from VRM and display it on one system dashboard.


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.

kreeker avatar image kreeker commented ·
Oh, it does not come with standard VE Node-RED library and it has to be installed additionally.

I'll look into it, but i think its already safe to say that this is propablyby going to solve my issue.
Thank you very much :)

0 Likes 0 ·
matt1309 avatar image
matt1309 answered ·

Hi @Kreeker


In addition to Nicks suggestion if you wanted to avoid using cloud infrastructure/keep data local you have a few options.


1. Use MQTT to get data from other Cerbo GX devices into your "main" one.

2. Use node red on the other cerbo GX devices to send the data using HTTP nodes to the "main" cerbo gx.

3. (Not sure if this will work but cool if it does). I know you can use TCP dbus to use victron nodes when running node red on machines that aren't a cerbo. My idea was maybe there's a way to use this to connect to multi GX devices at once. I dont know enough about node red or the victron nodes to know if you can have multiple instances of the victron nodes connected to different dbus, ie one local one via TCP.

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.

kreeker avatar image kreeker commented ·

Thank you for your answer!

It inspired me to try out 'Victron - ModbusTCP' node and it works even better for me, since it returns a simple value like tank lvl in % = 58, while VRM API returns a whole object, which is difficult for me to handle ( i just started using Node-RED and i dont know javascript so i dont know how to extract values which i need from the object ).

A little help for others looking for help in the future:
To make 'Victron - Modbus' node work properly, you need to:

1. Install node-red-contrib-modbus (ITS REQUIRED!)
2. Install node-red-contrib-victron-modbus

3. Run cmd console

4. Copy and paste below and press enter ( you might need to change "/" slashes to "\" in path to attributes.csv )

curl -o ~/.node-red/attributes.csv https://raw.githubusercontent.com/victronenergy/dbus_modbustcp/master/attributes.csv

5. Restart Node-RED

6. Configure your Modbus node by adding your Cerbo's IP in "Host" field.
7. Check Unit ID (its on your Cerbo Remote Console -> Device List -> Settings -> Services -> ModbusTCP (Enable it, and press on it to get inside it) -> Available services.

Specific functions require specific Unit ID. For example, reading Tank Value Requires Modbus node to have Unit Id = 20. Stuff related to Digital input will require Unit Id = 1 etc.

8. Select an attribute that you need, like com.victronenergy.tank:/Level

9. Test it by inserting 'Inject' node as an input, ad 'Debug' node as an output for your 'Victron - Modbus' node. Dont forget to press deploy! Pressing Inject should print your current tank value in the debug tab.

Please note, that if your 'Server' or 'Atrributes' fields do not have scroll-down buttons ( marked with red rectangles on the screenshot below ), your configurations steps 1-5 were not successful.

nodeexample.png



1 Like 1 ·
nodeexample.png (11.4 KiB)