Doorbird integration

@Klikini i see that in your python lib you have a motion sensor in there, but in the doorbird part you do not. I also read that you didn’t had luck with using it. I can confirm though that it does work very well normally (when i used the proxy) Is this something your willing to look into, i don’t mind helping out with testing where i can.

Can someone explain how to setup/use the doorbell events callback URL?

Just add doorbell_events: true to your doorbird component config and it should work.

As for actually doing anything with the events, see this example by @reynos.

This is good to know. Maybe they pushed an API update?

I will look into it when I get time, it shouldn’t be too hard.

Hmm let me see if i have this correct too, your doorbird integration shows the camera live, latest snapshot and latest motion picture. Next to that with the doorbell_events: true it will create a entity in hass so that you can monitor it and it will create a http call in doorbird so it will act directly upon pressing the doorbell.

The doorbell switch integration allows you to trigger the relay 1 or 2 and the IR lights on the doorbird itself.

But that would mean for ‘completeness’ that your missing 2 more items. A entity with a callback in doorbird for when you click on the slot “door open” (i actually don’t have a relay behind it but had a http call in the past for it) and when the motion sensor gets triggered.

Also rule of thumb, the relay cables are behind the doorbird… so if a thief knows the device he could just rip it from the wall and connect the 2 cables like how they hotwire a car in old movies :wink:

Next to that you allow with https://github.com/home-assistant/home-assistant/pull/13268 to set the host, in my case that would be the internal ip. Which i can whitelist so i don’t need a password for the api calls, but i read from your messages above that you removed the password requirement from the endpoint right?

That leaves us with that all http calls are now called “legacy” and we should be using the scheduled way or something from what i read in the new api pdf from doorbird. (you can still reference an old one like http://www.zwavehome.nl/images/Veiligheid/Doorbird-api_lan.pdf this one) and https://www.doorbird.com/downloads/api_lan.pdf?rev=0.21 being the latest.

So to be clear, my ‘legacy’ motion event http calls towards hass was always working just fine…

So i did some homework to perhaps make it easier for you. (192.168.1.115 is my doorbird) 81 hass.

GET to bha-api/schedules.cgi for getting schedules.
Remove old entry’s etc etc like:
http://192.168.1.115/bha-api/schedule.cgi?action=remove&input=doorbell&param=1

Doing a POST with a json payload to schedule.cgi will add the entry. However, unlike the end result which is a nicely formated 3 segment json object, it will only allow you to add 1 entry at a time (at least from what i tried)

Here are the 3 entry’s you can add, including input 2 if you want that aswell.

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

{
    "input": "motion",
    "param": "",
    "output": [
        {
            "event": "http",
            "param": "1",
            "enabled": "1",
            "schedule": {
                "weekdays": [
                    {
                        "to": "82799",
                        "from": "82800"
                    }
                ]
            }
        }
    ]
}

{
    "input": "input",
    "param": "1",
    "output": [
        {
            "event": "http",
            "param": "2",
            "enabled": "1",
            "schedule": {
                "weekdays": [
                    {
                        "to": "82799",
                        "from": "82800"
                    }
                ]
            }
        }
    ]
}

Motion doesn’t take any params btw. So leave that empty.

GET to bha-api/favorites.cgi for the list of current favorites.
Delete the old legacy ones:

http://192.168.1.115/bha-api/favorites.cgi?action=remove&type=http&id=1000
http://192.168.1.115/bha-api/favorites.cgi?action=remove&type=http&id=1001
http://192.168.1.115/bha-api/favorites.cgi?action=remove&type=http&id=1002

Doing a GET with a save url sets them.

http://192.168.1.115/bha-api/favorites.cgi?action=save&type=http&title=http_notification_doorbell&value=http://192.168.1.81:8123/api/doorbird/doorbell
http://192.168.1.115/bha-api/favorites.cgi?action=save&type=http&title=http_notification_motionsensor&value=http://192.168.1.81:8123/api/doorbird/motionsensor
http://192.168.1.115/bha-api/favorites.cgi?action=save&type=http&title=http_notification_input&value=http://192.168.1.81:8123/api/doorbird/input

According to the docs the weekdays is “always” but the legacy’s still had this:

"to": "0",
"from": "604799"

So don’t know if that makes a difference…

But this should be the proper way as they want to have it these days as stated in the doorbird api.
Hope it helps :smile:

Ow and don’t forget that in order to save these items, you have to have that new API-Operator flag on your account (which was not default on for me) see:

Just to answer the question on DoorBird security @riemers if you need high security and are worried about people tampering with the DoorBird unit you can avoid using the relays within that unit and use a DoorBird I/O controller (network connected and securely located) and use the relays within it to trigger the door or gate. However I’m not sure this unit would work with the current HA implementation??

Hence the reason why i want the http call for relay1 notification, then you don’t need cables. Since you can use automation to trigger the door open event as example. But granted, that is another valid solution.

@Klikini the fix in 0.67 has done the trick, all working very well now, thanks again!

I’ve got it working with Sonos and lights doing different things when the doorbell is pressed depending on the time of day. I’ll update the doco example automation code and post in Share Your Project too.

1 Like

Thanks, I got it working, but I still have a question:

I don’t see that “event” listed anywhere in my services or states. How do I know events like this are available?

It won’t show up in services because it’s incoming, not called by HA; and it won’t show up in states because it is a momentary event.

The easiest way I’ve found to test it is to set up something like the example I provided, but make the action something like pushing to Pushbullet or logging in the HA logbook, then ring your doorbell and check if something happened :slight_smile:

@riemers Sorry, I’m confused as to what all of this is, especially in a thread with other issues going on.

Could you please open threads at https://community.home-assistant.io/c/feature-requests detailing each of the features you want me to look into and mention me in them?

Thanks!

I’am sorry, was trying to be help full maybe i got a bit carried away. I made Doorbird, use new API and add motion as requested.

Anyway we can get it so we can integrate with Google Home so we can talk to/through the Doorbird?

Hi all, I can’t get my DoorBird_doorbell event to work.
I can see the event under Developer tools/Events on the front page, and also manually trigger it, so I know my automation is okay, but hassio does not respond when I press the button on my Doorbird.

I’m using duckdns and https, and cannot access hass via my local IP address, only via the duckdns address.

My config:
doorbird:
host: 192.168.X.Y
username: !secret doorbirduser
password: !secret doorbirdpass
doorbell_events: true

Any ideas?

Thanks!

BR Christian

OK, I’m not so sure my automation was working correctly anyways. But TBH I don’t exactly know what did the trick because I also tinkered with the override URL setting, but… it works! :wink:

For those who need motion, there’s a nice PR in the queue.

3 Likes

Did this get added in in the .70 update?

It did not.

it did now, but no motion so far. Looking at the PR i do see a note from Klikini, https://github.com/home-assistant/home-assistant/pull/13994/files#r194552231

And this one https://github.com/home-assistant/home-assistant/pull/14933 is still in heavy talks, lots of good work there!