Add to root MQTT topic panel SN #435
Replies: 4 comments
-
MQTT_BASE_TOPIC can be overridden in configuration. |
Beta Was this translation helpful? Give feedback.
-
yes, but i was thinking in the context of have multiple alarm panels in cloud hosted broker, to make a swan open alternative |
Beta Was this translation helpful? Give feedback.
-
but everybody wants to have different MQTT_BASE_TOPIC. You want serial number, somebody wants street name and so on. |
Beta Was this translation helpful? Give feedback.
-
Yes, it's just an idea. A better way to do this may be to add a flag in the configuration file. That flag enables an intermediate MQTT topic between the root and others with the serial number value. |
Beta Was this translation helpful? Give feedback.
-
Hi,
The idea is to add at MQTT root topic, panel serial number, to handle multiple panels at the same time without create a full custom config for each
I do it in a dirty way editing file paradox/connections/ip/commands.py
and add at file header:
from paradox.config import config as cfg, get_limits_for_type
then add at line 130 (before logger.info):
cfg.MQTT_BASE_TOPIC = "PDX" + binascii.hexlify(response.ip_module_serial).decode("utf-8").upper()
I'm sure it wasn't the best way to do it, but I only know a little of Python.
Thanks
Regards
Beta Was this translation helpful? Give feedback.
All reactions