roopesh / ad-qolsys

AppDaemon app for Qolsys IQ Panel 2
MIT License
22 stars 10 forks source link

Add unique ID field to identify the panel and its sensors #25

Open jsb5151 opened 3 years ago

jsb5151 commented 3 years ago

Since it seems we can't pull uniquely identifiable information from the INFO packet, perhaps one way of fixing this would be to pass the panel IP address, or any other customizeable field in apps.yaml, to uniquely identify the discovered entities and bring them under one device.

This would make entities much easier to manage; all reported sensors would have the device: payload with all the parent panel's information. Paradox Alarm Interface (PAI) and many other MQTT integrations are using this.

Example of a discovered binary_sensor under PAI (pay attention to the "device" section):

{"name": "Z1", "unique_id": "abcd1234_zone_Z1_open", "state_topic": "paradox/states/zones/Z1/open", "device_class": "motion", "availability_topic": "paradox/interface/availability", "payload_on": "True", "payload_off": "False", "device": {"manufacturer": "Paradox", "model": "SP5500", "identifiers": ["Paradox", "SP5500", "abcd1234"], "name": "SP5500", "sw_version": "7.14 build 2" } }