[SOLVED] New rule mqtt keep alive Victron CCGX

Hi All

trying to add my Victron CCGX it will only transmit MQTT if it knows someone is listening

so added this rule

// conf/rules/ccgx.rules

rule “CCGX MQTT Keep Alive Timer”
Time cron “0/30 * * * * ?”
publish(“”, “R/9884e39841a9/system/0/Serial”, “”)

getting the following in the logs

18:33:00.028 [ERROR] [untime.internal.engine.ExecuteRuleJob] - Error during the execution of rule ‘CCGX MQTT Keep Alive Timer’: The name ‘publish’ cannot be resolved to an item or type; line 6, column 2, length 61

is publish not valid for 2.4 ?


Depends on which version of the binding you have installed…

thanks thats sorted it

It never ceases to amaze me at the number of ways that commercial firms misuse and abuse the MQTT protocol. One of the guiding principals of MQTT is to not impose upon the subscribers. CCGX shouldn’t require you to publish a heartbeat, they shouldn’t care if anyone is listening and just publish the messages.