iobroker-community-adapters / ioBroker.doorbird

Doorbird Adapter for ioBroker
MIT License
17 stars 13 forks source link

Suggestion to use Doorbird client library #100

Open ihrigb opened 10 months ago

ihrigb commented 10 months ago

I'd like to suggest to move this implementation to my client library for the Doorbird API: https://github.com/ihrigb/node-doorbird. I will try to find some time to work on a proposal during the holidays.

Schmakus commented 10 months ago

Good idea!

Schmakus commented 9 months ago

Hi, is it possible to get the favourites? I se only set favourite and update favourite, but how can I update one if I don't know the id of them? Second question: for doorbell and motion, no favourites are needed anymore, correct?

ihrigb commented 9 months ago

The library has a listFavorites method (https://github.com/ihrigb/node-doorbird/blob/main/src/index.ts#L534). Seems like I forgot to document this in the README. For your second question: The library comes with a UDP socket that listens on either of Doorbird's UDP ports and can handle incoming broadcasts (for ring and motion events). The problem sometimes is that this library is often used in Docker environments with a bridge network. In these circumstances, UDP broadcast messages are not forwarded to the container and hence the message will not reach the socket. For that, either another network configuration (host or macvlan) are necessary, or the registration of a favorite is handy.