Updated external content (Jenkins build 123)

pull/1325/head
openHAB Build Server 2020-12-13 00:33:04 +00:00
parent 01eee8d5e4
commit 58cc18ea07
10 changed files with 1226 additions and 1486 deletions

File diff suppressed because one or more lines are too long

View File

@ -28,7 +28,7 @@ This binding supports the following Thing types
| panel | Thing | The basic representation of the alarm System. |
| partition | Thing | Represents a controllable area within the alarm system. |
| zone | Thing | Represents a physical device such as a door, window, or motion sensor. |
| keypad | Thing | Represents a keypad. (Not yet functional) |
| keypad | Thing | Represents a keypad. |
## Discovery
@ -36,7 +36,7 @@ First the bridge must be **manually** defined. The serial port, baud rate and pr
After the bridge is manually added and available to openHAB, the binding will automatically start to discover partitions and zones and add them to the discovery inbox.
Note:
There is currently no support to discover the available keypads.
There is no support to discover the available keypads.
## Prerequisites
@ -55,7 +55,7 @@ For the binding to work the panel has also to be programmed appropriately.
| 211 | 2 | 1,2,3,4,5 | (Flags 4 and 5 are not yet functional. Can be ignored.) |
| 211 | 3 | | |
| 211 | 4 | 5,7,8 | |
| 212 | 1 | 192 | Programming the LCD keypad address. (Not yet functional. Can be ignored.) |
| 212 | 1 | 192 | Programming the LCD keypad address. |
### Programming locations for the NX-584E home automation module
@ -69,24 +69,23 @@ For the binding to work the panel has also to be programmed appropriately.
| 3 | 2 | 1,2,3,4,5 | (Flags 4 and 5 are not yet functional. Can be ignored.) |
| 3 | 3 | | |
| 3 | 4 | 5,7,8 | |
| 4 | 1 | 192 | Programming the LCD keypad address. (Not yet functional. Can be ignored.) |
| 4 | 1 | 192 | Programming the LCD keypad address. |
## Thing Configuration
The things can be configured either through the online configuration utility via discovery, or manually through the configuration file.
The following table shows the available configuration parameters for each thing.
| Thing | Configuration Parameters |
|-----------|------------------------------------------------------------------------------------------------|
| bridge | `serialPort` - Serial port for the bridge - Required |
| | `protocol` - Protocol used for the communication (Binary, Ascii) - Required - Default = Binary |
| | `baud` - Baud rate of the bridge - Required - Default = 9600 |
| | `maxZoneNumber` - Maximum zone number to be added during discovery - Required - Default = 16 |
| partition | `partitionNumber` - Partition number (1-8) - Required |
| zone | `zoneNumber` - Zone number (1-192) - Required |
| keypad | `keypadAddress` - Keypad address (192-255) - Required |
A full example is further below.
| Thing | Configuration Parameters |
|-----------|-----------------------------------------------------------------------------------------------------|
| bridge | `serialPort` - Serial port for the bridge - Required |
| | `protocol` - Protocol used for the communication (Binary, Ascii) - Required - Default = Binary |
| | `baud` - Baud rate of the bridge - Required - Default = 9600 |
| | `maxZoneNumber` - Maximum zone number to be added during discovery - Required - Default = 16 |
| partition | `partitionNumber` - Partition number (1-8) - Required |
| zone | `zoneNumber` - Zone number (1-192) - Required |
| keypad | `keypadAddress` - Keypad address (192-255) - Required |
| keypad | `terminalModeSeconds` - The number of Seconds the keypad has to remain in Terminal Mode. - Required |
## Channels
@ -228,6 +227,66 @@ Caddx Alarm things support a variety of channels as seen below in the following
| zone_loss_of_supervision | Switch | Zone Condition | Loss of supervision |
| zone_alarm_memory | Switch | Zone Condition | Alarm memory |
| zone_bypass_memory | Switch | Zone Condition | Bypass memory |
| keypad_key_pressed | String | Button press | The pressed button on the keypad |
## Thing actions
The binding supports the following actions on the respective things.
| Thing | Name | Description | Specification |
|-----------|---------------------------------|----------------------------------------------------------|-----------------------------------------------------------------|
| bridge | restart | Restart the binding | void restart() |
| zone | bypass | Bypass the zone | void bypass() |
| keypad | enterTerminalMode | Enter terminal mode on the selected keypad | void enterTerminalMode() |
| keypad | sendKeypadTextMessage | Display a message on the Keypad | void sendKeypadTextMessage(String displayLocation, String text) |
| partition | turnOffAnySounderOrAlarm | Turn off any sounder or alarm | void turnOffAnySounderOrAlarm(String pin) |
| partition | disarm | Dis-arm | void disarm(String pin) |
| partition | armInAwayMode | Arm in away mode | void armInAwayMode(String pin) |
| partition | armInStayMode | Arm in stay mode | void armInStayMode(String pin) |
| partition | cancel | Cancel | void cancel(String pin) |
| partition | initiateAutoArm | Initiate auto arm | void initiateAutoArm(String pin) |
| partition | startWalkTestMode | Start walk-test mode | void startWalkTestMode(String pin) |
| partition | stopWalkTestMode | Stop walk-test mode | void stopWalkTestMode(String pin) |
| partition | stay | Stay (1 button arm / toggle interiors) | void stay() |
| partition | chime | Chime (toggle chime mode) | void chime() |
| partition | exit | Exit (1 button arm / toggle instant) | void exit() |
| partition | bypassInteriors | Bypass Interiors | void bypassInteriors() |
| partition | firePanic | Fire Panic | void firePanic() |
| partition | medicalPanic | Medical Panic | void medicalPanic() |
| partition | policePanic | Police Panic | void policePanic() |
| partition | smokeDetectorReset | Smoke detector reset | void smokeDetectorReset() |
| partition | autoCallbackDownload | Auto callback download | void autoCallbackDownload() |
| partition | manualPickupDownload | Manual pickup download | void manualPickupDownload() |
| partition | enableSilentExit | Enable silent exit | void enableSilentExit() |
| partition | performTest | Perform test | void performTest() |
| partition | groupBypass | Group Bypass | void groupBypass() |
| partition | auxiliaryFunction1 | Auxiliary Function 1 | void auxiliaryFunction1() |
| partition | auxiliaryFunction2 | Auxiliary Function 2 | void auxiliaryFunction2() |
| partition | startKeypadSounder | Start keypad sounder | void startKeypadSounder() |
| panel | turnOffAnySounderOrAlarmOnPanel | Turn off any sounder or alarm on all partitions | void turnOffAnySounderOrAlarm(String pin) |
| panel | disarmOnPanel | Dis-arm all partitions | void disarm(String pin) |
| panel | armInAwayModeOnPanel | Arm in away mode on all partitions | void armInAwayMode(String pin) |
| panel | armInStayModeOnPanel | Arm in stay mode on all partitions | void armInStayMode(String pin) |
| panel | cancelOnPanel | Cancel command on all partitions | void cancel(String pin) |
| panel | initiateAutoArmOnPanel | Initiate auto arm on all partitions | void initiateAutoArm(String pin) |
| panel | startWalkTestModeOnPanel | Start walk-test mode on all partitions | void startWalkTestMode(String pin) |
| panel | stopWalkTestModeOnPanel | Stop walk-test mode on all partitions | void stopWalkTestMode(String pin) |
| panel | stayOnPanel | Stay (1 button arm / toggle interiors) on all partitions | void stay() |
| panel | chimeOnPanel | Chime (toggle chime mode) on all partitions | void chime() |
| panel | exitOnPanel | Exit (1 button arm / toggle instant) on all partitions | void exit() |
| panel | bypassInteriorsOnPanel | Bypass Interiors on all partitions | void bypassInteriors() |
| panel | firePanicOnPanel | Fire Panic on all partitions | void firePanic() |
| panel | medicalPanicOnPanel | Medical Panic on all partitions | void medicalPanic() |
| panel | policePanicOnPanel | Police Panic on all partitions | void policePanic() |
| panel | smokeDetectorResetOnPanel | Smoke detector reset on all partitions | void smokeDetectorReset() |
| panel | autoCallbackDownloadOnPanel | Auto callback download on all partitions | void autoCallbackDownload() |
| panel | manualPickupDownloadOnPanel | Manual pickup download on all partitions | void manualPickupDownload() |
| panel | enableSilentExitOnPanel | Enable silent exit on all partitions | void enableSilentExit() |
| panel | performTestOnPanel | Perform test on all partitions | void performTest() |
| panel | groupBypassOnPanel | Group Bypass on all partitions | void groupBypass() |
| panel | auxiliaryFunction1OnPanel | Auxiliary Function 1 on all partitions | void auxiliaryFunction1() |
| panel | auxiliaryFunction2OnPanel | Auxiliary Function 2 on all partitions | void auxiliaryFunction2() |
| panel | startKeypadSounderOnPanel | Start keypad sounder on all partitions | void startKeypadSounder() |
## Full Example
@ -286,3 +345,20 @@ sitemap home label="Home" {
}
}
```
The following is a rule example with calling of an action on the binding
```
rule "Zone Bypass on Chime Off"
when
Item caddx_partition_thebridge_partition1_partition_chime_mode_on changed from ON to OFF
then
val actions = getActions("caddx","caddx:zone:thebridge:zone4")
if (null === actions) {
logWarn("actions", "Actions not found, check thing ID for the Zone")
return
}
actions.bypass()
end
```

View File

@ -177,7 +177,7 @@ Other devices support
| color | Color | R/W | Color of an multi-color light | `colorlight`, `extendedcolorlight`, `lightgroup`|
| color_temperature | Number | R/W | Color temperature in Kelvin. The value range is determined by each individual light | `colortemperaturelight`, `extendedcolorlight`, `lightgroup` |
| effect | String | R/W | Effect selection. Allowed commands are set dynamically | `colorlight` |
| effectSpeed | Number | R/W | Effect Speed | `colorlight` |
| effectSpeed | Number | W | Effect Speed | `colorlight` |
| lock | Switch | R/W | Lock (ON) or unlock (OFF) the doorlock| `doorlock` |
| position | Rollershutter | R/W | Position of the blind | `windowcovering` |
| heatsetpoint | Number:Temperature | R/W | Target Temperature in °C | `thermostat` |
@ -187,11 +187,11 @@ Other devices support
| alert | Switch | R/W | Turn alerts on/off | `warningdevice`, `lightgroup` |
| all_on | Switch | R | All lights in group are on | `lightgroup` |
| any_on | Switch | R | Any light in group is on | `lightgroup` |
| scene | String | W | Recall a scene. Allowed commands are set dynamically | `lightgroup` |
**NOTE:** For groups `color` and `color_temperature` are used for sending commands to the group.
Their state represents the last command send to the group, not necessarily the actual state of the group.
### Trigger Channels
The dimmer switch additionally supports trigger channels.

View File

@ -3,7 +3,7 @@ id: gardena
label: Gardena
title: Gardena - Bindings
type: binding
description: "This is the binding for [Gardena smart system](https://www.gardena.com/de/rasenpflege/smartsystem/)."
description: "This is the binding for [Gardena smart system](https://www.gardena.com/smart)."
since: 3x
logo: images/addons/gardena.png
install: auto
@ -15,24 +15,22 @@ install: auto
# Gardena Binding
This is the binding for [Gardena smart system](https://www.gardena.com/de/rasenpflege/smartsystem/).
This is the binding for [Gardena smart system](https://www.gardena.com/smart).
This binding allows you to integrate, view and control Gardena smart system devices in the openHAB environment.
## Supported Things
Devices connected to Gardena smart system, currently:
| Thing type | Name |
|--------------------------|--------------------------|
| bridge | smart Garden Gateway |
| mower | smart Sileno(+) Mower |
| watering_computer | smart Water Control |
| sensor | smart Sensor |
| electronic_pressure_pump | smart Pressure Pump |
| power | smart Power |
| ic24 | smart Irrigation Control |
The schedules are not yet integrated!
| Thing type | Name |
|--------------------------|----------------------------------------------------|
| bridge | smart Gateway |
| mower | smart SILENO(+), SILENO city, SILENO life Mower |
| sensor | smart Sensor |
| pump | smart Pressure Pump |
| power | smart Power Adapter |
| water_control | smart Water Control |
| irrigation_control | smart Irrigation Control |
## Discovery
@ -42,109 +40,94 @@ An account must be specified, all things for an account are discovered automatic
There are several settings for an account:
| Name | Required | Description |
|-----------------------|----------|------------------------------------------------------------------------------------------|
| **email** | yes | The email address for logging into the Gardena smart system |
| **password** | yes | The password for logging into the Gardena smart system |
| **sessionTimeout** | no | The timeout in minutes for a session to Gardena smart system (default = 30) |
| **connectionTimeout** | no | The timeout in seconds for connections to Gardena smart system (default = 10) |
| **refresh** | no | The interval in seconds for refreshing the data from Gardena smart system (default = 60) |
| Name | Required | Description |
|-----------------------|----------|-----------------------------------------------------------------------------------------------------|
| **email** | yes | The email address for logging into the Gardena smart system |
| **password** | yes | The password for logging into the Gardena smart system |
| **apiKey** | yes | The Gardena smart system integration API key |
| **connectionTimeout** | no | The timeout in seconds for connections to Gardena smart system integration API (default = 10) |
**Example**
### Obtaining your API Key
1. Goto https://developer.husqvarnagroup.cloud/, sign in using your GARDENA smart system account and accept the terms of use
2. Create and save a new application via the 'Create application' button
3. Connect both _Authentication API_ and _GARDENA smart system API_ to your application via the 'Connect new API' button
4. Copy the application key to use with this binding as _apiKey_
## Examples
### Things
Minimal Thing configuration:
```java
Bridge gardena:account:home [ email="...", password="..." ]
```
Configuration with refresh:
```java
Bridge gardena:account:home [ email="...", password="...", refresh=30 ]
Bridge gardena:account:home [ email="...", password="...", apiKey="..." ]
```
Configuration of multiple bridges:
```java
Bridge gardena:account:home1 [ email="...", password="..." ]
Bridge gardena:account:home2 [ email="...", password="..." ]
Bridge gardena:account:home1 [ email="...", password="...", apiKey="..." ]
Bridge gardena:account:home2 [ email="...", password="...", apiKey="..." ]
```
Once a connection to an account is established, connected Things are discovered automatically.
Alternatively, you can manually configure a Thing:
Alternatively, you can manually configure Things:
```perl
Bridge gardena:account:home [ email="...", password="..." ]
```java
Bridge gardena:account:home [ email="...", password="...", apiKey="..." ]
{
Thing mower myMower [ deviceId="c81ad682-6e45-42ce-bed1-6b4eff5620c8" ]
Thing water_control myWaterControl [ deviceId="c81ad682-6e45-42ce-bed1-6b4eff5620c8" ]
Thing sensor mySensor [ deviceId="c81ad682-6e45-42ce-bed1-6b4eff5620c8" ]
Thing pump myEPP [ deviceId="c81ad682-6e45-42ce-bed1-6b4eff5620c8" ]
Thing power myPowerSocket [ deviceId="c81ad682-6e45-42ce-bed1-6b4eff5620c8" ]
Thing irrigation_control myIrrigationControl [ deviceId="c81ad682-6e45-42ce-bed1-6b4eff5620c8" ]
}
```
## Items
### Items
In the items file, you can link items to channels of your Things:
```java
Number Battery_Level "Battery [%d %%]" {channel="gardena:mower:home:myMower:battery#level"}
Number Mower_Battery_Level "Battery [%d %%]" {channel="gardena:mower:home:myMower:common#batteryLevel"}
```
## Sensor refresh
### Sensor refresh
You can send a REFRESH command to items linked to these Sensor channels:
Sensor refresh commands are not yet supported by the Gardena smart system integration API.
- ambient_temperature#temperature
- soil_temperature#temperature
- humidity#humidity
- light#light
In the console:
```shell
smarthome:send ITEM_NAME REFRESH
```
In scripts:
```
import org.openhab.core.types.RefreshType
...
sendCommand(ITEM_NAME, RefreshType.REFRESH)
```
## Examples
### Example configuration
```
// smart Water Control
Switch Watering_Valve "Valve" { channel="gardena:watering_computer:home:myValve:outlet#valve_open" }
Number Watering_Duration "Duration [%d min]" { channel="gardena:watering_computer:home:myValve:outlet#button_manual_override_time" }
String WC_Valve_Activity "Valve Activity" { channel="gardena:water_control:home:myWateringComputer:valve#activity" }
Number WC_Valve_Duration "Last Watering Duration [%d min]" { channel="gardena:water_control:home:myWateringComputer:valve#duration" }
// smart Power Plug
String Power_Timer "Power Timer [%s]" { channel="gardena:power:home:myPowerplug:power#power_timer" }
Number WC_Valve_cmd_Duration "Command Duration [%d min]" { channel="gardena:water_control:home:myWateringComputer:valve_commands#commandDuration" }
Switch WC_Valve_cmd_OpenWithDuration "Watering Timer [%d min]" { channel="gardena:water_control:home:myWateringComputer:valve_commands#start_seconds_to_override" }
Switch WC_Valve_cmd_CloseValve "Stop Switch" { channel="gardena:water_control:home:myWateringComputer:valve_commands#stop_until_next_task" }
// smart Irrigation Control
Number Watering_Timer_1 "Watering Timer 1 [%d min] { channel="gardena:ic24:home:myIrrigationController:watering#watering_timer_1" }
// smart Pressure Pump
Number Pump_Timer "Pump Timer [%d min] { channel="gardena:electronic_pressure_pump:home:myPressurePump:manual_watering#manual_watering_timer" }
smarthome:status WC_Valve_Duration // returns the duration of the last watering request if still active, or 0
smarthome:status WC_Valve_Activity // returns the current valve activity (CLOSED|MANUAL_WATERING|SCHEDULED_WATERING)
```
All channels are read-only, except the command group and the lastUpdate timestamp
```
smarthome:send WC_Valve_cmd_Duration.sendCommand(10) // set the duration for the command to 10min
smarthome:send WC_Valve_cmd_OpenWithDuration.sendCommand(ON) // start watering
smarthome:send WC_Valve_cmd_CloseValve.sendCommand(ON) // stop any active watering
```
Watering_Duration.sendCommand(30) // 30 minutes
Watering_Valve.sendCommand(ON)
Power_Timer.sendCommand("on")
Power_Timer.sendCommand("off")
Power_Timer.sendCommand("180") // on for 180 seconds
If you send a REFRESH command to the last update timestamp (no matter which thing), **ALL** items from **ALL** things are updated
```
DateTime LastUpdate "LastUpdate [%1$td.%1$tm.%1$tY %1$tH:%1$tM]" { channel="gardena:water_control:home:myWateringComputer:common#lastUpdate_timestamp" }
Watering_Timer_1.sendCommand(0) // turn off watering
Watering_Timer_1.sendCommand(30) // turn on for 30 minutes
Pump_Timer.sendCommand(0) // turn the pump off
Pump_Timer.sendCommand(30) // turn the pump on for 30 minutes
// refresh ALL items
smarthome:send LastUpdate REFRESH
```
### Debugging and Tracing
@ -161,12 +144,21 @@ Set the logging back to normal
log:set INFO org.openhab.binding.gardena
```
**Note:** The Online/Offline status is not always valid. I'm using the ```connection_status``` property Gardena sends for each device, but it seems not to be very reliable.
My watering control for example shows offline, but it is still working.
I have to press the button on the device, then the status changed to online.
My mower always shows online, regardless of whether it is switched on or off.
This is not a binding issue, it must be fixed by Gardena.
When the binding sends a command to a device, it communicates only with the Gardena online service.
It has not control over, whether the command is sent from the online service via your gateway to the device.
**Notes and known limitations:**
When the binding sends a command to a device, it communicates only with the Gardena smart system integration API.
It has no control over whether the command is sent from the online service via your gateway to the device.
It is the same as if you send the command in the Gardena App.
Schedules, sensor-refresh commands, irrigation control master valve configuration etc. are not supported.
This binding relies on the GARDENA smart system integration API.
Further API documentation: https://developer.1689.cloud/apis/GARDENA+smart+system+API
###Troubleshooting
Occasionally it can happen that the API key is no longer valid.
```
HTTP protocol violation: Authentication challenge without WWW-Authenticate header
```
If this error message appears in the log file, simply renew or delete/create a new API key as described in 'Obtaining your API Key' and restart openHAB.

File diff suppressed because it is too large Load Diff

View File

@ -110,17 +110,11 @@
</channel-type>
<!-- keypad -->
<channel-type id="led">
<item-type>Number</item-type>
<label>Keypad Led</label>
<description>Keypad Led (0=Off, 1=On, 2=Flashing)</description>
<state pattern="%d" readOnly="true">
<options>
<option value="0">Off</option>
<option value="1">On</option>
<option value="2">Flashing</option>
</options>
</state>
<channel-type id="keypad_button_press">
<item-type>String</item-type>
<label>Key</label>
<description>Key text</description>
<state pattern="%s" readOnly="true"></state>
</channel-type>
</thing:thing-descriptions>

View File

@ -12,12 +12,24 @@
<label>Caddx Alarm Keypad</label>
<description>Represents any of the keypads of the Caddx Alarm System.</description>
<channels>
<channel id="keypad_key_pressed" typeId="keypad_button_press">
<label>Key</label>
<description>Key pressed</description>
</channel>
</channels>
<representation-property>keypadAddress</representation-property>
<config-description>
<parameter name="keypadAddress" type="text" required="true">
<parameter name="keypadAddress" type="integer" required="true" min="192" max="255">
<label>Keypad Address</label>
<description>The Keypad Address.</description>
<default>192</default>
</parameter>
<parameter name="terminalModeSeconds" type="integer" required="true" min="1" max="120">
<label>Terminal Mode Seconds</label>
<description>The number of Seconds the keypad has to remain in Terminal Mode.</description>
</parameter>
</config-description>
</thing-type>

View File

@ -16,6 +16,7 @@
<channel typeId="alert" id="alert"/>
<channel typeId="color" id="color"/>
<channel typeId="ct" id="color_temperature"/>
<channel typeId="scene" id="scene"/>
</channels>
<representation-property>uid</representation-property>
@ -67,4 +68,13 @@
<state pattern="%d K" min="15" max="100000" step="100"/>
</channel-type>
<channel-type id="scene">
<item-type>String</item-type>
<label>Recall Scene</label>
<tags>
<tag>Lighting</tag>
</tags>
</channel-type>
</thing:thing-descriptions>

View File

@ -4,39 +4,31 @@
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- Gardena Smart Home Account -->
<!-- Gardena smart system Account -->
<bridge-type id="account">
<label>Gardena Smart Home Account</label>
<description>The Gardena Smart Home Account</description>
<label>Gardena Smart System Account</label>
<description>The Gardena smart system account</description>
<config-description>
<parameter name="email" type="text" required="true">
<label>Email</label>
<description>Email address for logging in to Gardena Smart Home</description>
<description>Email address for logging in to Gardena smart system</description>
</parameter>
<parameter name="password" type="text" required="true">
<label>Password</label>
<context>password</context>
<description>Password for logging in to Gardena Smart Home</description>
<description>Password for logging in to Gardena smart system</description>
</parameter>
<parameter name="sessionTimeout" type="integer">
<label>Session Timeout</label>
<description>The timeout in minutes for a session to Gardena Smart Home</description>
<advanced>true</advanced>
<default>30</default>
<parameter name="apiKey" type="text" required="true">
<label>API Key</label>
<description>The Gardena smart system integration API key</description>
</parameter>
<parameter name="connectionTimeout" type="integer">
<parameter name="connectionTimeout" type="integer" min="0" unit="s">
<label>Connection Timeout</label>
<description>The timeout in seconds for connections to Gardena Smart Home</description>
<advanced>true</advanced>
<description>The timeout in seconds for connections to Gardena smart system integration API</description>
<unitLabel>seconds</unitLabel>
<default>10</default>
</parameter>
<parameter name="refresh" type="integer">
<label>Refresh Interval</label>
<description>The interval in seconds for refreshing the data from Gardena Smart Home</description>
<advanced>true</advanced>
<default>60</default>
</parameter>
</config-description>
</bridge-type>
</thing:thing-descriptions>