Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional support Glass Break and Motion Detector #16

Open
kotahukka opened this issue Jul 3, 2019 · 2 comments
Open

Additional support Glass Break and Motion Detector #16

kotahukka opened this issue Jul 3, 2019 · 2 comments

Comments

@kotahukka
Copy link

Would it be possible to get support for the motion detector and glass break? Also any idea what is causing the other "Do not know how to handle device" errors?

Jul 3 14:52:57 Library homebridge[4920]: [2019-7-3 14:52:57] [Vivint] Do not know how to handle device! ID: 20003 Data.t: scheduler_service data.ec: undefined Data.n: undefined Jul 3 14:52:57 Library homebridge[4920]: [2019-7-3 14:52:57] [Vivint] Do not know how to handle device! ID: 5 Data.t: energy_service data.ec: undefined Data.n: undefined Jul 3 14:52:57 Library homebridge[4920]: [2019-7-3 14:52:57] [Vivint] Do not know how to handle device! ID: 12 Data.t: network_hosts_service data.ec: undefined Data.n: undefined Jul 3 14:52:57 Library homebridge[4920]: [2019-7-3 14:52:57] [Vivint] Do not know how to handle device! ID: 13 Data.t: panel_diagnostics_service data.ec: undefined Data.n: undefined Jul 3 14:52:57 Library homebridge[4920]: [2019-7-3 14:52:57] [Vivint] Do not know how to handle device! ID: 32 Data.t: wireless_sensor data.ec: 475 Data.n: Living Room Glass Break Jul 3 14:52:57 Library homebridge[4920]: [2019-7-3 14:52:57] [Vivint] Do not know how to handle device! ID: 33 Data.t: wireless_sensor data.ec: 609 Data.n: Living Room Motion Detector

@daymondm
Copy link
Contributor

Glass break detectors can be added, but I'd advise against it: the event stream is some times unreliable so receiving an immediate notification when a sensor is activated is not always possible. You'd receive the update when the snapshot is updated at the interval specified in the config file. At that point, using Vivint's app to manage the security of your home would be a better choice.

The Do not know how to handle device messages you are seeing are not errors, they are simply telling you that there are other devices that support could be added for. Its useful debugging information.

It looks like that motion sensor you are using with your vivint sensor is not one that is supplied from Vivint (or at least a different model than was supplied when the plugin was added). To add support for your motion sensor, you would simply need to modify the following line:

  extend(MotionSensor, {
    appliesTo: (data) => {
      return ((data.t == "wireless_sensor") && ((data.ec == 1249) || (data.ec == 1249))
    },

(side note - not sure why 1249 is mentioned twice on this line)
to:

  extend(MotionSensor, {
    appliesTo: (data) => {
      return ((data.t == "wireless_sensor") && ((data.ec == 1249) || (data.ec == 609))
    },

Its on line 347 of device_set.js if my copy is still the same as what is posted here

@balansse
Copy link

balansse commented Aug 4, 2020

@kotahukka check out my fork. I added the support for more devices, including Glass Break detectors and fire alarm sensors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants