This PR adds support for the Security System accessory on homebridge.
Please note lines 187 to 197 on index.js
I've had to add this try - catch block since some Tuya alarms are not properly configured and may not have functions properly assigned, resulting in a useless accessory being added to homebridge.
To prevent home app cluttering, I've added this try - catch in addition to the checkAccessoryFunctions function in lib/security_system_accessory.js lines 183 to 188.
The rest is a pretty simple and basic implementation following homebridge documentation and tuya documentation.
It doesn't manage all the states of a multifunctional alarm because it doesn't need to since the SecuritySystem accessory API is pretty simple.
I've tested this for quite a long time with some home security devices I have personally and also with some virtual devices I created at tuya iot platform and it works great.
Please provide feedback, ask any question and consider merging this PR to add official support.
This PR adds support for the Security System accessory on homebridge.
Please note lines 187 to 197 on
index.js
I've had to add thistry - catch
block since some Tuya alarms are not properly configured and may not have functions properly assigned, resulting in a useless accessory being added to homebridge.To prevent home app cluttering, I've added this
try - catch
in addition to thecheckAccessoryFunctions
function inlib/security_system_accessory.js
lines 183 to 188.The rest is a pretty simple and basic implementation following homebridge documentation and tuya documentation. It doesn't manage all the states of a multifunctional alarm because it doesn't need to since the SecuritySystem accessory API is pretty simple.
I've tested this for quite a long time with some home security devices I have personally and also with some virtual devices I created at tuya iot platform and it works great.
Please provide feedback, ask any question and consider merging this PR to add official support.