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…
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" />
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)
Switch DoorBird_DoorBell “DoorBird Door Bell Triggered” (DoorBird)
Sitemap:
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:
rule “DoorBird_DoorBell_Register”
when
Item DoorBird_DoorBell_Register received command
then
logInfo(“logInfoDoorBird_Doorbell_Register”,“DoorBird Register on”)
sendCommand(DoorBird_DoorBell,ON)
end
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…
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.
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
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:
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:
One implementation for that is than when someone touch doorbird you can do ringing to normal cheap doorbell in your home with one Sonoff with Tasmota Firmware an one rule like this: https://github.com/arendst/Sonoff-Tasmota
rule "Suena Doorbell"
when
Item DoorBird_DoorBell received command ON
then
sendCommand(DoorBird_DoorBell, OFF)
if (SilencioTimbreSalon.state != ON)
{
sendCommand(TimbreSalon, ON)
Thread::sleep(300)
sendCommand(TimbreSalon, OFF)
Thread::sleep(2000)
sendCommand(TimbreSalon, ON)
Thread::sleep(300)
sendCommand(TimbreSalon, OFF)
Thread::sleep(2000)
sendCommand(TimbreSalon, ON)
Thread::sleep(300)
sendCommand(TimbreSalon, OFF)
}
end
i defined on home.item a switch SilencioTimbreSalon because i have a baby and sometimes i dont want the doorbell ringing Switch SilencioTimbreSalon "Silenciar Timbre" <alarm> (DoorBird) [ "Switchable" ]
And the switch for doing que doorbell ringing with tasmota firmware and mqtt: Switch TimbreSalon "Timbre" <alarm> {mqtt=">[localBroker:cmnd/Sonoff_Timbre/POWER:command:ON:1],>[localBroker:cmnd/Sonoff_Timbre/POWER:command:OFF:0],<[localBroker:stat/Sonoff_Timbre/POWER:state:default]"}
Thank you so much Patrick. I had a freelancer set this up previously for me, but the hardware died and when i replaced it I couldnt work out how to actually ENABLE this on the Doorbird. My rules and schedule were all set correctly but this was the missing link that turned it on!
I love my Doorbird. It makes SIP calls to my 4G phone when I’m away (ive setup Asterisk on a UNIX VM) and it even plays a voice mail out of my Doorbird if I’m not home! then sends me the email. Alexa alerts me to visitors at the front gate when I’m home also and ive integrated it all into HabPanel so I can make two way calls to/from the Doorbird, along with Visitor captures and on. Works well! i love making random calls to the Doorbird when people walk by and scare them HAHAH!
Hi Kris
It depends what you want to achieve. I’ve just had a look at the API - getting the actual DoorBird hardware to ring does not seem possible - but you could probably get a notification - for example - without having to physically pushing the button.
Sorry Patrick, i only just saw this. Yes I can trigger the notification easily using the smarthome:send ON and the rule triggers.
I wanted to be able to remotely assist/troubleshoot issues with the unit without having to actually physically press the button to set off the chain of events.