forked from openhab/openhab-addons
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented some improvement suggestions from PR code review
Signed-off-by: Ondrej Pecta <[email protected]>
- Loading branch information
Showing
24 changed files
with
390 additions
and
234 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
65 changes: 37 additions & 28 deletions
65
addons/binding/org.openhab.binding.somfytahoma/ESH-INF/config/config.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<config-description:config-descriptions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:config-description="http://eclipse.org/smarthome/schemas/config-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/config-description/v1.0.0 http://eclipse.org/smarthome/schemas/config-description-1.0.0.xsd"> | ||
xmlns:config-description="http://eclipse.org/smarthome/schemas/config-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/config-description/v1.0.0 http://eclipse.org/smarthome/schemas/config-description-1.0.0.xsd"> | ||
|
||
<config-description uri="thing-type:somfytahoma:device"> | ||
<parameter name="url" type="text"> | ||
<label>SomfyTahoma device URL</label> | ||
<description>The identifier of this Somfy device</description> | ||
<required>true</required> | ||
<advanced>true</advanced> | ||
</parameter> | ||
</config-description> | ||
<config-description uri="thing-type:somfytahoma:device"> | ||
<parameter name="url" type="text"> | ||
<label>Somfy Tahoma device URL</label> | ||
<description>The identifier of this Somfy device</description> | ||
<required>true</required> | ||
<advanced>true</advanced> | ||
</parameter> | ||
</config-description> | ||
|
||
<config-description uri="thing-type:somfytahoma:gateway"> | ||
<parameter name="id" type="text"> | ||
<label>Somfy Tahoma gateway ID</label> | ||
<description>The identifier of this Somfy gateway</description> | ||
<required>true</required> | ||
<advanced>true</advanced> | ||
</parameter> | ||
</config-description> | ||
|
||
<config-description uri="bridge-type:somfytahoma:bridge"> | ||
<parameter name="email" type="text"> | ||
<label>Email Address</label> | ||
<description>Email address for TahomaLink portal</description> | ||
<required>true</required> | ||
</parameter> | ||
<config-description uri="bridge-type:somfytahoma:bridge"> | ||
<parameter name="email" type="text"> | ||
<label>Email Address</label> | ||
<description>Email address for TahomaLink portal</description> | ||
<required>true</required> | ||
</parameter> | ||
|
||
<parameter name="password" type="text"> | ||
<context>password</context> | ||
<label>Password</label> | ||
<description>Password for TahomaLink portal</description> | ||
<required>true</required> | ||
</parameter> | ||
<parameter name="password" type="text"> | ||
<context>password</context> | ||
<label>Password</label> | ||
<description>Password for TahomaLink portal</description> | ||
<required>true</required> | ||
</parameter> | ||
|
||
<parameter name="refresh" type="integer" required="false"> | ||
<label>Refresh refresh</label> | ||
<description>Specifies the refresh of thing states in seconds</description> | ||
<default>30</default> | ||
</parameter> | ||
</config-description> | ||
<parameter name="refresh" type="integer" required="false"> | ||
<label>Refresh refresh</label> | ||
<description>Specifies the refresh of thing states in seconds</description> | ||
<default>30</default> | ||
</parameter> | ||
</config-description> | ||
</config-description:config-descriptions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 23 additions & 23 deletions
46
addons/binding/org.openhab.binding.somfytahoma/ESH-INF/thing/awning.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 4 additions & 14 deletions
18
addons/binding/org.openhab.binding.somfytahoma/ESH-INF/thing/bridge.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<thing:thing-descriptions bindingId="somfytahoma" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd"> | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd"> | ||
|
||
<!-- Bridge --> | ||
<bridge-type id="bridge"> | ||
<label>Somfy Tahoma Bridge</label> | ||
<description>Somfy Tahoma bridge enabling communication with Somfy devices</description> | ||
|
||
<channels> | ||
<channel id="version" typeId="version"/> | ||
</channels> | ||
<channels/> | ||
<config-description-ref uri="bridge-type:somfytahoma:bridge"/> | ||
</bridge-type> | ||
|
||
<!-- Bridge firmware version --> | ||
<channel-type id="version"> | ||
<item-type>String</item-type> | ||
<label>SomfyTahoma Firmware Version</label> | ||
<description>Version channel for SomfyTahoma Binding</description> | ||
<state readOnly="true"/> | ||
</channel-type> | ||
|
||
</thing:thing-descriptions> |
24 changes: 24 additions & 0 deletions
24
addons/binding/org.openhab.binding.somfytahoma/ESH-INF/thing/gateway.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<thing:thing-descriptions bindingId="somfytahoma" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd"> | ||
|
||
<thing-type id="gateway"> | ||
<supported-bridge-type-refs> | ||
<bridge-type-ref id="bridge" /> | ||
</supported-bridge-type-refs> | ||
<label>Somfy Tahoma Gateway</label> | ||
<channels> | ||
<channel id="version" typeId="version"></channel> | ||
</channels> | ||
<config-description-ref uri="thing-type:somfytahoma:gateway"/> | ||
</thing-type> | ||
|
||
<!-- Gateway firmware version --> | ||
<channel-type id="version"> | ||
<item-type>String</item-type> | ||
<label>Somfy Tahoma Firmware Version</label> | ||
<description>Version channel for SomfyTahoma Binding</description> | ||
<state readOnly="true"/> | ||
</channel-type> | ||
</thing:thing-descriptions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 24 additions & 24 deletions
48
addons/binding/org.openhab.binding.somfytahoma/ESH-INF/thing/rollershutter.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<thing:thing-descriptions bindingId="somfytahoma" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd"> | ||
xmlns:thing="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0" | ||
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/thing-description/v1.0.0 http://eclipse.org/smarthome/schemas/thing-description-1.0.0.xsd"> | ||
|
||
<thing-type id="rollershutter"> | ||
<supported-bridge-type-refs> | ||
<bridge-type-ref id="bridge"/> | ||
<thing-type id="rollershutter"> | ||
<supported-bridge-type-refs> | ||
<bridge-type-ref id="bridge"/> | ||
</supported-bridge-type-refs> | ||
<label>Somfy Rollershutter</label> | ||
<channels> | ||
<channel id="position" typeId="position"></channel> | ||
<channel id="control" typeId="control"></channel> | ||
</channels> | ||
<config-description-ref uri="thing-type:somfytahoma:device"/> | ||
</thing-type> | ||
<label>Somfy Rollershutter</label> | ||
<channels> | ||
<channel id="position" typeId="position"></channel> | ||
<channel id="control" typeId="control"></channel> | ||
</channels> | ||
<config-description-ref uri="thing-type:somfytahoma:device"/> | ||
</thing-type> | ||
|
||
<channel-type id="position"> | ||
<item-type>Dimmer</item-type> | ||
<label>Somfy Roller Shutter Position</label> | ||
<description>Position of the roller shutter (only for IO devices)</description> | ||
<state max="100" min="0" step="1" pattern="%d %%" readOnly="false"></state> | ||
</channel-type> | ||
<channel-type id="control"> | ||
<item-type>Rollershutter</item-type> | ||
<label>Somfy Roller Shutter Control</label> | ||
<description>Rollershutter control (UP, DOWN, MY/STOP)</description> | ||
<state readOnly="false"></state> | ||
</channel-type> | ||
<channel-type id="position"> | ||
<item-type>Dimmer</item-type> | ||
<label>Somfy Roller Shutter Position</label> | ||
<description>Position of the roller shutter (only for IO devices)</description> | ||
<state max="100" min="0" step="1" pattern="%d %%" readOnly="false"></state> | ||
</channel-type> | ||
<channel-type id="control"> | ||
<item-type>Rollershutter</item-type> | ||
<label>Somfy Roller Shutter Control</label> | ||
<description>Rollershutter control (UP, DOWN, MY/STOP)</description> | ||
<state readOnly="false"></state> | ||
</channel-type> | ||
|
||
</thing:thing-descriptions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# Somfy Tahoma Binding | ||
|
||
This binding integrates the [Somfy Tahoma](https://www.somfy.fr/produits/domotique/maison-connectee-tahoma) home automation system. | ||
|
||
## Supported Things | ||
|
||
Currently supports these things | ||
- bridge (Somfy Tahoma bridge, which can discover roller shutters, awnings, switches and action groups) | ||
- bridge (Somfy Tahoma bridge, which can discover gateways, roller shutters, awnings, switches and action groups) | ||
- gateways (Somfy Tahoma gateway - getting firmware version) | ||
- roller shutters (UP, DOWN, STOP control of a roller shutter). IO Homecontrol devices are allowed to set exact position of a shutter (0-100%) | ||
- awnings (UP, DOWN, STOP control of an awning). IO Homecontrol devices are allowed to set exact position of an awning (0-100%) | ||
- on/off switches (connected by RTS, IO protocol or supported by USB stick - z-wave, enocean, ..) | ||
|
@@ -32,7 +34,9 @@ Please see the example below. | |
|
||
## Channels | ||
|
||
A bridge exposes this read only channel: | ||
A bridge does not expose and channel. | ||
|
||
Gateways expose this read only channel: | ||
- version (this is a firmware version of your Tahoma device) | ||
|
||
Roller shutters and awnings expose these channels: | ||
|
@@ -54,6 +58,7 @@ A on/off thing has this channel: | |
.things file | ||
``` | ||
Bridge somfytahoma:bridge:237dbae7 "Somfy Tahoma Bridge" [ email="[email protected]", password="MyPassword", refresh=30 ] { | ||
Thing gateway 1214-4519-8041 "Tahoma gateway" [ id="1214-4519-8041" ] | ||
Thing rollershutter 31da8dac-8e09-455a-bc7a-6ed70f740001 "Bedroom" [ url="io://0204-1234-8041/6825356" ] | ||
Thing rollershutter 87bf0403-a45d-4037-b874-28f4ece30004 "Living room" [ url="io://0204-1234-8041/3832644" ] | ||
Thing rollershutter 68bee082-63ab-421d-9830-3ea561601234 "Hall" [ url="io://0204-1234-8041/4873641" ] | ||
|
@@ -66,6 +71,7 @@ Bridge somfytahoma:bridge:237dbae7 "Somfy Tahoma Bridge" [ email="[email protected]", | |
``` | ||
.items file | ||
``` | ||
String TahomaVersion "Tahoma version [%s]" { channel="somfytahoma:gateway:237dbae7:1214-4519-8041:version" } | ||
Rollershutter RollerShutterBedroom "Roller shutter [%d %%]" {channel="somfytahoma:rollershutter:237dbae7:31da8dac-8e09-455a-bc7a-6ed70f740001:control"} | ||
Dimmer RollerShutterBedroomD "Roller shutter dimmer [%.1f]" {channel="somfytahoma:rollershutter:237dbae7:31da8dac-8e09-455a-bc7a-6ed70f740001:position"} | ||
Rollershutter RollerShutterLiving "Roller shutter [%d %%]" {channel="somfytahoma:rollershutter:237dbae7:87bf0403-a45d-4037-b874-28f4ece30004:control" } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.