Doorbird doorbell

Others (MiLight, Hue, Toon etc...)
Post Reply
Shrimp
Posts: 1
Joined: Wednesday 16 November 2016 12:28
Target OS: Raspberry Pi
Domoticz version: 3.5921
Location: Netherlands
Contact:

Doorbird doorbell

Post by Shrimp » Wednesday 16 November 2016 12:53

Hi,

I have installed a Doorbird doorbell and would like to integrate it in Domoticz.
They do have a public lan API (https://www.doorbird.com/api) but I lack the programming skills/knowledge to get any further.

I would like Domoticz to be aware when someone presses the doorbell (so that it can switch on the light in the hallway).

The API says that i should be able to do a notification request:
Method: GET
Syntax: http://<device-ip>/bha-api/notification.cgi?<parameter>=<value>

They also provide an example:
http://<deviceip>/bha-api/notification.cgi?url=http://foo.bar?doorbell&user=&password=&event=doorbell&subscribe=1

Does anyone have a suggestion on how to use this within Domoticz?

borgkitty
Posts: 41
Joined: Wednesday 26 October 2016 21:01
Target OS: Raspberry Pi
Domoticz version: 3.5877
Contact:

Re: Doorbird doorbell

Post by borgkitty » Wednesday 16 November 2016 18:28

(I haven't read the api yet this is just me guessig)are you able to put anything into this?
Syntax: http:// <device-ip>/bha-api/notification.cgi?<parameter>=<value>

what I mean is can you put anything into the parameter? because if you can it would be relative easy to do this
you would set up a dummy switch in domoticz and remember the idx

then within that get you would push it to your server with something similar to json.htm?type=command&param=udevice&idx=(dummy device idx&nvalue=(on or off or whatever you want)&svalue=79
following the json api of domoticz https://www.domoticz.com/wiki/Domoticz_API/JSON_URL's

User avatar
gizmocuz
Posts: 8705
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi
Domoticz version: beta
Location: Top of the world
Contact:

Re: Doorbird doorbell

Post by gizmocuz » Wednesday 16 November 2016 19:03

Seems on Page 7 of the manual you can set a notification URL, in this URL you just do a domoticz json call to a switch to put this on (or a doorbel sensor)
Quality outlives Quantity!

bmwproboi05
Posts: 2
Joined: Wednesday 04 January 2017 22:08
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Doorbird doorbell

Post by bmwproboi05 » Wednesday 04 January 2017 22:15

gizmocuz wrote:Seems on Page 7 of the manual you can set a notification URL, in this URL you just do a domoticz json call to a switch to put this on (or a doorbel sensor)
Thanks for the hint to get this working...

Here is what I did to get mine to get the doorbell rang notification

http://<doorbird-ip>/bha-api/notification.cgi?url=http://localhost:8080/json.htm?type=command%26param=switchlight%26idx=5%26switchcmd=On&event=doorbell&subscribe=1

The %26 is used to subsitute the & sign. The doorbird uses & to move on... Here is the response I get back

{"BHA": { "RETURNCODE": "1", "NOTIFICATIONS": [{"event": "doorbell","subscribe": "1","url": "http://localhost:8080/json.htm?type=com ... =On","user": "","password": "","relaxation": "10"}]}}

<doorbird -ip> - the ip address of the doorbird
localhost - ip of domoticz install. If you are on windows you will need to allow access on your firewall in pc settings. ( I tested this on my pc before moving over to Rpi)

I am trying to see what else I can get working , and will probably make a new post

sulley
Posts: 2
Joined: Monday 30 January 2017 19:44
Target OS: Windows
Domoticz version:
Contact:

Re: Doorbird doorbell

Post by sulley » Monday 30 January 2017 19:54

Hi,

Is this working well for you? I installed a DoorBird a couple of weeks and I'm finding that the notifications don't fire much of the time. They seem to cycle on and off every couple of days. I've tried rebooting the unit, resetting and re-entering the notifications and triggering a non-Domoticz device and I am sure they are simply not working.

Thanks

paultie
Posts: 16
Joined: Thursday 08 October 2015 20:58
Target OS: Raspberry Pi
Domoticz version: V2.3272
Location: Netherlands
Contact:

Re: Doorbird doorbell

Post by paultie » Saturday 25 February 2017 20:11

Hi,
Just installed the doorbird and this did the trick for me switching based on the motionsensor.
Did a blocky to set the switch to off after a certain time which is the same time of the doorbird for the motion sensor minus 1 second so that there is no conflict.

There is more possible with the API but just started xperimenting with this.

Regards,
Paul
Raspberry Pi B+ with Zwave GPIO board, P1 interface and RFXCOM receiver.

Thomasdc
Posts: 243
Joined: Wednesday 11 March 2015 20:13
Target OS: Raspberry Pi
Domoticz version: Beta
Contact:

Re: Doorbird doorbell

Post by Thomasdc » Saturday 24 February 2018 12:49

I am also looking in to this doorbird doorbell.

i was wondering, is it also possible to send notifications to domoticz when there is movement? or only when the doorbell is pushed?

is there an delay on the notifications or is it responding really fast?

Thanks

sulley
Posts: 2
Joined: Monday 30 January 2017 19:44
Target OS: Windows
Domoticz version:
Contact:

Re: Doorbird doorbell

Post by sulley » Tuesday 27 February 2018 18:22

Yes you can just change event=doorbell to event=motionsensor (but I haven't actually tested this). The response is very fast. I have Domoticz emailing me a capture from the DoorBird camera whenever the button is pressed.

My issue from last year (see earlier post) turned out to be a faulty unit but since getting the new one it's worked perfectly.

Neuvidor2307
Posts: 8
Joined: Wednesday 07 March 2018 23:41
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Doorbird doorbell

Post by Neuvidor2307 » Wednesday 10 October 2018 4:52

Dear all,

I just want to share my script I'm using in order to receive Doorbird pictures on my smartphone over Telegram when somebody press the doorbird button.

How it works :
- I defined in the doorbird application a HTTP command into favorite. This command activate a domoticz "Push ON" button

Code: Select all

http://192.168.xxx.xxx:8063/json.htm?type=command&param=switchlight&idx=79&switchcmd=On
- I defined in domoticz the "Push ON" button parameters in order to execute a "Doorbell.sh" script when the "Push ON" button is activated

Code: Select all

script:////home/pi/domoticz/scripts/Doorbell.sh
- The Doorbell.sh script is called by Domoticz, it automatically send a telegram to me and my wife's smartphone with 3 pictures
=> First picture correspond to the picture stored into the doorbird memory when the doorbell was pressed
=> Second picture is taken 2s after doordbird button is pressed with live request
=> Third picture is taken 4s after doordbird button is pressed with live request

Code: Select all

#!/bin/bash

Doorbell.sh script
##############################################################
##                                                          ##
##  Doorbell.sh script                                      ##
##  Send Doorbird D101S pictures to telegram message script ##
##                                                          ##
##############################################################



# Telegram configuration
TelegramUser01="Activated"
TelegramUser02="Desactivated"
TelegramUser03="Desactivated"

Token_1="xxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Token_2="xxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
Token_3="xxxxxxxxx:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

ChatID1="xxxxxxxxx"
ChatID2="xxxxxxxxx"
ChatID3="xxxxxxxxx"


# Doorbird D101S configuration
DoorbirdIP="xxx.xxx.xxx.xxx"
DoorbirdLogin="xxxxxx0001"
DoorbirdPassword="xxxxxxxxxx"
DoorbirdUrlImage="http://$DoorbirdIP/bha-api/image.cgi?http-user=$DoorbirdLogin&http-password=$DoorbirdPassword"
DoorbirdUrlHistory="http://$DoorbirdIP/bha-api/history.cgi?index=1&http-user=$DoorbirdLogin&http-password=$DoorbirdPassword"


# Snapshot configuration
SnapFile1="/var/tmp/DoorbirdSnapshot1.jpg"
SnapFile2="/var/tmp/DoorbirdSnapshot2.jpg"
SnapFile3="/var/tmp/DoorbirdSnapshot3.jpg"
PauseBetweenSnap=2





#Script beginning
###########################################################################################################################################


# send telegram (text only)

if [ "$TelegramUser01" == "Activated" ]
	then curl -s -X POST "https://api.telegram.org/bot$Token_1/sendMessage?chat_id=$ChatID1&text=Baptiste, Quelqu'un vient de sonner à la porte !"
fi

if [ "$TelegramUser02" == "Activated" ]
	then curl -s -X POST "https://api.telegram.org/bot$Token_2/sendMessage?chat_id=$ChatID2&text=Noémie, Quelqu'un vient de sonner à la porte !"
fi

if [ "$TelegramUser03" == "Activated" ]
	then curl -s -X POST "https://api.telegram.org/bot$Token_3/sendMessage?chat_id=$ChatID3&text=Quelqu'un vient de sonner à la porte !"
fi





# get second Picture
wget -O $SnapFile2 $DoorbirdUrlImage


# pause
sleep $PauseBetweenSnap


# get another Picture
wget -O $SnapFile3 $DoorbirdUrlImage


# pause
sleep $PauseBetweenSnap


# get first Picture
wget -O $SnapFile1 $DoorbirdUrlImage



# send telegram (multiple pictures) to user 1
if [ "$TelegramUser01" == "Activated" ]
	then curl -s \
		-X POST "https://api.telegram.org/bot"$Token_1"/sendMediaGroup" \
		-F chat_id=$ChatID1 \
		-F media='[{"type":"photo","media":"attach://photo_1","caption":"When Doorbell button was pressed"},{"type":"photo","media":"attach://photo_2","caption":"Other picture 1"},{"type":"photo","media":"attach://photo_3","caption":"Other picture 2"}]' \
		-F photo_1="@$SnapFile1" \
		-F photo_2="@$SnapFile2" \
		-F photo_3="@$SnapFile3"
fi

# send telegram (multiple pictures) to user 2
if [ "$TelegramUser02" == "Activated" ]
	then curl -s \
		-X POST "https://api.telegram.org/bot"$Token_2"/sendMediaGroup" \
		-F chat_id=$ChatID2 \
		-F media='[{"type":"photo","media":"attach://photo_1","caption":"When Doorbell button was pressed"},{"type":"photo","media":"attach://photo_2","caption":"Other picture 1"},{"type":"photo","media":"attach://photo_3","caption":"Other picture 2"}]' \
		-F photo_1="@$SnapFile1" \
		-F photo_2="@$SnapFile2" \
		-F photo_3="@$SnapFile3"
fi

# send telegram (multiple pictures) to user 3
if [ "$TelegramUser03" == "Activated" ]
	then curl -s \
		-X POST "https://api.telegram.org/bot"$Token_3"/sendMediaGroup" \
		-F chat_id=$ChatID3 \
		-F media='[{"type":"photo","media":"attach://photo_1","caption":"When Doorbell button was pressed"},{"type":"photo","media":"attach://photo_2","caption":"Other picture 1"},{"type":"photo","media":"attach://photo_3","caption":"Other picture 2"}]' \
		-F photo_1="@$SnapFile1" \
		-F photo_2="@$SnapFile2" \
		-F photo_3="@$SnapFile3"
fi


# Delete all pictures
rm $SnapFile1
rm $SnapFile2
rm $SnapFile3



Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests