]> git.basschouten.com Git - openhab-addons.git/commitdiff
[tplinksmarthome] Added new devices ES20, KP125, KP405 and KS230 (#11771)
authorHilbrand Bouwkamp <hilbrand@h72.nl>
Mon, 20 Dec 2021 17:58:27 +0000 (18:58 +0100)
committerGitHub <noreply@github.com>
Mon, 20 Dec 2021 17:58:27 +0000 (18:58 +0100)
Signed-off-by: Hilbrand Bouwkamp <hilbrand@h72.nl>
bundles/org.openhab.binding.tplinksmarthome/README.md
bundles/org.openhab.binding.tplinksmarthome/src/main/java/org/openhab/binding/tplinksmarthome/internal/TPLinkSmartHomeThingType.java
bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/i18n/tplinksmarthome.properties
bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/ES20M.xml [new file with mode: 0644]
bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KP125.xml [new file with mode: 0644]
bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KP405.xml [new file with mode: 0644]
bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KS230.xml [new file with mode: 0644]

index e1df96e22350f85988ed98a0b8c4bfe0a6957d9d..591748c1d525639fb2f037fca238c5b6cb44ec95 100644 (file)
@@ -19,51 +19,58 @@ The following TP-Link Smart Devices are supported:
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### HS100 Smart Wi-Fi Plug
+## ES20M Smart Wi-Fi Light Switch, Motion-Activated
 
 * Power On/Off
+* Dimmer
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### HS103 Smart Wi-Fi Plug Lite
+### HS100 Kasa Smart Wi-Fi Plug
 
 * Power On/Off
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### HS105 Smart Wi-Fi Plug
+### HS103 Kasa Smart Wi-Fi Plug Lite
 
 * Power On/Off
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### HS107 Smart Wi-Fi Plug, 2-Outlets
+### HS105 Kasa Smart Wi-Fi Plug
+
+* Power On/Off
+* LED On/Off
+* Wi-Fi signal strength (RSSI)
+
+### HS107 Kasa Smart Wi-Fi Plug, 2-Outlets
 
 * Power On/Off Group
 * Power On/Off 2 Outlets
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### HS110 Smart Wi-Fi Plug
+### HS110 Kasa Smart Wi-Fi Plug
 
 * Power On/Off
 * Energy readings
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### HS200 Smart Wi-Fi Switch
+### HS200 Kasa Smart Wi-Fi Switch
 
 * Power On/Off
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### HS210 Smart Wi-Fi Light Switch 3-Way Kit
+### HS210 Kasa Smart Wi-Fi Light Switch 3-Way Kit
 
 * Power On/Off
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### HS220 Smart Wi-Fi Light Switch, Dimmer
+### HS220 Kasa Smart Wi-Fi Light Switch, Dimmer
 
 * Power On/Off
 * Adjust the brightness
@@ -78,7 +85,7 @@ If you don't use the switch manually often, you can set it to a higher refresh.
 The refresh is only relevant to detect manual using the switch.
 Switching via openHAB activates the switch directly.
 
-### HS300 Smart Wi-Fi Power Strip
+### HS300 Kasa Smart Wi-Fi Power Strip
 
 * Power On/Off Group
 * Power On/Off 6 Outlets
@@ -86,7 +93,7 @@ Switching via openHAB activates the switch directly.
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### LB100 Smart Wi-Fi LED Bulb with Dimmable Light
+### LB100 Kasa Smart Wi-Fi LED Bulb with Dimmable Light
 
 * Power On/Off
 * Adjust the brightness
@@ -95,7 +102,7 @@ Switching via openHAB activates the switch directly.
 
 Switching and Brightness is done using the `brightness` channel.
 
-### LB110 Smart Wi-Fi LED Bulb with Dimmable Light
+### LB110 Kasa Smart Wi-Fi LED Bulb with Dimmable Light
 
 * Power On/Off
 * Adjust the brightness
@@ -104,7 +111,7 @@ Switching and Brightness is done using the `brightness` channel.
 
 Switching and Brightness is done using the `brightness` channel.
 
-### LB120 Smart Wi-Fi LED Bulb with Tunable White Light
+### LB120 Kasa Smart Wi-Fi LED Bulb with Tunable White Light
 
 * Power On/Off
 * Adjust light appearance from soft white (2700k) to daylight (6500k)
@@ -114,7 +121,7 @@ Switching and Brightness is done using the `brightness` channel.
 
 Switching and Brightness is done using the `brightness` channel.
 
-### LB130 Smart Wi-Fi LED Bulb with Color Changing Hue
+### LB130 Kasa Smart Wi-Fi LED Bulb with Color Changing Hue
 
 * Power On/Off
 * Fine-tune colors
@@ -125,7 +132,7 @@ Switching and Brightness is done using the `brightness` channel.
 
 Switching, Brightness and Color is done using the `color` channel.
 
-### LB200 Smart Wi-Fi LED Bulb with Dimmable Light
+### LB200 Kasa Smart Wi-Fi LED Bulb with Dimmable Light
 
 * Power On/Off
 * Adjust the brightness
@@ -134,7 +141,7 @@ Switching, Brightness and Color is done using the `color` channel.
 
 Switching and Brightness is done using the `brightness` channel.
 
-### LB230 Smart Wi-Fi LED Bulb with Color Changing Hue
+### LB230 Kasa Smart Wi-Fi LED Bulb with Color Changing Hue
 
 * Power On/Off
 * Fine-tune colors
@@ -183,7 +190,7 @@ Switching and Brightness is done using the `brightness` channel.
 
 Switching and Brightness is done using the `brightness` channel.
 
-### KL110 Smart Wi-Fi LED Bulb with Dimmable Light
+### KL110 Kasa Smart Wi-Fi LED Bulb with Dimmable Light
 
 * Power On/Off
 * Adjust the brightness
@@ -192,7 +199,7 @@ Switching and Brightness is done using the `brightness` channel.
 
 Switching and Brightness is done using the `brightness` channel.
 
-### KL120 Smart Wi-Fi LED Bulb with Tunable White Light
+### KL120 Kasa Smart Wi-Fi LED Bulb with Tunable White Light
 
 * Power On/Off
 * Adjust light appearance from soft white (2700k) to daylight (6500k)
@@ -213,7 +220,7 @@ Switching and Brightness is done using the `brightness` channel.
 
 Switching, Brightness and Color is done using the `color` channel.
 
-### KL130 Smart Wi-Fi LED Bulb with Color Changing Hue
+### KL130 Kasa Smart Wi-Fi LED Bulb with Color Changing Hue
 
 * Power On/Off
 * Fine-tune colors
@@ -254,27 +261,48 @@ Switching, Brightness and Color is done using the `color` channel.
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### KP200 Smart Wi-Fi Power Outlet, 2-Sockets
+### KP125 Kasa Smart WiFi Plug Slim with Energy Monitoring
+
+* Power On/Off
+* Energy readings
+* LED On/Off
+* Wi-Fi signal strength (RSSI)
+
+### KP200 Kasa Smart Wi-Fi Power Outlet, 2-Sockets
 
 * Power On/Off Group
 * Power On/Off 2 Outlets
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### KP303 Smart Wi-Fi Power Outlet, 3-Sockets
+### KP303 Kasa Smart Wi-Fi Power Outlet, 3-Sockets
 
 * Power On/Off Group
 * Power On/Off 3 Outlets
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
-### KP400 Smart Outdoor Plug
+### KP400 Kasa Smart Outdoor Plug
 
 * Power On/Off Group
 * Power On/Off 2 Outlets
 * LED On/Off
 * Wi-Fi signal strength (RSSI)
 
+### KP405 Kasa Smart Wi-Fi Outdoor Plug-In Dimmer
+
+* Power On/Off
+* Dimmer
+* LED On/Off
+* Wi-Fi signal strength (RSSI)
+
+### KS230 Kasa Smart Wi-Fi Dimmer Switch 3-Way Kit
+
+* Power On/Off
+* Adjust the brightness
+* LED On/Off
+* Wi-Fi signal strength (RSSI)
+
 ### RE270K AC750 Wi-Fi Range Extender with Smart Plug
 
 * Power On/Off (readonly)
@@ -331,19 +359,19 @@ Either `deviceId` or `ipAddress` must be set.
 
 All devices support some of the following channels:
 
-| Channel Type ID     | Item Type                | Description                                    | Thing types supporting this channel                                                                                          |
-|---------------------|--------------------------|------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
-| switch              | Switch                   | Power the device on or off.                    | EP10, EP40, HS100, HS103, HS105, HS107, HS110, HS200, HS210, HS300, KP100, KP105, KP115, KP200, KP303, KP400, RE270K, RE370K |
-| brightness          | Dimmer                   | Set the brightness of device or dimmer.        | HS220, KB100, KL50, KL60, KL110, KL120, LB100, LB110, LB120, LB200                                                           |
-| colorTemperature    | Dimmer                   | Set the color temperature in percentage.       | KB130, KL120, KL125, KL130, KL135, LB120, LB130, LB230                                                                       |
-| colorTemperatureAbs | Number                   | Set the color temperature in Kelvin.           | KB130, KL120, KL125, KL130, KL135, LB120, LB130, LB230                                                                       |
-| color               | Color                    | Set the color of the light.                    | KB130, KL125, KL130, KL135, LB130, LB230                                                                                     |
-| power               | Number:Power             | Actual energy usage in Watt.                   | HS110, HS300, KLxxx, KP115, LBxxx,                                                                                           |
-| eneryUsage          | Number:Energy            | Energy Usage in kWh.                           | HS110, HS300, KP115                                                                                                          |
-| current             | Number:ElectricCurrent   | Actual current usage in Ampere.                | HS110, HS300, KP115                                                                                                          |
-| voltage             | Number:ElectricPotential | Actual voltage usage in Volt.                  | HS110, HS300, KP115                                                                                                          |
-| led                 | Switch                   | Switch the status LED on the device on or off. | EP10, EP40, HS100, HS103, HS105, HS107, HS110, HS200, HS210, HS220, HS300, KP100, KP105, KP115, KP303, KP200, KP400          |
-| rssi                | Number:Power             | Wi-Fi signal strength indicator in dBm.        | All                                                                                                                          |
+| Channel Type ID     | Item Type                | Description                                    | Thing types supporting this channel                                                                                                             |
+|---------------------|--------------------------|------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------|
+| switch              | Switch                   | Power the device on or off.                    | EP10, EP40, HS100, HS103, HS105, HS107, HS110, HS200, HS210, HS300, KP100, KP105, KP115, KP200, KP303, KP400, KS230, RE270K, RE370K             |
+| brightness          | Dimmer                   | Set the brightness of device or dimmer.        | ES20M, HS220, KB100, KL50, KL60, KL110, KL120, KP405, LB100, LB110, LB120, LB200                                                                |
+| colorTemperature    | Dimmer                   | Set the color temperature in percentage.       | KB130, KL120, KL125, KL130, KL135, LB120, LB130, LB230                                                                                          |
+| colorTemperatureAbs | Number                   | Set the color temperature in Kelvin.           | KB130, KL120, KL125, KL130, KL135, LB120, LB130, LB230                                                                                          |
+| color               | Color                    | Set the color of the light.                    | KB130, KL125, KL130, KL135, LB130, LB230                                                                                                        |
+| power               | Number:Power             | Actual energy usage in Watt.                   | HS110, HS300, KLxxx, KP115, KP125, LBxxx,                                                                                                       |
+| eneryUsage          | Number:Energy            | Energy Usage in kWh.                           | HS110, HS300, KP115, KP125                                                                                                                      |
+| current             | Number:ElectricCurrent   | Actual current usage in Ampere.                | HS110, HS300, KP115, KP125                                                                                                                      |
+| voltage             | Number:ElectricPotential | Actual voltage usage in Volt.                  | HS110, HS300, KP115, KP125                                                                                                                      |          
+| led                 | Switch                   | Switch the status LED on the device on or off. | ES20M, EP10, EP40, HS100, HS103, HS105, HS107, HS110, HS200, HS210, HS220, HS300, KP100, KP105, KP115, KP125, KP303, KP200, KP400, KP405, KS230 |
+| rssi                | Number:Power             | Wi-Fi signal strength indicator in dBm.        | All                                                                                                                                             |
 
 The outlet devices (EP40, HS107, HS300, KP200, KP400) have group channels.
 This means the channel is prefixed with the group id.
index 35411f75ddcfe8e44bbf7a0ced449c02bf4595e3..e47d97be697b5e8fe38b7dfeffdf3f64961dcc32 100644 (file)
@@ -58,13 +58,17 @@ public enum TPLinkSmartHomeThingType {
     KP100("kp100", DeviceType.PLUG),
     KP105("kp105", DeviceType.PLUG),
     KP115("kp115", DeviceType.PLUG_WITH_ENERGY),
+    KP125("kp125", DeviceType.PLUG_WITH_ENERGY),
+    KP405("kp405", DeviceType.DIMMER),
 
     // Switch Thing Type UIDs
     HS200("hs200", DeviceType.SWITCH),
     HS210("hs210", DeviceType.SWITCH),
 
     // Dimmer Thing Type UIDs
+    ES20M("es20m", DeviceType.DIMMER),
     HS220("hs220", DeviceType.DIMMER),
+    KS230("ks230", DeviceType.DIMMER),
 
     // Power Strip Thing Type UIDs.
     EP40("ep40", DeviceType.STRIP, 2),
index 8472187fc373e53fa9c3a63cbf2ab7d6476e91e2..6447c4425cfa2885241bad287762573c2d0a58c6 100644 (file)
@@ -11,6 +11,8 @@ thing-type.tplinksmarthome.ep40.label = EP40
 thing-type.tplinksmarthome.ep40.description = TP-Link EP40 Kasa Smart Wi-Fi Outdoor Plug
 thing-type.tplinksmarthome.ep40.group.outlet1.label = Outlet 1
 thing-type.tplinksmarthome.ep40.group.outlet2.label = Outlet 2
+thing-type.tplinksmarthome.es20m.label = ES20M
+thing-type.tplinksmarthome.es20m.description = TP-Link ES20M Smart Wi-Fi Light Switch, Motion-Activated
 thing-type.tplinksmarthome.hs100.label = HS100
 thing-type.tplinksmarthome.hs100.description = TP-Link HS100 Smart Wi-Fi Plug
 thing-type.tplinksmarthome.hs103.label = HS103
@@ -61,6 +63,8 @@ thing-type.tplinksmarthome.kp105.label = KP105
 thing-type.tplinksmarthome.kp105.description = TP-Link KP105 Kasa Wi-Fi Smart Plug - Slim Edition
 thing-type.tplinksmarthome.kp115.label = KP115
 thing-type.tplinksmarthome.kp115.description = TP-Link KP115 Kasa Wi-Fi Smart Plug with Energy Monitoring - Slim Edition
+thing-type.tplinksmarthome.kp125.label = KP125
+thing-type.tplinksmarthome.kp125.description = TP-Link KP125 Kasa Smart WiFi Plug Slim with Energy Monitoring
 thing-type.tplinksmarthome.kp200.label = KP200
 thing-type.tplinksmarthome.kp200.description = TP-Link KP200 Smart Wi-Fi Power Outlet, 2-Sockets
 thing-type.tplinksmarthome.kp200.group.outlet1.label = Outlet 1
@@ -74,6 +78,10 @@ thing-type.tplinksmarthome.kp400.label = KP400
 thing-type.tplinksmarthome.kp400.description = TP-Link KP400 Smart Outdoor Plug
 thing-type.tplinksmarthome.kp400.group.outlet1.label = Outlet 1
 thing-type.tplinksmarthome.kp400.group.outlet2.label = Outlet 2
+thing-type.tplinksmarthome.kp405.label = KP405
+thing-type.tplinksmarthome.kp405.description = TP-Link KP405 Kasa Smart Wi-Fi Outdoor Plug-In Dimmer
+thing-type.tplinksmarthome.ks230.label = KS230
+thing-type.tplinksmarthome.ks230.description = TP-Link KS230 Kasa Smart Wi-Fi Dimmer Switch 3-Way Kit
 thing-type.tplinksmarthome.lb100.label = LB100
 thing-type.tplinksmarthome.lb100.description = TP-Link LB100 Smart Wi-Fi LED Bulb with Dimmable Light
 thing-type.tplinksmarthome.lb110.label = LB110
diff --git a/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/ES20M.xml b/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/ES20M.xml
new file mode 100644 (file)
index 0000000..069cd7b
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="tplinksmarthome"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       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">
+
+       <thing-type id="es20m">
+               <label>ES20M</label>
+               <description>TP-Link ES20M Smart Wi-Fi Light Switch, Motion-Activated</description>
+               <category>WallSwitch</category>
+
+               <channels>
+                       <channel id="brightness" typeId="system.brightness"/>
+                       <channel id="led" typeId="led"/>
+                       <channel id="rssi" typeId="rssi"/>
+               </channels>
+
+               <representation-property>deviceId</representation-property>
+
+               <config-description-ref uri="thing-type:tplinksmarthome:device-switch"/>
+       </thing-type>
+</thing:thing-descriptions>
diff --git a/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KP125.xml b/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KP125.xml
new file mode 100644 (file)
index 0000000..1222e39
--- /dev/null
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="tplinksmarthome"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       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">
+
+       <thing-type id="kp125">
+               <label>KP125</label>
+               <description>TP-Link KP125 Kasa Smart WiFi Plug Slim with Energy Monitoring</description>
+               <category>PowerOutlet</category>
+
+               <channels>
+                       <channel id="switch" typeId="system.power"/>
+                       <channel id="led" typeId="led"/>
+                       <channel id="rssi" typeId="rssi"/>
+                       <channel id="power" typeId="power"/>
+                       <channel id="energyUsage" typeId="energy-usage"/>
+                       <channel id="current" typeId="current"/>
+                       <channel id="voltage" typeId="voltage"/>
+               </channels>
+
+               <representation-property>deviceId</representation-property>
+
+               <config-description-ref uri="thing-type:tplinksmarthome:device-plug"/>
+       </thing-type>
+</thing:thing-descriptions>
diff --git a/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KP405.xml b/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KP405.xml
new file mode 100644 (file)
index 0000000..29afe4d
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="tplinksmarthome"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       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">
+
+       <thing-type id="kp405">
+               <label>KP405</label>
+               <description>TP-Link KP405 Kasa Smart Wi-Fi Outdoor Plug-In Dimmer</description>
+               <category>PowerOutlet</category>
+
+               <channels>
+                       <channel id="switch" typeId="system.power"/>
+                       <channel id="led" typeId="led"/>
+                       <channel id="rssi" typeId="rssi"/>
+               </channels>
+
+               <representation-property>deviceId</representation-property>
+
+               <config-description-ref uri="thing-type:tplinksmarthome:device-plug"/>
+       </thing-type>
+</thing:thing-descriptions>
diff --git a/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KS230.xml b/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/KS230.xml
new file mode 100644 (file)
index 0000000..07bbf2a
--- /dev/null
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="tplinksmarthome"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       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">
+
+       <thing-type id="ks230">
+               <label>KS230</label>
+               <description>TP-Link KS230 Kasa Smart Wi-Fi Dimmer Switch 3-Way Kit</description>
+               <category>WallSwitch</category>
+
+               <channels>
+                       <channel id="brightness" typeId="system.brightness"/>
+                       <channel id="led" typeId="led"/>
+                       <channel id="rssi" typeId="rssi"/>
+               </channels>
+
+               <representation-property>deviceId</representation-property>
+
+               <config-description-ref uri="thing-type:tplinksmarthome:device-switch"/>
+       </thing-type>
+</thing:thing-descriptions>