horemansp avatar image
horemansp asked

Connect to Cloud VRM MQTT with node-red

A little tutorial on how to connect and receive data from the cloud MQTT server into node-red.

This involves 2 steps:

  1. Subscribe to a topic to the right mqtt server. (you will need to calculate the address of your system - see below for details)
  2. Schedule a node to send a "keepalive" message every 50 second to keep receiving data

Subscribe to a topic

1. Use the "mqtt in" node and double click to configure.


2. Configure the topic you want to subscribe to. The example above will subscribe to the power out status. (other example topic: N/<yourVRMportalD>/system/0/Dc/Battery/Soc for battery status.)

Your VRM portal ID can be found on either:

  • The console under settings/VRM Online Portal
  • The web application under settings/general

3. Configure the output to be a string

4. Give the node a name

5.Configure the server: choose "Add new mqtt-broker" from the server drop down.


6. Click the pencil to edit.


7. Fill in your mqtt server address. You need to calculate this address from your Victron installation ID. Yours will probably be different from the screenshot below.

(more details on how you calculate the address can be found here: under the section "Cloud MQTT broker")


8. Click on the pencil next to "TLS configuration"

9. Upload the "venus-ca.crt" file which you can find on github:


Send a "keepalive" message to receive data

This is important to keep receiving data. Without this step your value's won't keep receiving!

1. Use an inject-node and schedule it to run every 50 second.

1670889396897.png2. Fill in the topic with "R/<yourVRMportalID>/keepalive" and leave the msg.payload blank.

3. Use a "mqtt out" node like this:


You should now start receiving messages:


1670887797037.png (11.1 KiB)
1670887835840.png (12.0 KiB)
1670888954565.png (112.4 KiB)
1670889396897.png (144.3 KiB)
1670890194726.png (92.1 KiB)
1670890438556.png (138.2 KiB)
1670890494122.png (92.2 KiB)
1670890817445.png (108.7 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
buddhafragt avatar image
buddhafragt answered ·

its not working. MQTT is alwas on "connecting"

2 |3000

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

akasha avatar image
akasha answered ·


I have the same issue.

At this moment iam trying to set it up myself.

I have a Cerbo running my MP2/5000va. running node red to adjust my heatsink/hotwater.

Now i have a Raspberry Pi 3, running Node red aswell. i want to use it as a datalogger and

added 2 pi hats for more switch ability.

i solved it i think.

1. Remove the "use TLS" check mark.

2. adjust your "keep alive INJECT NODE" to the value = Inject once after 10 seconds . ( free to adjust)

Let us know if it did the trick for you.

My greetings

2 |3000

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