hjdhjd / homebridge-doorbird

Homebridge plugin for Doorbird
Apache License 2.0
54 stars 14 forks source link

Door lock support. #2

Closed hjdhjd closed 7 years ago

hjdhjd commented 7 years ago

As you continue to evolve the plugin, door lock support would be terrific to see added. The API reference seems pretty straightforward, it's a matter of making the door lock component "visible" to HomeKit / homebridge. Thoughts?

Relevant API:

http:///bha-api/open-door.cgi

Returns on success:

{ "BHA": { "RETURNCODE": "1" } }

brownad commented 7 years ago

Can be done

brownad commented 7 years ago

I think adding a switch component but would need to poll for status periodically to see if another device has changed its state. I don't have a lock but can look at it sometime soon

hjdhjd commented 7 years ago

I suspect you don’t actually need to have the lock to trigger / test it. You can trigger the “unlock” action from the Doorbird app or the web interface. I don’t think a “switch” type is right though…it would be a “LockMechanism” type. See the August homebridge or homebridge-httplock as examples…

Thoughts?

On Apr 9, 2017, at 4:25 PM, brownad notifications@github.com wrote:

I think adding a switch component but would need to poll for status periodically to see if another device has changed its state. I don't have a lock but can look at it sometime soon

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brownad/homebridge-doorbird/issues/2#issuecomment-292814161, or mute the thread https://github.com/notifications/unsubscribe-auth/ATOK-ZkERK95yH-wwHAqNwKO1up6siw_ks5ruUzKgaJpZM4M4Fac.

brownad commented 7 years ago

Yep I know the idea, not difficult I'll have a look and will probably publish this in npm properly

One problem I have is the sensors keep on dropping out you might notice this not a plugin problem but something on HAPjs

Sent from my iPhone

On 9 Apr 2017, at 22:29, hjdhjd notifications@github.com wrote:

I suspect you don’t actually need to have the lock to trigger / test it. You can trigger the “unlock” action from the Doorbird app or the web interface. I don’t think a “switch” type is right though…it would be a “LockMechanism” type. See the August homebridge or homebridge-httplock as examples…

Thoughts?

On Apr 9, 2017, at 4:25 PM, brownad notifications@github.com wrote:

I think adding a switch component but would need to poll for status periodically to see if another device has changed its state. I don't have a lock but can look at it sometime soon

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/brownad/homebridge-doorbird/issues/2#issuecomment-292814161, or mute the thread https://github.com/notifications/unsubscribe-auth/ATOK-ZkERK95yH-wwHAqNwKO1up6siw_ks5ruUzKgaJpZM4M4Fac.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

brownad commented 7 years ago

I have added the 'open door', night vision and motion sensor in this change. Have a look its a bit rough, the button event reset since they never detect state.

brownad commented 7 years ago

Leaving as door service for now, lockmechanism would be better but a change in the plugin is needed

brownad commented 7 years ago

thanks for the link mention on the wiki ;) @hjdhjd

Hope its all working for you. I'm thinking about some fundamental changes to make this a real video doorbell whereby:

IP Camera stream includes a Doorbell service Motion sensor is provided Door lock service provided Remove need for night vision... you get it for free in the doorbird at night time automatically, don't think there's much need for it

Now I need some serious time to work out the above :|