I have my paradox alarm setup using the mqtt middleware mentioned in this thread:
This is all working well except for one thing - when Home Assistant restarts the alarm state shows as Unkown and I am therefore unable to control the alarm until the state is manually changed (Either in the developer tools or by arming and disarming the alarm)
The configuration is set with “retain” as “true” :
Check to see if the broker has retained the message in its database. The easiest way to use another client, and see what prints out at start up when you subscribe to all topics. I generally use mosquitto_sub
If you don’t see anything, then the broker hasn’t retained anything and you need to check your broker set up. For instance, the embedded broker doesn’t (or at least didn’t the last time I tried) support retained messages.
I am using a standalone mosquitto service.
It looks like it is retained in mosquitto as this is the output I get:
[homeassistant@hypnos ~]$ mosquitto_sub -h localhost -t “#” -v
Paradox/State State Machine 4, Listening for events…
Paradox/Zone/MAINBEDROOM OFF
Paradox/Zone/PASSAGEPIR ON
Paradox/Zone/DINING PIR OFF
Paradox/Zone/KITCHENDOOR OFF
Paradox/Zone/DONWSTAIRSPIR OFF
Paradox/Zone/GARAGEPIR OFF
Paradox/Zone/BACKBEAM OFF
Paradox/Zone/FRONTDOOR OFF
Paradox/Zone/BEDROOMBEAM OFF
Paradox/HA_AlarmState disarmed
Paradox/English_AlarmState Disarmed
Paradox/Partition OFF 1546183077
Paradox/C/P1 Disarm
I think you are 100% correct. I had just changed the qos to 1 in the middleware python script and now it seems to have retained the correct status after a reboot / restart:
OK so update - Confirmed this works through several restarts of the Home Assistant Service (Which it wasnt before)
It doesnt work through the restart of the mosquitto service itself. So when the server reboots for any reason the state is lost.
Trying to read if this is something that can be set in mosquitto. Anyone have any ideas?