DoorBird Binding?

Tags: #<Tag:0x00007f01485fc508>

(Pavel) #73

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.

(Pavel) #74

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?

(Patrick Boch) #75

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:


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


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)?


(Kris K) #76

Hi Patrick, I am using the same Doorbird.

We use OpenHab Cloud (Local instance) for notificiations.

(Patrick Boch) #77

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)?

(Patrick Boch) #78

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:


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"
Item DoorBird_DoorBell changed 
if(DoorBird_DoorBell.state==ON) {
	timer = createTimer(now.plusSeconds(2)) [
	sendCommand(DoorBird_DoorBell, OFF)
} else {
if(timer!==null) {
	timer = null

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:

(Philipp) #79

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:


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


<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" /> 

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 ?


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 for more details.

is there another way for images in html ?

(Matt) #80

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.

(Philipp) #81

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

(Patrick Boch) #82

Hi Philipp

Unfortunately I am not a big coder myself, but have you tried php?
A quick search revealed (for example) this:

As I said, I can’t code myself, but I use the application Postman on Mac - this even gives you example coding, which worked at least two times with different REST APIs, so you might give it a try…

(Bernhard Bauer) #83

Hi RiotMode,

the DoorBird API actually supports passing user and password as URL parameters (cf. API spec p7f.), so your example should work the followin way:
<img height="85%" src="http://192.168.1.XXX/bha-api/history.cgi?http-user=USER&http-password=PASS&index=1" />

Hope that helps!

(Philipp) #84

Thank you for the hint - Patrick !

much love :black_heart: this works perfectly - thank you!!!

(Dominik Terhardt) #85

Hi all,

I am a new openhab2 User (and in the Community) and very happy with the few little things I‘ve been done yet.
(Using Raspberry PI3 / Openhabian Image / Openhab 2.3)

But now I have problems to get the notification of my doorbird running.
BTW: The goal is: When I push the Button on my Doorbird, all Sonos-Speaker have to play a Notification Sound.
Playing the sound on Sonos already works with a „test-switch”

What is the best way to found out what is wrong?
If I press the Button on my Doorbird, should there a LogInfo in the console? (log:tail)
Like: Receive Command over http. Or something like that?
At the moment, with my items, there isn’t any LogInfo for this case.

I have read this topic and the wiki but I don’t know how to go forward and receive a command to make a
rule for my Sons System:

That’s what I did so far:
Installed http-Binding
Installed Classic UI (with PaperUI)

Schliessystem.items :

Group DoorBird

Switch DoorBird_DoorBell_Register “DoorBird - Register Door Bell” (DoorBird) { http=">[ON:GET:http://DB_USER0001:DB_PASSWORD@DB_Local_IP/bha-api/notification.cgi?url=http%%3A//openhabian_local_IP%%3A8080/classicui/CMD%%3FDoorBird_DoorBell%%3DON&user=openhabian&password=openhabian_Password&event=doorbell&subscribe=1] >[OFF:GET:http://DB_USER0001:DB_PASSWORD@DB_Local_IP/bha-api/notification.cgi?url=http%%3A//openhabian_local_IP%%3A8080/classicui/CMD%%3FDoorBird_DoorBell%%3DON&user=openhabian&password=openhabian_Password&event=doorbell&subscribe=0]" }

Switch DoorBird_DoorBell “DoorBird Door Bell Triggered” (DoorBird)


Text label=“Doorbird Test”
Video url=“http://DB_USER0001:PDB_PASSWORD@192.168.XXX./bha- api/video.cgi” encoding=“mjpeg” //funktioniert
Default item=DoorBird_DoorBell
Default item=DoorBird_DoorBell_Register
Group item=DoorBird label=“Doorbird Gruppe Test”

rule “DoorBird_DoorBell_Register”
Item DoorBird_DoorBell_Register received command
logInfo(“logInfoDoorBird_Doorbell_Register”,“DoorBird Register on”)

Could you help me?

Thank you very much!!!


(Michael Sutter) #86

Hello Dominik

I needed to do the register manually.
Check the registration at this url: http://DB_USER0001:DB_PASSWORD@DB_Local_IP/bha-api/notification.cgi?
What happens when you use the HTTP URL manual in your browser? The bell should ring…


(Dominik Terhardt) #87

Hello Michael,

thank you very much for your reply!

When I use the HTTP URL the browser (Firefox) “says” the following:

{“BHA”: { “RETURNCODE”: “1”, “NOTIFICATIONS”: [{“event”: “doorbell101”,“subscribe”: “0”,“url”: “http://openhabian_local_IP:8080/classicui/CMD?DoorBird_DoorBell=ON”,“user”: “openhabian”,“password”: “openhabian_Password”,“relaxation”: “10”}]}}

Should my Fritzfon and my IOS App ring too when I use the HTTP URL in my Browser?
I have to say that I haven’t connect a “normal” bell in my house.
Just my Fritzfon and the Mobile App. They work fine if I press the physical Button on my Doorbird.
But nothing happened when I use the URL in my Firefox.

Should the Item “DoorBird_DoorBell” turn to “ON”?


(Patrick Boch) #88


Just saw this. The feedback from your browser suggests that you have not subscribed to the event ‚doorbell rings‘ yet.

Also, the old notification.cgi is depreciated in the Doorbird api. Here’s what I did to achieve something very similar:

As Michael pointed out, you need to register first, I.e. you need to tell Doorbird that it should react on a certain event (the bell rings) and perform a certain action on this (call the http from OpenHAB which then triggers the switch) - this you do in the schedule.cgi of Doorbird.

What is a little tricky there: you don’t enter the http address in the schedule.cgi directly, rather you refer to an http favorite which you define in the app of Doorbird (this is the actual http address of OpenHAB, incl. url parameters)

Once you’ve done that, the item should indeed switch to on, and you can perform any OpenHAB action like having sonos play a sound.

One additional remark: you might want to write a small rule which resets the switch to off after a few seconds, otherwise sonos will only play a song once :slight_smile:

(Dominik Terhardt) #89

Yipiiieh… that was the key! :grinning:

The two things: Learn how to register in the app and using schedule.cgi instead of notification.cgi.

I am happy it works. Awesome.

Thank you very much !!!

And thank you for the additional remark. A very good Idea…

(Iván ramírez alcobendas) #90

Could you explain how to set up de favourite and the schedule please?? I am very lost jejeje

(Kris K) #91

Hi patrick

can you explain more about your 4th paragraph. How do you do this with schedule.cgi?

(Patrick Boch) #92

glad to explain.

First, you need to go into the app and define an “http-favourite”: Settings --> Administration --> Favorites --> HTTP Calls
Add an http call there with the address:

http://XX.XX.XX.XX:8080/classicui/CMD?DoorBird_DoorBell=ON (where xx.xx.xx.xx is your ip and “DoorBird_DoorBell” is an item I defined for the DoorBell)

Secondly, follow the instructions in the DoorBird API to register this http call and when it should be called. In the schedule.cgi I entered the following:

"input": "doorbell",
"param": "1", 
"output": [{
"event": "http",
"param": "0",
"enabled": "1",
"schedule": {
"weekdays": [{
"to": "82799"
"from": "82800"

Which basically says: When Doorbell rings (input), call up http (event) favorite No. 0 (param, the first http fav in the app is counted as 0).

To send these lines to the Doorbird I used Postman - there are also some extensions to common browsers which also do the job fine.

You basically send these lines to this address: http://doorbird-IP/bha-api/schedule.cgi

Let me know whether this helps