homebridge-vivint
homebridge-vivint copied to clipboard
Support for new devices
Plugin works well for advertised devices however I have a few new ones that don't seem to be supported. Are you able to integrate them?
[Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 20 Data.t: wireless_sensor data.ec: 863 Data.n: Front Door [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 21 Data.t: wireless_sensor data.ec: 863 Data.n: Back Door [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 22 Data.t: wireless_sensor data.ec: 863 Data.n: Garage Door [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 23 Data.t: wireless_sensor data.ec: 1061 Data.n: Overhead Garage Door [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 24 Data.t: wireless_sensor data.ec: 864 Data.n: Master Bedroom Glass Break [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 25 Data.t: wireless_sensor data.ec: 864 Data.n: Living Room Glass Break [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 26 Data.t: wireless_sensor data.ec: 864 Data.n: Study Glass Break [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 27 Data.t: keyfob_device data.ec: 866 Data.n: Keyfob One [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 28 Data.t: keypad_device data.ec: 867 Data.n: Upstairs Keypad [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 56 Data.t: energy_service data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 58 Data.t: network_hosts_service data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 59 Data.t: panel_diagnostics_service data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 68 Data.t: iot_service data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 70 Data.t: scheduler_service data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 115 Data.t: hvac_control data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 116 Data.t: temperature data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 117 Data.t: humidity data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 118 Data.t: battery data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 119 Data.t: antitheft data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 120 Data.t: generic_config data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 121 Data.t: clock data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 122 Data.t: firmware_update data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 123 Data.t: generic_indicator data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 124 Data.t: zwave data.ec: undefined Data.n: undefined [Homebridge] [1/15/2020, 3:59:47 PM] [Vivint] Do not know how to handle device! ID: 125 Data.t: element data.ec: undefined Data.n: undefined
Also, for my doorlock, I see the accessory appear but clicking on it doesn't do anything (does not lock / unlock). No errors in the logs.
Hi @JTDeel , I believe you can add support for the wireless sensors. There are several devices in your list that I have not seen and do not have access to so therefore cannot give advice on how to implement them in your system.
Here's my advice:
id | data.ec | data.t | data.n | presumption |
---|---|---|---|---|
20 | 863 | wireless_sensor | back door | this is a sensor that tells when the back door is open |
22 | 863 | wireless_sensor | garage door | this is a sensor that tells when the garage door is open |
23 | 1061 | wireless_sensor | overhead garage door | this sensor tells when the overhead is open or closed |
24 | 864 | wireless_sensor | glass break | glass break sensor - not really worth including into HomeKit |
25 | 864 | wireless_sensor | study glass break | glass break sensor - not really worth including into HomeKit |
27 | 866 | keyfob_device | keyfob one | not needed in homekit since panel announces arm and disarm states |
28 | 867 | keypad_device | upstairs keypad | not needed in homekit since panel announces arm and disarm states |
56 | energy_service | not applicable to homekit | ||
58 | network_hosts_service | not applicable to homekit | ||
59 | panel_diagnostics_service | not applicable to homekit | ||
68 | iot_service | not sure what this is | ||
70 | scheduler_service | not applicable to homekit | ||
115 | hvac_control | not sure what this is or how to interface | ||
116 | temperature | not sure how to interface this | ||
117 | humidity | not sure how to interface this | ||
118 | battery | not sure what this is | ||
119 | antitheft | not sure what this is | ||
120 | generic_config | not sure what this is | ||
121 | clock | not sure what this is | ||
122 | firmware_update | not sure what this is | ||
123 | generic_indicator | not sure what this is | ||
124 | zwave | not sure what this is | ||
125 | element | not sure what this is |
find these lines in device_set.js:
extend(ContactSensor, {
appliesTo: (data) => {
return (
(data.t == "wireless_sensor") && ((data.ec == 1252) || (data.ec == 1251) || (data.ec == 655)) //|| (data.ec == 1248) || (data.ec == 2831) || (data.ec == 1269))
)
},
inferCategory: (data) => {
let name = data.n
if (name.match(/\bwindow\b/i))
return Accessory.Categories.WINDOW
else if (name.match(/\bdoor(way)?\b/i))
return Accessory.Categories.DOOR
else
return Accessory.Categories.OTHER
},
addServices: (accessory) => {
accessory.addService(new Service.ContactSensor(accessory.context.name))
accessory.addService(new Service.BatteryService(accessory.context.name))
}
})
and change the long line that says data.ec == to this:
return (
(data.t == "wireless_sensor") && ((data.ec == 1252) || (data.ec == 1251) || (data.ec == 655) || (data.ec == 863) || (data.ec == 1061))
)
I would also advise not including the glass break sensor (data.ec == 864) because the event stream is, at times, unreliable. I would let the Vivint system handle any triggers that are associated with the glass break sensor. I have not tested whether or not the glass break sensors will operate properly in HomeKit for this reason. Unless you just want the sensors to show up in HomeKit... your call I suppose.
I do not know whether or not if the overhead garage door sensor will work without being able to debug it myself.
I don't think it is necessary for the key fob or upstairs keypad to show in HomeKit since it will pick up arm and disarm states automatically.
The rest of the services (ID 56-125) don't have any useful control or information to add to HomeKit. Possibly the humidity, temperature, and hvac_control services, but again without having the devices in my own setup to be able to experiment with, I cannot give you any advice.
Hope this helps!
@JTDeel check out my fork, in one of the recent updates I added support for additional devices like glass break detectors and fire alert sensors.