|
| 1 | +# DahuaDoor Binding |
| 2 | + |
| 3 | +This binding integrates Dahua VTO Villastation door controllers with openHAB, enabling doorbell notifications, camera snapshots, and remote door control. |
| 4 | + |
| 5 | +## Supported Things |
| 6 | + |
| 7 | +| Thing Type | Thing ID | Description | |
| 8 | +| ---------- | --------- | ------------------------------------------------ | |
| 9 | +| VTO2202 | `vto2202` | Dahua VTO2202 outdoor station with single button | |
| 10 | +| VTO3211 | `vto3211` | Dahua VTO3211 outdoor station with dual buttons | |
| 11 | + |
| 12 | +## Discovery |
| 13 | + |
| 14 | +Automatic discovery is not supported. |
| 15 | +Things must be manually configured. |
| 16 | + |
| 17 | +## Thing Configuration |
| 18 | + |
| 19 | +### VTO2202/VTO3211 Device |
| 20 | + |
| 21 | +Single-button outdoor station. |
| 22 | + |
| 23 | +| Parameter | Type | Required | Description | |
| 24 | +| ------------ | ---- | -------- | ---------------------------------------------------------------------------- | |
| 25 | +| hostname | text | Yes | Hostname or IP address of the device (e.g., 192.168.1.100) | |
| 26 | +| username | text | Yes | Username to access the device | |
| 27 | +| password | text | Yes | Password to access the device | |
| 28 | +| snapshotPath | text | Yes | Linux path where image files are stored (e.g., /var/lib/openhab/door-images) | |
| 29 | + |
| 30 | +**Note:** Windows paths are not currently supported. |
| 31 | + |
| 32 | +## Channels |
| 33 | + |
| 34 | +### VTO2202 Channels (Single Button) |
| 35 | + |
| 36 | +| Channel ID | Type | Read/Write | Description | |
| 37 | +| ----------- | ------- | ---------- | --------------------------------------------------------- | |
| 38 | +| bell-button | Trigger | Read | Triggers when doorbell button is pressed (event: PRESSED) | |
| 39 | +| door-image | Image | Read | Camera snapshot taken when doorbell is pressed | |
| 40 | +| open-door-1 | Switch | Write | Command to open door relay 1 | |
| 41 | +| open-door-2 | Switch | Write | Command to open door relay 2 | |
| 42 | + |
| 43 | +### VTO3211 Channels (Dual Button) |
| 44 | + |
| 45 | +| Channel ID | Type | Read/Write | Description | |
| 46 | +| ------------- | ------- | ---------- | -------------------------------------------------- | |
| 47 | +| bell-button-1 | Trigger | Read | Triggers when button 1 is pressed (event: PRESSED) | |
| 48 | +| bell-button-2 | Trigger | Read | Triggers when button 2 is pressed (event: PRESSED) | |
| 49 | +| door-image-1 | Image | Read | Camera snapshot when button 1 is pressed | |
| 50 | +| door-image-2 | Image | Read | Camera snapshot when button 2 is pressed | |
| 51 | +| open-door-1 | Switch | Write | Command to open door relay 1 | |
| 52 | +| open-door-2 | Switch | Write | Command to open door relay 2 | |
| 53 | + |
| 54 | +## Full Example |
| 55 | + |
| 56 | +### VTO2202 Example (Single Button) |
| 57 | + |
| 58 | +#### Thing Configuration |
| 59 | + |
| 60 | +```java |
| 61 | +Thing dahuadoor:vto2202:frontdoor "Front Door Station" @ "Entrance" [ |
| 62 | + hostname="192.168.1.100", |
| 63 | + username="admin", |
| 64 | + password="password123", |
| 65 | + snapshotPath="/var/lib/openhab/door-images" |
| 66 | +] |
| 67 | +``` |
| 68 | + |
| 69 | +#### Item Configuration |
| 70 | + |
| 71 | +```java |
| 72 | +Switch OpenFrontDoor "Open Front Door" <door> { channel="dahuadoor:vto2202:frontdoor:open-door-1" } |
| 73 | +Image FrontDoorImage "Front Door Camera" <camera> { channel="dahuadoor:vto2202:frontdoor:door-image" } |
| 74 | +``` |
| 75 | + |
| 76 | +#### Rule Configuration |
| 77 | + |
| 78 | +Send smartphone notification with camera image when doorbell is pressed (requires openHAB Cloud Connector): |
| 79 | + |
| 80 | +```java |
| 81 | +rule "Doorbell Notification" |
| 82 | +when |
| 83 | + Channel "dahuadoor:vto2202:frontdoor:bell-button" triggered PRESSED |
| 84 | +then |
| 85 | + sendBroadcastNotification("Visitor at the door", "door", |
| 86 | + "entrance", "Entrance", "door-notifications", null, |
| 87 | + "item:FrontDoorImage", |
| 88 | + "Open Door=command:OpenFrontDoor:ON", null) |
| 89 | +end |
| 90 | +``` |
| 91 | + |
| 92 | +### VTO3211 Example (Dual Button) |
| 93 | + |
| 94 | +#### Thing Configuration |
| 95 | + |
| 96 | +```java |
| 97 | +Thing dahuadoor:vto3211:entrance "Entrance Station" @ "Entrance" [ |
| 98 | + hostname="192.168.1.101", |
| 99 | + username="admin", |
| 100 | + password="password123", |
| 101 | + snapshotPath="/var/lib/openhab/door-images" |
| 102 | +] |
| 103 | +``` |
| 104 | + |
| 105 | +#### Item Configuration |
| 106 | + |
| 107 | +```java |
| 108 | +Switch OpenApartment1 "Open Apartment 1" <door> { channel="dahuadoor:vto3211:entrance:open-door-1" } |
| 109 | +Switch OpenApartment2 "Open Apartment 2" <door> { channel="dahuadoor:vto3211:entrance:open-door-2" } |
| 110 | +Image Apartment1Image "Apartment 1 Camera" <camera> { channel="dahuadoor:vto3211:entrance:door-image-1" } |
| 111 | +Image Apartment2Image "Apartment 2 Camera" <camera> { channel="dahuadoor:vto3211:entrance:door-image-2" } |
| 112 | +``` |
| 113 | + |
| 114 | +#### Rule Configuration |
| 115 | + |
| 116 | +Send notifications for both buttons: |
| 117 | + |
| 118 | +```java |
| 119 | +rule "Apartment 1 Doorbell" |
| 120 | +when |
| 121 | + Channel "dahuadoor:vto3211:entrance:bell-button-1" triggered PRESSED |
| 122 | +then |
| 123 | + sendBroadcastNotification("Visitor at Apartment 1", "door", |
| 124 | + "entrance", "Entrance", "door-notifications", null, |
| 125 | + "item:Apartment1Image", |
| 126 | + "Open Door=command:OpenApartment1:ON", null) |
| 127 | +end |
| 128 | + |
| 129 | +rule "Apartment 2 Doorbell" |
| 130 | +when |
| 131 | + Channel "dahuadoor:vto3211:entrance:bell-button-2" triggered PRESSED |
| 132 | +then |
| 133 | + sendBroadcastNotification("Visitor at Apartment 2", "door", |
| 134 | + "entrance", "Entrance", "door-notifications", null, |
| 135 | + "item:Apartment2Image", |
| 136 | + "Open Door=command:OpenApartment2:ON", null) |
| 137 | +end |
| 138 | +``` |
0 commit comments