DoorBird Binding?

Hi, i’m rather experienced in OH (2.3) but new to Doorbird 101 (which I start hating by the way - this closed cloud solution with almost no local entry - except the API is a security nightmare sooner or later but thats another story).

My question is if I will run in any issues if after registering motion/doorbell I turn OFF my doorbird over night and turn it on the next morning…do not understand all details but it sounds similar to SIP registration and i assume that if i turn OFF and ON the doorbird it will loose this registration and not notifiy anymore…

Is that true? because i also fear that anyhow from time to time registration will even with POWER ON get lost…does OH take care of these lost registrations and reregisters by itself?

Cheers and thanks a lot for your comments! Norbert

@norbert_jordan I can share your security concerns and have put my DoorBird into a separate VLAN with only a port forward to OH for the callbacks.
But in my experience so far the registration doesn’t seem to get lost in case of power interruptions.

Hi all

I have a D201x unit but the App is slow talking to the cloud. I just installed OpenHab today and MQTT on a Windows Machine.

Can anyone provide a sample config to get me going with the unlock door, live video and turning IR on/off?

Im struggling even using the Tutorial.

Thanks
Kris

Can you post your notify.cgi and info.cgi outputs? I have strange problem with notification absence from DoorBird D2101V. May be it need to be turned on somewhere else?

Or may be somebody knows Doorbird diagnostic capabilities? Logs, remote connection, something else? Without it very hard to figure out what happening on door bell side.

Anybody tried to use “EVENT MONITORING (UDP BROADCASTS)” for notifications? I catched couple of them, but in “EVENT” field they contain only “1”.

Here are the outputs from my DoorBird (I’ve replaced private information with XXX):

info.cgi
"BHA": { "RETURNCODE": "1", "VERSION": [{"FIRMWARE": "000111","BUILD_NUMBER": "15222406","WIFI_MAC_ADDR": "XXXXXXXXXXXX","RELAYS":["1"],"DEVICE-TYPE": "DoorBird D102"}]}}

notification.cgi
{"BHA": { "RETURNCODE": "1", "NOTIFICATIONS": [{"event": "motionsensor","subscribe": "1","url": "http://X.X.X.X:X/classicui/CMD?DoorBird_MotionSensor=ON","user": "","password": "","relaxation": "10"}, {"event": "doorbell1","subscribe": "1","url": "http://X.X.X.X:X/classicui/CMD?DoorBird_DoorBell=ON","user": "","password": "","relaxation": "10"}, {"event": "dooropen","subscribe": "1","url": "http://X.X.X.X:X/classicui/CMD?DoorBird_DoorOpen=ON","user": "","password": "","relaxation": "10"}]}}

Sorry, so far I’ve not played around with the schedules and favourites.

Thanks bern77! hopefully this helps Pavel :smiley:

Thanks for output, I think it will be very useful for future users. We resolved our problem with missed notifications by DoorBird reset. May be it was some strange internal state or some bad combination of settings.

But now I stuck on impossibility of configuration SIP via HTTP API. I receiving “401 Unauthorized”, when I trying to enter. Settings looks right. Waiting meaningful response from Doorbird support.

And the response we got for others, you must create a new SIP user in the Doorbird Admin utillity. It must be called ‘SIP’ with Video always on and API permissions. This resolved the problem Pavel and I had :slight_smile:

Anybody tried SIP on DoorBird? I meet weird issue. First of all, I set up back calls (DoorBird calls you after HTTP request) and it worked fine for a days. But now it not working any more and answers on direct and back calls “503 Service unavailable”. I don’t changed anything and even try sip.cgi?action=reset without success. Another problem is pure debug capabilities of DoorBird: I can only get last error code and text message - it’s not always informative.

I successfully made web softphone with SIP.js. It works well in the Firefox. Chrome based browsers don’t allow unsecured http/ws connection and self-signed certificate is a problem. I embed it into sitemap via WebView and it works in Firefox, but when I tried it in Openhab app nothing happens and it’s hard to get debug info from app. Anybody tried something like this?

Hi all
I’d like to revive this topic: I’ve recently received my Doorbird (2101V), and apparently the notification.cgi has been discontinued and has been replaced by schedule.cgi.

Therefore I am struggling a bit with how to format the notifications/triggers from the wiki.

Here’s my output from notification.cgi (nothing programmed yet, hence it’s pretty empty:

[{"input":"doorbell","param":"1","output":[{"event":"notify","param":"","schedule":{"weekdays":[{"to":"79199","from":"79200"}]}}]},{"input":"motion","param":"","output":[{"event":"notify","param":"","schedule":{"weekdays":[{"to":"79199","from":"79200"}]}}]},{"input":"rfid","param":"xxxxx","output":[{"event":"relay","param":"1","schedule":{"weekdays":[{"to":"79199","from":"79200"}]}}]}]

My idea was to change the formatting of notification.cgi like so:

[ON:GET:http://<user>:<password>@<doorbird-ip>/bha-api/schedule.cgi?url=http%%3A//<OH-IP>%%3A<port>/classicui/CMD%%3FDoorBird_MotionSensor%%3DON&event=motion&schedule=weekdays]

But that’s apparently not enough. Anyone here already worked with schedule.cgi (or has enough experiences with those kind of APIs to make an educated guess as to how this should be formatted)?

Thanks!
Patrick

Hi Patrick, I am using the same Doorbird.

We use OpenHab Cloud (Local instance) for notificiations.

Hi Kris

that’s one of the use cases I intend to do, yes.
How did you configure OH to receive a notification via the OH cloud when, for example, the doorbell is pushed?
Or, more generally, how do you configure OH to react to a trigger from DoorBird (doorbell, motion)?

Hi all
solved the problem. Here’s a short run down of how I solved it.

Not that I know the “old” notification.cgi, but the new schedule.cgi of DoorBird essentially is doing all the work - in other words, there is one possibility I used - http trigger - where essentially an http request is called whenever an event is happening (i.e. doorbell, motion, etc.).

What I did therefore is to add that scheduled event (in my case, an http request) using JSON - I used postman to set up this JSON call just that once.
In a second step (it was actually the first step, since you have to define the http request in the favorites of the DoorBell App (or API)), I then simply used a http-request for OH, in the form of:

http://<openhab-ip>:<openhab-port>/classicui/CMD?<itemname>=ON

This triggers a switch, and since the switch needs to reset to OFF after the Doorbell rang, I used a rule to reset it, like this:

rule "Tür öffnen"
when
Item DoorBird_DoorBell changed 
then
if(DoorBird_DoorBell.state==ON) {
	timer = createTimer(now.plusSeconds(2)) [
	sendCommand(DoorBird_DoorBell, OFF)
		]
} else {
if(timer!==null) {
	timer.cancel
	timer = null
	}
}
end

Not sure if there’s a more elegant way - but it definitely works. Now all I have to think is what to actually do when the doorbell rings :slight_smile:

1 Like

hey guys, just a simple question i think, but i dont get it to work

i want the last 3 history images in my BasicUI - i dont like it to have an image-url item in my sitemap, because i cant adjust the size of the image and cant put the last 3 images in one line side by side, so i created a html-file and put it in my sitemap with “Webview”

looks like this now:

SITEMAP

Frame label="Doorbird History"
            {
                Webview url="/static/doorbird_history.html" height=8
            }

doorbird_history.html

<center>
<img height="85%" src="http://192.168.1.XXX/bha-api/history.cgi?index=1" />  
<img height="85%" src="http://192.168.1.XXX/bha-api/history.cgi?index=2" /> 
<img height="85%" src="http://USER:PASS@192.168.1.XXX/bha-api/history.cgi?index=1" /> 
</center>

i can see the first two images, when i am logged in to doorbird in my browser - but on my phone i am not logged in, so i cant see the images at all - so i tried the 3rd line, but its not working at all - how do i need to adjust the html code to get it working without loggin in at all ?

Thanks!

EDIT:
i am in chrome browser - i think its chrome related - in Safari it works well - the Chrome Log gives me this:

[Deprecation] Subresource requests whose URLs contain embedded credentials (e.g. `https://user:pass@host/`) are blocked. See https://www.chromestatus.com/feature/5669008342777856 for more details.

is there another way for images in html ?

If im not mistaken this is indeed a “problem” with chrome.
As I can remember chrom is not supporting to call pages with the “USER:PASSWORD@” any longer.

you get me right - that sucks :frowning: - any workaround for my idea in chrome ?