No way to start in awake mode
I cannot get it to work. I run it in ubuntu 20.04 AMD64 in a python virtualenv
I get it running and can send commands to it:
# python3 ClassicMQTT/ClassicMQTT/code/Python/classic_mqtt.py --classic [IP] --classic_name classic-150-1 --mqtt [IP] --mqtt_root /midnite --mqtt_user midnite --mqtt_pass *******
2021-09-04 16:09:46,253:INFO:classic_mqtt:classic_mqtt starting up...
2021-09-04 16:09:46,256:INFO:classic_mqtt:classicHost = [IP]
2021-09-04 16:09:46,257:INFO:classic_mqtt:classicPort = 502
2021-09-04 16:09:46,257:INFO:classic_mqtt:classicName = classic-150-1
2021-09-04 16:09:46,257:INFO:classic_mqtt:mqttHost = [IP]
2021-09-04 16:09:46,257:INFO:classic_mqtt:mqttPort = 1883
2021-09-04 16:09:46,257:INFO:classic_mqtt:mqttRoot = midnite
2021-09-04 16:09:46,257:INFO:classic_mqtt:mqttUser = midnite
2021-09-04 16:09:46,257:INFO:classic_mqtt:mqttPassword = **********
2021-09-04 16:09:46,257:INFO:classic_mqtt:awakePublishRate = 5
2021-09-04 16:09:46,257:INFO:classic_mqtt:snoozePublishRate = 300
2021-09-04 16:09:46,257:INFO:classic_mqtt:awakePublishLimit = 60
2021-09-04 16:09:46,257:DEBUG:classic_mqtt:snoozeCycleLimit: 60
2021-09-04 16:09:46,257:INFO:classic_mqtt:Connecting with clientId=midnite_mqttclient_589
2021-09-04 16:09:46,258:INFO:classic_mqtt:Connecting to MQTT 10.39.199.28:1883
2021-09-04 16:09:46,264:DEBUG:classic_mqtt:MQTT connected OK Returned code=0
2021-09-04 16:09:46,265:DEBUG:classic_mqtt:Subscribed to /midnite/classic-150-1/cmnd/#
2021-09-04 16:09:46,266:DEBUG:classic_mqtt:Starting main loop...
2021-09-04 16:12:02,902:DEBUG:classic_mqtt:Received MQTT message {"WAKEPUBLISHRATE":3000, "STAYAWAKE":TRUE}
2021-09-04 16:12:02,902:DEBUG:classic_mqtt:{'wakePublishRate': 3000, 'stayAwake': True}
2021-09-04 16:12:02,902:DEBUG:classic_mqtt:StayAwake received, setting stayAwake to True
2021-09-04 16:12:02,903:DEBUG:classic_mqtt:wakePublishRate message received, setting rate to 3
2021-09-04 16:12:02,903:DEBUG:classic_mqtt:Updating snoozeCycleLimit to 100
But it doesn't seem to send stats to the mqtt, it stays as it forever. I also don't understand that snooze thing, it doens't seem documented.

Okay, found it, I needed to send {"wake"} to cmnd. I am not interested in the snooze feature. Is it possible to start it in wake state forever ?
You should be able to set the snooze_publish_rate to 5 seconds, the same value as the wake publish rate.
https://github.com/ClassicDIY/ClassicMQTT/wiki/3.-Raspberry-Pi-Classic-MQTT-Publisher
On Sat, Sep 4, 2021 at 1:46 AM Laurent Dinclaux @.***> wrote:
Okay, found it, I needed to send {"wake"} to cmnd. I am not interested in the snooze feature. Is it possible to start it in wake state forever ?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ClassicDIY/ClassicMQTT/issues/29#issuecomment-912913836, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIYATLB7OS6SBI6AT56N7LUAGXDDANCNFSM5DM5CK2Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Graham A. Ross (613) 769-1331
Nice, thank you. But because doing this closes and reopens the connection to the Classic, there is an additional delay. So when setting to 3 second, it really updates every 6 seconds.
2021-09-05 11:28:30,380:INFO:classic_mqtt:awakePublishRate = 3
2021-09-05 11:28:30,380:INFO:classic_mqtt:snoozePublishRate = 3
2021-09-05 11:28:30,380:INFO:classic_mqtt:awakePublishLimit = 60
2021-09-05 11:28:30,380:DEBUG:classic_mqtt:snoozeCycleLimit: 1
2021-09-05 11:28:30,380:INFO:classic_mqtt:Connecting with clientId=midnite_mqttclient_971
2021-09-05 11:28:30,381:INFO:classic_mqtt:Connecting to MQTT [ip]:1883
2021-09-05 11:28:30,382:DEBUG:classic_mqtt:MQTT connected OK Returned code=0
2021-09-05 11:28:30,382:DEBUG:classic_mqtt:Starting main loop...
2021-09-05 11:28:30,383:DEBUG:classic_mqtt:Subscribed to midnite/classic150/cmnd/#
2021-09-05 11:28:30,383:DEBUG:classic_mqtt:Received MQTT message {"WAKEPUBLISHRATE":3000, "STAYAWAKE":TRUE}
2021-09-05 11:28:30,384:DEBUG:classic_mqtt:{'wakePublishRate': 3000, 'stayAwake': True}
2021-09-05 11:28:30,384:DEBUG:classic_mqtt:StayAwake received, setting stayAwake to True
2021-09-05 11:28:30,384:DEBUG:classic_mqtt:wakePublishRate message received, setting rate to 3
2021-09-05 11:28:30,384:DEBUG:classic_mqtt:Updating snoozeCycleLimit to 1
2021-09-05 11:28:36,383:DEBUG:classic_mqtt:Opening the modbus Connection
2021-09-05 11:28:36,398:DEBUG:classic_mqtt:Closing the modbus Connection, we are in Snooze mode
2021-09-05 11:28:36,398:DEBUG:classic_mqtt:Got data from Classic at [ip]:502
2021-09-05 11:28:36,399:DEBUG:classic_mqtt:Publishing: midnite/classic150/stat/readings
2021-09-05 11:28:36,400:DEBUG:classic_mqtt:Publishing: midnite/classic150/stat/info
2021-09-05 11:28:42,385:DEBUG:classic_mqtt:Opening the modbus Connection
2021-09-05 11:28:42,398:DEBUG:classic_mqtt:Closing the modbus Connection, we are in Snooze mode
2021-09-05 11:28:42,398:DEBUG:classic_mqtt:Got data from Classic at [ip]:502
2021-09-05 11:28:42,398:DEBUG:classic_mqtt:Publishing: midnite/classic150/stat/readings
2021-09-05 11:28:42,399:DEBUG:classic_mqtt:Publishing: midnite/classic150/stat/info