- rain sensors (OPEN/CLOSE contact)
- temperature sensors (get temperature)
- electricity sensors (get energy consumption)
+- carbon dioxide sensors (get CO2 concentration)
+- noise sensors (get noise)
- door locks (LOCK/UNLOCK, OPEN/CLOSE commands)
- heating systems (control temperature, set heating level)
- valve heating systems (control temperature, derogation mode and temperature)
| light sensor | luminance | light luminance value in luxes |
| electricity sensor | energy_consumption | energy consumption value in watts |
| humidity sensor | humidity | current relative humidity |
+| carbon dioxide sensor | co2_concentration | CO2 concentration in ppm |
+| noise sensor | noise | noise in decibel |
| dock | battery_status | indicates running on battery (yes/no) |
| dock | battery_level | remaining battery percentage |
| dock | siren_status | used for controlling and getting siren state (on, off, cyclic) |
// RainSensor
public static final ThingTypeUID THING_TYPE_RAINSENSOR = new ThingTypeUID(BINDING_ID, "rainsensor");
+ // CarbonDioxideSensor
+ public static final ThingTypeUID THING_TYPE_CARBON_DIOXIDE_SENSOR = new ThingTypeUID(BINDING_ID, "co2sensor");
+
+ // NoiseSensor
+ public static final ThingTypeUID THING_TYPE_NOISE_SENSOR = new ThingTypeUID(BINDING_ID, "noisesensor");
+
// List of all Channel ids
public static final String RSSI = "rssi";
// Temperature sensor
public static final String TEMPERATURE = "temperature";
+ // Carbon dioxide sensor
+ public static final String CO2_CONCENTRATION = "co2_concentration";
+
+ // Noise sensor
+ public static final String NOISE = "noise";
+
// Alarm
public static final String ALARM_COMMAND = "alarm_command";
public static final String ALARM_STATE = "alarm_state";
public static final String CLASS_WATER_HEATING_SYSTEM = "WaterHeatingSystem";
public static final String CLASS_HITACHI_HEATING_SYSTEM = "HitachiHeatingSystem";
public static final String CLASS_RAIN_SENSOR = "RainSensor";
+ public static final String CLASS_CARBON_DIOXIDE_SENSOR = "CarbonDioxideSensor";
+ public static final String CLASS_NOISE_SENSOR = "NoiseSensor";
// unsupported uiClasses
public static final String THING_PROTOCOL_GATEWAY = "ProtocolGateway";
public static final String THING_REMOTE_CONTROLLER = "RemoteController";
public static final String THING_NETWORK_COMPONENT = "NetworkComponent";
public static final String THING_GENERIC = "Generic";
+ public static final String THING_CONFIGURATION_COMPONENT = "ConfigurationComponent";
// Event states
public static final String FAILED_EVENT = "FAILED";
THING_TYPE_WATERSENSOR, THING_TYPE_HUMIDITYSENSOR, THING_TYPE_MYFOX_ALARM, THING_TYPE_THERMOSTAT,
THING_TYPE_DIMMER_LIGHT, THING_TYPE_EXTERIOR_HEATING_SYSTEM, THING_TYPE_VALVE_HEATING_SYSTEM,
THING_TYPE_BIOCLIMATIC_PERGOLA, THING_TYPE_WATERHEATINGSYSTEM, THING_TYPE_HITACHI_ATWHZ,
- THING_TYPE_HITACHI_DHW, THING_TYPE_HITACHI_ATWMC, THING_TYPE_RAINSENSOR, THING_TYPE_SHUTTER));
+ THING_TYPE_HITACHI_DHW, THING_TYPE_HITACHI_ATWMC, THING_TYPE_RAINSENSOR, THING_TYPE_SHUTTER,
+ THING_TYPE_CARBON_DIOXIDE_SENSOR, THING_TYPE_NOISE_SENSOR));
// somfy gateways
public static Map<Integer, String> gatewayTypes = new HashMap<>() {
put(72, "TAHOMA_RAIL_DIN");
put(77, "ELIOT");
put(88, "WISER");
+ put(92, "NETATMO");
put(99, "CONNECTIVITY KIT");
}
};
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaAwningHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaBioclimaticPergolaHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaBridgeHandler;
+import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaCarbonDioxideSensorHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaContactSensorHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaCurtainHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaDimmerLightHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaLightSensorHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaMyfoxAlarmHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaMyfoxCameraHandler;
+import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaNoiseSensorHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaOccupancySensorHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaOnOffHandler;
import org.openhab.binding.somfytahoma.internal.handler.SomfyTahomaOnOffHeatingSystemHandler;
return new SomfyTahomaHitachiATWMCHandler(thing);
} else if (thingTypeUID.equals(THING_TYPE_RAINSENSOR)) {
return new SomfyTahomaRainSensorHandler(thing);
+ } else if (thingTypeUID.equals(THING_TYPE_CARBON_DIOXIDE_SENSOR)) {
+ return new SomfyTahomaCarbonDioxideSensorHandler(thing);
+ } else if (thingTypeUID.equals(THING_TYPE_NOISE_SENSOR)) {
+ return new SomfyTahomaNoiseSensorHandler(thing);
} else {
return null;
}
// widget: RelativeHumiditySensor
deviceDiscovered(device, THING_TYPE_HUMIDITYSENSOR, place);
}
+ break;
case CLASS_DOOR_LOCK:
// widget: UnlockDoorLockWithUnknownPosition
deviceDiscovered(device, THING_TYPE_DOOR_LOCK, place);
} else {
logUnsupportedDevice(device);
}
+ break;
+ case CLASS_CARBON_DIOXIDE_SENSOR:
+ // widget: CO2Sensor
+ deviceDiscovered(device, THING_TYPE_CARBON_DIOXIDE_SENSOR, place);
+ break;
+ case CLASS_NOISE_SENSOR:
+ // widget: NoiseSensor
+ deviceDiscovered(device, THING_TYPE_NOISE_SENSOR, place);
+ break;
case THING_PROTOCOL_GATEWAY:
case THING_REMOTE_CONTROLLER:
// widget: AlarmRemoteController
case THING_NETWORK_COMPONENT:
+ case THING_CONFIGURATION_COMPONENT:
+ // widget: NetatmoHome
case THING_GENERIC:
// widget: unknown
break;
--- /dev/null
+/**
+ * Copyright (c) 2010-2023 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.somfytahoma.internal.handler;
+
+import static org.openhab.binding.somfytahoma.internal.SomfyTahomaBindingConstants.CO2_CONCENTRATION;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.openhab.core.thing.Thing;
+
+/**
+ * The {@link SomfyTahomaCarbonDioxideSensorHandler} is responsible for handling commands,
+ * which are sent to one of the channels of the carbon dioxide sensor thing.
+ *
+ * @author Ondrej Pecta - Initial contribution
+ */
+@NonNullByDefault
+public class SomfyTahomaCarbonDioxideSensorHandler extends SomfyTahomaBaseThingHandler {
+
+ public SomfyTahomaCarbonDioxideSensorHandler(Thing thing) {
+ super(thing);
+ stateNames.put(CO2_CONCENTRATION, "core:CO2ConcentrationState");
+ }
+}
--- /dev/null
+/**
+ * Copyright (c) 2010-2023 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.somfytahoma.internal.handler;
+
+import static org.openhab.binding.somfytahoma.internal.SomfyTahomaBindingConstants.NOISE;
+
+import org.eclipse.jdt.annotation.NonNullByDefault;
+import org.openhab.core.thing.Thing;
+
+/**
+ * The {@link SomfyTahomaNoiseSensorHandler} is responsible for handling commands,
+ * which are sent to one of the channels of the noise sensor thing.
+ *
+ * @author Ondrej Pecta - Initial contribution
+ */
+@NonNullByDefault
+public class SomfyTahomaNoiseSensorHandler extends SomfyTahomaBaseThingHandler {
+
+ public SomfyTahomaNoiseSensorHandler(Thing thing) {
+ super(thing);
+ stateNames.put(NOISE, "core:NoiseState");
+ }
+}
thing-type.somfytahoma.bioclimaticpergola.label = Somfy Bioclimatic Pergola
thing-type.somfytahoma.bridge.label = Bridge
thing-type.somfytahoma.bridge.description = Bridge enabling communication with devices through a cloud portal
+thing-type.somfytahoma.co2sensor.label = Somfy CO2 Sensor
thing-type.somfytahoma.contactsensor.label = Somfy Contact Sensor
thing-type.somfytahoma.curtain.label = Somfy Curtain
thing-type.somfytahoma.dimmerlight.label = Somfy Dimmer Light
thing-type.somfytahoma.lightsensor.label = Somfy Light Sensor
thing-type.somfytahoma.myfoxalarm.label = Somfy Myfox Alarm
thing-type.somfytahoma.myfoxcamera.label = Somfy Myfox Camera
+thing-type.somfytahoma.noisesensor.label = Somfy Noise Sensor
thing-type.somfytahoma.occupancysensor.label = Somfy Occupancy Sensor
thing-type.somfytahoma.onoff.label = Somfy On/Off Switch
thing-type.somfytahoma.onoffheatingsystem.label = Somfy Heating System with On/Off
channel-type.somfytahoma.control.description = Device control (UP, DOWN, MY/STOP, closure 0-100%)
channel-type.somfytahoma.moving.label = Moving
channel-type.somfytahoma.moving.description = Indicates if the device is currently operating a command
+channel-type.somfytahoma.co2_concentration.label = CO2 concentration
+channel-type.somfytahoma.co2_concentration.description = A CO2 sensor carbon dioxide concentration in ppm
channel-type.somfytahoma.control_silent.label = Control (silent)
channel-type.somfytahoma.control_silent.description = Device control (UP, DOWN, MY/STOP, closure 0-100%) (only for IO devices)
channel-type.somfytahoma.current_heating_mode.label = Current Heating Mode
channel-type.somfytahoma.myfox_alarm_command.state.option.arm = ARM
channel-type.somfytahoma.myfox_alarm_command.state.option.disarm = DISARM
channel-type.somfytahoma.myfox_alarm_command.state.option.partial = ARM_PARTIAL
+channel-type.somfytahoma.noise.label = Noise
+channel-type.somfytahoma.noise.description = A noise sensor noise in decibel
channel-type.somfytahoma.open.label = Open/Close
channel-type.somfytahoma.open.description = A channel for controlling door OPEN/CLOSE state
channel-type.somfytahoma.open_closed_valve.label = Valve Open/Closed state
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
+ <channel-type id="co2_concentration">
+ <item-type>Number:DimensionLess</item-type>
+ <label>CO2 concentration</label>
+ <description>A CO2 sensor carbon dioxide concentration in ppm</description>
+ <state readOnly="true" pattern="%d %unit%"/>
+ </channel-type>
+
+ <channel-type id="noise">
+ <item-type>Number:DimensionLess</item-type>
+ <label>Noise</label>
+ <description>A noise sensor noise in decibel</description>
+ <state readOnly="true" pattern="%d %unit%"/>
+ </channel-type>
+
<channel-type id="alarm_command">
<item-type>String</item-type>
<label>Command</label>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="somfytahoma"
+ 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="co2sensor">
+ <supported-bridge-type-refs>
+ <bridge-type-ref id="bridge"/>
+ </supported-bridge-type-refs>
+ <label>Somfy CO2 Sensor</label>
+ <channels>
+ <channel id="co2_concentration" typeId="co2_concentration"></channel>
+ </channels>
+ <representation-property>url</representation-property>
+ <config-description-ref uri="thing-type:somfytahoma:device"/>
+ </thing-type>
+
+</thing:thing-descriptions>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="somfytahoma"
+ 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="noisesensor">
+ <supported-bridge-type-refs>
+ <bridge-type-ref id="bridge"/>
+ </supported-bridge-type-refs>
+ <label>Somfy Noise Sensor</label>
+ <channels>
+ <channel id="noise" typeId="noise"></channel>
+ </channels>
+ <representation-property>url</representation-property>
+ <config-description-ref uri="thing-type:somfytahoma:device"/>
+ </thing-type>
+
+</thing:thing-descriptions>