Doorbird video doorbell binding

Got it working on Unifi USG by using the approach here: https://community.ui.com/questions/Multicast-Sonos-Phorus-and-Play-Fi-Broadcast-255-255-255-255-lessportgreater-Discovery-Solution/1ce890c2-5e7e-4ef2-a42a-e9c59444fd3f?page=5

Glad you got it sorted. Thanks for posting the solution.

This isn’t strictly a question about the binding but I wondered if I could pick the brains of you clever Doorbird users out there


Does anyone happen to know if the Doorbird D101 can supply an H.264 stream or does it always supply a series of MJPEG images? The reason I ask is that I’m investigating moving from animated GIFs to H264 attachments sent via Telegram instead of Pushover when motion is detected at my front door. I have a Hikvision camera over the front door and a Doorbird doorbell and while I can get H264 streams from the Hikvision (as you’d expect) I can’t seem to get anything but MJPEG from the Doorbird. I’ve tried VLC on Windows and Tinycam Pro on Android.

Not really a big deal but I’m just curious if I’m doing something wrong or it’s just not possible.

Yes, it does. See page 31 of the Doorbird API spec.

Have you ever got that rtsp URL to work in something like VLC? It never seems to work for me.

Not in VLC, but that’s the URL I use in Zoneminder and it works great.

This is what I put in Zoneminder:

rtsp://<user>:<pass>@<ip>:8557/mpeg/media.amp

Make sure you give the user permission to use the API.

Strange, I use the same URL in my Zoneminder except I use port 554 rather than 8557 and it works fine (with the correct username/password), doesn’t work in VLC though. Neither 554 nor 8557, I’ve checked that the user I’m using has the API permission. Thanks for the tip!

I have a couple of Amazon Fire tablets around the house running Tinycam Pro that I use to monitor the house cams and if I cast my mind back to lasts year when I installed the Doorbird I had an issue using the URL on multiple devices so I used Zoneminder to serve the Doorbird stream onward. If I configured Tinycam to go direct to the Doorbird I’d get something like 0.5fps. If I use Zoneminder as the Doorbird server I get around 8fps but it’s a JPEG stream so the datarate is around 500KBps compared to the other Hikvision cameras I have that run at around 10-20KBps.

Many thanks for your help and advice. I’ll keep investigating.

FWIW, I’m not able to open the URL in VLC on my Mac. Older versions of VLC would just crash. The latest version of VLC just complains that the URL can’t be opened.

In that case it looks like a VLC issue rather than a PEBKAC or Doorbird issue. Thanks for testing it, much appreciated! :slight_smile:

Hi,

first, good work!
—> Solved, see answer below

I installed the binding some time ago, and setup some rules, that send a REFRESH to the image channel to get the actually picture.
Sometimes it worked, and sometimes not, today I will figure out, why it happens, first I updated from openhab 2.5.10 to 2.5.11 and tried it again, after enable the Debug Log for this plugin I get an interesting information:

10:29:10.835 [INFO ] [smarthome.event.ItemCommandEvent     ] - Item 'Doorbell_Image' received command REFRESH
10:29:10.847 [DEBUG] [bird.internal.handler.DoorbellHandler] - Got command REFRESH for channel doorbird:d210x:doorbell:image of thing doorbird:d210x:doorbell
10:29:10.850 [DEBUG] [ing.doorbird.internal.api.DoorbirdAPI] - Downloading image from doorbird: http://192.168.0.169/bha-api/image.cgi
10:29:10.888 [DEBUG] [ing.doorbird.internal.api.DoorbirdAPI] - HTTP GET failed: 204, No Content

My Item:
Image Doorbell_Image "Doorbell Image [%s]" { channel="doorbird:d210x:doorbell:image" }

My thing:
Thing doorbird:d210x:doorbell “Doorbird D2102 Doorbell” [doorbirdHost="192.168.0.169",userId="api_user",userPassword="api_password",doorbellOffDelay=3]

Doorbird model: DoorBird D2102V
Firmware Version: 128

EDIT:
Here is a full output of restart the bundle:

10:41:10.381 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d210x:doorbell' changed from ONLINE to UNINITIALIZED
10:41:10.400 [DEBUG] [internal.listener.DoorbirdUdpListener] - Listener got IOException waiting for datagram: Socket closed
10:41:10.400 [DEBUG] [internal.listener.DoorbirdUdpListener] - Listener exiting
10:41:10.401 [DEBUG] [internal.listener.DoorbirdUdpListener] - Listener closing listener socket
10:41:10.402 [DEBUG] [bird.internal.handler.DoorbellHandler] - Canceling listener job
10:41:10.419 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d210x:doorbell' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)
10:41:10.527 [DEBUG] [nding.doorbird.action.DoorbirdActions] - DoorbirdActions service created
10:41:10.538 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d210x:doorbell' changed from UNINITIALIZED (HANDLER_MISSING_ERROR) to INITIALIZING
10:41:10.548 [DEBUG] [bird.internal.handler.DoorbellHandler] - Listener job is scheduled to start in 5 seconds
10:41:10.552 [INFO ] [ome.event.ThingStatusInfoChangedEvent] - 'doorbird:d210x:doorbell' changed from INITIALIZING to ONLINE
10:41:10.553 [DEBUG] [bird.internal.handler.DoorbellHandler] - Got command REFRESH for channel doorbird:d210x:doorbell:doorbell of thing doorbird:d210x:doorbell
10:41:10.555 [DEBUG] [bird.internal.handler.DoorbellHandler] - Got command REFRESH for channel doorbird:d210x:doorbell:doorbellHistoryTimestamp of thing doorbird:d210x:doorbell
10:41:10.555 [DEBUG] [bird.internal.handler.DoorbellHandler] - Got command REFRESH for channel doorbird:d210x:doorbell:doorbellHistoryImage of thing doorbird:d210x:doorbell
10:41:10.556 [DEBUG] [bird.internal.handler.DoorbellHandler] - Got command REFRESH for channel doorbird:d210x:doorbell:openDoor1 of thing doorbird:d210x:doorbell
10:41:10.556 [DEBUG] [bird.internal.handler.DoorbellHandler] - Got command REFRESH for channel doorbird:d210x:doorbell:image of thing doorbird:d210x:doorbell
10:41:10.557 [DEBUG] [ing.doorbird.internal.api.DoorbirdAPI] - Downloading image from doorbird: http://192.168.0.169/bha-api/image.cgi
10:41:10.587 [DEBUG] [ing.doorbird.internal.api.DoorbirdAPI] - HTTP GET failed: 204, No Content
10:41:15.550 [DEBUG] [internal.listener.DoorbirdUdpListener] - Listener got UDP socket on port 6524 with timeout 3000

EDIT2:
I feel bad
 After posting, I tried to read the api documentation from doorbird carefully, and by searching “bha-api/image.cgi” I found:

When the request is correct, but the requesting user has no permission to view thelive image at the moment, the request is answered with return code 204. This usuallyhappens for users without “watch-always” permission when there was no ring eventin the past 5 minutes

And the api user had no permission for live view, only for 5 minutes afters someone presses the button


1 Like

Hi Guys

Starting to give OH3 a shot, what a nightmare :confused:
Anyway!

Seeing this error when I send a command to the relay, any suggetions?

06:52:38.953 [INFO ] [openhab.event.ItemCommandEvent ] - Item ‘Doorbird_OpenDoor1’ received command ON
06:52:38.968 [ERROR] [rnal.common.AbstractInvocationHandler] - An error occurred while calling method ‘ThingHandler.handleCommand()’ on ‘org.openhab.binding.doorbird.internal.handler.DoorbellHandler@592d9389’: Illegal character in authority at index 7: http:// 192.168.0.141 /bha-api/open-door.cgi?r=1
java.lang.IllegalArgumentException: Illegal character in authority at index 7: http:// 192.168.0.141 /bha-api/open-door.cgi?r=1
at java.net.URI.create(URI.java:883) ~[?:?]
at org.eclipse.jetty.client.HttpClient.newRequest(HttpClient.java:442) ~[bundleFile:9.4.20.v20190813]
at org.openhab.core.io.net.http.HttpUtil.executeUrlAndGetReponse(HttpUtil.java:213) ~[?:?]
at org.openhab.core.io.net.http.HttpUtil.executeUrl(HttpUtil.java:156) ~[?:?]
at org.openhab.core.io.net.http.HttpUtil.executeUrl(HttpUtil.java:131) ~[?:?]
at org.openhab.core.io.net.http.HttpRequestBuilder.getContentAsString(HttpRequestBuilder.java:135) ~[?:?]
at org.openhab.binding.doorbird.internal.api.DoorbirdAPI.executeGetRequest(DoorbirdAPI.java:248) ~[?:?]
at org.openhab.binding.doorbird.internal.api.DoorbirdAPI.openDoor(DoorbirdAPI.java:158) ~[?:?]
at org.openhab.binding.doorbird.internal.api.DoorbirdAPI.openDoorDoorbell(DoorbirdAPI.java:153) ~[?:?]
at org.openhab.binding.doorbird.internal.handler.DoorbellHandler.handleOpenDoor(DoorbellHandler.java:304) ~[?:?]
at org.openhab.binding.doorbird.internal.handler.DoorbellHandler.handleCommand(DoorbellHandler.java:197) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59) [bundleFile:?]
at com.sun.proxy.$Proxy330.handleCommand(Unknown Source) [?:?]
at org.openhab.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:80) [bundleFile:?]
at org.openhab.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48) [bundleFile:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
at org.openhab.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:154) [bundleFile:?]
at org.openhab.core.internal.common.Invocation.call(Invocation.java:52) [bundleFile:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: java.net.URISyntaxException: Illegal character in authority at index 7: http:// 192.168.0.141 /bha-api/open-door.cgi?r=1
at java.net.URI$Parser.fail(URI.java:2913) ~[?:?]
at java.net.URI$Parser.parseAuthority(URI.java:3247) ~[?:?]
at java.net.URI$Parser.parseHierarchical(URI.java:3158) ~[?:?]
at java.net.URI$Parser.parse(URI.java:3114) ~[?:?]
at java.net.URI.(URI.java:600) ~[?:?]
at java.net.URI.create(URI.java:881) ~[?:?]

 29 more
06:52:38.976 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item ‘Doorbird_OpenDoor1’ predicted to become ON
06:52:38.985 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item ‘Doorbird_OpenDoor1’ changed from NULL to ON

Cheers!

That’s a nasty looking error. I’ll see if I can reproduce.

It looks like there’s a space before and after the IP address in the URL. I expect that’s what’s causing the problem. But I have no idea where those spaces are coming from.

1 Like

Odd. I recreated it and its fine now!

Hello there!

I finally found some time for openhab again after we moved into our house.
now i am trying to play an alarm sound when the doorbell is triggered.
the rule works fine when i trigger it manually but i cannot get the “doorbell pressed” item to work.
I tried the pressed command as well as a simple trigger (received command on) as described in the docs.

after further investigation it seems that the item for the “doorbell pressed” switch does not work.
the thing is online and i can manually turn the light of the doorbird on so i am pretty sure it’s no “thing” issue.

maybe my d1101v works different than the “old” doorbirds?
any suggestions what i could try?
i adapted the item config 1:1 from the docs 


i also noticed that the “doorbell pressed image” is very old (2 weeks or so). it seems that it does not get updated anymore and i don’t know why.
the “live image” however works fine.
that’s also pointing to a “trigger” issue 


By any chance is the Doorbird device on a different subnet than your openHAB box? If everything is set up correctly, this could be the issue.

Or, it could be a permissions issue. Check to make sure the Doorbird user you’ve put in the Thing config has the correct permissions.

1 Like

thank you!
i am running OH in docker so there is a high chance it’s a port issue.
I manually forwarded port 6524 now and will report back if i tested it.

That did the trick :slight_smile:
Forwarding:

  • 6524:6524/udp

thanks for pointing to that!

1 Like

Any chance of support for keypad events?

A “workaround” can be done with node-red.
You can create a http-Command with the specific/configured keypad input. The http-Command can be written directly to a node-red instance. There you can create a flow where you can write and read OpenHab items with the openhab-node.
Maybe I can give an example next week.