Doorbird video doorbell binding

@Skibi I have a version that now should work with the RPi3 (not sure about the RPi2 yet). I tested it successfully on an RPi3 last night. Let me know if you would like to give it a try.

Wow, great news! :grinning:
But I’m a bit confused: where can I find your latest version?

The last commit of the jar at https://github.com/mhilbush/openhab-binding-releases/tree/master/doorbird is 19 days ago?!

Oh, sorry, translation misunderstanding on my part! Yes, I would like to try it. :relaxed:

I haven’t posted it yet. I’m away right now and will post it tonight.

1 Like

@Skibi I posted the files. You’ll need to download the doorbird binding jar AND the doorbird-deps-1.0.1 jar. If you have the doorbird-deps-1.0.0 jar in your addons directory, please delete it.

1 Like

Now it works! Thank you very much, great! :smiley::+1:

2019-05-30 09:58:19.924 [hingStatusInfoChangedEvent] - ‘doorbird:d101:doorbell’ changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
2019-05-30 09:58:19.959 [hingStatusInfoChangedEvent] - ‘doorbird:d101:doorbell’ changed from INITIALIZING to UNKNOWN
2019-05-30 09:58:19.977 [hingStatusInfoChangedEvent] - ‘doorbird:d101:doorbell’ changed from UNKNOWN to ONLINE
2019-05-30 09:58:22.266 [vent.ItemStateChangedEvent] - Doorbell_MotionDetectedImage changed from NULL to raw type (image/jpeg): 26893 bytes
2019-05-30 09:58:23.148 [vent.ItemStateChangedEvent] - Doorbell_PressedImage changed from NULL to raw type (image/jpeg): 40963 bytes
2019-05-30 09:58:23.158 [vent.ItemStateChangedEvent] - Doorbell_MotionTimestamp changed from NULL to 1970-01-01T01:00:00.000+0100
2019-05-30 09:58:23.163 [vent.ItemStateChangedEvent] - Doorbell_PressedTimestamp changed from NULL to 1970-01-01T01:00:00.000+0100
2019-05-30 09:58:23.165 [vent.ItemStateChangedEvent] - Doorbell_Motion changed from NULL to OFF
2019-05-30 09:58:23.168 [vent.ItemStateChangedEvent] - Doorbell_Pressed changed from NULL to OFF

1 Like

Cause this post (binding), I’ve also bought the doorbird doorbell d101. :blush:
Guess that OH should start a seperate part ‘What hardware to buy if you use OH’. :wink:

Not sure if it’s an issue with my config, the binding or the doorbell.
But it seems I can’t get the ‘push button’ to work. Images, datetime, switch getImage
 are working.
But no events for ‘channel="doorbird:d101:97cb8f27:doorbell’?

Must the doorbell have any specific setting to have these events push towards OH, or
?

Using the Doorbird app, did you make sure the user you put in the thing config has all the permissions set?

Edit: Assuming that’s set, you might need to put the binding in debug mode to see what’s happening when the doorbell is pressed.

BTW, what hardware are you running on? The RPi was only recently supported, so you need the latest version of the binding.

I had a normal user (the ‘app user’) in it.
So I’ve now changed this to the ‘app administrator user’.
But that didn’t improved.

EDIT: seem that when I’m using the ‘administrator user’, I can’t get new snapshot images with the switch? So I turned back to the ‘app user’.

I’m running on a standard server, so no RPI. And I’m using the latest binding (I think).
Could this be the issue?

278 │ Active    │  80 │ 1.0.1                  │ doorbird-deps bundle
279 │ Active    │  80 │ 2.5.0.201905301620     │ openHAB Add-ons :: Bundles :: Doorbird Binding

I just enabled the debug logs.
For the moment, there’s nobody home to push the button. But once I’ve got more logs, I’ll add them


A normal user should be fine as long as it has all the permissions. That’s how mine is set up.

That looks fine.

Hopefully, this will shed some light on what’s going on. The doorbell press and motion detection events are handled differently than everything else in the API, so there may be something going on with the decryption of that event stream.

You might want to enable TRACE level logging if the DEBUG level doesn’t reveal much. It’s a bit noisy, but it should show exactly what’s going on.

What OS and OS version are you running?

I’m running Linux Ubuntu:

Ubuntu 18.10 (4.18.0-20-generic)
OpenHAB 2.5.0.M1 Milestone Build

Ok. I’ve run it on 18.04, so 18.10 should be fine.

It’s a bit sensitive to the OS because of the crypto library used to decrypt the event stream.

Another thing to do while in debug mode would be to stop/start the binding and watch for what it says about loading the crypto library.

Could this be of any help to you?
Maybe an issue with the network (UDP timeout) on the last line?

14:17:04.910 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent STOPPING - org.openhab.binding.doorbird
14:17:04.916 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler disposing for doorbird:d101:97cb8f27
14:17:04.917 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from ONLINE to UNINITIALIZED 
14:17:04.917 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener shutting down       
14:17:04.918 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener closing listener socket          
14:17:04.918 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Canceling listener job           
14:17:04.918 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener got IOException waiting for datagram: Socket closed       
14:17:04.918 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener no longer receiving packets         
14:17:04.919 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener exiting        
14:17:05.076 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)   
14:17:05.076 [DEBUG] [org.openhab.binding.doorbird         ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=551, service.bundleid=279, service.scope=bundle,component.name=org.openhab.binding.doorbird.internal.DoorbirdHandlerFactory, component.id=325} - org.openhab.binding.doorbird
14:17:05.089 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent STOPPED - org.openhab.binding.doorbird   
14:17:05.090 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent STARTING - org.openhab.binding.doorbird 
14:17:05.091 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent STARTED - org.openhab.binding.doorbird  
14:17:05.097 [DEBUG] [org.openhab.binding.doorbird         ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=552, service.bundleid=279, service.scope=bundle,component.name=org.openhab.binding.doorbird.internal.DoorbirdHandlerFactory, component.id=326} - org.openhab.binding.doorbird  
14:17:05.107 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler created for doorbird:d101:97cb8f27   
14:17:05.113 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler initializing for doorbird:d101:97cb8f27  
14:17:05.113 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING        
14:17:05.114 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Scheduled listener job to start in 5 seconds             
14:17:05.114 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from INITIALIZING to UNKNOWN        
14:17:05.115 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from UNKNOWN to ONLINE        
14:17:05.116 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler: REFRESH doorbell image channel using most recent doorbell history image         
14:17:05.116 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler: REFRESH motion image channel using most recent motion history image 
14:17:05.116 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Downloading image using url=http://perry/bha-api/history.cgi?event=doorbell&index=1
14:17:06.117 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Downloading image using url=http://perry/bha-api/history.cgi?event=motionsensor&index=1
14:17:10.114 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener got UDP socket on port 6524 with timeout 3000 

That last line is normal.

Can you remove the binding from add-ons, wait for the binding to uninstall, copy back into add-ons, wait for it to install. Then post the debug log.

The removal (move out of folder addons):

14:35:26.553 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent STOPPING - org.openhab.binding.doorbird
14:35:26.575 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from ONLINE to UNINITIALIZED
14:35:26.576 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler disposing for doorbird:d101:97cb8f27
14:35:26.577 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener shutting down
14:35:26.577 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener closing listener socket
14:35:26.577 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener got IOException waiting for datagram: Socket closed
14:35:26.577 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Canceling listener job
14:35:26.578 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener no longer receiving packets
14:35:26.578 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener exiting
14:35:26.583 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
14:35:26.586 [DEBUG] [org.openhab.binding.doorbird         ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=552, service.bundleid=279, service.scope=bundle, component.name=org.openhab.binding.doorbird.internal.DoorbirdHandlerFactory, component.id=326} - org.openhab.binding.doorbird
14:35:26.630 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent STOPPED - org.openhab.binding.doorbird
14:35:30.252 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent UNRESOLVED - org.openhab.binding.doorbird
14:35:30.350 [WARN ] [org.apache.felix.fileinstall         ] - Error while starting bundle: file:/usr/share/openhab2/addons/org.openhab.binding.doorbird-2.5.0-SNAPSHOT.jar
org.osgi.framework.BundleException: Could not resolve module: org.openhab.binding.doorbird [279]
  Unresolved requirement: Import-Package: com.sun.jna; version="[5.3.0,6.0.0)"

        at org.eclipse.osgi.container.Module.start(Module.java:444) ~[?:?]
        at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:383) ~[?:?]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1260) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1233) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1221) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.doProcess(DirectoryWatcher.java:515) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:365) [10:org.apache.felix.fileinstall:3.6.4]
        at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:316) [10:org.apache.felix.fileinstall:3.6.4]
14:36:30.841 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent UNINSTALLED - org.openhab.binding.doorbird

And moving back the files:

14:39:01.476 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent INSTALLED - org.openhab.binding.doorbird
14:39:04.476 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent RESOLVED - org.openhab.binding.doorbird
14:39:04.530 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent STARTING - org.openhab.binding.doorbird
14:39:04.532 [DEBUG] [org.openhab.binding.doorbird         ] - BundleEvent STARTED - org.openhab.binding.doorbird
14:39:06.779 [DEBUG] [org.openhab.binding.doorbird         ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=553, service.bundleid=281, service.scope=bundle, component.name=org.openhab.binding.doorbird.internal.DoorbirdHandlerFactory, component.id=327} - org.openhab.binding.doorbird
14:39:06.883 [DEBUG] [nding.doorbird.internal.DoorbirdEvent] - LazySodium has not been loaded yet. Try to load it now.
14:39:07.308 [DEBUG] [nding.doorbird.internal.DoorbirdEvent] - Successfully loaded bundled libsodium library!!
14:39:07.327 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler created for doorbird:d101:97cb8f27
14:39:07.335 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
14:39:07.338 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler initializing for doorbird:d101:97cb8f27
14:39:07.339 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from INITIALIZING to UNKNOWN
14:39:07.339 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Scheduled listener job to start in 5 seconds
14:39:07.340 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler: REFRESH doorbell image channel using most recent doorbell history image
14:39:07.341 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d101:97cb8f27' changed from UNKNOWN to ONLINE
14:39:07.341 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Handler: REFRESH motion image channel using most recent motion history image
14:39:07.342 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Downloading image using url=http://perry/bha-api/history.cgi?event=doorbell&index=1
14:39:09.536 [DEBUG] [ing.doorbird.internal.DoorbirdHandler] - Downloading image using url=http://perry/bha-api/history.cgi?event=motionsensor&index=1
14:39:10.473 [INFO ] [smarthome.event.ItemStateChangedEvent] - Perry_PressedImage changed from raw type (image/jpeg): 26630 bytes to raw type (image/jpeg): 24189 bytes
14:39:10.474 [INFO ] [smarthome.event.ItemStateChangedEvent] - Perry_MotionImage changed from raw type (image/jpeg): 25053 bytes to raw type (image/jpeg): 25057 bytes
14:39:10.474 [INFO ] [smarthome.event.ItemStateChangedEvent] - Perry_MotionTime changed from 2019-06-08T14:09:51.000+0200 to 2019-06-08T14:19:55.000+0200
14:39:10.475 [INFO ] [smarthome.event.ItemStateChangedEvent] - Perry_PressedTime changed from 2019-06-08T14:09:54.000+0200 to 2019-06-08T14:19:59.000+0200
14:39:12.341 [DEBUG] [doorbird.internal.DoorbirdUdpListener] - Listener got UDP socket on port 6524 with timeout 3000

Ok. That all looks good. The crypto library loaded successfully.

Let’s see what happens when the doorbell is pressed.

Damned. Nothing

Somebody rang the bell at 15:10:31.
But i don’t see anything in the logs regarding this. :blush:
When I do a refresh (index to 1) on my sitemap, I nicely see the latest pictures, with a timestamp 03:10:31


2019-06-08 15:03:58.605 [vent.ItemStateChangedEvent] - Perry_DoorbellHistoryIndex changed from 2 to 1
2019-06-08 15:03:59.575 [vent.ItemStateChangedEvent] - Perry_DoorbellHistoryImage changed from raw type (image/jpeg): 26630 bytes to raw type (image/jpeg): 24189 bytes
2019-06-08 15:03:59.576 [vent.ItemStateChangedEvent] - Perry_DoorbellHistoryTime changed from 2019-06-08T14:09:54.000+0200 to 2019-06-08T14:19:59.000+0200
2019-06-08 15:04:07.186 [ome.event.ItemCommandEvent] - Item 'Perry_DoorbellHistoryIndex' received command 1
2019-06-08 15:04:07.187 [nt.ItemStatePredictedEvent] - Perry_DoorbellHistoryIndex predicted to become 1
2019-06-08 15:13:14.593 [ome.event.ItemCommandEvent] - Item 'Perry_DoorbellHistoryIndex' received command 1
2019-06-08 15:13:14.595 [nt.ItemStatePredictedEvent] - Perry_DoorbellHistoryIndex predicted to become 1
2019-06-08 15:13:16.174 [vent.ItemStateChangedEvent] - Perry_DoorbellHistoryImage changed from raw type (image/jpeg): 24189 bytes to raw type (image/jpeg): 26750 bytes
2019-06-08 15:13:16.175 [vent.ItemStateChangedEvent] - Perry_DoorbellHistoryTime changed from 2019-06-08T14:19:59.000+0200 to 2019-06-08T15:10:31.000+0200


2019-06-08 15:03:58.600 [DEBUG] [ng.doorbird.internal.DoorbirdHandler] - Got command 1 for channel doorbird:d101:97cb8f27:doorbellHistoryIndex of thing doorbird:d101:97cb8f27
2019-06-08 15:03:58.600 [DEBUG] [ng.doorbird.internal.DoorbirdHandler] - Downloading image using url=http://perry/bha-api/history.cgi?event=doorbell&index=1
2019-06-08 15:04:07.187 [DEBUG] [ng.doorbird.internal.DoorbirdHandler] - Got command 1 for channel doorbird:d101:97cb8f27:doorbellHistoryIndex of thing doorbird:d101:97cb8f27
2019-06-08 15:04:07.191 [DEBUG] [ng.doorbird.internal.DoorbirdHandler] - Downloading image using url=http://perry/bha-api/history.cgi?event=doorbell&index=1
2019-06-08 15:13:14.600 [DEBUG] [ng.doorbird.internal.DoorbirdHandler] - Got command 1 for channel doorbird:d101:97cb8f27:doorbellHistoryIndex of thing doorbird:d101:97cb8f27
2019-06-08 15:13:14.604 [DEBUG] [ng.doorbird.internal.DoorbirdHandler] - Downloading image using url=http://perry/bha-api/history.cgi?event=doorbell&index=1

That’s strange. Try setting logging to TRACE level.

I’m not sure if this matters, but in the smartphone app’s Device Config settings is the doorbell activated for push notifications?