import org.eclipse.jetty.util.ssl.SslContextFactory;
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.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.bulb.TapoBulbHandler;
import org.openhab.binding.tapocontrol.internal.devices.wifi.hub.TapoHubHandler;
return new TapoLightStripHandler(thing);
} else if (SUPPORTED_SMART_CONTACTS.contains(thingTypeUID)) {
return new TapoSmartContactHandler(thing);
- } else if (SUPPORTED_WHEATHER_SENSORS.contains(thingTypeUID)) {
- return new TapoWheaterSensorHandler(thing);
+ } else if (SUPPORTED_WEATHER_SENSORS.contains(thingTypeUID)) {
+ return new TapoWeatherSensorHandler(thing);
} else if (thingTypeUID.equals(UNIVERSAL_THING_TYPE)) {
return new TapoUniversalDeviceHandler(thing);
}
T315_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_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 ***/
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,
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()));
/*** THINGS WITH ENERGY DATA ***/
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,
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()));
public static final String CHILD_REPRESENTATION_PROPERTY = "serialNumber";
--- /dev/null
+/**
+ * Copyright (c) 2010-2024 Contributors to the openHAB project
+ *
+ * See the NOTICE file(s) distributed with this work for additional
+ * information.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License 2.0 which is available at
+ * http://www.eclipse.org/legal/epl-2.0
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ */
+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.helpers.utils.TypeUtils.*;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.openhab.binding.tapocontrol.internal.devices.dto.TapoChildDeviceData;
+import org.openhab.binding.tapocontrol.internal.devices.rf.TapoChildDeviceHandler;
+import org.openhab.core.library.unit.SIUnits;
+import org.openhab.core.thing.Thing;
+
+/**
+ * TAPO Smart-Contact-Device.
+ *
+ * @author Christian Wild - Initial contribution
+ */
+@NonNullByDefault
+public class TapoWeatherSensorHandler extends TapoChildDeviceHandler {
+ /**
+ * Constructor
+ *
+ * @param thing Thing object representing device
+ */
+ public TapoWeatherSensorHandler(Thing thing) {
+ super(thing);
+ }
+
+ /**
+ * Update properties
+ */
+ @Override
+ protected void devicePropertiesChanged(TapoChildDeviceData deviceInfo) {
+ super.devicePropertiesChanged(deviceInfo);
+
+ updateState(getChannelID(CHANNEL_GROUP_SENSOR, CHANNEL_TEMPERATURE),
+ getTemperatureType(deviceInfo.getTemperature(), SIUnits.CELSIUS));
+ updateState(getChannelID(CHANNEL_GROUP_SENSOR, CHANNEL_HUMIDITY), getPercentType(deviceInfo.getHumidity()));
+ }
+}
+++ /dev/null
-/**
- * Copyright (c) 2010-2024 Contributors to the openHAB project
- *
- * See the NOTICE file(s) distributed with this work for additional
- * information.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License 2.0 which is available at
- * http://www.eclipse.org/legal/epl-2.0
- *
- * SPDX-License-Identifier: EPL-2.0
- */
-package org.openhab.binding.tapocontrol.internal.devices.rf.wheatersensor;
-
-import static org.openhab.binding.tapocontrol.internal.constants.TapoThingConstants.*;
-import static org.openhab.binding.tapocontrol.internal.helpers.utils.TypeUtils.*;
-
-import org.eclipse.jdt.annotation.NonNullByDefault;
-import org.openhab.binding.tapocontrol.internal.devices.dto.TapoChildDeviceData;
-import org.openhab.binding.tapocontrol.internal.devices.rf.TapoChildDeviceHandler;
-import org.openhab.core.library.unit.SIUnits;
-import org.openhab.core.thing.Thing;
-
-/**
- * TAPO Smart-Contact-Device.
- *
- * @author Christian Wild - Initial contribution
- */
-@NonNullByDefault
-public class TapoWheaterSensorHandler extends TapoChildDeviceHandler {
- /**
- * Constructor
- *
- * @param thing Thing object representing device
- */
- public TapoWheaterSensorHandler(Thing thing) {
- super(thing);
- }
-
- /**
- * Update properties
- */
- @Override
- protected void devicePropertiesChanged(TapoChildDeviceData deviceInfo) {
- super.devicePropertiesChanged(deviceInfo);
-
- updateState(getChannelID(CHANNEL_GROUP_SENSOR, CHANNEL_TEMPERATURE),
- getTemperatureType(deviceInfo.getTemperature(), SIUnits.CELSIUS));
- updateState(getChannelID(CHANNEL_GROUP_SENSOR, CHANNEL_HUMIDITY), getPercentType(deviceInfo.getHumidity()));
- }
-}
deviceLabel = DEVICE_DESCRIPTION_SMART_CONTACT;
} else if (SUPPORTED_MOTION_SENSORS.contains(deviceUID)) {
deviceLabel = DEVICE_DESCRIPTION_MOTION_SENSOR;
- } else if (SUPPORTED_WHEATHER_SENSORS.contains(deviceUID)) {
+ } else if (SUPPORTED_WEATHER_SENSORS.contains(deviceUID)) {
deviceLabel = DEVICE_DESCRIPTION_TEMP_SENSOR;
}
if (alias.length() > 0) {
</parameter>
<parameter name="pollingInterval" type="integer" min="0" max="9999" required="false">
<label>Refresh Interval</label>
- <description>Refresh interval for refreshing the data in seconds (0=disabled). Set it below 10 seconds may cause
- communication issues (not recommed).</description>
+ <description>Refresh interval for refreshing the data in seconds (0=disabled). Setting it below 10 seconds may cause
+ communication issues (not recommended).</description>
<default>30</default>
<advanced>true</advanced>
</parameter>
</parameter>
<parameter name="pollingInterval" type="integer" min="0" max="9999" required="false">
<label>Refresh Interval</label>
- <description>Refresh interval for refreshing hub informations in seconds (0=disabled). Set it below 10 seconds may
- cause communication issues (not recommed).</description>
+ <description>Refresh interval for refreshing hub informations in seconds (0=disabled). Setting it below 10 seconds
+ may cause communication issues (not recommended).</description>
<default>10</default>
<advanced>true</advanced>
</parameter>
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.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.description = Communication Protocol
bridge-type.config.tapo.hub.protocol.option. = Direct HTTP
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.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.description = Communication Protocol
thing-type.config.tapo.device.protocol.option. = Direct HTTP
channel-group-type.tapocontrol.smartHubAlarms.description = Tapo Smart Hub Alarms
channel-group-type.tapocontrol.smartPlug.label = SmartPlug
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 types
# 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-aes-decode-fail = aes decode failed (-1005)
error-api-antitheft-conflict = device antitheft conflict (-2002)
<!-- Temperature Sensor -->
<channel-group-type id="temperatureSensor">
- <label>Wheater Sensor</label>
+ <label>Weather Sensor</label>
<description>Temperature and Humidity Sensor Channels</description>
<channels>
<channel id="currentTemp" typeId="temperatureChannel"></channel>