[hdpowerview] Add support for repeaters (#12061)

* Add support for repeaters.

Fixes #12060

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Simplify thing type filtering.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Improve robustness of configuration ID validation/initialization.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Convert repeater-identify to command channel.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Fix logged warning.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Skip unneeded bridge status logic.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Skip redundant logging.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>

* Fix chanenl type label for blinking enabled.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
This commit is contained in:
Jacob Laursen
2022-01-24 22:42:53 +01:00
committed by GitHub
parent 3d24cfc535
commit 9d361c1fa3
17 changed files with 682 additions and 96 deletions

View File

@@ -13,10 +13,11 @@ By using a scene to control multiple shades at once, the shades will all begin m
## Supported Things
| Thing | Thing Type | Description |
|-------|------------|-------------|
| hub | Bridge | The PowerView hub provides the interface between your network and the shade's radio network. It also contains channels used to interact with scenes. |
| shade | Thing | A motorized shade. |
| Thing | Thing Type | Description |
|----------|------------|-------------|
| hub | Bridge | The PowerView hub provides the interface between your network and the shade's radio network. It also contains channels used to interact with scenes. |
| shade | Thing | A motorized shade. |
| repeater | Thing | A PowerView signal repeater. |
## Discovery
@@ -46,16 +47,25 @@ If in the future, you add additional shades or scenes to your system, the bindin
| hardRefresh | The number of minutes between hard refreshes of the PowerView hub's shade state (default 180 three hours). See [Refreshing the PowerView Hub Cache](#Refreshing-the-PowerView-Hub-Cache). |
| hardRefreshBatteryLevel | The number of hours between hard refreshes of battery levels from the PowerView Hub (or 0 to disable, defaulting to weekly). See [Refreshing the PowerView Hub Cache](#Refreshing-the-PowerView-Hub-Cache). |
### Thing Configuration for PowerView Shades
### Thing Configuration for PowerView Shades and Accessories
PowerView shades should preferably be configured via the automatic discovery process.
It is quite difficult to configure manually as the `id` of the shade is not exposed in the PowerView app.
However, the configuration parameters are described below:
PowerView shades and repeaters should preferably be configured via the automatic discovery process.
It is quite difficult to configure manually as the `id` of the shade or repeater is not exposed in the
PowerView app. However, the configuration parameters are described below.
#### Thing Configuration for PowerView Shades
| Configuration Parameter | Description |
|-------------------------|-------------|
| id | The ID of the PowerView shade in the app. Must be an integer. |
#### Thing Configuration for PowerView Repeaters
| Configuration Parameter | Description |
|-------------------------|-------------|
| id | The ID of the PowerView repeater in the app. Must be an integer. |
## Channels
### Channels for Hub (Thing type `hub`)
@@ -88,6 +98,13 @@ All of these channels appear in the binding, but only those which have a physica
| batteryVoltage | Number:ElectricPotential | Battery voltage reported by the shade. |
| signalStrength | Number | Signal strength (0 for no or unknown signal, 1 for weak, 2 for average, 3 for good or 4 for excellent) |
### Channels for Repeaters (Thing type `repeater`)
| Channel | Item Type | Description |
|-----------------|-----------|-------------------------------|
| identify | String | Flash repeater to identify. Valid values are: IDENTIFY |
| blinkingEnabled | Switch | Blink during commands. |
### Roller Shutter Up/Down Position vs. Open/Close State
The `position` and `secondary` channels are Rollershutter types.
@@ -191,6 +208,7 @@ For single shades the refresh takes the item's channel into consideration:
```
Bridge hdpowerview:hub:g24 "Luxaflex Hub" @ "Living Room" [host="192.168.1.123"] {
Thing shade s50150 "Living Room Shade" @ "Living Room" [id="50150"]
Thing repeater r16384 "Bedroom Repeater" @ "Bedroom" [id="16384"]
}
```
@@ -200,16 +218,19 @@ Shade items:
```
Rollershutter Living_Room_Shade_Position "Living Room Shade Position [%.0f %%]" {channel="hdpowerview:shade:g24:s50150:position"}
Rollershutter Living_Room_Shade_Secondary "Living Room Shade Secondary Position [%.0f %%]" {channel="hdpowerview:shade:g24:s50150:secondary"}
Dimmer Living_Room_Shade_Vane "Living Room Shade Vane [%.0f %%]" {channel="hdpowerview:shade:g24:s50150:vane"}
Switch Living_Room_Shade_Battery_Low_Alarm "Living Room Shade Battery Low Alarm [%s]" {channel="hdpowerview:shade:g24:s50150:lowBattery"}
Switch Living_Room_Shade_Calibrate "Living Room Shade Calibrate" {channel="hdpowerview:shade:g24:s50150:calibrate", autoupdate="false"}
```
Repeater items:
```
String Bedroom_Repeater_Identify "Bedroom Repeater Identify" {channel="hdpowerview:repeater:g24:r16384:identify"}
Switch Bedroom_Repeater_BlinkingEnabled "Bedroom Repeater Blinking Enabled [%s]" {channel="hdpowerview:repeater:g24:r16384:blinkingEnabled"}
```
Scene items:
```
@@ -219,8 +240,12 @@ Switch Living_Room_Shades_Scene_Heart "Living Room Shades Scene Heart" <blinds>
### `demo.sitemap` File
```
Frame label="Living Room Shades" {
Switch item=Living_Room_Shades_Scene_Open
Slider item=Living_Room_Shade_1_Position 
Frame label="Living Room Shades" {
Switch item=Living_Room_Shades_Scene_Open
Slider item=Living_Room_Shade_1_Position
}
Frame label="Bedroom" {
Switch item=Bedroom_Repeater_Identify mappings=[IDENTIFY="Identify"]
Switch item=Bedroom_Repeater_BlinkingEnabled
}
```