Doorbird video doorbell binding

Hmm. I’ve not seen these errors before…

The current version of the binding uses com.google.gson.annotations, but I thought that would come along with the gson library when it gets loaded.

The actions (restart, sipHangup, etc.) use org.openhab.core.automation.annotation, but I would expected that to be there already. Perhaps try installing a binding that has actions, such as mail (v1 or v2), telegram, etc.

I don’t think this is an issue.

If you kept an older version of the binding, you may need to revert to that until you’re ready to move to 2.5.

Hi Mark

Installed telegram and it looks like its happy with gson

one more to go. I have the latest binding running on my other 2.4.0 machine

openhab> bundle:restart 253
Error executing command: Error restarting bundles:
        Unable to start bundle 253: Could not resolve module: org.openhab.binding.doorbird [253]
  Unresolved requirement: Import-Package: org.openhab.core.automation.annotation; resolution:="optional"
  Bundle was not resolved because of a uses contraint violation.
  org.osgi.service.resolver.ResolutionException: Uses constraint violation. Unable to resolve resource org.openhab.binding.doorbird [osgi.identity; osgi.identity="org.openhab.binding.doorbird"; type="osgi.bundle"; version:Version="2.5.0.201911042200"] because it is exposed to package 'com.sun.jna' from resources com.sun.jna [osgi.identity; osgi.identity="com.sun.jna"; type="osgi.bundle"; version:Version="5.4.0"] and doorbird-deps [osgi.identity; type="osgi.bundle"; version:Version="1.0.0"; osgi.identity="doorbird-deps"] via two dependency chains.

Chain 1:
  org.openhab.binding.doorbird [osgi.identity; osgi.identity="org.openhab.binding.doorbird"; type="osgi.bundle"; version:Version="2.5.0.201911042200"]
    import: (&(osgi.wiring.package=com.sun.jna)(&(version>=5.4.0)(!(version>=6.0.0))))
     |
    export: osgi.wiring.package: com.sun.jna
  com.sun.jna [osgi.identity; osgi.identity="com.sun.jna"; type="osgi.bundle"; version:Version="5.4.0"]

Chain 2:
  org.openhab.binding.doorbird [osgi.identity; osgi.identity="org.openhab.binding.doorbird"; type="osgi.bundle"; version:Version="2.5.0.201911042200"]
    import: (&(osgi.wiring.package=com.goterl.lazycode.lazysodium)(&(version>=4.0.0)(!(version>=5.0.0))))
     |
    export: osgi.wiring.package=com.goterl.lazycode.lazysodium; uses:=com.sun.jna
  com.goterl.lazycode.lazysodium-java [osgi.identity; osgi.identity="com.goterl.lazycode.lazysodium-java"; type="osgi.bundle"; version:Version="4.0.1"]
    import: (osgi.wiring.package=com.sun.jna)
     |
    export: osgi.wiring.package: com.sun.jna
  doorbird-deps [osgi.identity; type="osgi.bundle"; version:Version="1.0.0"; osgi.identity="doorbird-deps"]

Hi Mark

where can i find an older version of the binding?

Cheers
Kris

I don’t have one. Do you maybe have a backup that you can pull it from?

Unfortunately not. I tried installing all the bindings my prod system has but the same issue.

Hi @mhilbush ,
I am still struggling with using the binding in my LAN, as my Doorbird is in a seperate VLAN. I am not sure if this is a problem of the binding or of some kind of network layering of openhab.
If I connect my openhab instance with the VLAN, I receive logs good like:

2019-11-20 19:34:03.230 [DEBUG] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Listener got UDP socket on port 6524 with timeout 3000
2019-11-20 19:34:07.333 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 22 from 172.16.3.11
2019-11-20 19:34:07.334 [TRACE] [b.binding.doorbird.internal.listener.DoorbirdEvent] - Received event not a doorbell event: 3535:ghcqij:1574274847
2019-11-20 19:34:07.334 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 22 from 172.16.3.11
2019-11-20 19:34:07.334 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Dropping duplicate packet
2019-11-20 19:34:14.334 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 22 from 172.16.3.11
2019-11-20 19:34:14.335 [TRACE] [b.binding.doorbird.internal.listener.DoorbirdEvent] - Received event not a doorbell event: 3536:ghcqij:1574274854
2019-11-20 19:34:14.335 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 22 from 172.16.3.11
2019-11-20 19:34:14.335 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Dropping duplicate packet
2019-11-20 19:34:21.335 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 22 from 172.16.3.11
2019-11-20 19:34:21.336 [TRACE] [b.binding.doorbird.internal.listener.DoorbirdEvent] - Received event not a doorbell event: 3537:ghcqij:1574274861
as well as: 
2019-11-20 19:08:32.027 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 70 from 172.16.3.11
2019-11-20 19:08:32.028 [TRACE] [b.binding.doorbird.internal.listener.DoorbirdEvent] - Calling cryptoPwHash with passwordFirstFive='xxxxx', opslimit=4, memlimit=8192, salt='XX XX XX XX XX'
2019-11-20 19:08:32.030 [TRACE] [b.binding.doorbird.internal.listener.DoorbirdEvent] - Call cryptoAeadChaCha20Poly1305Decrypt with ciphertext='XX XX XX', nonce='XX XX XX', key='XX XX XX'
2019-11-20 19:08:32.030 [DEBUG] [b.binding.doorbird.internal.listener.DoorbirdEvent] - Received and successfully decrypted a Doorbird event!!
2019-11-20 19:08:32.030 [DEBUG] [b.binding.doorbird.internal.listener.DoorbirdEvent] - Event is eventId='1', intercomId='ghcqij', timestamp=1574273311
2019-11-20 19:08:32.031 [DEBUG] [.binding.doorbird.internal.handler.DoorbellHandler] - Handler: Update DOORBELL channels for thing doorbird:d101:422a9f37
2019-11-20 19:08:32.031 [DEBUG] [.binding.doorbird.internal.handler.DoorbellHandler] - Downloading image using url=http://172.16.3.11/bha-api/image.cgi
2019-11-20 19:08:32.088 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 70 from 172.16.3.11
2019-11-20 19:08:32.088 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Dropping duplicate packet
2019-11-20 19:08:33.792 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 22 from 172.16.3.11
2019-11-20 19:08:33.792 [TRACE] [b.binding.doorbird.internal.listener.DoorbirdEvent] - Received event not a doorbell event: 3316:ghcqij:1574273313
2019-11-20 19:08:33.792 [TRACE] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Got datagram of length 22 from 172.16.3.11

so that IS working. But if I connect my Instance to the VLAN, I receive nothing more than:

2019-11-20 19:44:21.004 [DEBUG] [.binding.doorbird.internal.handler.DoorbellHandler] - Scheduled listener job to start in 5 seconds
2019-11-20 19:44:26.005 [DEBUG] [ing.doorbird.internal.listener.DoorbirdUdpListener] - Listener got UDP socket on port 6524 with timeout 3000

But when I do a TCPDUMP on the network card, I can see those packages, so they do arrive at the openhab instance, the Listener just does not care:

I have the two PCAP files, but cannot attach them directly due to forum restrictions. So I zipped them and renamed that zip to PDF :smiley:

doorbird.zip.pdf (867 Bytes)

Can you have a look and see if your listener ignores those packets or if this is more a general problem of cross-vlan-multicasting of openhab?

Thanks a bunch!
PhiL

The binding doesn’t filter anything. As you can see in the code here, when the binding creates the datagram socket, it binds only to the UDP port.

I’m not really sure what’s going on at the Java and/or OS level to understand why the UDP packet is not being passed up to the binding.

Hello, is it possible to get the information of pressed “open door” button in the app ?

Not sure what you’re asking. Do you want to know if executing “open door” in openHAB will be shown in the Doorbird smartphone app? If so, I don’t believe so.

in the App i dont think so, as Mark already said.
But you can get a “pushover” notification via openhab. i think this should be possible

Happy new year to everyone!

Apologies if this has been asked before… I finally got some time to install the D101 on my door over the Christmas break, I think it’s a great bit of kit but there’s one thing that strikes me as a bit odd. In the mobile app you can turn the IR light on (there’s also a channel in the binding to perform the same function) but the light only stays on for three minutes at a time. I thought it would make more sense to have the IR light on permanently at night to help with motion detection. After all, how can the camera detect motion correctly if it can’t see anything?

Is the three minute IR light limit changeable? I can’t see anything in the app. At the moment I’m considering writing a rule that sets the light switch to ON every two minutes between sunset and sunrise. Is there any reason why this would be a bad idea?

Incidentally, I have a Hikvision camera above the door that turns on it’s IR light when the light level is low but it doesn’t seem to provide enough IR light for the D101.

Not to the best of my knowledge.

I don’t see any downside. Unless, in the off chance that calling the Doorbird API repeatedly over a long period time might have some negative effect on the performance of the device. I have no reason to believe this would be the case, but you never know…

@mhilbush When I understand this correctly the DoorOpen1 is just to trigger the relay on the DoorBird, correct? Would it be possible to add a channel to get an event if the door button in the DoorBird app was pressed? I can only open the door from an OH rule and should have this event to open the door from the DoorBird app.

I don’t imagine turning the IR light on every two minutes will cause a problem either but I thought I’d ask. It seems odd to me that the IR light doesn’t come on permanently for the duration of a low light situation, i.e. at night. Just like my Hikvision cameras do.

I’ve set up a rule and the light is staying on so I’ll see what happens and report back.

1 Like

Yes, that’s correct. Sending an ON command to an item linked to the openDoor1 channel activates the relay. The OFF command does nothing.

Unfortunately, no. The Doorbird API currently supports only button press and motion events. I’ve asked them if/when it might support other events, such as this. But they’ve been noncommittal.

Before the DoorBird binding existed I’ve built my own simple solution with http items. I found an api where you can register callback url’s on the DoorBird. With those callbacks I simply set another switch item to ON when the door button in the DoorBird app is pressed. Here it the item I’ve built to register the callback:

Switch SW_Entrance_DoorBird_DoorOpen_Register "DoorBird - register door open" { http=">[ON:GET:http://user:password@172.17.4.16/bha-api/notification.cgi?url=http%%3A%%2F%%2F172.17.2.21%%3A8080%%2Fclassicui%%2FCMD%%3FSW_Entrance_DoorBird_DoorOpen%%3DON&event=dooropen&subscribe=1&relaxation=60] >[OFF:GET:http://user:password@172.17.4.16/bha-api/notification.cgi?url=http%%3A%%2F%%2F172.17.2.21%%3A8080%%2Fclassicui%%2FCMD%%3FSW_Entrance_DoorBird_DoorOpen%%3DON&event=dooropen&subscribe=0&relaxation=60]" }

There are also callback events for motion event and doorbell. Maybe you can use this to implement a channel in the binding.

The notification.cgi API is no longer in the API spec, so I expect it is deprecated. I believe you can do the same thing with the schedule.cgi, but I haven’t looked at that functionality. I was holding out hope that they would add the missing events to the UDP-based event protocol.

Hi David,
I have an Axis A8105E video doorbell. Would your method also work for the Axis?

@mhilbush I just read the latest api documentation and yes the notification api seems to be replaced with the schedule api. But the old api still works at the moment.

I will also write to the Doorbird team if the dooropen event will be added to the new api. Maybe if some users report this they will implement this faster. Also I found a security issue in the Doorbird app. I activated the Fingerprint protection when the app is opened, but you can just rotate the phone and it will unlock the app without a Fingerprint! I guess they will be happy to know this. :slight_smile:

@epicurean The api we are talking about is specific to Doorbird devices. I don’t know if Axis has a similar api function.

That is implemented in the ipCamera binding which I believe it will notify you when the doorbell is pressed.

Uses
sendHttpGET(“/bha-api/monitor.cgi?ring=doorbell,motionsensor”);

And the code for handling the replies is here:

https://github.com/Skinah/IpCamera/blob/master/src/main/java/org/openhab/binding/ipcamera/internal/DoorBirdHandler.java