Skip to content

Commit 5841601

Browse files
oblogic7syssi
authored andcommitted
Add support for multiple Doorbird stations (home-assistant#5205)
1 parent 0df2ecc commit 5841601

File tree

2 files changed

+74
-77
lines changed

2 files changed

+74
-77
lines changed

source/_components/doorbird.markdown

Lines changed: 63 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -20,89 +20,78 @@ To connect your device, add the following to your `configuration.yaml` file:
2020
```yaml
2121
# Example configuration.yaml entry
2222
doorbird:
23-
host: DOORBIRD_IP_OR_HOSTNAME
24-
username: YOUR_USERNAME
25-
password: YOUR_PASSWORD
26-
hass_url_override: HASS_IP
23+
devices:
24+
- host: DOORBIRD_IP_OR_HOSTNAME
25+
username: YOUR_USERNAME
26+
password: YOUR_PASSWORD
27+
hass_url_override: HASS_URL
28+
name: Front Door
29+
- host: DOORBIRD_IP_OR_HOSTNAME
30+
username: YOUR_USERNAME
31+
password: YOUR_PASSWORD
32+
name: Driveway Gate
33+
monitored_conditions:
34+
- doorbell
35+
- motion
2736
```
2837
29-
Configuration variables:
38+
{% configuration %}
39+
devices:
40+
description: List of doorbird devices.
41+
required: true
42+
type: list
43+
keys:
44+
host:
45+
description: The LAN IP address or hostname of your device. You can find this by going to the [DoorBird Online check](http://www.doorbird.com/checkonline) and entering the information from the paper that was included in the box.
46+
required: true
47+
type: string
48+
username:
49+
description: The username of a non-administrator user account on the device.
50+
required: true
51+
type: string
52+
password:
53+
description: The password for the user specified.
54+
required: true
55+
type: string
56+
name:
57+
description: Custom name for this device.
58+
required: false
59+
type: string
60+
hass_url_override:
61+
description: If your DoorBird cannot connect to the machine running Home Assistant because you are using dynamic DNS or some other HTTP configuration (such as HTTPS), specify the LAN IP of the machine here to force a LAN connection.
62+
required: false
63+
type: string
64+
monitored_conditions:
65+
description: Monitor motion and/or doorbell events for this device.
66+
required: false
67+
type: string
68+
keys:
69+
doorbell:
70+
description: Monitor doorbell events
71+
motion:
72+
description: Monitor motion events (Motion monitoring must be enabled on the doorstation via DoorBird app)
3073
31-
- **host** (*Required*): The LAN IP address or hostname of your device. You can find this by going to the [DoorBird Online check](http://www.doorbird.com/checkonline) and entering the information from the paper that was included in the box.
32-
- **username** (*Required*): The username of a non-administrator user account on the device.
33-
- **password** (*Required*): The password for the user specified.
34-
- **doorbell_events** (*Optional*): Setting this to `true` this will register a callback URL with the device so that events can be published to the event bus when the doorbell rings.
35-
- **hass_url_override** (*Optional*): If your DoorBird cannot connect to the machine running Home Assistant because you are using dynamic DNS or some other HTTP configuration (such as HTTPS), specify the LAN IP of the machine here to force a LAN connection.
74+
{% endconfiguration %}
3675
37-
<p class="note warning">
38-
Enabling `doorbell_events` will delete all other registered push notification services with the device every time Home Assistant starts. This will not affect notifications delivered by the DoorBird mobile app.
39-
</p>
40-
41-
### Doorbell Sound Examples
76+
The configuration above is also used by the following components:
77+
- [Camera](../camera.doorbird) - View live and historical event based images
78+
- [Switch](../switch.doorbird) - Enable control of relays and camera night vision
4279
43-
You can create an automation that triggers on event `doorbird_doorbell` to play a doorbell sound when the Doorbird button is pressed. This should work with any media player.
80+
## {% linkable_title Motion and Doorbell Events %}
4481
45-
#### Example using SONOS
82+
Home Assistant will fire an event any time a `monitored_condition` happens on a doorstation. Event names are created using the format `doorbird_{station}_{event}` (Examples: `doorbird_side_entry_button`, `doorbird_side_entry_motion`). You can verify the assigned event names in the Home Assistant log file.
4683

47-
[`SONOS`](http://www.sonos.com) players have features allowing for "snapshotting" the current state of some or all players so those state(s) can be "restored" at a later time. This feature is perfect for implementing a doorbell sound (from Doorbird or any other Doorbell setup for that matter). The [`media_player.sonos`](/components/media_player.sonos/) platform includes the [`SONOS_SNAPSHOT`](/components/media_player.sonos/#service-sonos_snapshot) and [`SONOS_RESTORE`](/components/media_player.sonos/#service-sonos_restore) features. The result of not using these features is any currently playing songs or media will not continue playing after the doorbell sound has played and you will be left with the doorbell sound queued as the last played song. This setup allows for seamless ringing of the doorbell and all SONOS devices continuing nicely on as if nothing had happened.
48-
49-
The example script below takes a snapshot of three SONOS players that are not currently grouped together, joins the three players in a group (so the sound plays at the same time on all players), plays the doorbell MP3 sound, unjoins the players from the group and finally restores the players to their original state. When the players are grouped they are controlled by referring to the `master`.
50-
51-
Automation file:
84+
<p class="note warning">
85+
Enabling any monitored condition will delete all registered notification services on the doorstation every time Home Assistant starts. This will not affect notifications delivered by the DoorBird mobile app.
86+
</p>
5287

88+
### {% linkable_title Automation Example %}
5389
```yaml
54-
- alias: Doorbird ring
90+
- alias: Doorbird Ring
5591
trigger:
5692
platform: event
57-
event_type: doorbird_doorbell
93+
event_type: doorbird_side_entry_button
5894
action:
59-
service: script.turn_on
60-
entity_id: script.doorbell
61-
```
62-
63-
Script file:
64-
65-
```yaml
66-
doorbell:
67-
alias: Ring Doorbell
68-
sequence:
69-
- service: media_player.sonos_snapshot
70-
data:
71-
entity_id:
72-
- media_player.kitchen
73-
- media_player.master_bedroom
74-
- media_player.study
75-
- service: media_player.sonos_join
76-
data:
77-
master: media_player.study
78-
entity_id:
79-
- media_player.kitchen
80-
- media_player.master_bedroom
81-
- media_player.study
82-
- service: media_player.play_media
83-
data:
84-
entity_id: media_player.study # the group master
85-
media_content_id: http://10.1.1.10/sounds/doorbell.mp3 # this is on a NAS but could be HASS local
86-
media_content_type: music
87-
- service: media_player.volume_set
88-
data:
89-
entity_id: # can still control the volume of grouped players indivdually
90-
- media_player.study
91-
- media_player.kitchen
92-
- media_player.master_bedrom
93-
volume_level: 0.50
94-
- delay:
95-
seconds: 4 # wait while the sound plays
96-
- service: media_player.sonos_unjoin
97-
data:
98-
entity_id:
99-
- media_player.kitchen
100-
- media_player.master_bedroom
101-
- media_player.study
102-
- service: media_player.sonos_restore
103-
data:
104-
entity_id:
105-
- media_player.kitchen
106-
- media_player.master_bedroom
107-
- media_player.study
108-
```
95+
service: light.turn_on
96+
entity_id: light.side_entry_porch
97+
```

source/_components/switch.doorbird.markdown

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ switch:
3030
- open_door
3131
```
3232
33-
Configuration variables:
34-
35-
- **switches** (*Required*): A list of switches to include. Possible entries are `light_on` for control of the IR array and `open_door` for control of an electronic door strike or alarm.
33+
{% configuration %}
34+
switches:
35+
description: A list of switches to include. Possible entries are `light_on` for control of the IR array and `open_door` for control of an electronic door strike or alarm.
36+
required: false
37+
type: list
38+
keys:
39+
light_on:
40+
description: Enable the IR light for 3 minutes.
41+
open_door:
42+
description: Activate DoorBird door relay
43+
{% endconfiguration %}

0 commit comments

Comments
 (0)