What I understand from the code is that when doorbell_events are activated, Home Assistant is opening a API endpoint for the DoorBird and will configure the DoorBird API (on startup) with notifications to call the Home Assistant API.
I will leave some feedback when it’s working, but I still need to upgrade Home Assistant.
While I haven’t moved over to this API’s ring notification (still using the proxy version), I have tied this into TTS using Bluetooth speakers with my RPi. I have my Pi connect to my Echos, and they will let me know when someone is ringing the door. There are a few known issues connecting to some Echo devices using RPis, but my Echo dot seems to consistently work. Other ideas may be to flash some lights, send some push notifications, etc.
Here’s my automation converted to use the trigger (but untested). Probably doesn’t make sense to put it in the documentation as I’m using multiple unofficial components to do this.
- id: NotifyDoorbell
alias: 'Notify of ringing doorbell'
initial_state: 'on'
trigger:
platform: event
event_type: doorbird_doorbell
action:
service: tts.google_say
data:
entity_id: media_player.tts_bluetooth_speaker
message: 'Ding Dong! Someone is at the front door!'
Thank you @reynos, this works perfectly. The sonos_snapshot and sonos_restore services where new to me, but this is brilliant to be able to save and restore the state of the speaker.
My issue was that the event was never triggered. I found that when I went in to the Doorbird APP under Administration and HTTP Calls the address of my HomeAssistant server was set to localhost - when changing this to the internal IP of the server the Event was now triggered when pressing the Doorbird Button.
I can connect locally to my HA instance using https://10.x.x.x (albeit after a browser warning that the URL does not match the cert) if that’s any help…
Did you installed a valid certificate on your HA instance? Maybe the DoorBird can only deal with valid certificates. If so, the DoorBird must connect by hostname, not by ip. Please review the DoorBird notification parameters first by making a request to your DoorBird api, something like:
The current DoorBird component code gets the LAN IP of the HA machine and uses that. Once I get time to work and test it, I’ll attempt to read the base_url option of the http component and use that instead, otherwise fall back to the IP address if it isn’t set up.
If you need more info that this I’ll PM you…
http:
api_password: !secret http_api_password
ssl_certificate: !secret ssl_certificate_loc
ssl_key: !secret ssl_key_loc
base_url: !secret base_url
The component should be using the base_url, so double-check that it’s correct.
Otherwise, please go to http://_doorbird_lan_ip_here_/bha-api/notification.cgi, log in with the same user account you have in your component configuration. It should look something like this: