LWT if not using local MQTT
liaan opened this issue · 6 comments
Hi,
Is it possible to add LWT when not using the default local MQTT server so one can monitor if the CCGX has disconnected and create a alarm on central MQTT server? (I'm happy to write the code and do PR)
Liaan
Hi, yes.. though I'm not sure if its needed to put in our code (since we won't be using it) or rather just make a patch in a branch, and make your GX device apply the patch on boot?
I'm trying to get my GX to be as little customized as possible... My system is so complex at moment its nightmare if anything fails to try and restore. But let me look into the patching, its only a 2 line of code to setup the LWT so might be simple enough.
Ok. Anyway welcome to send your change as a PR; then at least we’ve seen it.
Have you seen our node-red efforts? Might help to make an easier to maintain solution
I had quick look at the nod-red things. Not gone into to much detail though. I've been running nod-red using my MK2 gateway code (https://github.com/liaan/victron_thethingbox) for 5 years now, but every year or so the berry crashes and need redo .. which i'm getting to old for now :)
I'll do the code edit for the MQTT and do PR .
Closing this for now as there are other changes that is needed to make the current scirpt compatible with generic systems (not use json for values etc) , so the patch method will be simpler in long run.
Patching was way to complex to make all work and maintainable in long run so just made a "Read Only" version that is just a extension on build in dbus-mqtt : https://github.com/liaan/victron-dbus-mqtt-ro. Very simple and hopefully maintainable in long run.