sibartlett / homebridge-wink3

Homebridge plugin for wink.com
https://sibartlett.github.io/homebridge-wink3
ISC License
54 stars 20 forks source link

Door_Bell.js #36

Open thechrisreese opened 7 years ago

thechrisreese commented 7 years ago

door_bell.js.zip

Just trying to see if this works. I cribbed the top part of camera.js for the motion sensor and the battery at the bottom to make a door_bell.js so that the Ring Doorbell motion sensor works.

sibartlett commented 7 years ago

I've created a pull request: #37

sibartlett commented 7 years ago

@thechrisreese can you try this new version: 1.6.0beta1?

It includes support for door bells - not just as a motion sensor, but as a door bell too!

thechrisreese commented 7 years ago

What what? Ok how do I install it because I haven’t done a beta.

sibartlett commented 7 years ago
npm install -g homebridge-wink3@1.6.0beta1
thechrisreese commented 7 years ago

Ok tomorrow I’ll test it.

thechrisreese commented 7 years ago

@sibartlett I’m not seeing a change from it just being a motion sensor. Will keep trying it.

sibartlett commented 7 years ago

Hmm, I added the Doorbell service - I figured it'd allow for automations and notifications when someone presses the button.

thechrisreese commented 7 years ago

I will try again. I had to remove Ring from Wink because it kept failing. I will look into it again.

What did you add to Door_Bell beyond Motion Control? Did you add the button press?

sibartlett commented 7 years ago

Theses are the changes I made: https://github.com/sibartlett/homebridge-wink3/blob/79033345984631f0c45268c9b66f9e07e27c6019/src/devices/door_bell.js

thechrisreese commented 7 years ago

Yeah ok. That should add the Motion and Button Press. Ok I will try out again tonight. I feel like that should work. Of course I am running things on Docker which may make things odder.

sibartlett commented 7 years ago

I use docker too :)

thechrisreese commented 7 years ago

Ok! Well my Docker decided to mess everything up when trying to apt-get install libpcap-dev so I am still unwrapping that mess on my NAS.

sibartlett commented 7 years ago

I dunno if it helps, but I found this docker image works well for homebridge: https://hub.docker.com/r/oznu/homebridge/

thechrisreese commented 7 years ago

@sibartlett that one is nice because I can figure out where the Plugins install to. However its running an old version of Node which wont let me install a bunch of my favorite plugins.

davidvanvo commented 6 years ago

I just tried this and nothing happens when the door bell is pressed. Can confirm that the Wink app shows this event. Motion works.

thechrisreese commented 6 years ago

@davidvanvo my doorbell stopped working entirely on wink3. Is your motion still working? I want to fix this now that I have a week off.

thechrisreese commented 6 years ago

[2017-12-23 10:37:48] [Wink] Not supported by HomeKit: Home Sprinkler (sprinkler/6577)
[2017-12-23 10:37:48] [Wink] Not supported by HomeKit: Unknown Device (unknown_device/24988)
[2017-12-23 10:37:48] [Wink] Not supported by HomeKit: Front Door (door_bell/39923)

Ok it is flagging it as not supported by Homekit again....so I have to tweak the Door_bells.js and other files to make it see it. Likely they changed how door_bells are registered via hapnode.js

sibartlett commented 6 years ago

Not sure if it’s an issue with hap, more likely an issue with wink3.

Have you got the JSON for the doorbell, that comes from wink?

thechrisreese commented 6 years ago

@sibartlett I will have to pull it again.

I am trying to reconstruct my logic around this from August -

Where does it pull this information?

.forEach(device => { const definition = this.definitions[device.object_type];

    if (!definition) {
      ignoreDevices.push([device, "Not supported by HomeKit"]);
      return;
    }

Particularly where are the definitions coming from? Is it from doorbells.js?

davidvanvo commented 6 years ago

@thechrisreese mine is still working fine. i’m not running the latest wink3 homekit so not sure if there has been any updates to door_bell.js.