Doorbird video doorbell binding

Interesting, thank you !
I’m on holidays right now, I will try to check it next week.
Could you please provide me with your ulaw test file ?
Doorbird seems to be very picky about format.

This is the ulaw file: File-Upload.net - symph.raw
It is the same one like the MP3 file which I used for the gstreamer test, just converted it with Audacity with the following steps:

  • Import the MP3
  • Set project frequency at the bottem left to 8000
  • In the top menu: tracks → Mix → Stereo to Mono
  • File → Export → Audio → Select “other uncmpressed types” and in the format options: Header: RAW, Encoding: U-Law

But I think your code would at least play some noise if you add my changes there instead of just giving you a 200. The main issue is, that you post the whole file at once instead of streaming it.

weird that we both have such different results. On my ubuntu system, the addition of ‘use-content-length=true’ results in “ERROR: from element /GstPipeline:pipeline0/GstCurlHttpSink:curlhttpsink0: HTTP response error: (received: 400)”

on my raspberry pi with an older gstreamer (1.14.4), I don’t get the error, but I get corrupted audio.

If I add ‘use-content-length=true’ to my simple wav streaming pipeline, it again fails with a 400 error on the ubuntu system, but works perfectly (and without clicking!) on my raspberry pi.

So I now have the world’s most hacky audio system, with openhab converting an MP3 to wav using FFMPEG, then SCPing the result to the raspberry pi, and then running gstreamer on the pi using SSH. But it is better than it was before - so thank you!

Just to add: same results on two doorbirds - D101S, latest firmware 000134, D1101V (latest firmware 000131). So seems certain it’s weirdness in different gstreamer installations.

So, with the hint from @BerndZ (thank you !), I made some progress, and I have now a beta version with audio sink capability for the doordbird binding.

I’m not 100% satisfied, because :

  • The sound is not very good ? (would like your opinions on this)
  • Sometimes it doesn’t work. The audio is sent, the response is OK, but the Doorbird produces no sound. Does it also happen to you ?

Here is the snapshot to download. Beta tester welcome !

Only WAV files are supported (PCM, or ULAW). You shouldn’t have to worry about frequency, channel, sample rate or whatever, etc, as the code should convert it on the fly. If it doesn’t work, say it here and post the file you used.

I could add support for MP3 (as I did on the pulseaudio binding), but then I would have to add a dependency to another library (@mhilbush do you have an opinion ?)

By the way, @mhilbush, when (and if) it is ready, how do you usually proceed for merging code from another contributor ? Should I make a pull request to you ? Or directly to the openhab repository and you will review it ?

If it is satisfying, on the long term, I think it should be possible to add an audio source as well.
And with this, the doorbird could become a vocal assistant/conversation agent. So much fun to be a geek :rofl:

1 Like

The more libraries there are, the more to maintain by keeping libraries up to date. I’d suggest focusing on making sure the WAV version works consistently and reliably.

Normally you would just make a PR to the openhab-addons repo.

@mhilbush
Ever thought about asking Bird Home Automation GmbH (the DoorBird manufacturer) to add openHAB to their DoorBird Connect partners (see Video door intercom and video doorbell for iOS, Android, iPhone, iPad, Smartphone and Tablet)?
I am asking, because FHEM and ioBroker are listed there as well and improving visibility is always good.

No, I hadn’t considered it, but it’s a very good idea. Thanks.

1 Like

Come on, nobody ? :sweat_smile:
@BerndZ ? @dan12345 ? @higgers ?
I would really like to have feedback in order to decide if it is worth a pull request :wink:

Sorry, I hadn’t received a notification that there were more posts to this thread.

apologies, I don’t use openhab audio sinks, as I prefer to do as much as possible in my own code…

Hello,

is there a documentation available how to save short videos in OH3 - for example 30sec. when the motion sensor is triggered?

Really appreciated if someone can share something.

Thanks.

Unfortunately openHAB has no ability to save videos, it‘s a smart home platform and not a video surveillance system.

Personally, I am using Synology Surveillance Station on my Synology NAS to save short clips from my DoorBird.
This should work with the most video surveillance systems, you could also have a look at ZoneMinder.

Thanks for that information. I will have a look at ZoneMinder it’s also available as docker and I can use that with my unRAID server.

@snowy: I am using IP Camera binding for this. It’s working properly with Doorbird and also in parallel with Doorbird binding!

The video / pictures / Gifs… are stored in OH folder locally. I guess this is what you are looking for :slight_smile:

1 Like

Try Frigate and Shinobi, both support what you try to do I assume.

Thanks for all your hard work on the binding, I wonder if someone could answer a couple of questions surrounding triggering of relays? I have a D210x (and indoor station) running via POE. In attempting to integrate the D210x to OpenHAB (3.4.0 M1) I am running into some strange behaviour, I have read through the entire (increasingly long) thread but am not sure if this is expected or not and if so what is the best way to mitigate for it.

  • The D210x thing was configured and I linked the “Open Door 1” channel (I have a split swing gate and linked this to the first relay controlling the smaller pedestrian gate; the second relay opens both gates).
  • The “door” channel controlling the relay is showing as a switch
  • If i turn the switch on in the GUI then the relay is energised and the door opens/stops/closes (depending upon it’s current position)
  • In order to energise the relay again (to close or open the gate) I have to turn the switch in the GUI off (which does nothing) and then turn it back on

From what i have read this may be expected behaviour, is this true? If so, is there a way to automatically “turn off/expire” the switch within the binding (as it does nothing but add an extra button press) or am I fundamentally missing something or have some kind of incorrect setup?

I have also exposed this channel to homekit, through the homekit binding, where this issue causes further problems:

  • I have tried to set it as both a door and garage opener in homekit but the same issue appears
  • when opening the door via the Apple Home app it does trigger the relay but in the Home app keeps showing the door opening forever (? - there may be a timeout at some point but I have not confirmed this); it seems to be awaiting some kind of confirmation that it has been opened, although I do not have this issue with my Eltako rollderblinds
  • hitting the button in the Home app again makes the home app think the door is now closed and you can then open it again (although the same problem then reoccurs); similar behaviour to OpenHAB but for the indefinite opening part

Has anyone seen/overcome this issue when exposing Doorbird relays to Homekit? I was considering setting up 2 virtual switches (open/close) that make the same energise API call directly to the doorbird, in order to gain the nice geofencing/Siri benefits but would rather keep as much as possible in OpenHAB (rules being triggered etc).

Setup an expiration timer in the item’s metadata should solve the switch issue.
Regards,
Sascha

Thanks, that seems to resolve the switch issue in OpenHAB but leads to some weird behaviour when exposed to HomeKit. I will have a play about this weekend to see if I can resolve. I have grabbed a Zigbee contact sensor to give me closed/open status too, so may approach the HomeKit integration from a different angle; it’s crazy that Doorbird can’t report the relay state without shelling out on a very expensive and otherwise needed upgrade.

I have an issue with this Doorbird binding,
using OH 3.3.0 (running in official OH docker for Synology) and latest marketplace Doorbird binding.
Doorbird D201 (HW 1.20) firmware 000136.
Separated Doorbird user with all security rights (also API).
Everything on the same cabled Unifi network

Status is online, all fields are filled.

UID: doorbird:d101:10d882eae9
label: Doorbird Doorbell D201
thingTypeUID: doorbird:d101
configuration:
  doorbirdHost: *****
  userPassword: *****
  motionOffDelay: 1
  montageNumImages: 6
  userId: ****
  doorbellOffDelay: 1
  imageRefreshRate: 30
  montageScaleFactor: 25

most of the things work, for example images and image timestamps, trigger for the light.
but the most important doesn’t work, i can’t get any event from the doorbell pressed or motion.

When checking logs, i can’t find any trigger fired from the Doorbird.
I check these logs each time in /openhab/userdata/logs/events.log (better/faster way?)

Could i enable more logging for this binding for debugging what’s going wrong?
I have already tried with updating Doordbird firmware, restarting OH, hardware toggle for the doorbird pressed like requested in other posts in this topic.

I did everything with the UI, I still have to search/check how I can do it faster with cli in the Docker on Synology

By any chance is the Doorbird on a different network (or VLAN) from the openHAB server? The Doorbird broadcasts the motion and doorbell events using UDP, and by default those packets are not routable across networks/VLANs.