Doorbird video doorbell binding

Thanks!

Yep, it’s because of this. I’ll look into it.

2019-09-30 17:15:02.131 [DEBUG] [nternal.listener.DoorbirdUdpListener] - Listener got UDP socket on port 6524 with timeout 3000
2019-09-30 17:15:02.167 [DEBUG] [nternal.listener.DoorbirdUdpListener] - Listener got SocketException: Address already in use (Bind failed)
java.net.BindException: Address already in use (Bind failed)
1 Like

@Novanoid I posted a new version with a potential fix. I can’t test it myself, so I don’t know if it will resolve the problem. Can you download the new version and try it out? Use the same process as last time, i.e. press the doorbell on each of the devices and post the debug log. Please make sure to include the initialization of the binding. Thanks!!

1 Like

@mhilbush Thanks for the quick patch.

But i’m running into an error while installing:

[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 [211]
Unresolved requirement: Import-Package: com.sun.jna; version="[5.4.0,6.0.0)"

I guess the jna version has to be updated ? which one should I install?

EDIT: Okay installed jna-5.4.0.jar and it started now. So you might want to update the version of your jna. Going to do some testing now.

Tests are partially successful.

Binding both works good now:

Listener got UDP socket on port 6524 with timeout 3000
Listener got UDP socket on port 6524 with timeout 3000

Motion works on both:

Event is eventId=‘motion’, intercomId=‘ghfjwx’, timestamp=1569911237
Handler: Update MOTION channels for thing doorbird:d210x:doorbell1
Downloading image using url=http://bha-1CCAE372068F/bha-api/image.cgi

Event is eventId=‘motion’, intercomId=‘ghfjrd’, timestamp=1569911288
Handler: Update MOTION channels for thing doorbird:d210x:doorbell2
Downloading image using url=http://bha-1CCAE37205F9/bha-api/image.cgi

But doorbell still only works on one. But this time an event is received! Only problem that its unknown:

Event is eventId=‘1’, intercomId=‘ghfjwx’, timestamp=1569911269
Handler: Update DOORBELL channels for thing doorbird:d210x:doorbell1
Downloading image using url=http://bha-1CCAE372068F/bha-api/image.cgi

Received and successfully decrypted a Doorbird event!!
Event is eventId=‘1’, intercomId=‘ghfjrd’, timestamp=1569911327
Unknown doorbell event type: 1

Ok, then my fix resolved the issue. Good.

I’ll look at this today.

1 Like

@Novanoid I posted what I hope is a fix for the last issue you’re experiencing. Please give it a try and let me know if it works. I think I was interpreting the Doorbird api spec incorrectly, so hopefully I got it right this time.

1 Like

@mhilbush you sir are awesome!

Works like a charm!

2 Likes

Hi mhilbush,
Thank you for the binding!
I was using a workaround with the HTTP calls from the doorbird to the Openhab REST with some trickery… I prefer the binding. Thank you!

Hi @mhilbush,
I have a question regarding the openDoor1 and openDoor2 channels: I use them with autoupdate=“false” and added them to the sitemap with a switch, which is using a mapping. The result is a single button in the sitemap. I use this method for many other channels. But in the left of the doorbird channels the switch’s state is shown. Is it possible to hide the state?

Thank you!

Olliver

@oeiber I’m not sure. Can you post the item and sitemap definitions?

Sure:

Items:

Switch SPA01_Door1 "Haustüre" <frontdoor> {channel="doorbird:d210x:spa01:openDoor1",autoupdate="false"}
Switch SPA01_Door2  "Hintereingang" <door> {channel="doorbird:d210x:spa01:openDoor2",autoupdate="false"}

Sitemap:

Switch item=SPA01_Door1 mappings=[ON="öffnen"]
Switch item=SPA01_Door2 mappings=[ON="öffnen"]

Result:

The state of the two items is null, because autoupdate is set to false.

Regards,

Oliver

Can you try changing the item definitions to this (note the empty brackets)?

Switch SPA01_Door1 "Haustüre []" <frontdoor> {channel="doorbird:d210x:spa01:openDoor1",autoupdate="false"}
Switch SPA01_Door2  "Hintereingang []" <door> {channel="doorbird:d210x:spa01:openDoor2",autoupdate="false"}

Thank you, worked for me. But why is it necessary only for doorbird channels?

It’s not specific to Doorbird channels. I use this in a variety of places unrelated to Doorbird when I use a mapping and don’t want the state to show up.

Edit: It’s been discussed here on the forum a couple times. Here’s an example.

I have the DoorBird EA Controller as well - am I right that this is not (yet) supported?
Or is it? :smiley:

Greetings!
PhiL

btw, I have a DoorBird D205, which you can add to the supported things now :smiley:

This is the model A1081? If so, it’s currently not supported. However, it looks like it might use the same API as the video doorbells. You might want to try adding a D210x thing, then trying to operate the doors using the openDoor1 and openDoor2 channels. Let me know if that works.

Is the D205 functionally equivalent to the D101?

I’ll add these to my list of things to do. I’m currently focused on getting the binding through the review process and into the distribution. Once that wraps up, I’ll see about adding the D205 and Controller.

Unsure, I added it as a D210x Thing and it worked.

yes it is a A1081. I just tried adding it as a D210x thing, but the button failed.
Here is the tcp dump of that action:

GET /bha-api/open-door.cgi?r=1 HTTP/1.1
Accept-Encoding: gzip
User-Agent: Jetty/9.4.18.v20190429
Accept-Language: en-us
Authorization: Basic Z2hjcW...
charset: utf-8
Host: 10.0.11.248
HTTP/1.1 404 Not Found
Content-Type: text/html
Content-Length: 345
Date: Sun, 06 Oct 2019 21:03:36 GMT
Server: lighttpd/1.4.44
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>404 - Not Found</title>
</head>
<body>
<h1>404 - Not Found</h1>
</body>
</html>
GET /bha-api/open-door.cgi?r=2 HTTP/1.1
Accept-Encoding: gzip
User-Agent: Jetty/9.4.18.v20190429
Accept-Language: en-us
Authorization: Basic Z2hjcWlqMD...
charset: utf-8
Host: 10.0.11.248
HTTP/1.1 404 Not Found
Content-Type: text/html
Content-Length: 345
Date: Sun, 06 Oct 2019 21:03:39 GMT
Server: lighttpd/1.4.44
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>404 - Not Found</title>
</head>
<body>
<h1>404 - Not Found</h1>
</body>
</html>

So If you need help with that - when you get to it - drop me a note, I’ll be around :smiley:

Ok. The only thing I’m aware of that’s different between the D101 and D210x is that the D101 supports one door relay and the D210x supports 2 door relays.

Hmm. I took a quick look but didn’t see a separate spec for the A1081. I’ll take another look.

Will do.

Did a little investigation myself, so here ismy finding, maybe it helps to estimate the effort you need.

To open the relay, it is enough to post a GET request to that URL:

http://usernameOfDoorbird:pwOfDoorbird@ipOfDoorBird/bha-api/open-door.cgi?r=deviceIdOfEAController@ReleayNUmber

example:
http://ghcqiis0001:absdaso3@192.168.0.123/bha-api/open-door.cgi?r=ghcbnl@1