Open Caros2017 opened 1 year ago
Grott is not designed at this moment to have a persistent mqtt session. It works at fire and forget basis (publish only).
This is easier to program and not really an issue if you send a message once per 5 minutes (original Growatt interval).
Now with grottserver we can achieve a much shorter interval it might be a consideration to implement a persistent mqtt connection. It needs some rethinking while a not working mqqtt connection does not affect the communication flow with growatt (the primary objective).
If we create more and more persistency and statefullness within Grott I need to add all kind of error handling as well. I am not sure if this improve Grott (makes it at least more complex) and going think about it.
Even with a 10 second interval I do not think that not having a persistent mqtt connection is a real issue.
Be aware retain is something different then persistency.
Grott is not designed at this moment to have a persistent mqtt session. It works at fire and forget basis (publish only).
This is easier to program and not really an issue if you send a message once per 5 minutes (original Growatt interval).
Now with grottserver we can achieve a much shorter interval it might be a consideration to implement a persistent mqtt connection. It needs some rethinking while a not working mqqtt connection does not affect the communication flow with growatt (the primary objective).
If we create more and more persistency and statefullness within Grott I need to add all kind of error handling as well. I am not sure if this improve Grott (makes it at least more complex) and going think about it.
Even with a 10 second interval I do not think that not having a persistent mqtt connection is a real issue.
Be aware retain is something different then persistency.
Thanks for the comprehensive explanation. My request is for persistency indeed and not for retain. My bad! I confused both terms.
Copied from the discussion section:
I am not sure what I am doing wrong. I am running the latest version (2.7.8). I have multiple(5+) connections to my
Mosquitto
MQTT broker and they all stay persistent. But I can't get Grott working to be persistent.In docker-compose I use this:
when I look at docker logs from Grott I see:
Pulled 'gmqttretain=True' from the environment
andand
- Grott MQTT message retain enabled
But when I look at my Mosquitto logs I still see automatic disconnections from Grott:Am I doing something wrong or is
mqtttretain
not working properly?