kukulich / home-assistant-jablotron100

Home Assistant custom component for JABLOTRON 100+ alarm system
MIT License
65 stars 24 forks source link

Feature request: add info about blocked sensor #89

Open softko opened 5 months ago

softko commented 5 months ago

You can block your device in J-link or mobile app, so even when section, in which that device is, is armed it will not trigger an alarm (For example when I have motion sensor in room and I blocked it, that room will not trigger an alarm even when armed). It will be really good to have that information - yes section is armed (consisting of multiple devices), but one of them will not trigger an alarm anyway, because it is blocked. It can be as device attribute, or new entity (same way as problem entities). In mobile app it is under Peripherals, in J-link under Diagnistics (see pics) mobile j-link

Thanks and already great work with the integration.

kukulich commented 5 months ago

@softko if you can find out packets how to get the information, it would be easy to add the sensor then :)

softko commented 5 months ago

@kukulich I didn't find any suitable packet when I changed it via mobile app, only usual communication (I hope I didn't missed it). So I wanted to check device_info packet, which should be requested every hour, but then i found, that it is not requested for the motion devices. Just want to check if I'm right (python is not my "daily bread"). Here is the condition https://github.com/kukulich/home-assistant-jablotron100/blob/master/custom_components/jablotron100/jablotron.py#L932 Just wondering what is the reason, that only these types of devices are requested. Anyway I will tested it tomorrow.

softko commented 5 months ago

@kukulich Ok, I tried, but maybe it's over my head. Checked device_info_packets, device_status_packets they are same when device is blocked/activated (I modified the code, so the motion devices were also requested). When device is blocked, the state packets are not received (perhaps unit is not sending it). What I found is only only one special packet, which is received, when the device is changed, but the packet is always same (expect the ending, which is only increasing). It looks line "5305000800007f" and after few seconds "53050008000080". Always these 2 packets, when a change active/blocked on the device. But it does't matter which device I change, packets are always same, so maybe it is only some information that something was changed in settings or something like that. So I don't know where to look now, if you have some thoughts or something. Other way we can closed it.

kukulich commented 5 months ago

I tried to find the packet before and was not successful. I think the device state (blocked) is saved directly to central unit settings and API etc read the settings.

softko commented 5 months ago

Thank you for your effort. At the end I don't need it immediately when it is changed (like arm/disarm) so I can request that info periodically from API.