From bb28e6a528a9dc6989a539ea951407006deca349 Mon Sep 17 00:00:00 2001 From: Josh Proehl Date: Fri, 6 Sep 2024 14:31:33 -0500 Subject: [PATCH] [tplinksmarthome] Add new device: EP25 (#17377) The EP25 appears to be a version of the KP125 that lacks the LED. Because of this, and per the comments in #16027, this commit mimics #11771 and simply copies the KP125, without the LED channel. Signed-off-by: Josh Proehl --- .../README.md | 12 ++++++--- .../internal/TPLinkSmartHomeThingType.java | 1 + .../OH-INF/i18n/tplinksmarthome.properties | 2 ++ .../src/main/resources/OH-INF/thing/EP25.xml | 25 +++++++++++++++++++ 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/EP25.xml diff --git a/bundles/org.openhab.binding.tplinksmarthome/README.md b/bundles/org.openhab.binding.tplinksmarthome/README.md index a8ceaf87bdab5..cbdcbbfb3d82e 100644 --- a/bundles/org.openhab.binding.tplinksmarthome/README.md +++ b/bundles/org.openhab.binding.tplinksmarthome/README.md @@ -12,6 +12,12 @@ The following TP-Link Smart Devices are supported: - LED On/Off - Wi-Fi signal strength (RSSI) +### EP25 Kasa Smart WiFi Plug Slim with Energy Monitoring + +- Power On/Off +- Energy readings +- Wi-Fi signal strength (RSSI) + ### EP40 Kasa Smart Wi-Fi Outdoor Plug - Power On/Off Group @@ -385,13 +391,13 @@ 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, KP401, KS230, RE270K, RE370K | +| switch | Switch | Power the device on or off. | EP10, EP25, EP40, HS100, HS103, HS105, HS107, HS110, HS200, HS210, HS300, KP100, KP105, KP115, KP200, KP303, KP400, KP401, 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, KL400, KL430, LB120, LB130, LB230 | | colorTemperatureAbs | Number | Set the color temperature in Kelvin. | KB130, KL120, KL125, KL130, KL135, KL400, KL430, LB120, LB130, LB230 | | color | Color | Set the color of the light. | KB130, KL125, KL130, KL135, KL400, KL430, 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 | +| power | Number:Power | Actual energy usage in Watt. | EP25, HS110, HS300, KLxxx, KP115, KP125, LBxxx, | +| eneryUsage | Number:Energy | Energy Usage in kWh. | EP25, 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, KP401, KP405, KS230 | diff --git a/bundles/org.openhab.binding.tplinksmarthome/src/main/java/org/openhab/binding/tplinksmarthome/internal/TPLinkSmartHomeThingType.java b/bundles/org.openhab.binding.tplinksmarthome/src/main/java/org/openhab/binding/tplinksmarthome/internal/TPLinkSmartHomeThingType.java index 96563dfa57d15..d3398d28bb6d3 100644 --- a/bundles/org.openhab.binding.tplinksmarthome/src/main/java/org/openhab/binding/tplinksmarthome/internal/TPLinkSmartHomeThingType.java +++ b/bundles/org.openhab.binding.tplinksmarthome/src/main/java/org/openhab/binding/tplinksmarthome/internal/TPLinkSmartHomeThingType.java @@ -55,6 +55,7 @@ public enum TPLinkSmartHomeThingType { // Plug Thing Type UIDs EP10("ep10", DeviceType.PLUG), + EP25("ep25", DeviceType.PLUG_WITH_ENERGY), HS100("hs100", DeviceType.PLUG), HS103("hs103", DeviceType.PLUG), HS105("hs105", DeviceType.PLUG), diff --git a/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/i18n/tplinksmarthome.properties b/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/i18n/tplinksmarthome.properties index 11086ca80470f..f4257130a4da4 100644 --- a/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/i18n/tplinksmarthome.properties +++ b/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/i18n/tplinksmarthome.properties @@ -7,6 +7,8 @@ addon.tplinksmarthome.description = This binding integrates the TP-Link Wi-Fi Sm thing-type.tplinksmarthome.ep10.label = EP10 thing-type.tplinksmarthome.ep10.description = TP-Link EP10 Kasa Smart Wi-Fi Plug Mini +thing-type.tplinksmarthome.ep25.label = EP25 +thing-type.tplinksmarthome.ep25.description = TP-Link EP25 Kasa Smart WiFi Plug Slim with Energy Monitoring 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 diff --git a/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/EP25.xml b/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/EP25.xml new file mode 100644 index 0000000000000..219fc8cd3600b --- /dev/null +++ b/bundles/org.openhab.binding.tplinksmarthome/src/main/resources/OH-INF/thing/EP25.xml @@ -0,0 +1,25 @@ + + + + + + TP-Link EP25 Kasa Smart WiFi Plug Slim with Energy Monitoring + PowerOutlet + + + + + + + + + + + deviceId + + + +