Doorbird integration

Set the loglevel to info or debug:

Iā€™m stuck, I still donā€™t get an event. strange because the camera function works

Did you try lowering the log level? And did you see the above message (from the github snippet) during the restart of home assistant?

@DieterClaeys I am assuming that you are testing the event by triggering the doorbell. If so, the first thing to verify is if the Doorbird has the correct URL in the schedule. You can do this in the Doorbird app. I use iOS, so it may be slightly different for Android.

In the app, go to Settings -> Administration. Login to the Doorbird you need to verify. Scroll down and click on HTTP Calls under Favorites heading. You should see an entry for legacy_api_http_notification_doorbell in the list. Copy this URL and make sure that you can access it from a computer. Each time you access the URL, it should trigger the event in HA. If the URL returns an OK response, it is working and HA is receiving the event.

If you do not see the legacy_api_http_notification_doorbell entry, it means HA couldnā€™t connect to your Doorbird to setup the HTTP endpoint. Restarting HA should attempt to configure the endpoint again. Check the logs for any errors during restart if it still doesnā€™t show up in the app.

I have some changes that I will be making to the component that will make it easier to work with the events that are expected. Hopefully those changes will be available soon.

I got it working!
Thank you so much!

A while back I tried this component, and I also had the issue where the event was not present, even though the URL under the ā€˜HTTP Callsā€™ section was fine. The event simply didnā€™t show up, no matter what I tried. So I left it, and went to my backup solution, which has been working fine until now. But inspired by this thread, I decided to give it a go, and it turns out I didnā€™t set a ā€˜name:ā€™ for the Doorbird in my configuration.yaml - now that Iā€™ve set a custom name it shows up right away. So sometimes itā€™s the simplest things :wink:

This is one reason Iā€™m making it so the events will display in the Available Events list on the Events GUI. When a name is not provided, we generate a name like DoorBird 1 to be used for the device. This results in the event name being doorbird_doorbird_1_button which isnā€™t intuitive, but is currently required due to the way we lookup the device when an event is received that requires communication to the device. Adding the events to the GUI will allow the correct name to be determined without having to dig through logs.

Yes, thatā€™s exactly what my doorbird (doorbird_1) was named before, but I simply couldnā€™t get it to appear in the Events-tab, even though everything else seemed to be OK. I donā€™t know why! But the result was clear, as soon as I set a name for it, it appeared.

My point was that the events donā€™t currently appear there. Iā€™m working on adding them for a future release.

Oh sorry, misunderstood that :slight_smile: that explains a lot then :smiley:

Anyone seeing Doorbird not working on latest 0.82?

Nothing has changed in my config since updated 0.81.6 to 0.82

2018-11-10 13:04:52 ERROR (MainThread) [homeassistant.config] Invalid config for [doorbird]: required key not provided @ data['doorbird']['token']. Got None. (See /config/configuration.yaml, line 149). Please check the docs at https://home-assistant.io/components/doorbird/
2018-11-10 13:04:52 ERROR (MainThread) [homeassistant.setup] Setup failed for doorbird: Invalid config.
2018-11-10 13:04:52 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of camera.doorbird. Setup failed for dependencies: doorbird
2018-11-10 13:04:52 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform camera.doorbird: Could not set up all dependencies.
2018-11-10 13:04:53 ERROR (MainThread) [homeassistant.setup] Unable to set up dependencies of switch.doorbird. Setup failed for dependencies: doorbird
2018-11-10 13:04:53 ERROR (MainThread) [homeassistant.setup] Unable to prepare setup for platform switch.doorbird: Could not set up all dependencies.

You need to add a token with a random string in the config, see the documentation here: https://www.home-assistant.io/components/doorbird/
That fixes that problem but then I get a new one which I could not fix yet, any clues?
Hereā€™s the message:

2018-11-10 14:00:37 ERROR (MainThread) [homeassistant.setup] Error during setup of component doorbird
Traceback (most recent call last):
  File "/usr/src/app/homeassistant/setup.py", line 148, in _async_setup_component
    component.setup, hass, processed_config)  # type: ignore
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/app/homeassistant/components/doorbird.py", line 108, in setup
    doorstation.update_schedule(hass)
  File "/usr/src/app/homeassistant/components/doorbird.py", line 199, in update_schedule
    self._register_event(url, sensor_type, schedule)
  File "/usr/src/app/homeassistant/components/doorbird.py", line 220, in _register_event
    if not self.webhook_is_registered(hass_url):
  File "/usr/src/app/homeassistant/components/doorbird.py", line 278, in webhook_is_registered
    favs = favs if favs else self.device.favorites()
  File "/usr/local/lib/python3.6/site-packages/doorbirdpy/__init__.py", line 206, in favorites
    return self.__request(self.__url("favorites.cgi", auth=False))
  File "/usr/local/lib/python3.6/site-packages/doorbirdpy/__init__.py", line 297, in __request
    body_data = json.loads(body_json)
  File "/usr/local/lib/python3.6/json/__init__.py", line 354, in loads
    return _default_decoder.decode(s)
  File "/usr/local/lib/python3.6/json/decoder.py", line 339, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/lib/python3.6/json/decoder.py", line 357, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Thanks!! missed that new addition.

Works for me again now in 0.82, used a 20 character token string

Lucky you, canā€™t fix mine, even rebooted doorbird. Any other clues what causes that issue?
My configuration is:

doorbird:
  token: !secret doorbird_token
  devices:
    - host: !secret doorbird_ip
      username: !secret doorbird_user
      password: !secret doorbird_pass
      hass_url_override: !secret local_hass_url
      monitored_conditions:
        - doorbell

I tried with and without hass_url_override, both show the same issue.

It seems to me that it is an issue with doorbirdpy, I opened the issue https://gitlab.com/klikini/doorbirdpy/issues/1 since I could reproduce the same issue just with doorbirdpy. Strange that it does not happen to all.

Soo I investigated a bit more. I used the default user (not the default administrator) and it seems doorbird added some kind of permission system somewhen and the default user does not have ā€œAPI-Operatorā€ rights. So either give that user this rights (with the Doorbird app) or use the admin account or create a new user with that access right. Might be worth mentioning in the documentation as others might also have that issue.

Would explain why not issue for me, was using a user with api operator permission.Thanks

Could you please describe the steps to do this please?

So either give that user this rights (with the Doorbird app)

  1. Open the DoorBird app
  2. Go to Settings
  3. Go to Administration
  4. Login with an admin account
  5. Tap the user on top which you use in home assistant
  6. Tap on Permissions
  7. Make sure API-Operator is on
  8. Back
  9. Save
  10. Done
1 Like

thanks to all who posted hereā€¦my update went smoothly