-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTT sending commands stops working after mosquitto restart #55
Comments
@svde help me understand: are you talking of MQTT Daemon mode which stops working sometimes, while MQTT output plugin is still publishing values. |
As a workaround I had a cronjob which restarts the hpsu service at 03:00. I disabled this cronjob yesterday. This morning I monitored the rotex/# topic: $ mosquitto_sub -v -t "rotex/#" I'd now expect to see the value immediately repeated in "rotex/t_room1_setpoint", but that doesn't happen. rotex/t_hs 25.30 Same here. rotex/heat_slope 0.5 and here. rotex/t_hs 25.30 After restarting the hpsu service and sending a command, it's echoed back immediately, as I expect. rotex/command/t_dhw_setpoint1 48.00 2022-03-02 08:00:33,645 - DEBUG - mqtt output plugin data published, mid: 10 It's easy to reproduce. Turn off the mosquitto service, wait 30 seconds, then turn it back on again. pyhpsu may fail to read the values once. But for the next one it sets up a new instance and is able to read again. This doesn't happen for the process which is subscribed to command topic. |
Cool, thank you. I confirm the same behaviour happens on my setup, where mosquitto is 2.0.something and is running on a container. I will investigate on this and report here. Obviously if anyone has suggestions on how to improve the code, they are welcome. |
Silly workaround right now: exit the program when we detect an issue with MQTT server (then the service will keep try respawing until the mqtt server is back)
|
Perhaps this is a way to do it: michaelarnauts/aiocomfoconnect@383cb94 |
After my server running mosquitto reboots for software updates the raspberry running pyHPSU isn't able to send commands (for instance rotex/command/heat_slope) anymore. Reading values keeps working. After restarting the hpsu service sending commands works again. Nothing is mentioned in the logfile (LOG_LEVEL_STRING = WARNING).
Originally posted by @svde in #50 (comment)
The text was updated successfully, but these errors were encountered: