Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
Jacob Laursen 2024-08-14 15:06:04 +02:00 committed by Ciprian Pascu
parent afdaf4e5e2
commit 1ec52da623
8 changed files with 19 additions and 19 deletions

View File

@ -24,7 +24,7 @@ import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.util.ssl.SslContextFactory; import org.eclipse.jetty.util.ssl.SslContextFactory;
import org.openhab.binding.tapocontrol.internal.devices.bridge.TapoBridgeHandler; import org.openhab.binding.tapocontrol.internal.devices.bridge.TapoBridgeHandler;
import org.openhab.binding.tapocontrol.internal.devices.rf.smartcontact.TapoSmartContactHandler; import org.openhab.binding.tapocontrol.internal.devices.rf.smartcontact.TapoSmartContactHandler;
import org.openhab.binding.tapocontrol.internal.devices.rf.wheatersensor.TapoWheaterSensorHandler; import org.openhab.binding.tapocontrol.internal.devices.rf.weathersensor.TapoWeatherSensorHandler;
import org.openhab.binding.tapocontrol.internal.devices.wifi.TapoUniversalDeviceHandler; import org.openhab.binding.tapocontrol.internal.devices.wifi.TapoUniversalDeviceHandler;
import org.openhab.binding.tapocontrol.internal.devices.wifi.bulb.TapoBulbHandler; import org.openhab.binding.tapocontrol.internal.devices.wifi.bulb.TapoBulbHandler;
import org.openhab.binding.tapocontrol.internal.devices.wifi.hub.TapoHubHandler; import org.openhab.binding.tapocontrol.internal.devices.wifi.hub.TapoHubHandler;
@ -125,8 +125,8 @@ public class TapoControlHandlerFactory extends BaseThingHandlerFactory {
return new TapoLightStripHandler(thing); return new TapoLightStripHandler(thing);
} else if (SUPPORTED_SMART_CONTACTS.contains(thingTypeUID)) { } else if (SUPPORTED_SMART_CONTACTS.contains(thingTypeUID)) {
return new TapoSmartContactHandler(thing); return new TapoSmartContactHandler(thing);
} else if (SUPPORTED_WHEATHER_SENSORS.contains(thingTypeUID)) { } else if (SUPPORTED_WEATHER_SENSORS.contains(thingTypeUID)) {
return new TapoWheaterSensorHandler(thing); return new TapoWeatherSensorHandler(thing);
} else if (thingTypeUID.equals(UNIVERSAL_THING_TYPE)) { } else if (thingTypeUID.equals(UNIVERSAL_THING_TYPE)) {
return new TapoUniversalDeviceHandler(thing); return new TapoUniversalDeviceHandler(thing);
} }

View File

@ -100,13 +100,13 @@ public class TapoThingConstants {
T315_THING_TYPE); T315_THING_TYPE);
public static final Set<ThingTypeUID> SUPPORTED_SMART_CONTACTS = Set.of(T110_THING_TYPE); public static final Set<ThingTypeUID> SUPPORTED_SMART_CONTACTS = Set.of(T110_THING_TYPE);
public static final Set<ThingTypeUID> SUPPORTED_MOTION_SENSORS = Set.of(); public static final Set<ThingTypeUID> SUPPORTED_MOTION_SENSORS = Set.of();
public static final Set<ThingTypeUID> SUPPORTED_WHEATHER_SENSORS = Set.of(T310_THING_TYPE, T315_THING_TYPE); public static final Set<ThingTypeUID> SUPPORTED_WEATHER_SENSORS = Set.of(T310_THING_TYPE, T315_THING_TYPE);
/*** SET OF ALL SUPPORTED THINGS ***/ /*** SET OF ALL SUPPORTED THINGS ***/
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(Stream public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections.unmodifiableSet(Stream
.of(SUPPORTED_BRIDGE_UIDS, SUPPORTED_HUB_UIDS, SUPPORTED_SOCKET_UIDS, SUPPORTED_SOCKET_STRIP_UIDS, .of(SUPPORTED_BRIDGE_UIDS, SUPPORTED_HUB_UIDS, SUPPORTED_SOCKET_UIDS, SUPPORTED_SOCKET_STRIP_UIDS,
SUPPORTED_WHITE_BULB_UIDS, SUPPORTED_COLOR_BULB_UIDS, SUPPORTED_LIGHT_STRIP_UIDS, SUPPORTED_WHITE_BULB_UIDS, SUPPORTED_COLOR_BULB_UIDS, SUPPORTED_LIGHT_STRIP_UIDS,
SUPPORTED_SMART_CONTACTS, SUPPORTED_MOTION_SENSORS, SUPPORTED_WHEATHER_SENSORS) SUPPORTED_SMART_CONTACTS, SUPPORTED_MOTION_SENSORS, SUPPORTED_WEATHER_SENSORS)
.flatMap(Set::stream).collect(Collectors.toSet())); .flatMap(Set::stream).collect(Collectors.toSet()));
/*** THINGS WITH ENERGY DATA ***/ /*** THINGS WITH ENERGY DATA ***/
@ -116,7 +116,7 @@ public class TapoThingConstants {
public static final Set<ThingTypeUID> CHANNEL_GROUP_THING_SET = Collections.unmodifiableSet(Stream public static final Set<ThingTypeUID> CHANNEL_GROUP_THING_SET = Collections.unmodifiableSet(Stream
.of(SUPPORTED_BRIDGE_UIDS, SUPPORTED_HUB_UIDS, SUPPORTED_SOCKET_UIDS, SUPPORTED_SOCKET_STRIP_UIDS, .of(SUPPORTED_BRIDGE_UIDS, SUPPORTED_HUB_UIDS, SUPPORTED_SOCKET_UIDS, SUPPORTED_SOCKET_STRIP_UIDS,
SUPPORTED_WHITE_BULB_UIDS, SUPPORTED_COLOR_BULB_UIDS, SUPPORTED_LIGHT_STRIP_UIDS, SUPPORTED_WHITE_BULB_UIDS, SUPPORTED_COLOR_BULB_UIDS, SUPPORTED_LIGHT_STRIP_UIDS,
SUPPORTED_SMART_CONTACTS, SUPPORTED_MOTION_SENSORS, SUPPORTED_WHEATHER_SENSORS) SUPPORTED_SMART_CONTACTS, SUPPORTED_MOTION_SENSORS, SUPPORTED_WEATHER_SENSORS)
.flatMap(Set::stream).collect(Collectors.toSet())); .flatMap(Set::stream).collect(Collectors.toSet()));
public static final String CHILD_REPRESENTATION_PROPERTY = "serialNumber"; public static final String CHILD_REPRESENTATION_PROPERTY = "serialNumber";

View File

@ -10,7 +10,7 @@
* *
* SPDX-License-Identifier: EPL-2.0 * SPDX-License-Identifier: EPL-2.0
*/ */
package org.openhab.binding.tapocontrol.internal.devices.rf.wheatersensor; package org.openhab.binding.tapocontrol.internal.devices.rf.weathersensor;
import static org.openhab.binding.tapocontrol.internal.constants.TapoThingConstants.*; import static org.openhab.binding.tapocontrol.internal.constants.TapoThingConstants.*;
import static org.openhab.binding.tapocontrol.internal.helpers.utils.TypeUtils.*; import static org.openhab.binding.tapocontrol.internal.helpers.utils.TypeUtils.*;
@ -27,13 +27,13 @@ import org.openhab.core.thing.Thing;
* @author Christian Wild - Initial contribution * @author Christian Wild - Initial contribution
*/ */
@NonNullByDefault @NonNullByDefault
public class TapoWheaterSensorHandler extends TapoChildDeviceHandler { public class TapoWeatherSensorHandler extends TapoChildDeviceHandler {
/** /**
* Constructor * Constructor
* *
* @param thing Thing object representing device * @param thing Thing object representing device
*/ */
public TapoWheaterSensorHandler(Thing thing) { public TapoWeatherSensorHandler(Thing thing) {
super(thing); super(thing);
} }

View File

@ -172,7 +172,7 @@ public class TapoUtils {
deviceLabel = DEVICE_DESCRIPTION_SMART_CONTACT; deviceLabel = DEVICE_DESCRIPTION_SMART_CONTACT;
} else if (SUPPORTED_MOTION_SENSORS.contains(deviceUID)) { } else if (SUPPORTED_MOTION_SENSORS.contains(deviceUID)) {
deviceLabel = DEVICE_DESCRIPTION_MOTION_SENSOR; deviceLabel = DEVICE_DESCRIPTION_MOTION_SENSOR;
} else if (SUPPORTED_WHEATHER_SENSORS.contains(deviceUID)) { } else if (SUPPORTED_WEATHER_SENSORS.contains(deviceUID)) {
deviceLabel = DEVICE_DESCRIPTION_TEMP_SENSOR; deviceLabel = DEVICE_DESCRIPTION_TEMP_SENSOR;
} }
if (alias.length() > 0) { if (alias.length() > 0) {

View File

@ -29,8 +29,8 @@
</parameter> </parameter>
<parameter name="pollingInterval" type="integer" min="0" max="9999" required="false"> <parameter name="pollingInterval" type="integer" min="0" max="9999" required="false">
<label>Refresh Interval</label> <label>Refresh Interval</label>
<description>Refresh interval for refreshing the data in seconds (0=disabled). Set it below 10 seconds may cause <description>Refresh interval for refreshing the data in seconds (0=disabled). Setting it below 10 seconds may cause
communication issues (not recommed).</description> communication issues (not recommended).</description>
<default>30</default> <default>30</default>
<advanced>true</advanced> <advanced>true</advanced>
</parameter> </parameter>

View File

@ -29,8 +29,8 @@
</parameter> </parameter>
<parameter name="pollingInterval" type="integer" min="0" max="9999" required="false"> <parameter name="pollingInterval" type="integer" min="0" max="9999" required="false">
<label>Refresh Interval</label> <label>Refresh Interval</label>
<description>Refresh interval for refreshing hub informations in seconds (0=disabled). Set it below 10 seconds may <description>Refresh interval for refreshing hub informations in seconds (0=disabled). Setting it below 10 seconds
cause communication issues (not recommed).</description> may cause communication issues (not recommended).</description>
<default>10</default> <default>10</default>
<advanced>true</advanced> <advanced>true</advanced>
</parameter> </parameter>

View File

@ -62,7 +62,7 @@ bridge-type.config.tapo.hub.httpPort.label = Port
bridge-type.config.tapo.hub.httpPort.description = HTTP-Communication Port (default 80) bridge-type.config.tapo.hub.httpPort.description = HTTP-Communication Port (default 80)
bridge-type.config.tapo.hub.ipAddress.label = IP Address bridge-type.config.tapo.hub.ipAddress.label = IP Address
bridge-type.config.tapo.hub.pollingInterval.label = Refresh Interval bridge-type.config.tapo.hub.pollingInterval.label = Refresh Interval
bridge-type.config.tapo.hub.pollingInterval.description = Refresh interval for refreshing hub informations in seconds (0=disabled). Set it below 10 seconds may cause communication issues (not recommed). bridge-type.config.tapo.hub.pollingInterval.description = Refresh interval for refreshing hub informations in seconds (0=disabled). Setting it below 10 seconds may cause communication issues (not recommended).
bridge-type.config.tapo.hub.protocol.label = Protocol bridge-type.config.tapo.hub.protocol.label = Protocol
bridge-type.config.tapo.hub.protocol.description = Communication Protocol bridge-type.config.tapo.hub.protocol.description = Communication Protocol
bridge-type.config.tapo.hub.protocol.option. = Direct HTTP bridge-type.config.tapo.hub.protocol.option. = Direct HTTP
@ -72,7 +72,7 @@ thing-type.config.tapo.device.httpPort.label = Port
thing-type.config.tapo.device.httpPort.description = HTTP-Communication Port (default 80) thing-type.config.tapo.device.httpPort.description = HTTP-Communication Port (default 80)
thing-type.config.tapo.device.ipAddress.label = IP Address thing-type.config.tapo.device.ipAddress.label = IP Address
thing-type.config.tapo.device.pollingInterval.label = Refresh Interval thing-type.config.tapo.device.pollingInterval.label = Refresh Interval
thing-type.config.tapo.device.pollingInterval.description = Refresh interval for refreshing the data in seconds (0=disabled). Set it below 10 seconds may cause communication issues (not recommed). thing-type.config.tapo.device.pollingInterval.description = Refresh interval for refreshing the data in seconds (0=disabled). Setting it below 10 seconds may cause communication issues (not recommended).
thing-type.config.tapo.device.protocol.label = Protocol thing-type.config.tapo.device.protocol.label = Protocol
thing-type.config.tapo.device.protocol.description = Communication Protocol thing-type.config.tapo.device.protocol.description = Communication Protocol
thing-type.config.tapo.device.protocol.option. = Direct HTTP thing-type.config.tapo.device.protocol.option. = Direct HTTP
@ -117,7 +117,7 @@ channel-group-type.tapocontrol.smartHubAlarms.label = Smart Hub Alarms
channel-group-type.tapocontrol.smartHubAlarms.description = Tapo Smart Hub Alarms channel-group-type.tapocontrol.smartHubAlarms.description = Tapo Smart Hub Alarms
channel-group-type.tapocontrol.smartPlug.label = SmartPlug channel-group-type.tapocontrol.smartPlug.label = SmartPlug
channel-group-type.tapocontrol.smartPlug.description = Tapo Smart Plug Power Outlet channel-group-type.tapocontrol.smartPlug.description = Tapo Smart Plug Power Outlet
channel-group-type.tapocontrol.temperatureSensor.label = Wheater Sensor channel-group-type.tapocontrol.temperatureSensor.label = Weather Sensor
channel-group-type.tapocontrol.temperatureSensor.description = Temperature and Humidity Sensor Channels channel-group-type.tapocontrol.temperatureSensor.description = Temperature and Humidity Sensor Channels
# channel types # channel types
@ -282,7 +282,7 @@ channel-type.tapocontrol.effectOn.description = Switches the lightning effect on
# error messages # error messages
error-api-unknown-com-error = recieived unknown com error(9999) error-api-unknown-com-error = received unknown com error (9999)
error-api-account = received account error (-2101) error-api-account = received account error (-2101)
error-api-aes-decode-fail = aes decode failed (-1005) error-api-aes-decode-fail = aes decode failed (-1005)
error-api-antitheft-conflict = device antitheft conflict (-2002) error-api-antitheft-conflict = device antitheft conflict (-2002)

View File

@ -137,7 +137,7 @@
<!-- Temperature Sensor --> <!-- Temperature Sensor -->
<channel-group-type id="temperatureSensor"> <channel-group-type id="temperatureSensor">
<label>Wheater Sensor</label> <label>Weather Sensor</label>
<description>Temperature and Humidity Sensor Channels</description> <description>Temperature and Humidity Sensor Channels</description>
<channels> <channels>
<channel id="currentTemp" typeId="temperatureChannel"></channel> <channel id="currentTemp" typeId="temperatureChannel"></channel>