question

elvistherv avatar image
elvistherv asked

MQTT broker keep-alive on CCGX

Is there any way to run the MQTT keep alive on the CCGX itself, I can't find mosquitto_do on the CCGX to do?:

while :; do mosquitto_pub  -m '' -t 'R/e0ff50a097c0/system/0/Serial'; sleep 5; done



CCGX Color ControlMQTT
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.

irwinr avatar image irwinr commented ·

Would you mind sharing how you got the Hubitat to talk to the Color Control? I'm trying to figure out the same set up right now for my RV.

0 Likes 0 ·
woogieboogie avatar image woogieboogie irwinr commented ·

Hi, did you figure out a way to keep the broker alive? (I have the same issue and need to keep the broker alive).

(Separately, I note that the remote VRM console manages to get continual updates, and so is somehow keeping the broker alive...)

Thanks for any help,

Cliff

0 Likes 0 ·
2 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi Elvis,


rather than a bash script you could make a small Python script to do that?


or use mosquitto-pub ? (my experience with mqtt is limited).


and you could check the available opkg-es to see if mosquitto is available to be installed (I’m not near a gx device myself now, so havent checked).

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.

irwinr avatar image irwinr commented ·

It doesn't appear to be in the opkg repos.

It would be nice if we could simply disable the timeout/keepalive on the CCGX itself. It would also be nice if we could control how often it sends updates. Every 2 seconds seems a bit much.

0 Likes 0 ·
ben avatar image
ben answered ·

If you can install mosquitto_pub you can run it, sure. However, you're only running this if you have an external consumer, and I found it easier to set up the polling (also via mosquitto_pub) on the other machine instead.

Making changes to Venus OS that survive updates is something I didn't want to use precious mental space learning.

3 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.

elvistherv avatar image elvistherv commented ·

I've got an external consumer but it's limited, it seems, in being able to send the keep-alive (it's a Hubitat Home Automation hub) hence wanting to eliminate the 3rd piece of kit (that also needs to be powered of course and is an additional point of failure) just to send a keep-alive.

I was also hoping that mosquitto_pub may have been installed somewhere on the CCGX (or another mechanism to send the keep-alive/eliminate it as needed) to avoid having to work out how to let it survive an update as well! ;-)

0 Likes 0 ·
ben avatar image ben ♦ elvistherv commented ·

Yeah, but if your HA hub or whatever "fails," then there is no sink for the MQTT anyway, so... isn't it the same result? System down?

I agree it would be nice to just have a switch in the UI that kicks off a process that keeps it alive permanently, though.

0 Likes 0 ·
elvistherv avatar image elvistherv ben ♦ commented ·

In theory, an embedded system like the Hub will be more stable than a Pi.

And in practice, adding a Pi is not going to make the Hubitat Hub more stable.

0 Likes 0 ·