[insteon] added ability to configure the channels with parameters from the ui (#8959)

Signed-off-by: Rob Nielsen <rob.nielsen@yahoo.com>
This commit is contained in:
robnielsen 2020-11-11 21:11:17 -06:00 committed by GitHub
parent 3c3e9adbb1
commit 5b7f1b0e67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 121 additions and 16 deletions

View File

@ -199,10 +199,10 @@ Sample things file:
Bridge insteon:network:home [port="/dev/ttyUSB0"] { Bridge insteon:network:home [port="/dev/ttyUSB0"] {
Thing device 22F8A8 [address="22.F8.A8", productKey="F00.00.15"] { Thing device 22F8A8 [address="22.F8.A8", productKey="F00.00.15"] {
Channels: Channels:
Type switch : keypadButtonA [ group=3 ] Type keypadButtonA : keypadButtonA [ group=3 ]
Type switch : keypadButtonB [ group=4 ] Type keypadButtonB : keypadButtonB [ group=4 ]
Type switch : keypadButtonC [ group=5 ] Type keypadButtonC : keypadButtonC [ group=5 ]
Type switch : keypadButtonD [ group=6 ] Type keypadButtonD : keypadButtonD [ group=6 ]
} }
Thing device 238D93 [address="23.8D.93", productKey="F00.00.12"] Thing device 238D93 [address="23.8D.93", productKey="F00.00.12"]
Thing device 238F55 [address="23.8F.55", productKey="F00.00.11"] { Thing device 238F55 [address="23.8F.55", productKey="F00.00.11"] {
@ -333,7 +333,7 @@ Bridge insteon:network:home [port="/dev/ttyUSB0"] {
} }
Thing device AABBCD [address="AA.BB.CD", productKey="F00.00.15"] { Thing device AABBCD [address="AA.BB.CD", productKey="F00.00.15"] {
Channels: Channels:
Type dimmer : loadDimmer [dimmermax=60] Type loadDimmer : loadDimmer [dimmermax=60]
} }
} }
``` ```
@ -576,10 +576,10 @@ To make the buttons available, add the following:
Bridge insteon:network:home [port="/dev/ttyUSB0"] { Bridge insteon:network:home [port="/dev/ttyUSB0"] {
Thing device AABBCC [address="AA.BB.CC", productKey="F00.00.15"] { Thing device AABBCC [address="AA.BB.CC", productKey="F00.00.15"] {
Channels: Channels:
Type switch : keypadButtonA [ group="0xf3" ] Type keypadButtonA : keypadButtonA [ group="0xf3" ]
Type switch : keypadButtonB [ group="0xf4" ] Type keypadButtonB : keypadButtonB [ group="0xf4" ]
Type switch : keypadButtonC [ group="0xf5" ] Type keypadButtonC : keypadButtonC [ group="0xf5" ]
Type switch : keypadButtonD [ group="0xf6" ] Type keypadButtonD : keypadButtonD [ group="0xf6" ]
} }
} }
``` ```
@ -747,7 +747,7 @@ The format is `broadcastOnOff#X` where X is the group that you want to be able t
Bridge insteon:network:home [port="/dev/ttyUSB0"] { Bridge insteon:network:home [port="/dev/ttyUSB0"] {
Thing device AABBCC [address="AA.BB.CC", productKey="0x000045"] { Thing device AABBCC [address="AA.BB.CC", productKey="0x000045"] {
Channels: Channels:
Type switch : broadcastOnOff#2 Type broadcastOnOff : broadcastOnOff#2
} }
} }
@ -802,7 +802,7 @@ A typical example would be a switch configured to broadcast to a group, and one
Bridge insteon:network:home [port="/dev/ttyUSB0"] { Bridge insteon:network:home [port="/dev/ttyUSB0"] {
Thing device AABBCC [address="AA.BB.CC", productKey="0x000045"] { Thing device AABBCC [address="AA.BB.CC", productKey="0x000045"] {
Channels: Channels:
Type switch : broadcastOnOff#3 [related="AA.BB.DD"] Type broadcastOnOff : broadcastOnOff#3 [related="AA.BB.DD"]
} }
Thing device AABBDD [address="AA.BB.DD", productKey="F00.00.11"] Thing device AABBDD [address="AA.BB.DD", productKey="F00.00.11"]
} }

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<config-description:config-descriptions
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0 https://openhab.org/schemas/config-description-1.0.0.xsd">
<config-description uri="channel-type:insteon:button">
<parameter name="related" type="text">
<label>Related Devices</label>
<description>List of related Insteon devices separated by a '+' sign.</description>
</parameter>
</config-description>
<config-description uri="channel-type:insteon:contact">
<parameter name="related" type="text">
<label>Related Devices</label>
<description>List of related Insteon devices separated by a '+' sign.</description>
</parameter>
</config-description>
<config-description uri="channel-type:insteon:dimmer">
<parameter name="dimmermax" type="integer" min="1" max="99">
<label>Maximum Brightness</label>
<description>Maximum brightness of the dimmer in percentage.</description>
</parameter>
<parameter name="related" type="text">
<label>Related Devices</label>
<description>List of related Insteon devices separated by a '+' sign.</description>
</parameter>
</config-description>
<config-description uri="channel-type:insteon:keypad-button">
<parameter name="group" type="text">
<label>Group</label>
<description>Insteon broadcast group configured for this button.</description>
</parameter>
<parameter name="related" type="text">
<label>Related Devices</label>
<description>List of related Insteon devices separated by a '+' sign.</description>
</parameter>
</config-description>
<config-description uri="channel-type:insteon:keypad-button-fastonoff">
<parameter name="group" type="text">
<label>Group</label>
<description>Insteon broadcast group configured for this button.</description>
</parameter>
</config-description>
<config-description uri="channel-type:insteon:keypad-button-manualchange">
<parameter name="group" type="text">
<label>Group</label>
<description>Insteon broadcast group configured for this button.</description>
</parameter>
</config-description>
<config-description uri="channel-type:insteon:switch">
<parameter name="related" type="text">
<label>Related Devices</label>
<description>List of related Insteon devices separated by a '+' sign.</description>
</parameter>
</config-description>
</config-description:config-descriptions>

View File

@ -138,56 +138,67 @@
<channel-type id="bottomOutlet"> <channel-type id="bottomOutlet">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Bottom Outlet</label> <label>Bottom Outlet</label>
<config-description-ref uri="channel-type:insteon:switch"/>
</channel-type> </channel-type>
<channel-type id="buttonA"> <channel-type id="buttonA">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Button A</label> <label>Button A</label>
<config-description-ref uri="channel-type:insteon:button"/>
</channel-type> </channel-type>
<channel-type id="buttonB"> <channel-type id="buttonB">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Button B</label> <label>Button B</label>
<config-description-ref uri="channel-type:insteon:button"/>
</channel-type> </channel-type>
<channel-type id="buttonC"> <channel-type id="buttonC">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Button C</label> <label>Button C</label>
<config-description-ref uri="channel-type:insteon:button"/>
</channel-type> </channel-type>
<channel-type id="buttonD"> <channel-type id="buttonD">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Button D</label> <label>Button D</label>
<config-description-ref uri="channel-type:insteon:button"/>
</channel-type> </channel-type>
<channel-type id="buttonE"> <channel-type id="buttonE">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Button E</label> <label>Button E</label>
<config-description-ref uri="channel-type:insteon:button"/>
</channel-type> </channel-type>
<channel-type id="buttonF"> <channel-type id="buttonF">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Button F</label> <label>Button F</label>
<config-description-ref uri="channel-type:insteon:button"/>
</channel-type> </channel-type>
<channel-type id="buttonG"> <channel-type id="buttonG">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Button G</label> <label>Button G</label>
<config-description-ref uri="channel-type:insteon:button"/>
</channel-type> </channel-type>
<channel-type id="buttonH"> <channel-type id="buttonH">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Button H</label> <label>Button H</label>
<config-description-ref uri="channel-type:insteon:button"/>
</channel-type> </channel-type>
<channel-type id="broadcastOnOff"> <channel-type id="broadcastOnOff">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Broadcast On/Off</label> <label>Broadcast On/Off</label>
<config-description-ref uri="channel-type:insteon:switch"/>
</channel-type> </channel-type>
<channel-type id="contact"> <channel-type id="contact">
<item-type>Contact</item-type> <item-type>Contact</item-type>
<label>Contact</label> <label>Contact</label>
<config-description-ref uri="channel-type:insteon:contact"/>
</channel-type> </channel-type>
<channel-type id="coolSetPoint"> <channel-type id="coolSetPoint">
@ -198,6 +209,7 @@
<channel-type id="dimmer"> <channel-type id="dimmer">
<item-type>Dimmer</item-type> <item-type>Dimmer</item-type>
<label>Dimmer</label> <label>Dimmer</label>
<config-description-ref uri="channel-type:insteon:dimmer"/>
</channel-type> </channel-type>
<channel-type id="fan"> <channel-type id="fan">
@ -218,41 +230,49 @@
<channel-type id="fastOnOffButtonA"> <channel-type id="fastOnOffButtonA">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Fast On/Off Button A</label> <label>Fast On/Off Button A</label>
<config-description-ref uri="channel-type:insteon:keypad-button-fastonoff"/>
</channel-type> </channel-type>
<channel-type id="fastOnOffButtonB"> <channel-type id="fastOnOffButtonB">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Fast On/Off Button B</label> <label>Fast On/Off Button B</label>
<config-description-ref uri="channel-type:insteon:keypad-button-fastonoff"/>
</channel-type> </channel-type>
<channel-type id="fastOnOffButtonC"> <channel-type id="fastOnOffButtonC">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Fast On/Off Button C</label> <label>Fast On/Off Button C</label>
<config-description-ref uri="channel-type:insteon:keypad-button-fastonoff"/>
</channel-type> </channel-type>
<channel-type id="fastOnOffButtonD"> <channel-type id="fastOnOffButtonD">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Fast On/Off Button D</label> <label>Fast On/Off Button D</label>
<config-description-ref uri="channel-type:insteon:keypad-button-fastonoff"/>
</channel-type> </channel-type>
<channel-type id="fastOnOffButtonE"> <channel-type id="fastOnOffButtonE">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Fast On/Off Button E</label> <label>Fast On/Off Button E</label>
<config-description-ref uri="channel-type:insteon:keypad-button-fastonoff"/>
</channel-type> </channel-type>
<channel-type id="fastOnOffButtonF"> <channel-type id="fastOnOffButtonF">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Fast On/Off Button F</label> <label>Fast On/Off Button F</label>
<config-description-ref uri="channel-type:insteon:keypad-button-fastonoff"/>
</channel-type> </channel-type>
<channel-type id="fastOnOffButtonG"> <channel-type id="fastOnOffButtonG">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Fast On/Off Button G</label> <label>Fast On/Off Button G</label>
<config-description-ref uri="channel-type:insteon:keypad-button-fastonoff"/>
</channel-type> </channel-type>
<channel-type id="fastOnOffButtonH"> <channel-type id="fastOnOffButtonH">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Fast On/Off Button H</label> <label>Fast On/Off Button H</label>
<config-description-ref uri="channel-type:insteon:keypad-button-fastonoff"/>
</channel-type> </channel-type>
<channel-type id="heatSetPoint"> <channel-type id="heatSetPoint">
@ -288,41 +308,49 @@
<channel-type id="keypadButtonA"> <channel-type id="keypadButtonA">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Keypad Button A</label> <label>Keypad Button A</label>
<config-description-ref uri="channel-type:insteon:keypad-button"/>
</channel-type> </channel-type>
<channel-type id="keypadButtonB"> <channel-type id="keypadButtonB">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Keypad Button B</label> <label>Keypad Button B</label>
<config-description-ref uri="channel-type:insteon:keypad-button"/>
</channel-type> </channel-type>
<channel-type id="keypadButtonC"> <channel-type id="keypadButtonC">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Keypad Button C</label> <label>Keypad Button C</label>
<config-description-ref uri="channel-type:insteon:keypad-button"/>
</channel-type> </channel-type>
<channel-type id="keypadButtonD"> <channel-type id="keypadButtonD">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Keypad Button D</label> <label>Keypad Button D</label>
<config-description-ref uri="channel-type:insteon:keypad-button"/>
</channel-type> </channel-type>
<channel-type id="keypadButtonE"> <channel-type id="keypadButtonE">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Keypad Button E</label> <label>Keypad Button E</label>
<config-description-ref uri="channel-type:insteon:keypad-button"/>
</channel-type> </channel-type>
<channel-type id="keypadButtonF"> <channel-type id="keypadButtonF">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Keypad Button F</label> <label>Keypad Button F</label>
<config-description-ref uri="channel-type:insteon:keypad-button"/>
</channel-type> </channel-type>
<channel-type id="keypadButtonG"> <channel-type id="keypadButtonG">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Keypad Button G</label> <label>Keypad Button G</label>
<config-description-ref uri="channel-type:insteon:keypad-button"/>
</channel-type> </channel-type>
<channel-type id="keypadButtonH"> <channel-type id="keypadButtonH">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Keypad Button H</label> <label>Keypad Button H</label>
<config-description-ref uri="channel-type:insteon:keypad-button"/>
</channel-type> </channel-type>
<channel-type id="kWh"> <channel-type id="kWh">
@ -348,6 +376,7 @@
<channel-type id="lightDimmer"> <channel-type id="lightDimmer">
<item-type>Dimmer</item-type> <item-type>Dimmer</item-type>
<label>Light Dimmer</label> <label>Light Dimmer</label>
<config-description-ref uri="channel-type:insteon:dimmer"/>
</channel-type> </channel-type>
<channel-type id="lightLevel"> <channel-type id="lightLevel">
@ -363,16 +392,19 @@
<channel-type id="loadDimmer"> <channel-type id="loadDimmer">
<item-type>Dimmer</item-type> <item-type>Dimmer</item-type>
<label>Load Dimmer</label> <label>Load Dimmer</label>
<config-description-ref uri="channel-type:insteon:dimmer"/>
</channel-type> </channel-type>
<channel-type id="loadSwitch"> <channel-type id="loadSwitch">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Load Switch</label> <label>Load Switch</label>
<config-description-ref uri="channel-type:insteon:switch"/>
</channel-type> </channel-type>
<channel-type id="loadSwitchFastOnOff"> <channel-type id="loadSwitchFastOnOff">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Load Switch Fast On/Off</label> <label>Load Switch Fast On/Off</label>
<config-description-ref uri="channel-type:insteon:switch"/>
</channel-type> </channel-type>
<channel-type id="loadSwitchManualChange"> <channel-type id="loadSwitchManualChange">
@ -393,41 +425,49 @@
<channel-type id="manualChangeButtonA"> <channel-type id="manualChangeButtonA">
<item-type>Number</item-type> <item-type>Number</item-type>
<label>Manual Change Button A</label> <label>Manual Change Button A</label>
<config-description-ref uri="channel-type:insteon:keypad-button-manualchange"/>
</channel-type> </channel-type>
<channel-type id="manualChangeButtonB"> <channel-type id="manualChangeButtonB">
<item-type>Number</item-type> <item-type>Number</item-type>
<label>Manual Change Button B</label> <label>Manual Change Button B</label>
<config-description-ref uri="channel-type:insteon:keypad-button-manualchange"/>
</channel-type> </channel-type>
<channel-type id="manualChangeButtonC"> <channel-type id="manualChangeButtonC">
<item-type>Number</item-type> <item-type>Number</item-type>
<label>Manual Change Button C</label> <label>Manual Change Button C</label>
<config-description-ref uri="channel-type:insteon:keypad-button-manualchange"/>
</channel-type> </channel-type>
<channel-type id="manualChangeButtonD"> <channel-type id="manualChangeButtonD">
<item-type>Number</item-type> <item-type>Number</item-type>
<label>Manual Change Button D</label> <label>Manual Change Button D</label>
<config-description-ref uri="channel-type:insteon:keypad-button-manualchange"/>
</channel-type> </channel-type>
<channel-type id="manualChangeButtonE"> <channel-type id="manualChangeButtonE">
<item-type>Number</item-type> <item-type>Number</item-type>
<label>Manual Change Button E</label> <label>Manual Change Button E</label>
<config-description-ref uri="channel-type:insteon:keypad-button-manualchange"/>
</channel-type> </channel-type>
<channel-type id="manualChangeButtonF"> <channel-type id="manualChangeButtonF">
<item-type>Number</item-type> <item-type>Number</item-type>
<label>Manual Change Button F</label> <label>Manual Change Button F</label>
<config-description-ref uri="channel-type:insteon:keypad-button-manualchange"/>
</channel-type> </channel-type>
<channel-type id="manualChangeButtonG"> <channel-type id="manualChangeButtonG">
<item-type>Number</item-type> <item-type>Number</item-type>
<label>Manual Change Button G</label> <label>Manual Change Button G</label>
<config-description-ref uri="channel-type:insteon:keypad-button-manualchange"/>
</channel-type> </channel-type>
<channel-type id="manualChangeButtonH"> <channel-type id="manualChangeButtonH">
<item-type>Number</item-type> <item-type>Number</item-type>
<label>Manual Change Button H</label> <label>Manual Change Button H</label>
<config-description-ref uri="channel-type:insteon:keypad-button-manualchange"/>
</channel-type> </channel-type>
<channel-type id="notification"> <channel-type id="notification">
@ -463,6 +503,7 @@
<channel-type id="switch"> <channel-type id="switch">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Switch</label> <label>Switch</label>
<config-description-ref uri="channel-type:insteon:switch"/>
</channel-type> </channel-type>
<channel-type id="systemMode"> <channel-type id="systemMode">
@ -488,6 +529,7 @@
<channel-type id="topOutlet"> <channel-type id="topOutlet">
<item-type>Switch</item-type> <item-type>Switch</item-type>
<label>Top Outlet</label> <label>Top Outlet</label>
<config-description-ref uri="channel-type:insteon:switch"/>
</channel-type> </channel-type>
<channel-type id="update"> <channel-type id="update">