Hi everyone,
I’ve really tried understanding all this, I’ve been bashing my way through various forum posts for days trying to work this out for myself, but I really just need to ask for help now.
I have PAI (Paradox Alarm Interface) running on my Home Assistant, which publishes all of my alarm’s information to the MQTT database.
If I bypass a zone on my alarm, or bypass it by publishing to the MQTT database, the following state topic changes from False to True: paradox/states/zones/“zone name”/bypassed
I want to write a script to retrieve the current bypassed states from the MQTT database and input them into a list or entity of some description. The idea is that I can trigger the script either manually, or otherwise, and the list of bypassed zones is updated.
I can then display this list of bypassed zones in lovelace.
I’m a complete noob with MQTT, and I just can’t seem to understand the simple concept of “querying” the database without publishing or listening. i.e. I just want to check what the current value is of a topic, and record that.
The closest thing I have found to this is running mqtt.dump, specifically on “paradox/states/zones/+/bypassed”, which returns a list of the raw bypassed status of the zones (by reporting either True or False for each topic, in a text file).
See below:
I would be happy to continue with the mqtt.dump method, but then the next issue is how do I handle the mqtt_dump.txt file? I would want to remove/replace all of the “paradox/states/zones/” text, and somehow update a text entity just with the zones which have “True” as their state. So that I can simply display this entity on a lovelace card as a start.
I’m sure an experienced user reading the above can see that I have not grasped a number of MQTT concepts, but that’s really the issue. I don’t know what the best approach is to achieve what I’m trying to do, because I just can’t work out how to start properly.
Thank you!