Victron Cerbo GX - Keep alive with openHAB3


I am new with openHAB, started with 3. I trying to get mqtt data from my Cerbo GX. I think the “Keep alive” issue is the problem.
Like hier:

The “Cerbo mqtt broker Thing” is online.

I have connection with the Cerbo, also the “Broker status” in mqtt.fx shows that it works. But no answer when I try to subscribe…

I have tried to do this with OH3, but don´t have enougt experience with openHAB and mqtt to implement it to OH3.

How can I create a keep-alive rule with OH3?

Thanks in advance.

Welcome MadUBI,

I haven’t switched to OH3 yet. I will definitely do a write-up when I do.

How about just using plain old linux crontab and set it to fire once a minute?

* * * * * mosquitto_pub -h ccgx -t "R/a0f6fd5aa8c8/system/0/Serial" -m ""

Best of luck,

Full write up below.

Here’s how to keep alive with OH3.

Settings -> Rules -> Add a new rule with a 30 second cronjob.

Execute a script should be a “Run a Script” type using Rules DSL. This is the script.

actions.get("mqtt", "mqtt:broker:1e24481776").publishMQTT("R/a0f6fd5aa8b8/system/0/Serial", "");
logInfo("Solar", "CCGX MQTT Keep Alive Timer fired!!")

Change your broker ID in the first line accordingly. Watch your log and you’ll see it fire every 30 seconds.


Hello Zooka,

thank you for the infos.

I have found an old Victron video for a Grafana solution with a lot of background infos:

The Grafana is already running. Very nice.

I will start to play with these things.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.