|control |targetTemp |Number |no |Temperature in °C: 4=Low/Min; 5..30=target temperature;31=Hi/Max |
| |position |Dimmer |no |Set valve to manual mode (0..100%) disables auto-temp) |
| |mode |String |no |Switch between manual and automatic mode |
-| |profile |Number |no |Select profile: 0=disable, 1-n: profile index from Shelly Web App |
+| |selectedProfile|String |no |Select profile: Profile name or 0=disable, 1-n: profile index |
| |boost |Number |no |Enable/disable boost mode (full heating power) |
| |boostTimer |Number |no |Number of minutes to heat at full power while boost mode is enabled |
+| |schedule |Switch |yes |ON: Schedule is active |
|battery |batteryLevel |Number |yes |Battery Level in % |
| |batteryAlert |Switch |yes |Low battery alert |
-|device |schedule |Switch |yes |ON: Schedule is active |
### Shelly Button 1 or 2 (thing-type: shellybutton1 / shellybutton2)
public static final String CHANNEL_SENSOR_ALARM_STATE = "alarmState";
public static final String CHANNEL_SENSOR_ERROR = "lastError";
- public static final String CHANNEL_CONTROL_SETTEMP = "targetTemp"; // Shelly TRV: target temp
- public static final String CHANNEL_CONTROL_POSITION = "position"; // Shelly TRV: Valve position
- public static final String CHANNEL_CONTROL_MODE = "mode"; // Shelly TRV
- public static final String CHANNEL_CONTROL_PROFILE = "profile"; // Shelly TRV
- public static final String CHANNEL_CONTROL_BCONTROL = "boost"; // Shelly TRV
- public static final String CHANNEL_CONTROL_BTIMER = "boostTimer"; // Shelly TRV
+ // TRV
+ public static final String CHANNEL_CONTROL_SETTEMP = "targetTemp";
+ public static final String CHANNEL_CONTROL_POSITION = "position";
+ public static final String CHANNEL_CONTROL_MODE = "mode";
+ public static final String CHANNEL_CONTROL_PROFILE = "selectedProfile";
+ public static final String CHANNEL_CONTROL_BCONTROL = "boost";
+ public static final String CHANNEL_CONTROL_BTIMER = "boostTimer";
+ public static final String CHANNEL_CONTROL_SCHEDULE = "schedule";
// External sensors for Shelly1/1PM
public static final String CHANNEL_ESENDOR_TEMP1 = CHANNEL_SENSOR_TEMP + "1";
public static final String CHANNEL_DEVST_SELFTTEST = "selfTest";
public static final String CHANNEL_DEVST_VOLTAGE = "supplyVoltage";
public static final String CHANNEL_DEVST_CALIBRATED = "calibrated";
- public static final String CHANNEL_DEVST_SCHEDULE = "schedule";
public static final String CHANNEL_LED_STATUS_DISABLE = "statusLed";
public static final String CHANNEL_LED_POWER_DISABLE = "powerLed";
private final HttpClient httpClient;
private final ShellyTranslationProvider messages;
private final Shelly1CoapServer coapServer;
-
private final ShellyThingTable thingTable;
private ShellyBindingConfiguration bindingConfig = new ShellyBindingConfiguration();
private String localIP = "";
@Reference HttpClientFactory httpClientFactory, ComponentContext componentContext,
Map<String, Object> configProperties) {
super.activate(componentContext);
- messages = translationProvider;
- // Save bindingConfig & pass it to all registered listeners
- bindingConfig.updateFromProperties(configProperties);
+ this.messages = translationProvider;
+ this.thingTable = thingTable;
+ bindingConfig.updateFromProperties(configProperties);
localIP = bindingConfig.localIP;
if (localIP.isEmpty()) {
localIP = ShellyUtils.getString(networkAddressService.getPrimaryIpv4HostAddress());
}
logger.debug("Using OH HTTP port {}", httpPort);
- this.thingTable = thingTable;
this.coapServer = new Shelly1CoapServer();
}
} else if (thingType.equals(THING_TYPE_SHELLYBULB_STR) || thingType.equals(THING_TYPE_SHELLYDUO_STR)
|| thingType.equals(THING_TYPE_SHELLYRGBW2_COLOR_STR)
|| thingType.equals(THING_TYPE_SHELLYRGBW2_WHITE_STR)
- || thingType.equals(THING_TYPE_SHELLYDUORGBW_STR)) {
+ || thingType.equals(THING_TYPE_SHELLYRGBW2_WHITE_STR) || thingType.equals(THING_TYPE_SHELLYDUORGBW_STR)
+ || thingType.equals(THING_TYPE_SHELLYVINTAGE_STR)) {
logger.debug("{}: Create new thing of type {} using ShellyLightHandler", thing.getLabel(),
thingTypeUID.toString());
handler = new ShellyLightHandler(thing, messages, bindingConfig, coapServer, localIP, httpPort, httpClient);
public interface ShellyApiInterface {
public boolean isInitialized();
+ public void initialize() throws ShellyApiException;
+
public void setConfig(String thingName, ShellyThingConfiguration config);
public ShellySettingsDevice getDeviceInfo() throws ShellyApiException;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsRelay;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsRgbwLight;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsStatus;
+import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyThermnostat;
import org.openhab.binding.shelly.internal.util.ShellyVersionDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public String hostname = "";
public String name = "";
+ public String model = "";
public String mode = "";
public boolean discoverable = true;
public boolean auth = false;
numMeters = inColor ? 1 : getInteger(settings.device.numOutputs);
}
- if (settings.sleepMode != null) {
- // Sensor, usually 12h, H&T in USB mode 10min
- updatePeriod = getString(settings.sleepMode.unit).equalsIgnoreCase("m") ? settings.sleepMode.period * 60 // minutes
- : settings.sleepMode.period * 3600; // hours
- updatePeriod += 60; // give 1min extra
- } else if ((settings.coiot != null) && settings.coiot.updatePeriod != null && !isTRV) {
- // Derive from CoAP update interval, usually 2*15+10s=40sec -> 70sec
- updatePeriod = Math.max(UPDATE_SETTINGS_INTERVAL_SECONDS, 2 * getInteger(settings.coiot.updatePeriod)) + 10;
- } else {
- updatePeriod = UPDATE_SETTINGS_INTERVAL_SECONDS + 10;
- }
-
initialized = true;
return this;
}
return CHANNEL_GROUP_RELAY_CONTROL;
} else if (hasRelays) {
return numRelays <= 1 ? CHANNEL_GROUP_RELAY_CONTROL : CHANNEL_GROUP_RELAY_CONTROL + idx;
+ } else if (isRGBW2) {
+ return settings.lights == null || settings.lights.size() <= 1 ? CHANNEL_GROUP_LIGHT_CONTROL
+ : CHANNEL_GROUP_LIGHT_CHANNEL + idx;
} else if (isLight) {
- return numRelays <= 1 ? CHANNEL_GROUP_LIGHT_CONTROL : CHANNEL_GROUP_LIGHT_CONTROL + idx;
+ return CHANNEL_GROUP_LIGHT_CONTROL;
} else if (isButton) {
return CHANNEL_GROUP_STATUS;
} else if (isSensor) {
return -1;
}
+ public String getValueProfile(int profileId) {
+ int id = profileId;
+ if (settings.thermostats != null) {
+ ShellyThermnostat t = settings.thermostats.get(0);
+ id = profileId == 0 ? getInteger(t.profile) : profileId;
+ if (id <= 0) {
+ return "DISABLED";
+ }
+ return id <= t.profileNames.length ? getString(t.profileNames[id - 1]) : "" + id;
+ }
+
+ return "" + id;
+ }
+
public static String extractFwVersion(@Nullable String version) {
if (version != null) {
// fix version e.g. 20210319-122304/v.1.10-Dimmer1-gfd4cc10 (with v.1. instead of v1.)
import java.util.ArrayList;
import java.util.List;
+import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyStatusSensor.ShellyMotionSettings;
import org.openhab.core.thing.CommonTriggerEvents;
public String fw;
public Boolean auth;
public Integer gen;
-
- @SerializedName("coiot") // Shelly Motion Multicast Endpoint
public String coiot;
public Integer longid;
public Boolean overpower;
@SerializedName("is_valid")
public Boolean isValid;
- @SerializedName("ext_temperature")
- public ShellyStatusSensor.ShellyExtTemperature extTemperature; // Shelly 1/1PM: sensor values
- @SerializedName("ext_humidity")
- public ShellyStatusSensor.ShellyExtHumidity extHumidity; // Shelly 1/1PM: sensor values
}
public static class ShellySettingsDimmer {
public static class ShellySettingsGlobal {
// https://shelly-api-docs.shelly.cloud/#shelly1pm-settings
- public ShellySettingsDevice device;
+ public ShellySettingsDevice device = new ShellySettingsDevice();
@SerializedName("wifi_ap")
- public ShellySettingsWiFiAp wifiAp;
+ public ShellySettingsWiFiAp wifiAp = new ShellySettingsWiFiAp();
@SerializedName("wifi_sta")
- public ShellySettingsWiFiNetwork wifiSta;
+ public ShellySettingsWiFiNetwork wifiSta = new ShellySettingsWiFiNetwork();
@SerializedName("wifi_sta1")
- public ShellySettingsWiFiNetwork wifiSta1;
+ public ShellySettingsWiFiNetwork wifiSta1 = new ShellySettingsWiFiNetwork();
@SerializedName("wifirecovery_reboot_enabled")
public Boolean wifiRecoveryReboot; // FW 1.10+
@SerializedName("ap_roaming")
public ShellyApRoaming apRoaming; // FW 1.10+
- public ShellySettingsMqtt mqtt; // not used for now
- public ShellySettingsSntp sntp; // not used for now
- public ShellySettingsCoiot coiot; // Firmware 1.6+
- public ShellySettingsLogin login;
+ public ShellySettingsMqtt mqtt = new ShellySettingsMqtt();
+ public ShellySettingsSntp sntp = new ShellySettingsSntp();
+ public ShellySettingsCoiot coiot = new ShellySettingsCoiot();
+ public ShellySettingsLogin login = new ShellySettingsLogin();
@SerializedName("pin_code")
public String pinCode;
@SerializedName("coiot_execute_enable")
public Boolean discoverable; // FW 1.6+
public String fw;
@SerializedName("build_info")
- public ShellySettingsBuildInfo buildInfo;
- public ShellyStatusCloud cloud;
+ public ShellySettingsBuildInfo buildInfo = new ShellySettingsBuildInfo();
+ public ShellyStatusCloud cloud = new ShellyStatusCloud();
@SerializedName("sleep_mode")
public ShellySensorSleepMode sleepMode; // FW 1.6
@SerializedName("external_power")
@SerializedName("max_power")
public Double maxPower;
public Boolean calibrated;
-
- public ArrayList<ShellySettingsRelay> relays;
- public ArrayList<ShellySettingsRoller> rollers;
- public ArrayList<ShellySettingsDimmer> dimmers;
- public ArrayList<ShellySettingsRgbwLight> lights;
- public ArrayList<ShellySettingsEMeter> emeters;
- public ArrayList<ShellySettingsInput> inputs; // ix3
- public ArrayList<ShellyThermnostat> thermostats; // TRV
-
public Double voltage; // AC voltage for Shelly 2.5
@SerializedName("supply_voltage")
public Long supplyVoltage; // Shelly 1PM/1L: 0=110V, 1=220V
+ public @Nullable ArrayList<ShellySettingsRelay> relays;
+ public @Nullable ArrayList<ShellySettingsInput> inputs; // ix3
+ public @Nullable ArrayList<ShellySettingsDimmer> dimmers;
+ public @Nullable ArrayList<ShellySettingsRoller> rollers;
+ public @Nullable ArrayList<ShellySettingsRgbwLight> lights;
+ public @Nullable ArrayList<ShellySettingsEMeter> emeters;
+ public @Nullable ArrayList<ShellyThermnostat> thermostats; // TRV
+ @SerializedName("ext_temperature")
+ public ShellyStatusSensor.ShellyExtTemperature extTemperature; // Shelly 1/1PM: sensor values
+ @SerializedName("ext_humidity")
+ public ShellyStatusSensor.ShellyExtHumidity extHumidity; // Shelly 1/1PM: sensor values
+
@SerializedName("temperature_units")
public String temperatureUnits = "C"; // Either'C'or'F'
public String name; // FW 1.8: Symbolic Device name is configurable
@SerializedName("wifi_sta")
- public ShellySettingsWiFiNetwork wifiSta; // WiFi client configuration. See /settings/sta for details
- public ShellyStatusCloud cloud;
- public ShellyStatusMqtt mqtt;
+ public ShellySettingsWiFiNetwork wifiSta = new ShellySettingsWiFiNetwork();
+ public ShellyStatusCloud cloud = new ShellyStatusCloud();
+ public ShellyStatusMqtt mqtt = new ShellyStatusMqtt();
public String time;
public Integer serial = -1;
public Integer cfgChangedCount; // FW 1.8
@SerializedName("actions_stats")
public ShellyActionsStats astats;
-
- public ArrayList<ShellySettingsRelay> relays;
public Double voltage; // Shelly 2.5
- public ArrayList<ShellySettingsRoller> rollers;
public Integer input; // RGBW2 has no JSON array
- public ArrayList<ShellyInputState> inputs;
- public ArrayList<ShellySettingsLight> lights;
+ public ArrayList<ShellySettingsRelay> relays;
+ public ArrayList<ShellyRollerStatus> rollers;
public ArrayList<ShellyShortLightStatus> dimmers;
+ public ArrayList<ShellyInputState> inputs;
public ArrayList<ShellySettingsMeter> meters;
public ArrayList<ShellySettingsEMeter> emeters;
+ @SerializedName("ext_temperature")
+ public ShellyStatusSensor.ShellyExtTemperature extTemperature; // Shelly 1/1PM: sensor values
+ @SerializedName("ext_humidity")
+ public ShellyStatusSensor.ShellyExtHumidity extHumidity; // Shelly 1/1PM: sensor values
// Internal device temp
- public ShellySensorTmp tmp; // Shelly 1PM
- public Double temperature = SHELLY_API_INVTEMP; // Shelly 2.5
+ public ShellySensorTmp tmp = new ShellySensorTmp(); // Shelly 1PM
+ public Double temperature; // Shelly 2.5
public Boolean overtemperature;
// Shelly Dimmer only
public Boolean calibrated;
public ArrayList<ShellyThermnostat> thermostats;
- public ShellySettingsUpdate update;
+ public ShellySettingsUpdate update = new ShellySettingsUpdate();
+
@SerializedName("ram_total")
public Long ramTotal;
@SerializedName("ram_free")
break;
case "3117": // S, mode, 0-5 (0=disabled)
value = getDouble(s.value).intValue();
- updateChannel(updates, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_PROFILE, getDecimal(value));
- updateChannel(updates, CHANNEL_GROUP_DEV_STATUS, CHANNEL_DEVST_SCHEDULE, getOnOff(value > 0));
+ updateChannel(updates, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_PROFILE,
+ getStringType(profile.getValueProfile((int) value)));
+ updateChannel(updates, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_SCHEDULE, getOnOff(value > 0));
break;
case "3118": // Valve state
updateChannel(updates, CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_STATE,
import org.openhab.binding.shelly.internal.api.ShellyDeviceProfile;
import org.openhab.binding.shelly.internal.api.ShellyHttpClient;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyOtaCheckResult;
+import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyRollerStatus;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySendKeyList;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySenseKeyCode;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsDevice;
try {
json = httpRequest(SHELLY_URL_STATUS);
// Dimmer2 returns invalid json type for loaderror :-(
- json = getString(json.replace("\"loaderror\":0,", "\"loaderror\":false,"));
- json = getString(json.replace("\"loaderror\":1,", "\"loaderror\":true,"));
+ json = json.replace("\"loaderror\":0,", "\"loaderror\":false,")
+ .replace("\"loaderror\":1,", "\"loaderror\":true,")
+ .replace("\"tmp\":{\"value\": \"null\",", "\"tmp\":{\"value\": null,");
ShellySettingsStatus status = fromJson(gson, json, ShellySettingsStatus.class);
status.json = json;
return status;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyOtaCheckResult;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsDevice;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsStatus;
+import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyThermnostat;
import org.openhab.binding.shelly.internal.api1.Shelly1CoapHandler;
import org.openhab.binding.shelly.internal.api1.Shelly1CoapJSonDTO;
import org.openhab.binding.shelly.internal.api1.Shelly1CoapServer;
protected final ShellyApiInterface api;
private final HttpClient httpClient;
- protected ShellyBindingConfiguration bindingConfig;
+ private ShellyBindingConfiguration bindingConfig;
protected ShellyThingConfiguration config = new ShellyThingConfiguration();
protected ShellyDeviceProfile profile = new ShellyDeviceProfile(); // init empty profile to avoid NPE
protected ShellyDeviceStats stats = new ShellyDeviceStats();
private final Shelly1CoapHandler coap;
public boolean autoCoIoT = false;
- public final ShellyTranslationProvider messages;
+ private final ShellyTranslationProvider messages;
protected boolean stopping = false;
private boolean channelsCreated = false;
// delay before enabling channel
private final int cacheCount = UPDATE_SETTINGS_INTERVAL_SECONDS / UPDATE_STATUS_INTERVAL_SECONDS;
- protected final ShellyChannelCache cache;
+ private final ShellyChannelCache cache;
private String localIP = "";
private String localPort = "";
*
* @throws ShellyApiException e.g. http returned non-ok response, check e.getMessage() for details.
*/
- private boolean initializeThing() throws ShellyApiException {
+ public boolean initializeThing() throws ShellyApiException {
// Init from thing type to have a basic profile, gets updated when device info is received from API
stopping = false;
refreshSettings = false;
// Initialize API access, exceptions will be catched by initialize()
ShellySettingsDevice devInfo = api.getDeviceInfo();
- if (getBool(devInfo.auth) && config.userId.isEmpty()) {
+ if (getBool(devInfo.auth) && config.password.isEmpty()) {
setThingOffline(ThingStatusDetail.CONFIGURATION_ERROR, "offline.conf-error-no-credentials");
return false;
}
// New Shelly devices might use a different endpoint for the CoAP listener
tmpPrf.coiotEndpoint = devInfo.coiot;
}
+ if (tmpPrf.settings.sleepMode != null && !tmpPrf.isTRV) {
+ // Sensor, usually 12h, H&T in USB mode 10min
+ tmpPrf.updatePeriod = getString(tmpPrf.settings.sleepMode.unit).equalsIgnoreCase("m")
+ ? tmpPrf.settings.sleepMode.period * 60 // minutes
+ : tmpPrf.settings.sleepMode.period * 3600; // hours
+ tmpPrf.updatePeriod += 60; // give 1min extra
+ } else if ((tmpPrf.settings.coiot != null) && tmpPrf.settings.coiot.updatePeriod != null) {
+ // Derive from CoAP update interval, usually 2*15+10s=40sec -> 70sec
+ tmpPrf.updatePeriod = Math.max(UPDATE_SETTINGS_INTERVAL_SECONDS,
+ 2 * getInteger(tmpPrf.settings.coiot.updatePeriod)) + 10;
+ } else {
+ tmpPrf.updatePeriod = UPDATE_SETTINGS_INTERVAL_SECONDS + 10;
+ }
+
tmpPrf.auth = devInfo.auth; // missing in /settings
tmpPrf.status = api.getStatus();
tmpPrf.updateFromStatus(tmpPrf.status);
showThingConfig(tmpPrf);
+ // update thing properties
checkVersion(tmpPrf, tmpPrf.status);
if (config.eventsCoIoT && (tmpPrf.settings.coiot != null) && (tmpPrf.settings.coiot.enabled != null)) {
: 0;
api.setSleepTime(value);
break;
+ case CHANNEL_CONTROL_SCHEDULE:
+ if (profile.isTRV) {
+ logger.debug("{}: {} Valve schedule/profile", thingName,
+ command == OnOffType.ON ? "Enable" : "Disable");
+ api.setValveProfile(0,
+ command == OnOffType.OFF ? 0 : profile.status.thermostats.get(0).profile);
+ }
+ break;
case CHANNEL_CONTROL_PROFILE:
logger.debug("{}: Select profile {}", thingName, command);
- int profile = (int) getNumber(command);
- if (profile < 0 || profile > 5) {
+ int id = -1;
+ if (command instanceof Number) {
+ id = (int) getNumber(command);
+ } else {
+ String cmd = command.toString();
+ if (isDigit(cmd.charAt(0))) {
+ id = Integer.parseInt(cmd);
+ } else if (cmd.equalsIgnoreCase("DISABLED")) {
+ id = 0;
+ } else if (profile.settings.thermostats != null) {
+ ShellyThermnostat t = profile.settings.thermostats.get(0);
+ for (int i = 0; i < t.profileNames.length; i++) {
+ if (t.profileNames[i].equalsIgnoreCase(cmd)) {
+ id = i + 1;
+ }
+ }
+ }
+ }
+ if (id < 0 || id > 5) {
logger.warn("{}: Invalid profile Id {} requested", thingName, profile);
- break;
+ } else {
+ api.setValveProfile(0, id);
}
- api.setValveProfile(0, profile);
break;
case CHANNEL_CONTROL_MODE:
logger.debug("{}: Set mode to {}", thingName, command);
updateStatus(ThingStatus.ONLINE);
// request 3 updates in a row (during the first 2+3*3 sec)
- logger.debug("{}: Thing went online, request status update", thingName);
requestUpdates(profile.alwaysOn ? 3 : 1, !channelsCreated);
}
+
+ // Restart watchdog when status update was successful (no exception)
restartWatchdog();
}
if (force || !lastAlarm.equals(event)
|| (lastAlarm.equals(event) && now() > stats.lastAlarmTs + HEALTH_CHECK_INTERVAL_SEC)) {
- switch (event) {
+ switch (event.toUpperCase()) {
case "":
case "0": // DW2 1.8
case SHELLY_WAKEUPT_SENSOR:
* @param thingType thing type acc. to the xml definition
* @param mode Device mode (e.g. relay, roller)
*/
- private void changeThingType(String thingType, String mode) {
+ protected void changeThingType(String thingType, String mode) {
ThingTypeUID thingTypeUID = ShellyThingCreator.getThingTypeUID(thingType, "", mode);
if (!thingTypeUID.equals(THING_TYPE_SHELLYUNKNOWN)) {
logger.debug("{}: Changing thing type to {}", getThing().getLabel(), thingTypeUID);
int idx = 0;
boolean multiInput = status.inputs.size() >= 2; // device has multiple SW (inputs)
for (ShellyInputState input : status.inputs) {
- String group = profile.getControlGroup(idx);
+ String group = profile.getInputGroup(idx);
String suffix = multiInput ? profile.getInputSuffix(idx) : "";
if (!areChannelsCreated()) {
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.shelly.internal.api.ShellyApiException;
import org.openhab.binding.shelly.internal.api.ShellyDeviceProfile;
+import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyRollerStatus;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsEMeter;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsMeter;
+import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsRelay;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsStatus;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyStatusSensor;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyStatusSensor.ShellyADC;
import org.openhab.binding.shelly.internal.provider.ShellyChannelDefinitions;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.OpenClosedType;
+import org.openhab.core.library.types.StringType;
import org.openhab.core.library.unit.ImperialUnits;
import org.openhab.core.library.unit.SIUnits;
import org.openhab.core.library.unit.Units;
return false; // device status never triggers update
}
+ public static boolean updateRelay(ShellyBaseHandler thingHandler, ShellySettingsStatus status, int id) {
+ ShellyDeviceProfile profile = thingHandler.getProfile();
+ ShellySettingsRelay rsettings = profile.settings.relays.get(id);
+ ShellySettingsRelay relay = status.relays.get(id);
+
+ boolean updated = false;
+ if (relay.isValid == null || relay.isValid) {
+ String groupName = profile.getControlGroup(id);
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_OUTPUT_NAME, getStringType(rsettings.name));
+
+ if (getBool(relay.overpower)) {
+ thingHandler.postEvent(ALARM_TYPE_OVERPOWER, false);
+ }
+
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_OUTPUT, getOnOff(relay.ison));
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_TIMER_ACTIVE, getOnOff(relay.hasTimer));
+ if (status.extTemperature != null) {
+ // Shelly 1/1PM support up to 3 external sensors
+ // for whatever reason those are not represented as an array, but 3 elements
+ if (status.extTemperature.sensor1 != null) {
+ updated |= thingHandler.updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_ESENDOR_TEMP1,
+ toQuantityType(getDouble(status.extTemperature.sensor1.tC), DIGITS_TEMP, SIUnits.CELSIUS));
+ }
+ if (status.extTemperature.sensor2 != null) {
+ updated |= thingHandler.updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_ESENDOR_TEMP2,
+ toQuantityType(getDouble(status.extTemperature.sensor2.tC), DIGITS_TEMP, SIUnits.CELSIUS));
+ }
+ if (status.extTemperature.sensor3 != null) {
+ updated |= thingHandler.updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_ESENDOR_TEMP3,
+ toQuantityType(getDouble(status.extTemperature.sensor3.tC), DIGITS_TEMP, SIUnits.CELSIUS));
+ }
+ }
+ if ((status.extHumidity != null) && (status.extHumidity.sensor1 != null)) {
+ updated |= thingHandler.updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_HUM,
+ toQuantityType(getDouble(status.extHumidity.sensor1.hum), DIGITS_PERCENT, Units.PERCENT));
+ }
+
+ // Update Auto-ON/OFF timer
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_TIMER_AUTOON,
+ toQuantityType(getDouble(rsettings.autoOn), Units.SECOND));
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_TIMER_AUTOOFF,
+ toQuantityType(getDouble(rsettings.autoOff), Units.SECOND));
+ }
+ return updated;
+ }
+
+ public static boolean updateRoller(ShellyBaseHandler thingHandler, ShellyRollerStatus control, int id)
+ throws ShellyApiException {
+ ShellyDeviceProfile profile = thingHandler.getProfile();
+ boolean updated = false;
+ if (getBool(control.isValid)) {
+ String groupName = profile.getControlGroup(id);
+ if (control.name != null) {
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_OUTPUT_NAME, getStringType(control.name));
+ }
+
+ String state = getString(control.state);
+ if (state.equals(SHELLY_ALWD_ROLLER_TURN_STOP)) {
+ if (control.currentPos != null) {
+ // only valid in stop state
+ int pos = Math.max(SHELLY_MIN_ROLLER_POS, Math.min(control.currentPos, SHELLY_MAX_ROLLER_POS));
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_ROL_CONTROL_CONTROL,
+ toQuantityType((double) (SHELLY_MAX_ROLLER_POS - pos), Units.PERCENT));
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_ROL_CONTROL_POS,
+ toQuantityType((double) pos, Units.PERCENT));
+ }
+ }
+
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_ROL_CONTROL_STATE, new StringType(state));
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_ROL_CONTROL_STOPR,
+ getStringType(control.stopReason));
+ updated |= thingHandler.updateChannel(groupName, CHANNEL_ROL_CONTROL_SAFETY,
+ getOnOff(control.safetySwitch));
+ }
+ return updated;
+ }
+
/**
* Update Meter channel
*
int m = 0;
if (!profile.isEMeter) {
for (ShellySettingsMeter meter : status.meters) {
+ if (m >= profile.numMeters) {
+ // Shelly1: reports status.meters[0].is_valid = true, but even doesn't have a meter
+ meter.isValid = false;
+ }
if (getBool(meter.isValid) || profile.isLight) { // RGBW2-white doesn't report valid flag
- // correctly in white mode
+ // correctly in white mode
String groupName = profile.getMeterGroup(m);
if (!thingHandler.areChannelsCreated()) {
// skip for Shelly Bulb: JSON has a meter, but values don't get updated
// Shelly TRV
ShellyThermnostat t = status.thermostats.get(0);
ShellyThermnostat ps = profile.settings.thermostats.get(0);
- int bminutes = getInteger(t.boostMinutes) > 0 ? getInteger(t.boostMinutes)
+ int bminutes = getInteger(t.boostMinutes) >= 0 ? getInteger(t.boostMinutes)
: getInteger(ps.boostMinutes);
updated |= thingHandler.updateChannel(CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_BCONTROL,
getOnOff(getInteger(t.boostMinutes) > 0));
toQuantityType((double) bminutes, DIGITS_NONE, Units.MINUTE));
updated |= thingHandler.updateChannel(CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_MODE,
getStringType(getBool(t.targetTemp.enabled) ? SHELLY_TRV_MODE_AUTO : SHELLY_TRV_MODE_MANUAL));
- updated |= thingHandler.updateChannel(CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_PROFILE,
- getDecimal(getBool(t.schedule) ? t.profile + 1 : 0));
- updated |= thingHandler.updateChannel(CHANNEL_GROUP_DEV_STATUS, CHANNEL_DEVST_SCHEDULE,
+ int pid = getBool(t.schedule) ? getInteger(t.profile) : 0;
+ updated |= thingHandler.updateChannel(CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_SCHEDULE,
getOnOff(t.schedule));
+ updated |= thingHandler.updateChannel(CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_PROFILE,
+ getStringType(profile.getValueProfile(pid)));
if (t.tmp != null) {
Double temp = convertToC(t.tmp.value, getString(t.tmp.units));
updated |= thingHandler.updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_TEMP,
if (profile.settings.lights != null) {
// Channel control/timer
ShellySettingsRgbwLight ls = profile.settings.lights.get(lightId);
- updated |= updateChannel(controlGroup, CHANNEL_TIMER_AUTOON, getDecimal(ls.autoOn));
- updated |= updateChannel(controlGroup, CHANNEL_TIMER_AUTOOFF, getDecimal(ls.autoOff));
+ updated |= updateChannel(controlGroup, CHANNEL_TIMER_AUTOON,
+ toQuantityType(getDouble(ls.autoOn), Units.SECOND));
+ updated |= updateChannel(controlGroup, CHANNEL_TIMER_AUTOOFF,
+ toQuantityType(getDouble(ls.autoOff), Units.SECOND));
+ updated |= updateChannel(controlGroup, CHANNEL_LIGHT_POWER, col.power);
updated |= updateChannel(controlGroup, CHANNEL_TIMER_ACTIVE, getOnOff(light.hasTimer));
updated |= updateChannel(controlGroup, CHANNEL_LIGHT_POWER, col.power);
}
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyRollerStatus;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsDimmer;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsRelay;
-import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsRoller;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsStatus;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyShortLightStatus;
-import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyShortStatusRelay;
-import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyStatusRelay;
import org.openhab.binding.shelly.internal.api1.Shelly1CoapServer;
import org.openhab.binding.shelly.internal.config.ShellyBindingConfiguration;
import org.openhab.binding.shelly.internal.provider.ShellyChannelDefinitions;
import org.openhab.core.library.types.OnOffType;
import org.openhab.core.library.types.PercentType;
import org.openhab.core.library.types.StopMoveType;
-import org.openhab.core.library.types.StringType;
import org.openhab.core.library.types.UpDownType;
-import org.openhab.core.library.unit.SIUnits;
import org.openhab.core.library.unit.Units;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
if ((command == UpDownType.UP && getString(rstatus.state).equals(SHELLY_ALWD_ROLLER_TURN_OPEN))
|| (command == UpDownType.DOWN
&& getString(rstatus.state).equals(SHELLY_ALWD_ROLLER_TURN_CLOSE))) {
- logger.debug("{}: Roller is already moving ({}), ignore command {}", thingName,
+ logger.debug("{}: Roller is already in requested position ({}), ignore command {}", thingName,
getString(rstatus.state), command);
requestUpdates(1, false);
return;
/**
* Auto-create relay channels depending on relay type/mode
*/
- private void createRelayChannels(ShellyStatusRelay relay, int idx) {
+ private void createRelayChannels(ShellySettingsRelay relay, int idx) {
if (!areChannelsCreated()) {
updateChannelDefinitions(ShellyChannelDefinitions.createRelayChannels(getThing(), profile, relay, idx));
}
}
}
- if (profile.hasRelays && !profile.isRoller && !profile.isDimmer) {
- logger.trace("{}: Updating {} relay(s)", thingName, profile.numRelays);
- int i = 0;
- ShellyStatusRelay rstatus = api.getRelayStatus(i);
- for (ShellyShortStatusRelay relay : rstatus.relays) {
- createRelayChannels(rstatus, i);
- if ((relay.isValid == null) || relay.isValid) {
- String groupName = profile.getControlGroup(i);
- ShellySettingsRelay rs = profile.settings.relays.get(i);
- updated |= updateChannel(groupName, CHANNEL_OUTPUT_NAME, getStringType(rs.name));
-
- if (getBool(relay.overpower)) {
- postEvent(ALARM_TYPE_OVERPOWER, false);
- }
-
- updated |= updateChannel(groupName, CHANNEL_OUTPUT, getOnOff(relay.ison));
- updated |= updateChannel(groupName, CHANNEL_TIMER_ACTIVE, getOnOff(relay.hasTimer));
- if (rstatus.extTemperature != null) {
- // Shelly 1/1PM support up to 3 external sensors
- // for whatever reason those are not represented as an array, but 3 elements
- if (rstatus.extTemperature.sensor1 != null) {
- updated |= updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_ESENDOR_TEMP1, toQuantityType(
- getDouble(rstatus.extTemperature.sensor1.tC), DIGITS_TEMP, SIUnits.CELSIUS));
- }
- if (rstatus.extTemperature.sensor2 != null) {
- updated |= updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_ESENDOR_TEMP2, toQuantityType(
- getDouble(rstatus.extTemperature.sensor2.tC), DIGITS_TEMP, SIUnits.CELSIUS));
- }
- if (rstatus.extTemperature.sensor3 != null) {
- updated |= updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_ESENDOR_TEMP3, toQuantityType(
- getDouble(rstatus.extTemperature.sensor3.tC), DIGITS_TEMP, SIUnits.CELSIUS));
- }
- }
- if ((rstatus.extHumidity != null) && (rstatus.extHumidity.sensor1 != null)) {
- updated |= updateChannel(CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_HUM, toQuantityType(
- getDouble(rstatus.extHumidity.sensor1.hum), DIGITS_PERCENT, Units.PERCENT));
- }
-
- // Update Auto-ON/OFF timer
- ShellySettingsRelay rsettings = profile.settings.relays.get(i);
- if (rsettings != null) {
- updated |= updateChannel(groupName, CHANNEL_TIMER_AUTOON,
- toQuantityType(getDouble(rsettings.autoOn), Units.SECOND));
- updated |= updateChannel(groupName, CHANNEL_TIMER_AUTOOFF,
- toQuantityType(getDouble(rsettings.autoOff), Units.SECOND));
- }
- }
+ if (profile.hasRelays && !profile.isRoller) {
+ logger.trace("{}: Updating {} relay(s)", thingName, profile.numRelays);
+ for (int i = 0; i < status.relays.size(); i++) {
+ createRelayChannels(status.relays.get(i), i);
+ updated |= ShellyComponents.updateRelay(this, status, i);
i++;
}
- } else if (profile.hasRelays && profile.isRoller && (status.rollers != null)) {
+ } else {
// Check for Relay in Roller Mode
logger.trace("{}: Updating {} rollers", thingName, profile.numRollers);
- int i = 0;
-
- for (ShellySettingsRoller roller : status.rollers) {
- if (roller.isValid) {
- ShellyRollerStatus control = api.getRollerStatus(i);
- Integer relayIndex = i + 1;
- String groupName = profile.numRollers > 1 ? CHANNEL_GROUP_ROL_CONTROL + relayIndex.toString()
- : CHANNEL_GROUP_ROL_CONTROL;
-
- createRollerChannels(control);
-
- if (control.name != null) {
- updated |= updateChannel(groupName, CHANNEL_OUTPUT_NAME, getStringType(control.name));
- }
-
- String state = getString(control.state);
- if (state.equals(SHELLY_ALWD_ROLLER_TURN_STOP)) { // only valid in stop state
- int pos = Math.max(SHELLY_MIN_ROLLER_POS, Math.min(control.currentPos, SHELLY_MAX_ROLLER_POS));
- logger.debug("{}: REST Update roller position: control={}, position={}", thingName,
- SHELLY_MAX_ROLLER_POS - pos, pos);
- updated |= updateChannel(groupName, CHANNEL_ROL_CONTROL_CONTROL,
- toQuantityType((double) (SHELLY_MAX_ROLLER_POS - pos), Units.PERCENT));
- updated |= updateChannel(groupName, CHANNEL_ROL_CONTROL_POS,
- toQuantityType((double) pos, Units.PERCENT));
- scheduledUpdates = 1; // one more poll and then stop
- }
-
- updated |= updateChannel(groupName, CHANNEL_ROL_CONTROL_STATE, new StringType(state));
- updated |= updateChannel(groupName, CHANNEL_ROL_CONTROL_STOPR, getStringType(control.stopReason));
- updated |= updateChannel(groupName, CHANNEL_ROL_CONTROL_SAFETY, getOnOff(control.safetySwitch));
-
- i++;
- }
+ for (int i = 0; i < profile.numRollers; i++) {
+ ShellyRollerStatus roller = status.rollers.get(i);
+ createRollerChannels(roller);
+ updated |= ShellyComponents.updateRoller(this, roller, i);
}
}
+
return updated;
}
ShellyDeviceStats stats = th.getStats();
properties.putAll(stats.asProperties());
- for (Map.Entry<String, Object> p : thing.getConfiguration().getProperties().entrySet()) {
+ for (Map.Entry<String, @Nullable Object> p : thing.getConfiguration().getProperties().entrySet()) {
String key = p.getKey();
- if (p.getValue() != null) {
- String value = p.getValue().toString();
- properties.put(key, value);
+ Object o = p.getValue();
+ if (o != null) {
+ properties.put(key, o.toString());
}
}
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsRgbwLight;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellySettingsStatus;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyShortLightStatus;
-import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyShortStatusRelay;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyStatusLightChannel;
-import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyStatusRelay;
import org.openhab.binding.shelly.internal.api1.Shelly1ApiJsonDTO.ShellyStatusSensor;
import org.openhab.binding.shelly.internal.handler.ShellyThingInterface;
import org.openhab.core.thing.Channel;
private static final String CHGR_RELAY = CHANNEL_GROUP_RELAY_CONTROL;
private static final String CHGR_ROLLER = CHANNEL_GROUP_ROL_CONTROL;
private static final String CHGR_LIGHT = CHANNEL_GROUP_LIGHT_CONTROL;
+ private static final String CHGR_LIGHTCH = CHANNEL_GROUP_LIGHT_CHANNEL;
private static final String CHGR_STATUS = CHANNEL_GROUP_STATUS;
private static final String CHGR_METER = CHANNEL_GROUP_METER;
private static final String CHGR_SENSOR = CHANNEL_GROUP_SENSOR;
.add(new ShellyChannel(m, CHGR_DEVST, CHANNEL_DEVST_HEARTBEAT, "heartBeat", ITEMT_DATETIME))
.add(new ShellyChannel(m, CHGR_DEVST, CHANNEL_DEVST_UPDATE, "updateAvailable", ITEMT_SWITCH))
.add(new ShellyChannel(m, CHGR_DEVST, CHANNEL_DEVST_CALIBRATED, "calibrated", ITEMT_SWITCH))
- .add(new ShellyChannel(m, CHGR_DEVST, CHANNEL_DEVST_SCHEDULE, "deviceSchedule", ITEMT_SWITCH))
// Relay
.add(new ShellyChannel(m, CHGR_RELAY, CHANNEL_OUTPUT_NAME, "outputName", ITEMT_STRING))
.add(new ShellyChannel(m, CHGR_ROLLER, CHANNEL_STATUS_EVENTCOUNT, "eventCount", ITEMT_NUMBER))
.add(new ShellyChannel(m, CHGR_ROLLER, CHANNEL_EVENT_TRIGGER, "system:button", "system:button"))
- // RGBW2
- .add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_LIGHT_POWER, "system:power", ITEMT_SWITCH))
+ // Bulb/Duo/Vintage
.add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_INPUT, "inputState", ITEMT_SWITCH))
.add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_BUTTON_TRIGGER, "system:button", ITEMT_STRING))
.add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_STATUS_EVENTTYPE, "lastEvent", ITEMT_STRING))
.add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_STATUS_EVENTCOUNT, "eventCount", ITEMT_NUMBER))
+ .add(new ShellyChannel(m, CHANNEL_GROUP_WHITE_CONTROL, CHANNEL_BRIGHTNESS, "whiteBrightness",
+ ITEMT_DIMMER))
+ .add(new ShellyChannel(m, CHANNEL_GROUP_WHITE_CONTROL, CHANNEL_COLOR_TEMP, "whiteTemp", ITEMT_DIMMER))
+
+ // RGBW2-color
+ .add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_LIGHT_POWER, "system:power", ITEMT_SWITCH))
.add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_TIMER_AUTOON, "timerAutoOn", ITEMT_TIME))
.add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_TIMER_AUTOOFF, "timerAutoOff", ITEMT_TIME))
.add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_TIMER_ACTIVE, "timerActive", ITEMT_SWITCH))
+ // RGBW2-white
+ .add(new ShellyChannel(m, CHGR_LIGHTCH, CHANNEL_BRIGHTNESS, "whiteBrightness", ITEMT_DIMMER))
+ .add(new ShellyChannel(m, CHGR_LIGHTCH, CHANNEL_TIMER_AUTOON, "timerAutoOn", ITEMT_TIME))
+ .add(new ShellyChannel(m, CHGR_LIGHTCH, CHANNEL_TIMER_AUTOOFF, "timerAutoOff", ITEMT_TIME))
+ .add(new ShellyChannel(m, CHGR_LIGHTCH, CHANNEL_TIMER_ACTIVE, "timerActive", ITEMT_SWITCH))
+ // RGBW2-color
+ .add(new ShellyChannel(m, CHGR_LIGHT, CHANNEL_LIGHT_POWER, "system:power", ITEMT_SWITCH))
// Power Meter
.add(new ShellyChannel(m, CHGR_METER, CHANNEL_METER_CURRENTWATTS, "meterWatts", ITEMT_POWER))
.add(new ShellyChannel(m, CHGR_METER, CHANNEL_METER_TOTALKWH, "meterTotal", ITEMT_ENERGY))
// TRV
.add(new ShellyChannel(m, CHGR_CONTROL, CHANNEL_CONTROL_POSITION, "sensorPosition", ITEMT_DIMMER))
.add(new ShellyChannel(m, CHGR_CONTROL, CHANNEL_CONTROL_MODE, "controlMode", ITEMT_STRING))
- .add(new ShellyChannel(m, CHGR_CONTROL, CHANNEL_CONTROL_PROFILE, "controlProfile", ITEMT_NUMBER))
+ .add(new ShellyChannel(m, CHGR_CONTROL, CHANNEL_CONTROL_SCHEDULE, "controlSchedule", ITEMT_SWITCH))
+ .add(new ShellyChannel(m, CHGR_CONTROL, CHANNEL_CONTROL_PROFILE, "controlProfile", ITEMT_STRING))
.add(new ShellyChannel(m, CHGR_CONTROL, CHANNEL_CONTROL_SETTEMP, "targetTemp", ITEMT_TEMP))
.add(new ShellyChannel(m, CHGR_CONTROL, CHANNEL_CONTROL_BCONTROL, "boostControl", ITEMT_SWITCH))
.add(new ShellyChannel(m, CHGR_CONTROL, CHANNEL_CONTROL_BTIMER, "boostTimer", ITEMT_TIME));
* @return ArrayList<Channel> of channels to be added to the thing
*/
public static Map<String, Channel> createRelayChannels(final Thing thing, final ShellyDeviceProfile profile,
- final ShellyStatusRelay relay, int idx) {
+ final ShellySettingsRelay rstatus, int idx) {
Map<String, Channel> add = new LinkedHashMap<>();
String group = profile.getControlGroup(idx);
if (profile.settings.relays != null) {
ShellySettingsRelay rs = profile.settings.relays.get(idx);
- ShellyShortStatusRelay rstatus = relay.relays.get(idx);
- boolean timer = rs.hasTimer != null || (rstatus != null && rstatus.hasTimer != null); // Dimmer 1/2 have
- // has_timer under
- // /status
+ boolean timer = rs.hasTimer != null || rstatus.hasTimer != null; // Dimmer 1/2 have
addChannel(thing, add, rs.ison != null, group, CHANNEL_OUTPUT);
addChannel(thing, add, rs.name != null, group, CHANNEL_OUTPUT_NAME);
addChannel(thing, add, rs.autoOn != null, group, CHANNEL_TIMER_AUTOON);
}
// Shelly 1/1PM Addon
- if (relay.extTemperature != null) {
- addChannel(thing, add, relay.extTemperature.sensor1 != null, CHGR_SENSOR, CHANNEL_ESENDOR_TEMP1);
- addChannel(thing, add, relay.extTemperature.sensor2 != null, CHGR_SENSOR, CHANNEL_ESENDOR_TEMP2);
- addChannel(thing, add, relay.extTemperature.sensor3 != null, CHGR_SENSOR, CHANNEL_ESENDOR_TEMP3);
+ if (profile.settings.extTemperature != null) {
+ addChannel(thing, add, profile.settings.extTemperature.sensor1 != null, CHGR_SENSOR, CHANNEL_ESENDOR_TEMP1);
+ addChannel(thing, add, profile.settings.extTemperature.sensor2 != null, CHGR_SENSOR, CHANNEL_ESENDOR_TEMP2);
+ addChannel(thing, add, profile.settings.extTemperature.sensor3 != null, CHGR_SENSOR, CHANNEL_ESENDOR_TEMP3);
}
- if (relay.extHumidity != null) {
- addChannel(thing, add, relay.extHumidity.sensor1 != null, CHGR_SENSOR, CHANNEL_ESENDOR_HUMIDITY);
+ if (profile.settings.extHumidity != null) {
+ addChannel(thing, add, profile.settings.extHumidity.sensor1 != null, CHGR_SENSOR, CHANNEL_ESENDOR_HUMIDITY);
}
return add;
if (profile.settings.lights != null) {
ShellySettingsRgbwLight light = profile.settings.lights.get(idx);
+ String whiteGroup = profile.isRGBW2 ? group : CHANNEL_GROUP_WHITE_CONTROL;
+
// Create power channel in color mode and brightness channel in white mode
addChannel(thing, add, profile.inColor, group, CHANNEL_LIGHT_POWER);
- addChannel(thing, add, !profile.inColor, group, CHANNEL_BRIGHTNESS);
- addChannel(thing, add, light.temp != null, CHANNEL_GROUP_WHITE_CONTROL, CHANNEL_COLOR_TEMP);
addChannel(thing, add, light.autoOn != null, group, CHANNEL_TIMER_AUTOON);
addChannel(thing, add, light.autoOff != null, group, CHANNEL_TIMER_AUTOOFF);
addChannel(thing, add, status.hasTimer != null, group, CHANNEL_TIMER_ACTIVE);
+ addChannel(thing, add, light.brightness != null, whiteGroup, CHANNEL_BRIGHTNESS);
+ addChannel(thing, add, light.temp != null, whiteGroup, CHANNEL_COLOR_TEMP);
}
return add;
}
CHANNEL_SENSOR_ILLUM);
addChannel(thing, newChannels, sdata.flood != null, CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_FLOOD);
addChannel(thing, newChannels, sdata.smoke != null, CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_FLOOD);
- addChannel(thing, newChannels, (profile.settings.externalPower != null) || (sdata.charger != null), CHGR_DEVST,
+ addChannel(thing, newChannels, profile.settings.externalPower != null || sdata.charger != null, CHGR_DEVST,
CHANNEL_DEVST_CHARGER);
- addChannel(thing, newChannels,
- sdata.motion != null || ((sdata.sensor != null) && (sdata.sensor.motion != null)), CHANNEL_GROUP_SENSOR,
- CHANNEL_SENSOR_MOTION);
+ addChannel(thing, newChannels, sdata.motion != null || (sdata.sensor != null && sdata.sensor.motion != null),
+ CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_MOTION);
if (sdata.sensor != null) { // DW, Sense or Motion
addChannel(thing, newChannels, sdata.sensor.state != null, CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_STATE); // DW/DW2
addChannel(thing, newChannels, sdata.sensor.motionActive != null, CHANNEL_GROUP_SENSOR, // Motion
// TRV
if (profile.isTRV) {
- addChannel(thing, newChannels, true, CHANNEL_GROUP_DEV_STATUS, CHANNEL_DEVST_SCHEDULE);
addChannel(thing, newChannels, true, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_SETTEMP);
addChannel(thing, newChannels, true, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_BCONTROL);
addChannel(thing, newChannels, true, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_BTIMER);
addChannel(thing, newChannels, true, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_POSITION);
addChannel(thing, newChannels, true, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_MODE);
addChannel(thing, newChannels, true, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_PROFILE);
+ addChannel(thing, newChannels, true, CHANNEL_GROUP_CONTROL, CHANNEL_CONTROL_SCHEDULE);
addChannel(thing, newChannels, true, CHANNEL_GROUP_SENSOR, CHANNEL_SENSOR_STATE); // TRV
}
@Nullable
T obj = gson.fromJson(json, classOfT);
if ((obj == null) && exceptionOnNull) { // new in OH3: fromJson may return null
- throw new ShellyApiException(PRE + className + "from JSON: " + json);
+ throw new ShellyApiException(PRE + className + " from JSON: " + json);
}
return obj;
} catch (JsonSyntaxException e) {
throw new ShellyApiException(
PRE + className + "from JSON (syntax/format error: " + e.getMessage() + "): " + json, e);
} catch (RuntimeException e) {
- throw new ShellyApiException(PRE + className + "from JSON: " + json, e);
+ throw new ShellyApiException(PRE + className + " from JSON: " + json, e);
}
}
}
}
public static String buildControlGroupName(ShellyDeviceProfile profile, Integer channelId) {
- return profile.isBulb || profile.isDuo || profile.inColor ? CHANNEL_GROUP_LIGHT_CONTROL
+ return !profile.isRGBW2 || profile.inColor ? CHANNEL_GROUP_LIGHT_CONTROL
: CHANNEL_GROUP_LIGHT_CHANNEL + channelId.toString();
}
channel-type.shelly.outputName.label = Output Name
channel-type.shelly.outputName.description = Output/Channel Name as configured in the Shelly App
channel-type.shelly.timerAutoOn.label = Auto-ON Timer
-channel-type.shelly.timerAutoOn.description = When the output of the relay is switched on, it will be switched off automatically after n seconds
+channel-type.shelly.timerAutoOn.description = When the output of the relay is switched off, it will be switched off automatically after n seconds
channel-type.shelly.timerAutoOff.label = Auto-OFF Timer
-channel-type.shelly.timerAutoOff.description = When the output of the relay is switched off, it will be switched on automatically after n seconds
+channel-type.shelly.timerAutoOff.description = When the output of the relay is switched on, it will be switched on automatically after n seconds
channel-type.shelly.timerActive.label = Auto ON/OFF timer active
channel-type.shelly.timerActive.description = ON: A timer is active, OFF: no timer active
channel-type.shelly.temperature.label = Temperature
channel-type.shelly.controlMode.description = Sensor/Control Mode
channel-type.shelly.controlMode.state.option.manual = Manual
channel-type.shelly.controlMode.state.option.automatic = Automatic
-channel-type.shelly.controlProfile.label = Profile
-channel-type.shelly.controlProfile.description = Selected Profile
+channel-type.shelly.controlSchedule.label = Schedule active
+channel-type.shelly.controlSchedule.description = ON: A scheduled program is active
+channel-type.shelly.controlProfile.label = Selected Profile
+channel-type.shelly.controlProfile.description = Selected Profile configured in the Shelly App
channel-type.shelly.boostControl.label = Boost Mode
channel-type.shelly.boostControl.description = ON: Boost mode is activated (overwrites automatic temperature mode)
channel-type.shelly.boostTimer.label = Boost Timer
channel-type.shelly.sensorError.description = Only valid in case of error
channel-type.shelly.sensorSleepTime.label = Sensor Sleep Time
channel-type.shelly.sensorSleepTime.description = The sensor will not send notifications and will not perform actions until the specified time expires (0=disable)
-channel-type.shelly.deviceSchedule.label = Schedule active
-channel-type.shelly.deviceSchedule.description = ON: A scheduled program is active
channel-type.shelly.system.power.label = Power
channel-type.shelly.system.button.label = Event Trigger
channel-type.shelly.system.brightness.label = Brightness
</options>
</state>
</channel-type>
- <channel-type id="deviceSchedule" advanced="true">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.deviceSchedule.label</label>
- <description>@text/channel-type.shelly.deviceSchedule.description</description>
- <state readOnly="true">
- </state>
- </channel-type>
</thing:thing-descriptions>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<thing:thing-descriptions bindingId="shelly"
- 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="shellybulb">
- <label>Shelly Bulb (SHBLB-1)</label>
- <description>@text/thing-type.shelly.shellybulb.description</description>
- <category>Lightbulb</category>
- <channel-groups>
- <channel-group id="control" typeId="bulbControl"/>
- <channel-group id="color" typeId="colorSettingsBulb"/>
- <channel-group id="white" typeId="whiteSettings"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:light"/>
- </thing-type>
-
- <thing-type id="shellybulbduo">
- <label>Shelly Duo (SHBDUO-1)</label>
- <description>@text/thing-type.shelly.shellybulbduo.description</description>
- <category>Lightbulb</category>
- <channel-groups>
- <channel-group id="control" typeId="duoControl"/>
- <channel-group id="white" typeId="whiteSettings"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:light"/>
- </thing-type>
-
- <thing-type id="shellycolorbulb">
- <label>Shelly Color Bulb (SHCB-1)</label>
- <description>@text/thing-type.shelly.shellycolorbulb.description</description>
- <category>ColorLight</category>
- <channel-groups>
- <channel-group id="control" typeId="duoControl"/>
- <channel-group id="color" typeId="colorSettingsBulb"/>
- <channel-group id="white" typeId="whiteSettings"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:light"/>
- </thing-type>
-
- <thing-type id="shellyvintage">
- <label>Shelly Vintage (SHVIN-1)</label>
- <description>@text/thing-type.shelly.shellyvintage.description</description>
- <category>Lightbulb</category>
- <channel-groups>
- <channel-group id="control" typeId="duoControl"/>
- <channel-group id="white" typeId="whiteSettingsSimple"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:light"/>
- </thing-type>
-
- <thing-type id="shellyrgbw2-color">
- <label>Shelly RGBW2 Color Mode (SHRGBW2)</label>
- <description>@text/thing-type.shelly.shellyrgbw2-color.description</description>
- <category>ColorLight</category>
- <channel-groups>
- <channel-group id="control" typeId="rgbw2ColorControl"/>
- <channel-group id="color" typeId="colorSettingsRGBW2"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:rgbw2"/>
- </thing-type>
-
- <thing-type id="shellyrgbw2-white">
- <label>Shelly RGBW2 White Mode (SHRGBW2)</label>
- <description>@text/thing-type.shelly.shellyrgbw2-white.description</description>
- <category>Lightbulb</category>
- <channel-groups>
- <channel-group id="control" typeId="rgbw2WhiteControl"/>
- <channel-group id="channel1" typeId="rgbw2Channel">
- <label>@text/channel-group-type.shelly.rgbw2Channel1.label</label>
- </channel-group>
- <channel-group id="channel2" typeId="rgbw2Channel">
- <label>@text/channel-group-type.shelly.rgbw2Channel2.label</label>
- </channel-group>
- <channel-group id="channel3" typeId="rgbw2Channel">
- <label>@text/channel-group-type.shelly.rgbw2Channel3.label</label>
- </channel-group>
- <channel-group id="channel4" typeId="rgbw2Channel">
- <label>@text/channel-group-type.shelly.rgbw2Channel4.label</label>
- </channel-group>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:rgbw2"/>
- </thing-type>
-
- <channel-group-type id="bulbControl">
- <label>@text/channel-group-type.shelly.bulbControl.label</label>
- <description>@text/channel-group-type.shelly.bulbControl.description</description>
- <channels>
- <channel id="power" typeId="system.power"/>
- <channel id="mode" typeId="colorMode"/>
- <channel id="autoOn" typeId="timerAutoOn"/>
- <channel id="autoOff" typeId="timerAutoOff"/>
- <channel id="timerActive" typeId="timerActive"/>
- </channels>
- </channel-group-type>
-
- <channel-group-type id="duoControl">
- <label>@text/channel-group-type.shelly.duoControl.label</label>
- <description>@text/channel-group-type.shelly.duoControl.description</description>
- <channels>
- <channel id="autoOn" typeId="timerAutoOn"/>
- <channel id="autoOff" typeId="timerAutoOff"/>
- <channel id="timerActive" typeId="timerActive"/>
- </channels>
- </channel-group-type>
-
- <channel-group-type id="rgbw2ColorControl">
- <label>@text/channel-group-type.shelly.rgbw2ColorControl.label</label>
- <description>@text/channel-group-type.shelly.rgbw2ColorControl.description</description>
- </channel-group-type>
-
- <channel-group-type id="rgbw2WhiteControl">
- <label>@text/channel-group-type.shelly.rgbw2WhiteControl.label</label>
- <description>@text/channel-group-type.shelly.rgbw2WhiteControl.description</description>
- </channel-group-type>
-
- <channel-group-type id="colorSettingsBulb">
- <label>@text/channel-group-type.shelly.colorSettingsBulb.label</label>
- <description>@text/channel-group-type.shelly.colorSettingsBulb.description</description>
- <channels>
- <channel id="hsb" typeId="system.color"/>
- <channel id="full" typeId="colorFull"/>
- <channel id="red" typeId="colorRed"/>
- <channel id="green" typeId="colorGreen"/>
- <channel id="blue" typeId="colorBlue"/>
- <channel id="white" typeId="colorWhite"/>
- <channel id="gain" typeId="colorGain"/>
- <channel id="effect" typeId="colorEffectBulb"/>
- </channels>
- </channel-group-type>
-
- <channel-group-type id="colorSettingsRGBW2">
- <label>@text/channel-group-type.shelly.colorSettingsRGBW2.label</label>
- <description>@text/channel-group-type.shelly.colorSettingsRGBW2.description</description>
- <channels>
- <channel id="hsb" typeId="system.color"/>
- <channel id="full" typeId="colorFull"/>
- <channel id="red" typeId="colorRed"/>
- <channel id="green" typeId="colorGreen"/>
- <channel id="blue" typeId="colorBlue"/>
- <channel id="white" typeId="colorWhite"/>
- <channel id="gain" typeId="colorGain"/>
- <channel id="effect" typeId="colorEffectRGBW2"/>
- </channels>
- </channel-group-type>
-
- <channel-group-type id="whiteSettings">
- <label>@text/channel-group-type.shelly.whiteSettings.label</label>
- <description>@text/channel-group-type.shelly.whiteSettings.description</description>
- <channels>
- <channel id="brightness" typeId="whiteBrightness"/>
- <channel id="temperature" typeId="whiteTemp"/>
- </channels>
- </channel-group-type>
-
- <channel-group-type id="whiteSettingsSimple">
- <label>@text/channel-group-type.shelly.whiteSettingsSimple.label</label>
- <description>@text/channel-group-type.shelly.whiteSettingsSimple.description</description>
- <channels>
- <channel id="brightness" typeId="whiteBrightness"/>
- </channels>
- </channel-group-type>
-
- <channel-group-type id="rgbw2Channel">
- <label>@text/channel-group-type.shelly.rgbw2Channel.label</label>
- <description>@text/channel-group-type.shelly.rgbw2Channel.description</description>
- <channels>
- <channel id="autoOn" typeId="timerAutoOn"/>
- <channel id="autoOff" typeId="timerAutoOff"/>
- <channel id="timerActive" typeId="timerActive"/>
- <channel id="brightness" typeId="whiteBrightness"/>
- </channels>
- </channel-group-type>
-
-
- <channel-type id="colorMode">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.colorMode.label</label>
- <description>@text/channel-type.shelly.colorMode.description</description>
- </channel-type>
-
- <channel-type id="colorFull">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.colorFull.label</label>
- <description>@text/channel-type.shelly.colorFull.description</description>
- <state>
- <options>
- <option value="red">@text/channel-type.shelly.colorFull.state.option.red</option>
- <option value="green">@text/channel-type.shelly.colorFull.state.option.green</option>
- <option value="blue">@text/channel-type.shelly.colorFull.state.option.blue</option>
- <option value="yellow">@text/channel-type.shelly.colorFull.state.option.yellow</option>
- <option value="white">@text/channel-type.shelly.colorFull.state.option.white</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="colorRed" advanced="true">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.colorRed.label</label>
- <description>@text/channel-type.shelly.colorRed.description</description>
- <state min="0" max="255" step="1" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="colorGreen" advanced="true">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.colorGreen.label</label>
- <description>@text/channel-type.shelly.colorGreen.description</description>
- <state min="0" max="255" step="1" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="colorBlue" advanced="true">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.colorBlue.label</label>
- <description>@text/channel-type.shelly.colorBlue.description</description>
- <state min="0" max="255" step="1" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="colorWhite">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.colorWhite.label</label>
- <description>@text/channel-type.shelly.colorWhite.description</description>
- <state min="0" max="255" step="1" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="colorGain">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.colorGain.label</label>
- <description>@text/channel-type.shelly.colorGain.description</description>
- <state min="0" max="100" step="1" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="whiteTemp">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.whiteTemp.label</label>
- <description>@text/channel-type.shelly.whiteTemp.description</description>
- <state min="3000" max="6500" step="10" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="whiteBrightness">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.whiteBrightness.label</label>
- <description>@text/channel-type.shelly.whiteBrightness.description</description>
- <category>DimmableLight</category>
- <state min="0" max="100" step="1" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="colorEffectBulb">
- <item-type>Number</item-type>
- <label>@text/channel-type.shelly.colorEffectBulb.label</label>
- <description>@text/channel-type.shelly.colorEffectBulb.description</description>
- <state>
- <options>
- <option value="0">@text/channel-type.shelly.colorEffectBulb.option.0</option>
- <option value="1">@text/channel-type.shelly.colorEffectBulb.option.1</option>
- <option value="2">@text/channel-type.shelly.colorEffectBulb.option.2</option>
- <option value="3">@text/channel-type.shelly.colorEffectBulb.option.3</option>
- <option value="4">@text/channel-type.shelly.colorEffectBulb.option.4</option>
- <option value="5">@text/channel-type.shelly.colorEffectBulb.option.5</option>
- <option value="6">@text/channel-type.shelly.colorEffectBulb.option.6</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="colorEffectRGBW2">
- <item-type>Number</item-type>
- <label>@text/channel-type.shelly.colorEffectRGBW2.label</label>
- <description>@text/channel-type.shelly.colorEffectRGBW2.description</description>
- <state>
- <options>
- <option value="0">@text/channel-type.shelly.colorEffectRGBW2.option.0</option>
- <option value="1">@text/channel-type.shelly.colorEffectRGBW2.option.1</option>
- <option value="2">@text/channel-type.shelly.colorEffectRGBW2.option.2</option>
- <option value="3">@text/channel-type.shelly.colorEffectRGBW2.option.3</option>
- </options>
- </state>
- </channel-type>
-
-</thing:thing-descriptions>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<thing:thing-descriptions bindingId="shelly"
- 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="shelly1">
- <label>Shelly 1 (SHSW-1)</label>
- <description>@text/thing-type.shelly.shelly1.description</description>
- <channel-groups>
- <channel-group id="relay" typeId="relayChannel"/>
- <channel-group id="sensors" typeId="externalSensors"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shelly1l">
- <label>Shelly 1L (SHSW-L)</label>
- <description>@text/thing-type.shelly.shelly1l.description</description>
- <channel-groups>
- <channel-group id="relay" typeId="relayChannel"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="sensors" typeId="externalSensors"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shelly1pm">
- <label>Shelly 1PM (SHSW-PM)</label>
- <description>@text/thing-type.shelly.shelly1pm.description</description>
- <channel-groups>
- <channel-group id="relay" typeId="relayChannel"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="sensors" typeId="externalSensors"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shellyem">
- <label>Shelly EM (SHEM)</label>
- <description>@text/thing-type.shelly.shellyem.description</description>
- <channel-groups>
- <channel-group id="meter1" typeId="meter">
- <label>@text/channel-group-type.shelly.meter1.label</label>
- </channel-group>
- <channel-group id="meter2" typeId="meter">
- <label>@text/channel-group-type.shelly.meter2.label</label>
- </channel-group>
- <channel-group id="relay" typeId="relayChannel"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <!-- Shelly 3EM - device reports wrong service name: shellyem3, see README -->
- <thing-type id="shellyem3">
- <label>Shelly 3EM (SHEM-3)</label>
- <description>@text/thing-type.shelly.shellyem3.description</description>
- <channel-groups>
- <channel-group id="meter1" typeId="meter">
- <label>@text/channel-group-type.shelly.meter1.label</label>
- </channel-group>
- <channel-group id="meter2" typeId="meter">
- <label>@text/channel-group-type.shelly.meter2.label</label>
- </channel-group>
- <channel-group id="meter3" typeId="meter">
- <label>@text/channel-group-type.shelly.meter3.label</label>
- </channel-group>
- <channel-group id="relay" typeId="relayChannel"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shelly2-relay">
- <label>Shelly 2 Relay (SHSW-21)</label>
- <description>@text/thing-type.shelly.shelly2-relay.description</description>
-
- <channel-groups>
- <channel-group id="relay1" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel1.label</label>
- </channel-group>
- <channel-group id="relay2" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel2.label</label>
- </channel-group>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shelly2-roller">
- <label>Shelly 2 Roller (SHSW-21)</label>
- <description>@text/thing-type.shelly.shelly2-roller.description</description>
- <category>Rollershutter</category>
- <channel-groups>
- <channel-group id="roller" typeId="rollerControl"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:roller"/>
- </thing-type>
-
- <thing-type id="shelly25-relay">
- <label>Shelly 2.5 Relay (SHSW-25)</label>
- <description>@text/thing-type.shelly.shelly25-relay.description</description>
- <channel-groups>
- <channel-group id="relay1" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel1.label</label>
- </channel-group>
- <channel-group id="meter1" typeId="meter">
- <label>@text/channel-group-type.shelly.meter1.label</label>
- </channel-group>
- <channel-group id="relay2" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel2.label</label>
- </channel-group>
- <channel-group id="meter2" typeId="meter">
- <label>@text/channel-group-type.shelly.meter2.label</label>
- </channel-group>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shelly25-roller">
- <label>Shelly 2.5 Roller (SHSW-25)</label>
- <description>@text/thing-type.shelly.shelly25-roller.description</description>
- <category>Rollershutter</category>
- <channel-groups>
- <channel-group id="roller" typeId="rollerControl"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:roller"/>
- </thing-type>
-
- <thing-type id="shelly4pro">
- <label>Shelly 4 Pro Relay (SHSW-44)</label>
- <description>@text/thing-type.shelly.shelly4pro.description</description>
-
- <channel-groups>
- <channel-group id="relay1" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel1.label</label>
- </channel-group>
- <channel-group id="meter1" typeId="meter">
- <label>@text/channel-group-type.shelly.meter1.label</label>
- </channel-group>
- <channel-group id="relay2" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel2.label</label>
- </channel-group>
- <channel-group id="meter2" typeId="meter">
- <label>@text/channel-group-type.shelly.meter2.label</label>
- </channel-group>
- <channel-group id="relay3" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel3.label</label>
- </channel-group>
- <channel-group id="meter3" typeId="meter">
- <label>@text/channel-group-type.shelly.meter3.label</label>
- </channel-group>
- <channel-group id="relay4" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel4.label</label>
- </channel-group>
- <channel-group id="meter4" typeId="meter">
- <label>@text/channel-group-type.shelly.meter4.label</label>
- </channel-group>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shellyplug">
- <label>Shelly Plug (SHPLG-1)</label>
- <description>@text/thing-type.shelly.shellyplug.description</description>
- <category>PowerOutlet</category>
- <channel-groups>
- <channel-group id="relay" typeId="relayChannelPlug"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shellyplugs">
- <label>Shelly Plug-S (SHPLG-S)</label>
- <description>@text/thing-type.shelly.shellyplugs.description</description>
- <category>PowerOutlet</category>
- <channel-groups>
- <channel-group id="relay" typeId="relayChannelPlug"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shellyplugu1">
- <label>Shelly Plug US (SHPLG-U1)</label>
- <description>@text/thing-type.shelly.shellyplugu1.description</description>
- <category>PowerOutlet</category>
- <channel-groups>
- <channel-group id="relay" typeId="relayChannelPlug"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shellyuni">
- <label>Shelly UNI (SHUNI-1)</label>
- <description>@text/thing-type.shelly.shellyuni.description</description>
-
- <channel-groups>
- <channel-group id="relay1" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel1.label</label>
- </channel-group>
- <channel-group id="relay2" typeId="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel2.label</label>
- </channel-group>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <thing-type id="shellydimmer">
- <label>Shelly Dimmer (SHDM-1)</label>
- <description>@text/thing-type.shelly.shellydimmer.description</description>
- <category>DimmableLight</category>
- <channel-groups>
- <channel-group id="relay" typeId="dimmerChannel"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:dimmer"/>
- </thing-type>
-
- <thing-type id="shellydimmer2">
- <label>Shelly Dimmer 2 (SHDM-2)</label>
- <description>@text/thing-type.shelly.shellydimmer2.description</description>
- <category>DimmableLight</category>
- <channel-groups>
- <channel-group id="relay" typeId="dimmerChannel"/>
- <channel-group id="meter" typeId="meter"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:dimmer"/>
- </thing-type>
-
- <thing-type id="shellyix3">
- <label>Shelly ix3 (SHIX3-1)</label>
- <description>@text/thing-type.shelly.shellyix3.description</description>
- <channel-groups>
- <channel-group id="status1" typeId="ix3Channel">
- <label>@text/channel-group-type.shelly.ix3Channel1.label</label>
- </channel-group>
- <channel-group id="status2" typeId="ix3Channel">
- <label>@text/channel-group-type.shelly.ix3Channel2.label</label>
- </channel-group>
- <channel-group id="status3" typeId="ix3Channel">
- <label>@text/channel-group-type.shelly.ix3Channel3.label</label>
- </channel-group>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:relay"/>
- </thing-type>
-
- <channel-group-type id="relayChannel">
- <label>@text/channel-group-type.shelly.relayChannel.label</label>
- <description>@text/channel-group-type.shelly.relayChannel.description</description>
- </channel-group-type>
-
- <channel-group-type id="relayChannelPlug">
- <label>@text/channel-group-type.shelly.relayChannel.label</label>
- <description>@text/channel-group-type.shelly.relayChannel.description</description>
- </channel-group-type>
-
- <channel-group-type id="dimmerChannel">
- <label>@text/channel-group-type.shelly.dimmerChannel.label</label>
- <description>@text/channel-group-type.shelly.dimmerChannel.description</description>
- </channel-group-type>
-
- <channel-group-type id="ix3Channel">
- <label>@text/channel-group-type.shelly.ix3Channel.label</label>
- <description>@text/channel-group-type.shelly.ix3Channel.description</description>
- </channel-group-type>
-
- <channel-group-type id="rollerControl">
- <label>@text/channel-group-type.shelly.rollerControl.label</label>
- <description>@text/channel-group-type.shelly.rollerControl.description</description>
- </channel-group-type>
-
- <channel-group-type id="meter">
- <label>@text/channel-group-type.shelly.meter.label</label>
- <description>@text/channel-group-type.shelly.meter.description</description>
- </channel-group-type>
-
- <channel-group-type id="externalSensors">
- <label>@text/channel-group-type.shelly.externalSensors.label</label>
- <description>@text/channel-group-type.shelly.externalSensors.description</description>
- </channel-group-type>
-
- <channel-type id="outputName">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.outputName.label</label>
- <description>@text/channel-type.shelly.outputName.description</description>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="timerAutoOn" advanced="true">
- <item-type>Number:Time</item-type>
- <label>@text/channel-type.shelly.timerAutoOn.label</label>
- <description>@text/channel-type.shelly.timerAutoOn.description</description>
- <category>Time</category>
- <state min="0" step="1" pattern="%.0f %unit%" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="timerAutoOff" advanced="true">
- <item-type>Number:Time</item-type>
- <label>@text/channel-type.shelly.timerAutoOff.label</label>
- <description>@text/channel-type.shelly.timerAutoOff.description</description>
- <category>Time</category>
- <state min="0" step="1" pattern="%.0f %unit%" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="timerActive" advanced="true">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.timerActive.label</label>
- <description>@text/channel-type.shelly.timerActive.description</description>
- <category>Status</category>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="rollerShutter">
- <item-type>Rollershutter</item-type>
- <label>@text/channel-type.shelly.rollerShutter.label</label>
- <description>@text/channel-type.shelly.rollerShutter.description</description>
- <category>Blinds</category>
- </channel-type>
-
- <channel-type id="rollerPosition" advanced="true">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.rollerPosition.label</label>
- <description>@text/channel-type.shelly.rollerPosition.description</description>
- <tags>
- <tag>Measurement</tag>
- <tag>Level</tag>
- </tags>
- <state readOnly="false" min="0" max="100" pattern="%.0f %%"/>
- </channel-type>
-
- <channel-type id="rollerFavorite">
- <item-type>Number</item-type>
- <label>@text/channel-type.shelly.rollerFavorite.label</label>
- <description>@text/channel-type.shelly.rollerFavorite.description</description>
- <state readOnly="false" min="0" max="4"/>
- </channel-type>
-
- <channel-type id="rollerState">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.rollerState.label</label>
- <description>@text/channel-type.shelly.rollerState.description</description>
- <category>Status</category>
- <state readOnly="true">
- <options>
- <option value="open">@text/channel-type.shelly.rollerState.state.option.open</option>
- <option value="close">@text/channel-type.shelly.rollerState.state.option.close</option>
- <option value="stop">@text/channel-type.shelly.rollerState.state.option.stop</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="rollerStop">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.rollerStop.label</label>
- <description>@text/channel-type.shelly.rollerStop.description</description>
- <state readOnly="true">
- <options>
- <option value="normal">@text/channel-type.shelly.rollerStop.state.option.normal</option>
- <option value="safety_switch">@text/channel-type.shelly.rollerStop.state.option.safety_switch</option>
- <option value="obstacle">@text/channel-type.shelly.rollerStop.state.option.obstacle</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="rollerDirection">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.rollerDirection.label</label>
- <description>@text/channel-type.shelly.rollerDirection.description</description>
- <state readOnly="true">
- <options>
- <option value="open">@text/channel-type.shelly.rollerDirection.state.option.open</option>
- <option value="close">@text/channel-type.shelly.rollerDirection.state.option.close</option>
- <option value="stop">@text/channel-type.shelly.rollerDirection.state.option.stop</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="rollerSafety" advanced="true">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.rollerSafety.label</label>
- <description>@text/channel-type.shelly.rollerSafety.description</description>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="inputState">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.inputState.label</label>
- <description>@text/channel-type.shelly.inputState.description</description>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="inputState1" advanced="true">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.inputState1.label</label>
- <description>@text/channel-type.shelly.inputState1.description</description>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="inputState2" advanced="true">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.inputState2.label</label>
- <description>@text/channel-type.shelly.inputState2.description </description>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="dimmerBrightness">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.dimmerBrightness.label</label>
- <description>@text/channel-type.shelly.dimmerBrightness.description</description>
- <category>DimmableLight</category>
- </channel-type>
-
- <channel-type id="meterWatts">
- <item-type>Number:Power</item-type>
- <label>@text/channel-type.shelly.meterWatts.label</label>
- <description>@text/channel-type.shelly.meterWatts.description</description>
- <category>Energy</category>
- <tags>
- <tag>Measurement</tag>
- <tag>Current</tag>
- </tags>
- <state readOnly="true" pattern="%.2f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterAccuWatts" advanced="true">
- <item-type>Number:Power</item-type>
- <label>@text/channel-type.shelly.meterAccuWatts.label</label>
- <description>@text/channel-type.shelly.meterAccuWatts.description</description>
- <category>Energy</category>
- <state readOnly="true" pattern="%.2f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterAccuTotal" advanced="true">
- <item-type>Number:Power</item-type>
- <label>@text/channel-type.shelly.meterAccuTotal.label</label>
- <description>@text/channel-type.shelly.meterAccuTotal.description</description>
- <category>Energy</category>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterAccuReturned" advanced="true">
- <item-type>Number:Power</item-type>
- <label>@text/channel-type.shelly.meterAccuReturned.label</label>
- <description>@text/channel-type.shelly.meterAccuReturned.description</description>
- <category>Energy</category>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterReactive">
- <item-type>Number:Power</item-type>
- <label>@text/channel-type.shelly.meterReactive.label</label>
- <description>@text/channel-type.shelly.meterReactive.description</description>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="lastPower1" advanced="true">
- <item-type>Number:Energy</item-type>
- <label>@text/channel-type.shelly.lastPower1.label</label>
- <description>@text/channel-type.shelly.lastPower1.description</description>
- <category>Energy</category>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterTotal">
- <item-type>Number:Energy</item-type>
- <label>@text/channel-type.shelly.meterTotal.label</label>
- <description>@text/channel-type.shelly.meterTotal.description</description>
- <category>Energy</category>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterReturned">
- <item-type>Number:Energy</item-type>
- <label>@text/channel-type.shelly.meterReturned.label</label>
- <description>@text/channel-type.shelly.meterReturned.description</description>
- <category>Energy</category>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterVoltage">
- <item-type>Number:ElectricPotential</item-type>
- <label>@text/channel-type.shelly.meterVoltage.label</label>
- <description>@text/channel-type.shelly.meterVoltage.description</description>
- <tags>
- <tag>Measurement</tag>
- <tag>Voltage</tag>
- </tags>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterCurrent">
- <item-type>Number:ElectricPotential</item-type>
- <label>@text/channel-type.shelly.meterCurrent.label</label>
- <description>@text/channel-type.shelly.meterCurrent.description</description>
- <category>Energy</category>
- <tags>
- <tag>Measurement</tag>
- <tag>Power</tag>
- </tags>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="meterPowerFactor">
- <item-type>Number</item-type>
- <label>@text/channel-type.shelly.meterPowerFactor.label</label>
- <description>@text/channel-type.shelly.meterPowerFactor.description</description>
- <state readOnly="true" pattern="%.3f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="timestamp">
- <item-type>DateTime</item-type>
- <label>@text/channel-type.shelly.timestamp.label</label>
- <description>@text/channel-type.shelly.timestamp.description</description>
- <category>Time</category>
- <tags>
- <tag>Timestamp</tag>
- </tags>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="ledStatusDisable">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.ledStatusDisable.label</label>
- <description>@text/channel-type.shelly.ledStatusDisable.description</description>
- </channel-type>
-
- <channel-type id="ledPowerDisable">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.ledPowerDisable.label</label>
- <description>@text/channel-type.shelly.ledPowerDisable.description</description>
- </channel-type>
-
- <channel-type id="lastUpdate" advanced="true">
- <item-type>DateTime</item-type>
- <label>@text/channel-type.shelly.lastUpdate.label</label>
- <description>@text/channel-type.shelly.lastUpdate.description</description>
- <category>Time</category>
- <tags>
- <tag>Timestamp</tag>
- </tags>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="eventTrigger">
- <kind>trigger</kind>
- <label>@text/channel-type.shelly.eventTrigger.label</label>
- <description>@text/channel-type.shelly.eventTrigger.description</description>
- <event>
- <options>
- <option value="ROLLER_OPEN">@text/channel-type.shelly.eventTrigger.option.ROLLER_OPEN</option>
- <option value="ROLLER_CLOSE">@text/channel-type.shelly.eventTrigger.option.ROLLER_CLOSE</option>
- <option value="ROLLER_STOP">@text/channel-type.shelly.eventTrigger.option.ROLLER_STOP</option>
- </options>
- </event>
- </channel-type>
-
-</thing:thing-descriptions>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<thing:thing-descriptions bindingId="shelly"
- 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="shellyht">
- <label>Shelly H&T (SHHT-1)</label>
- <description>@text/thing-type.shelly.shellyht.description</description>
- <category>Sensor</category>
- <channel-groups>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellysmoke">
- <label>Shelly Smoke</label>
- <description>@text/thing-type.shelly.shellysmoke.description</description>
- <category>SmokeDetector</category>
- <channel-groups>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellygas">
- <label>Shelly GAS (SHGS-1)</label>
- <description>@text/thing-type.shelly.shellygas.description</description>
- <category>Sensor</category>
- <channel-groups>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:basic"/>
- </thing-type>
-
- <thing-type id="shellyflood">
- <label>Shelly Flood (SHWT-1)</label>
- <description>@text/thing-type.shelly.shellyflood.description</description>
- <category>Sensor</category>
- <channel-groups>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellydw">
- <label>Shelly Door/Window (SHDW-1)</label>
- <description>@text/thing-type.shelly.shellydw.description</description>
- <category>Sensor</category>
- <channel-groups>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellydw2">
- <label>Shelly Door/Window (SHDW-2)</label>
- <description>@text/thing-type.shelly.shellydw2.description</description>
- <category>Sensor</category>
- <channel-groups>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellysense">
- <label>Shelly Sense (SHSEN-1)</label>
- <description>@text/thing-type.shelly.shellysense.description</description>
- <channel-groups>
- <channel-group id="control" typeId="control"/>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellybutton1">
- <label>Shelly Button 1 (SHBTN-1)</label>
- <description>@text/thing-type.shelly.shellybutton1.description</description>
- <category>WallSwitch</category>
- <channel-groups>
- <channel-group id="status" typeId="buttonState"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellybutton2">
- <label>Shelly Button 2 (SHBTN-2)</label>
- <description>@text/thing-type.shelly.shellybutton2.description</description>
- <category>WallSwitch</category>
- <channel-groups>
- <channel-group id="status" typeId="buttonState"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellymotion">
- <label>Shelly Motion (SHMOS-01/SHMOS-02)</label>
- <description>@text/thing-type.shelly.shellymotion.description</description>
- <category>MotionDetector</category>
- <channel-groups>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <thing-type id="shellytrv">
- <label>Shelly TRV (SHTRV-01)</label>
- <description>@text/thing-type.shelly.shellytrv.description</description>
- <category>RadiatorControl</category>
- <channel-groups>
- <channel-group id="sensors" typeId="sensorData"/>
- <channel-group id="control" typeId="control"/>
- <channel-group id="battery" typeId="batteryStatus"/>
- <channel-group id="device" typeId="deviceStatus"/>
- </channel-groups>
-
- <representation-property>serviceName</representation-property>
- <config-description-ref uri="thing-type:shelly:battery"/>
- </thing-type>
-
- <channel-type id="controlMode">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.controlMode.label</label>
- <description>@text/channel-type.shelly.controlMode.description</description>
- <state readOnly="false">
- <options>
- <option value="manual">@text/channel-type.shelly.controlMode.state.option.manual</option>
- <option value="automatic">@text/channel-type.shelly.controlMode.state.option.automatic</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="controlProfile">
- <item-type>Number</item-type>
- <label>@text/channel-type.shelly.controlProfile.label</label>
- <description>@text/channel-type.shelly.controlProfile.description</description>
- <state min="0" max="5" step="1" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="targetTemp">
- <item-type>Number:Temperature</item-type>
- <label>@text/channel-type.shelly.targetTemp.label</label>
- <description>@text/channel-type.shelly.targetTemp.description</description>
- <category>Heating</category>
- <tags>
- <tag>Setpoint</tag>
- <tag>Temperature</tag>
- </tags>
- <state min="4" max="31" step="0.5" pattern="%.1f %unit%" readOnly="false"></state>
- </channel-type>
-
- <channel-type id="boostControl">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.boostControl.label</label>
- <description>@text/channel-type.shelly.boostControl.description</description>
- </channel-type>
- <channel-type id="boostTimer">
- <item-type>Number:Time</item-type>
- <label>@text/channel-type.shelly.boostTimer.label</label>
- <description>@text/channel-type.shelly.boostTimer.description</description>
- <category>Time</category>
- <state min="0" step="1" pattern="%.0f %unit%" readOnly="false"></state>
- </channel-type>
-
-
- <channel-group-type id="sensorData">
- <label>@text/channel-group-type.shelly.sensorData.label</label>
- <description>@text/channel-group-type.shelly.sensorData.description</description>
- </channel-group-type>
-
- <channel-group-type id="batteryStatus">
- <label>@text/channel-group-type.shelly.batteryStatus.label</label>
- <description>@text/channel-group-type.shelly.batteryStatus.description</description>
- <category>BatteryLevel</category>
- </channel-group-type>
-
- <channel-group-type id="control">
- <label>@text/channel-group-type.shelly.control.label</label>
- <description>@text/channel-group-type.shelly.control.description</description>
- </channel-group-type>
-
- <channel-group-type id="buttonState">
- <label>@text/channel-group-type.shelly.buttonState.label</label>
- <description>@text/channel-group-type.shelly.buttonState.description</description>
- </channel-group-type>
-
- <channel-type id="sensorContact">
- <item-type>Contact</item-type>
- <label>@text/channel-type.shelly.sensorContact.label</label>
- <description>@text/channel-type.shelly.sensorContact.description</description>
- <state pattern="%s" readOnly="true">
- <options>
- <option value="OPEN">@text/channel-type.shelly.sensorContact.state.option.OPEN</option>
- <option value="CLOSED">@text/channel-type.shelly.sensorContact.state.option.CLOSED</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="sensorState">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.sensorState.label</label>
- <description>@text/channel-type.shelly.sensorState.description</description>
- <state pattern="%s" readOnly="true">
- <options>
- <option value="warmup">@text/channel-type.shelly.sensorState.state.option.warmup</option>
- <option value="normal">@text/channel-type.shelly.sensorState.state.option.normal</option>
- <option value="fault">@text/channel-type.shelly.sensorState.state.option.fault</option>
- <option value="unknown">@text/channel-type.shelly.sensorState.state.option.unknown</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="alarmState">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.alarmState.label</label>
- <description>@text/channel-type.shelly.alarmState.description</description>
- <state pattern="%s" readOnly="true">
- <options>
- <option value="unknown">@text/channel-type.shelly.alarmState.state.option.unknown</option>
- <option value="none">@text/channel-type.shelly.alarmState.state.option.none</option>
- <option value="mild">@text/channel-type.shelly.alarmState.state.option.mild</option>
- <option value="heavy">@text/channel-type.shelly.alarmState.state.option.heavy</option>
- <option value="test">@text/channel-type.shelly.alarmState.state.option.test</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="lastEvent">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.lastEvent.label</label>
- <description>@text/channel-type.shelly.lastEvent.description</description>
- <state pattern="%s" readOnly="true">
- <options>
- <option value="S">@text/channel-type.shelly.lastEvent.state.option.S</option>
- <option value="SS">@text/channel-type.shelly.lastEvent.state.option.SS</option>
- <option value="SSS">@text/channel-type.shelly.lastEvent.state.option.SSS</option>
- <option value="L">@text/channel-type.shelly.lastEvent.state.option.L</option>
- <option value="SL">@text/channel-type.shelly.lastEvent.state.option.SL</option>
- <option value="LS">@text/channel-type.shelly.lastEvent.state.option.LS</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="eventCount">
- <item-type>Number</item-type>
- <label>@text/channel-type.shelly.eventCount.label</label>
- <description>@text/channel-type.shelly.eventCount.description</description>
- <state pattern="%.0f" readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="sensorTemp">
- <item-type>Number:Temperature</item-type>
- <label>@text/channel-type.shelly.sensorTemp.label</label>
- <description>@text/channel-type.shelly.sensorTemp.description</description>
- <category>Temperature</category>
- <tags>
- <tag>Measurement</tag>
- <tag>Temperature</tag>
- </tags>
- <state readOnly="true" pattern="%.1f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="sensorExtTemp">
- <item-type>Number:Temperature</item-type>
- <label>@text/channel-type.shelly.sensorExtTemp.label</label>
- <description>@text/channel-type.shelly.sensorExtTemp.label</description>
- <category>Temperature</category>
- <tags>
- <tag>Measurement</tag>
- <tag>Temperature</tag>
- </tags>
- <state readOnly="true" pattern="%.1f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="sensorExtHum">
- <item-type>Number:Dimensionless</item-type>
- <label>@text/channel-type.shelly.sensorExtHum.label</label>
- <description>@text/channel-type.shelly.sensorExtHum.description</description>
- <category>Humidity</category>
- <tags>
- <tag>Measurement</tag>
- <tag>Humidity</tag>
- </tags>
- <state readOnly="true" pattern="%.1f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="sensorHumidity">
- <item-type>Number:Dimensionless</item-type>
- <label>@text/channel-type.shelly.sensorHumidity.label</label>
- <description>@text/channel-type.shelly.sensorHumidity.description</description>
- <category>Humidity</category>
- <tags>
- <tag>Measurement</tag>
- <tag>Humidity</tag>
- </tags>
- <state readOnly="true" pattern="%.1f %unit%"/>
- </channel-type>
-
- <channel-type id="sensorFlood">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.sensorFlood.label</label>
- <description>@text/channel-type.shelly.sensorFlood.description</description>
- <category>Water</category>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="sensorSmoke">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.sensorSmoke.label</label>
- <description>@text/channel-type.shelly.sensorSmoke.description</description>
- <category>Smoke</category>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="sensorLux">
- <item-type>Number:Illuminance</item-type>
- <label>@text/channel-type.shelly.sensorLux.label</label>
- <description>@text/channel-type.shelly.sensorLux.description</description>
- <state readOnly="true" pattern="%.0f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="sensorIllumination">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.sensorIllumination.label</label>
- <description>@text/channel-type.shelly.sensorIllumination.description</description>
- <state readOnly="true">
- <options>
- <option value="dark">@text/channel-type.shelly.sensorIllumination.state.option.dark</option>
- <option value="twilight">@text/channel-type.shelly.sensorIllumination.state.option.twilight</option>
- <option value="bright">@text/channel-type.shelly.sensorIllumination.state.option.bright</option>
- <option value="unknown">@text/channel-type.shelly.sensorIllumination.state.option.unknown</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="motionTimestamp">
- <item-type>DateTime</item-type>
- <label>@text/channel-type.shelly.motionTimestamp.label</label>
- <description>@text/channel-type.shelly.motionTimestamp.description</description>
- <category>Time</category>
- <tags>
- <tag>Timestamp</tag>
- </tags>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="motionActive" advanced="true">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.motionActive.label</label>
- <description>channel-type.shelly.motionActive.description</description>
- <category>Contact</category>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="sensorMotion">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.sensorMotion.label</label>
- <description>@text/channel-type.shelly.sensorMotion.description</description>
- <category>Motion</category>
- <tags>
- <tag>Status</tag>
- <tag>Presence</tag>
- </tags>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="sensorVibration">
- <item-type>Switch</item-type>
- <label>@text/channel-type.shelly.sensorVibration.label</label>
- <description>@text/channel-type.shelly.sensorVibration.description</description>
- <category>Flow</category>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="sensorTilt">
- <item-type>Number:Angle</item-type>
- <label>@text/channel-type.shelly.sensorTilt.label</label>
- <description>@text/channel-type.shelly.sensorTilt.description</description>
- <category>Tilt</category>
- <state readOnly="true" pattern="%.0f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="sensorPPM">
- <item-type>Number:Dimensionless</item-type>
- <label>@text/channel-type.shelly.sensorPPM.label</label>
- <description>@text/channel-type.shelly.sensorPPM.description</description>
- <category>Gas</category>
- <tags>
- <tag>Measurement</tag>
- <tag>Gas</tag>
- </tags>
- <state readOnly="true" pattern="%.0f ppm">
- </state>
- </channel-type>
-
- <channel-type id="sensorADC">
- <item-type>Number:ElectricPotential</item-type>
- <label>@text/channel-type.shelly.sensorADC.label</label>
- <description>@text/channel-type.shelly.sensorADC.description</description>
- <state readOnly="true" pattern="%.0f %unit%">
- </state>
- </channel-type>
-
- <channel-type id="sensorPosition">
- <item-type>Dimmer</item-type>
- <label>@text/channel-type.shelly.sensorPosition.label</label>
- <description>@text/channel-type.shelly.sensorPosition.description</description>
- <category>RadiatorControl</category>
- <state min="0" max="100" step="1" readOnly="false" pattern="%.0f %unit%"></state>
- </channel-type>
-
- <channel-type id="sensorValve">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.sensorValve.label</label>
- <description>@text/channel-type.shelly.sensorValve.description</description>
- <category>Pressure</category>
- <state readOnly="true">
- <options>
- <option value="closed">@text/channel-type.shelly.sensorValve.state.option.closed</option>
- <option value="opened">@text/channel-type.shelly.sensorValve.state.option.opened</option>
- <option value="not_connected">@text/channel-type.shelly.sensorValve.state.option.not_connected</option>
- <option value="failure">@text/channel-type.shelly.sensorValve.state.option.failure</option>
- <option value="closing">@text/channel-type.shelly.sensorValve.state.option.closing</option>
- <option value="opening">@text/channel-type.shelly.sensorValve.state.option.opening</option>
- <option value="checking">@text/channel-type.shelly.sensorValve.state.option.checking</option>
- <option value="unknown">@text/channel-type.shelly.sensorValve.state.option.UNKNOWN</option>
- </options>
- </state>
- </channel-type>
-
- <channel-type id="sensorError">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.sensorError.label</label>
- <description>@text/channel-type.shelly.sensorError.description</description>
- <state readOnly="true">
- </state>
- </channel-type>
-
- <channel-type id="sensorSleepTime" advanced="true">
- <item-type>Number:Time</item-type>
- <label>@text/channel-type.shelly.sensorSleepTime.label</label>
- <description>@text/channel-type.shelly.sensorSleepTime.description</description>
- <state readOnly="false" min="0" max="86400" pattern="%.0f %unit%"/>
- </channel-type>
-
- <channel-type id="senseKey">
- <item-type>String</item-type>
- <label>@text/channel-type.shelly.senseKey.label</label>
- <description>@text/channel-type.shelly.senseKey.description</description>
- </channel-type>
-
-</thing:thing-descriptions>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="shelly"
+ 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="shellybulb">
+ <label>Shelly Bulb (SHBLB-1)</label>
+ <description>@text/thing-type.shelly.shellybulb.description</description>
+ <category>Lightbulb</category>
+ <channel-groups>
+ <channel-group id="control" typeId="bulbControl"/>
+ <channel-group id="color" typeId="colorSettingsBulb"/>
+ <channel-group id="white" typeId="whiteSettings"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:light"/>
+ </thing-type>
+
+ <thing-type id="shellybulbduo">
+ <label>Shelly Duo (SHBDUO-1)</label>
+ <description>@text/thing-type.shelly.shellybulbduo.description</description>
+ <category>Lightbulb</category>
+ <channel-groups>
+ <channel-group id="control" typeId="duoControl"/>
+ <channel-group id="white" typeId="whiteSettings"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:light"/>
+ </thing-type>
+
+ <thing-type id="shellycolorbulb">
+ <label>Shelly Color Bulb (SHCB-1)</label>
+ <description>@text/thing-type.shelly.shellycolorbulb.description</description>
+ <category>ColorLight</category>
+ <channel-groups>
+ <channel-group id="control" typeId="duoControl"/>
+ <channel-group id="color" typeId="colorSettingsBulb"/>
+ <channel-group id="white" typeId="whiteSettings"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:light"/>
+ </thing-type>
+
+ <thing-type id="shellyvintage">
+ <label>Shelly Vintage (SHVIN-1)</label>
+ <description>@text/thing-type.shelly.shellyvintage.description</description>
+ <category>Lightbulb</category>
+ <channel-groups>
+ <channel-group id="control" typeId="duoControl"/>
+ <channel-group id="white" typeId="whiteSettings"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:light"/>
+ </thing-type>
+
+ <thing-type id="shellyrgbw2-color">
+ <label>Shelly RGBW2 Color Mode (SHRGBW2)</label>
+ <description>@text/thing-type.shelly.shellyrgbw2-color.description</description>
+ <category>ColorLight</category>
+ <channel-groups>
+ <channel-group id="control" typeId="rgbw2ColorControl"/>
+ <channel-group id="color" typeId="colorSettingsRGBW2"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:rgbw2"/>
+ </thing-type>
+
+ <thing-type id="shellyrgbw2-white">
+ <label>Shelly RGBW2 White Mode (SHRGBW2)</label>
+ <description>@text/thing-type.shelly.shellyrgbw2-white.description</description>
+ <category>Lightbulb</category>
+ <channel-groups>
+ <channel-group id="control" typeId="rgbw2WhiteControl"/>
+ <channel-group id="channel1" typeId="rgbw2Channel">
+ <label>@text/channel-group-type.shelly.rgbw2Channel1.label</label>
+ </channel-group>
+ <channel-group id="channel2" typeId="rgbw2Channel">
+ <label>@text/channel-group-type.shelly.rgbw2Channel2.label</label>
+ </channel-group>
+ <channel-group id="channel3" typeId="rgbw2Channel">
+ <label>@text/channel-group-type.shelly.rgbw2Channel3.label</label>
+ </channel-group>
+ <channel-group id="channel4" typeId="rgbw2Channel">
+ <label>@text/channel-group-type.shelly.rgbw2Channel4.label</label>
+ </channel-group>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:rgbw2"/>
+ </thing-type>
+
+ <channel-group-type id="bulbControl">
+ <label>@text/channel-group-type.shelly.bulbControl.label</label>
+ <description>@text/channel-group-type.shelly.bulbControl.description</description>
+ <channels>
+ <channel id="power" typeId="system.power"/>
+ <channel id="mode" typeId="colorMode"/>
+ </channels>
+ </channel-group-type>
+
+ <channel-group-type id="duoControl">
+ <label>@text/channel-group-type.shelly.duoControl.label</label>
+ <description>@text/channel-group-type.shelly.duoControl.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="rgbw2ColorControl">
+ <label>@text/channel-group-type.shelly.rgbw2ColorControl.label</label>
+ <description>@text/channel-group-type.shelly.rgbw2ColorControl.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="rgbw2WhiteControl">
+ <label>@text/channel-group-type.shelly.rgbw2WhiteControl.label</label>
+ <description>@text/channel-group-type.shelly.rgbw2WhiteControl.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="colorSettingsBulb">
+ <label>@text/channel-group-type.shelly.colorSettingsBulb.label</label>
+ <description>@text/channel-group-type.shelly.colorSettingsBulb.description</description>
+ <channels>
+ <channel id="hsb" typeId="system.color"/>
+ <channel id="full" typeId="colorFull"/>
+ <channel id="red" typeId="colorRed"/>
+ <channel id="green" typeId="colorGreen"/>
+ <channel id="blue" typeId="colorBlue"/>
+ <channel id="white" typeId="colorWhite"/>
+ <channel id="gain" typeId="colorGain"/>
+ <channel id="effect" typeId="colorEffectBulb"/>
+ </channels>
+ </channel-group-type>
+
+ <channel-group-type id="colorSettingsRGBW2">
+ <label>@text/channel-group-type.shelly.colorSettingsRGBW2.label</label>
+ <description>@text/channel-group-type.shelly.colorSettingsRGBW2.description</description>
+ <channels>
+ <channel id="hsb" typeId="system.color"/>
+ <channel id="full" typeId="colorFull"/>
+ <channel id="red" typeId="colorRed"/>
+ <channel id="green" typeId="colorGreen"/>
+ <channel id="blue" typeId="colorBlue"/>
+ <channel id="white" typeId="colorWhite"/>
+ <channel id="gain" typeId="colorGain"/>
+ <channel id="effect" typeId="colorEffectRGBW2"/>
+ </channels>
+ </channel-group-type>
+
+ <channel-group-type id="whiteSettings">
+ <label>@text/channel-group-type.shelly.whiteSettings.label</label>
+ <description>@text/channel-group-type.shelly.whiteSettings.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="rgbw2Channel">
+ <label>@text/channel-group-type.shelly.rgbw2Channel.label</label>
+ <description>@text/channel-group-type.shelly.rgbw2Channel.description</description>
+ </channel-group-type>
+
+ <channel-type id="colorMode">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.colorMode.label</label>
+ <description>@text/channel-type.shelly.colorMode.description</description>
+ </channel-type>
+
+ <channel-type id="colorFull">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.colorFull.label</label>
+ <description>@text/channel-type.shelly.colorFull.description</description>
+ <state>
+ <options>
+ <option value="red">@text/channel-type.shelly.colorFull.state.option.red</option>
+ <option value="green">@text/channel-type.shelly.colorFull.state.option.green</option>
+ <option value="blue">@text/channel-type.shelly.colorFull.state.option.blue</option>
+ <option value="yellow">@text/channel-type.shelly.colorFull.state.option.yellow</option>
+ <option value="white">@text/channel-type.shelly.colorFull.state.option.white</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="colorRed" advanced="true">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.colorRed.label</label>
+ <description>@text/channel-type.shelly.colorRed.description</description>
+ <state min="0" max="255" step="1" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="colorGreen" advanced="true">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.colorGreen.label</label>
+ <description>@text/channel-type.shelly.colorGreen.description</description>
+ <state min="0" max="255" step="1" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="colorBlue" advanced="true">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.colorBlue.label</label>
+ <description>@text/channel-type.shelly.colorBlue.description</description>
+ <state min="0" max="255" step="1" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="colorWhite">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.colorWhite.label</label>
+ <description>@text/channel-type.shelly.colorWhite.description</description>
+ <state min="0" max="255" step="1" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="colorGain">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.colorGain.label</label>
+ <description>@text/channel-type.shelly.colorGain.description</description>
+ <state min="0" max="100" step="1" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="whiteTemp">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.whiteTemp.label</label>
+ <description>@text/channel-type.shelly.whiteTemp.description</description>
+ <state min="3000" max="6500" step="10" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="whiteBrightness">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.whiteBrightness.label</label>
+ <description>@text/channel-type.shelly.whiteBrightness.description</description>
+ <category>DimmableLight</category>
+ <state min="0" max="100" step="1" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="colorEffectBulb">
+ <item-type>Number</item-type>
+ <label>@text/channel-type.shelly.colorEffectBulb.label</label>
+ <description>@text/channel-type.shelly.colorEffectBulb.description</description>
+ <state>
+ <options>
+ <option value="0">@text/channel-type.shelly.colorEffectBulb.option.0</option>
+ <option value="1">@text/channel-type.shelly.colorEffectBulb.option.1</option>
+ <option value="2">@text/channel-type.shelly.colorEffectBulb.option.2</option>
+ <option value="3">@text/channel-type.shelly.colorEffectBulb.option.3</option>
+ <option value="4">@text/channel-type.shelly.colorEffectBulb.option.4</option>
+ <option value="5">@text/channel-type.shelly.colorEffectBulb.option.5</option>
+ <option value="6">@text/channel-type.shelly.colorEffectBulb.option.6</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="colorEffectRGBW2">
+ <item-type>Number</item-type>
+ <label>@text/channel-type.shelly.colorEffectRGBW2.label</label>
+ <description>@text/channel-type.shelly.colorEffectRGBW2.description</description>
+ <state>
+ <options>
+ <option value="0">@text/channel-type.shelly.colorEffectRGBW2.option.0</option>
+ <option value="1">@text/channel-type.shelly.colorEffectRGBW2.option.1</option>
+ <option value="2">@text/channel-type.shelly.colorEffectRGBW2.option.2</option>
+ <option value="3">@text/channel-type.shelly.colorEffectRGBW2.option.3</option>
+ </options>
+ </state>
+ </channel-type>
+</thing:thing-descriptions>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="shelly"
+ 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="shelly1">
+ <label>Shelly 1 (SHSW-1)</label>
+ <description>@text/thing-type.shelly.shelly1.description</description>
+ <channel-groups>
+ <channel-group id="relay" typeId="relayChannel"/>
+ <channel-group id="sensors" typeId="externalSensors"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shelly1l">
+ <label>Shelly 1L (SHSW-L)</label>
+ <description>@text/thing-type.shelly.shelly1l.description</description>
+ <channel-groups>
+ <channel-group id="relay" typeId="relayChannel"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="sensors" typeId="externalSensors"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shelly1pm">
+ <label>Shelly 1PM (SHSW-PM)</label>
+ <description>@text/thing-type.shelly.shelly1pm.description</description>
+ <channel-groups>
+ <channel-group id="relay" typeId="relayChannel"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="sensors" typeId="externalSensors"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shellyem">
+ <label>Shelly EM (SHEM)</label>
+ <description>@text/thing-type.shelly.shellyem.description</description>
+ <channel-groups>
+ <channel-group id="meter1" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter1.label</label>
+ </channel-group>
+ <channel-group id="meter2" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter2.label</label>
+ </channel-group>
+ <channel-group id="relay" typeId="relayChannel"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <!-- Shelly 3EM - device reports wrong service name: shellyem3, see README -->
+ <thing-type id="shellyem3">
+ <label>Shelly 3EM (SHEM-3)</label>
+ <description>@text/thing-type.shelly.shellyem3.description</description>
+ <channel-groups>
+ <channel-group id="meter1" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter1.label</label>
+ </channel-group>
+ <channel-group id="meter2" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter2.label</label>
+ </channel-group>
+ <channel-group id="meter3" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter3.label</label>
+ </channel-group>
+ <channel-group id="relay" typeId="relayChannel"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shelly2-relay">
+ <label>Shelly 2 Relay (SHSW-21)</label>
+ <description>@text/thing-type.shelly.shelly2-relay.description</description>
+
+ <channel-groups>
+ <channel-group id="relay1" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel1.label</label>
+ </channel-group>
+ <channel-group id="relay2" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel2.label</label>
+ </channel-group>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shelly2-roller">
+ <label>Shelly 2 Roller (SHSW-21)</label>
+ <description>@text/thing-type.shelly.shelly2-roller.description</description>
+ <category>Rollershutter</category>
+ <channel-groups>
+ <channel-group id="roller" typeId="rollerControl"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:roller"/>
+ </thing-type>
+
+ <thing-type id="shelly25-relay">
+ <label>Shelly 2.5 Relay (SHSW-25)</label>
+ <description>@text/thing-type.shelly.shelly25-relay.description</description>
+ <channel-groups>
+ <channel-group id="relay1" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel1.label</label>
+ </channel-group>
+ <channel-group id="meter1" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter1.label</label>
+ </channel-group>
+ <channel-group id="relay2" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel2.label</label>
+ </channel-group>
+ <channel-group id="meter2" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter2.label</label>
+ </channel-group>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shelly25-roller">
+ <label>Shelly 2.5 Roller (SHSW-25)</label>
+ <description>@text/thing-type.shelly.shelly25-roller.description</description>
+ <category>Rollershutter</category>
+ <channel-groups>
+ <channel-group id="roller" typeId="rollerControl"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:roller"/>
+ </thing-type>
+
+ <thing-type id="shelly4pro">
+ <label>Shelly 4 Pro Relay (SHSW-44)</label>
+ <description>@text/thing-type.shelly.shelly4pro.description</description>
+
+ <channel-groups>
+ <channel-group id="relay1" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel1.label</label>
+ </channel-group>
+ <channel-group id="meter1" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter1.label</label>
+ </channel-group>
+ <channel-group id="relay2" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel2.label</label>
+ </channel-group>
+ <channel-group id="meter2" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter2.label</label>
+ </channel-group>
+ <channel-group id="relay3" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel3.label</label>
+ </channel-group>
+ <channel-group id="meter3" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter3.label</label>
+ </channel-group>
+ <channel-group id="relay4" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel4.label</label>
+ </channel-group>
+ <channel-group id="meter4" typeId="meter">
+ <label>@text/channel-group-type.shelly.meter4.label</label>
+ </channel-group>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shellyplug">
+ <label>Shelly Plug (SHPLG-1)</label>
+ <description>@text/thing-type.shelly.shellyplug.description</description>
+ <category>PowerOutlet</category>
+ <channel-groups>
+ <channel-group id="relay" typeId="relayChannelPlug"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shellyplugs">
+ <label>Shelly Plug-S (SHPLG-S)</label>
+ <description>@text/thing-type.shelly.shellyplugs.description</description>
+ <category>PowerOutlet</category>
+ <channel-groups>
+ <channel-group id="relay" typeId="relayChannelPlug"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shellyplugu1">
+ <label>Shelly Plug US (SHPLG-U1)</label>
+ <description>@text/thing-type.shelly.shellyplugu1.description</description>
+ <category>PowerOutlet</category>
+ <channel-groups>
+ <channel-group id="relay" typeId="relayChannelPlug"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shellyuni">
+ <label>Shelly UNI (SHUNI-1)</label>
+ <description>@text/thing-type.shelly.shellyuni.description</description>
+
+ <channel-groups>
+ <channel-group id="relay1" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel1.label</label>
+ </channel-group>
+ <channel-group id="relay2" typeId="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel2.label</label>
+ </channel-group>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <thing-type id="shellydimmer">
+ <label>Shelly Dimmer (SHDM-1)</label>
+ <description>@text/thing-type.shelly.shellydimmer.description</description>
+ <category>DimmableLight</category>
+ <channel-groups>
+ <channel-group id="relay" typeId="dimmerChannel"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:dimmer"/>
+ </thing-type>
+
+ <thing-type id="shellydimmer2">
+ <label>Shelly Dimmer 2 (SHDM-2)</label>
+ <description>@text/thing-type.shelly.shellydimmer2.description</description>
+ <category>DimmableLight</category>
+ <channel-groups>
+ <channel-group id="relay" typeId="dimmerChannel"/>
+ <channel-group id="meter" typeId="meter"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:dimmer"/>
+ </thing-type>
+
+ <thing-type id="shellyix3">
+ <label>Shelly ix3 (SHIX3-1)</label>
+ <description>@text/thing-type.shelly.shellyix3.description</description>
+ <channel-groups>
+ <channel-group id="status1" typeId="ix3Channel">
+ <label>@text/channel-group-type.shelly.ix3Channel1.label</label>
+ </channel-group>
+ <channel-group id="status2" typeId="ix3Channel">
+ <label>@text/channel-group-type.shelly.ix3Channel2.label</label>
+ </channel-group>
+ <channel-group id="status3" typeId="ix3Channel">
+ <label>@text/channel-group-type.shelly.ix3Channel3.label</label>
+ </channel-group>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:relay"/>
+ </thing-type>
+
+ <channel-group-type id="relayChannel">
+ <label>@text/channel-group-type.shelly.relayChannel.label</label>
+ <description>@text/channel-group-type.shelly.relayChannel.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="relayChannelPlug">
+ <label>@text/channel-group-type.shelly.relayChannel.label</label>
+ <description>@text/channel-group-type.shelly.relayChannel.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="dimmerChannel">
+ <label>@text/channel-group-type.shelly.dimmerChannel.label</label>
+ <description>@text/channel-group-type.shelly.dimmerChannel.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="ix3Channel">
+ <label>@text/channel-group-type.shelly.ix3Channel.label</label>
+ <description>@text/channel-group-type.shelly.ix3Channel.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="rollerControl">
+ <label>@text/channel-group-type.shelly.rollerControl.label</label>
+ <description>@text/channel-group-type.shelly.rollerControl.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="meter">
+ <label>@text/channel-group-type.shelly.meter.label</label>
+ <description>@text/channel-group-type.shelly.meter.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="externalSensors">
+ <label>@text/channel-group-type.shelly.externalSensors.label</label>
+ <description>@text/channel-group-type.shelly.externalSensors.description</description>
+ </channel-group-type>
+
+ <channel-type id="outputName">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.outputName.label</label>
+ <description>@text/channel-type.shelly.outputName.description</description>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="timerAutoOn" advanced="true">
+ <item-type>Number:Time</item-type>
+ <label>@text/channel-type.shelly.timerAutoOn.label</label>
+ <description>@text/channel-type.shelly.timerAutoOn.description</description>
+ <category>Time</category>
+ <state min="0" step="1" pattern="%.0f %unit%" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="timerAutoOff" advanced="true">
+ <item-type>Number:Time</item-type>
+ <label>@text/channel-type.shelly.timerAutoOff.label</label>
+ <description>@text/channel-type.shelly.timerAutoOff.description</description>
+ <category>Time</category>
+ <state min="0" step="1" pattern="%.0f %unit%" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="timerActive" advanced="true">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.timerActive.label</label>
+ <description>@text/channel-type.shelly.timerActive.description</description>
+ <category>Status</category>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="rollerShutter">
+ <item-type>Rollershutter</item-type>
+ <label>@text/channel-type.shelly.rollerShutter.label</label>
+ <description>@text/channel-type.shelly.rollerShutter.description</description>
+ <category>Blinds</category>
+ </channel-type>
+
+ <channel-type id="rollerPosition" advanced="true">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.rollerPosition.label</label>
+ <description>@text/channel-type.shelly.rollerPosition.description</description>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Level</tag>
+ </tags>
+ <state readOnly="false" min="0" max="100" pattern="%.0f %%"/>
+ </channel-type>
+
+ <channel-type id="rollerFavorite">
+ <item-type>Number</item-type>
+ <label>@text/channel-type.shelly.rollerFavorite.label</label>
+ <description>@text/channel-type.shelly.rollerFavorite.description</description>
+ <state readOnly="false" min="0" max="4"/>
+ </channel-type>
+
+ <channel-type id="rollerState">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.rollerState.label</label>
+ <description>@text/channel-type.shelly.rollerState.description</description>
+ <category>Status</category>
+ <state readOnly="true">
+ <options>
+ <option value="open">@text/channel-type.shelly.rollerState.state.option.open</option>
+ <option value="close">@text/channel-type.shelly.rollerState.state.option.close</option>
+ <option value="stop">@text/channel-type.shelly.rollerState.state.option.stop</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="rollerStop">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.rollerStop.label</label>
+ <description>@text/channel-type.shelly.rollerStop.description</description>
+ <state readOnly="true">
+ <options>
+ <option value="normal">@text/channel-type.shelly.rollerStop.state.option.normal</option>
+ <option value="safety_switch">@text/channel-type.shelly.rollerStop.state.option.safety_switch</option>
+ <option value="obstacle">@text/channel-type.shelly.rollerStop.state.option.obstacle</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="rollerDirection">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.rollerDirection.label</label>
+ <description>@text/channel-type.shelly.rollerDirection.description</description>
+ <state readOnly="true">
+ <options>
+ <option value="open">@text/channel-type.shelly.rollerDirection.state.option.open</option>
+ <option value="close">@text/channel-type.shelly.rollerDirection.state.option.close</option>
+ <option value="stop">@text/channel-type.shelly.rollerDirection.state.option.stop</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="rollerSafety" advanced="true">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.rollerSafety.label</label>
+ <description>@text/channel-type.shelly.rollerSafety.description</description>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="inputState">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.inputState.label</label>
+ <description>@text/channel-type.shelly.inputState.description</description>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="inputState1" advanced="true">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.inputState1.label</label>
+ <description>@text/channel-type.shelly.inputState1.description</description>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="inputState2" advanced="true">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.inputState2.label</label>
+ <description>@text/channel-type.shelly.inputState2.description </description>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="dimmerBrightness">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.dimmerBrightness.label</label>
+ <description>@text/channel-type.shelly.dimmerBrightness.description</description>
+ <category>DimmableLight</category>
+ </channel-type>
+
+ <channel-type id="meterWatts">
+ <item-type>Number:Power</item-type>
+ <label>@text/channel-type.shelly.meterWatts.label</label>
+ <description>@text/channel-type.shelly.meterWatts.description</description>
+ <category>Energy</category>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Current</tag>
+ </tags>
+ <state readOnly="true" pattern="%.2f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterAccuWatts" advanced="true">
+ <item-type>Number:Power</item-type>
+ <label>@text/channel-type.shelly.meterAccuWatts.label</label>
+ <description>@text/channel-type.shelly.meterAccuWatts.description</description>
+ <category>Energy</category>
+ <state readOnly="true" pattern="%.2f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterAccuTotal" advanced="true">
+ <item-type>Number:Power</item-type>
+ <label>@text/channel-type.shelly.meterAccuTotal.label</label>
+ <description>@text/channel-type.shelly.meterAccuTotal.description</description>
+ <category>Energy</category>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterAccuReturned" advanced="true">
+ <item-type>Number:Power</item-type>
+ <label>@text/channel-type.shelly.meterAccuReturned.label</label>
+ <description>@text/channel-type.shelly.meterAccuReturned.description</description>
+ <category>Energy</category>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterReactive">
+ <item-type>Number:Power</item-type>
+ <label>@text/channel-type.shelly.meterReactive.label</label>
+ <description>@text/channel-type.shelly.meterReactive.description</description>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="lastPower1" advanced="true">
+ <item-type>Number:Energy</item-type>
+ <label>@text/channel-type.shelly.lastPower1.label</label>
+ <description>@text/channel-type.shelly.lastPower1.description</description>
+ <category>Energy</category>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterTotal">
+ <item-type>Number:Energy</item-type>
+ <label>@text/channel-type.shelly.meterTotal.label</label>
+ <description>@text/channel-type.shelly.meterTotal.description</description>
+ <category>Energy</category>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterReturned">
+ <item-type>Number:Energy</item-type>
+ <label>@text/channel-type.shelly.meterReturned.label</label>
+ <description>@text/channel-type.shelly.meterReturned.description</description>
+ <category>Energy</category>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterVoltage">
+ <item-type>Number:ElectricPotential</item-type>
+ <label>@text/channel-type.shelly.meterVoltage.label</label>
+ <description>@text/channel-type.shelly.meterVoltage.description</description>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Voltage</tag>
+ </tags>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterCurrent">
+ <item-type>Number:ElectricPotential</item-type>
+ <label>@text/channel-type.shelly.meterCurrent.label</label>
+ <description>@text/channel-type.shelly.meterCurrent.description</description>
+ <category>Energy</category>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Power</tag>
+ </tags>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="meterPowerFactor">
+ <item-type>Number</item-type>
+ <label>@text/channel-type.shelly.meterPowerFactor.label</label>
+ <description>@text/channel-type.shelly.meterPowerFactor.description</description>
+ <state readOnly="true" pattern="%.3f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="timestamp">
+ <item-type>DateTime</item-type>
+ <label>@text/channel-type.shelly.timestamp.label</label>
+ <description>@text/channel-type.shelly.timestamp.description</description>
+ <category>Time</category>
+ <tags>
+ <tag>Timestamp</tag>
+ </tags>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="ledStatusDisable">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.ledStatusDisable.label</label>
+ <description>@text/channel-type.shelly.ledStatusDisable.description</description>
+ </channel-type>
+
+ <channel-type id="ledPowerDisable">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.ledPowerDisable.label</label>
+ <description>@text/channel-type.shelly.ledPowerDisable.description</description>
+ </channel-type>
+
+ <channel-type id="lastUpdate" advanced="true">
+ <item-type>DateTime</item-type>
+ <label>@text/channel-type.shelly.lastUpdate.label</label>
+ <description>@text/channel-type.shelly.lastUpdate.description</description>
+ <category>Time</category>
+ <tags>
+ <tag>Timestamp</tag>
+ </tags>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="eventTrigger">
+ <kind>trigger</kind>
+ <label>@text/channel-type.shelly.eventTrigger.label</label>
+ <description>@text/channel-type.shelly.eventTrigger.description</description>
+ <event>
+ <options>
+ <option value="ROLLER_OPEN">@text/channel-type.shelly.eventTrigger.option.ROLLER_OPEN</option>
+ <option value="ROLLER_CLOSE">@text/channel-type.shelly.eventTrigger.option.ROLLER_CLOSE</option>
+ <option value="ROLLER_STOP">@text/channel-type.shelly.eventTrigger.option.ROLLER_STOP</option>
+ </options>
+ </event>
+ </channel-type>
+
+</thing:thing-descriptions>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<thing:thing-descriptions bindingId="shelly"
+ 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="shellyht">
+ <label>Shelly H&T (SHHT-1)</label>
+ <description>@text/thing-type.shelly.shellyht.description</description>
+ <category>Sensor</category>
+ <channel-groups>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellysmoke">
+ <label>Shelly Smoke</label>
+ <description>@text/thing-type.shelly.shellysmoke.description</description>
+ <category>SmokeDetector</category>
+ <channel-groups>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellygas">
+ <label>Shelly GAS (SHGS-1)</label>
+ <description>@text/thing-type.shelly.shellygas.description</description>
+ <category>Sensor</category>
+ <channel-groups>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:basic"/>
+ </thing-type>
+
+ <thing-type id="shellyflood">
+ <label>Shelly Flood (SHWT-1)</label>
+ <description>@text/thing-type.shelly.shellyflood.description</description>
+ <category>Sensor</category>
+ <channel-groups>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellydw">
+ <label>Shelly Door/Window (SHDW-1)</label>
+ <description>@text/thing-type.shelly.shellydw.description</description>
+ <category>Sensor</category>
+ <channel-groups>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellydw2">
+ <label>Shelly Door/Window (SHDW-2)</label>
+ <description>@text/thing-type.shelly.shellydw2.description</description>
+ <category>Sensor</category>
+ <channel-groups>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellysense">
+ <label>Shelly Sense (SHSEN-1)</label>
+ <description>@text/thing-type.shelly.shellysense.description</description>
+ <channel-groups>
+ <channel-group id="control" typeId="control"/>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellybutton1">
+ <label>Shelly Button 1 (SHBTN-1)</label>
+ <description>@text/thing-type.shelly.shellybutton1.description</description>
+ <category>WallSwitch</category>
+ <channel-groups>
+ <channel-group id="status" typeId="buttonState"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellybutton2">
+ <label>Shelly Button 2 (SHBTN-2)</label>
+ <description>@text/thing-type.shelly.shellybutton2.description</description>
+ <category>WallSwitch</category>
+ <channel-groups>
+ <channel-group id="status" typeId="buttonState"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellymotion">
+ <label>Shelly Motion (SHMOS-01/SHMOS-02)</label>
+ <description>@text/thing-type.shelly.shellymotion.description</description>
+ <category>MotionDetector</category>
+ <channel-groups>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <thing-type id="shellytrv">
+ <label>Shelly TRV (SHTRV-01)</label>
+ <description>@text/thing-type.shelly.shellytrv.description</description>
+ <category>RadiatorControl</category>
+ <channel-groups>
+ <channel-group id="sensors" typeId="sensorData"/>
+ <channel-group id="control" typeId="control"/>
+ <channel-group id="battery" typeId="batteryStatus"/>
+ <channel-group id="device" typeId="deviceStatus"/>
+ </channel-groups>
+
+ <representation-property>serviceName</representation-property>
+ <config-description-ref uri="thing-type:shelly:battery"/>
+ </thing-type>
+
+ <channel-type id="controlMode">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.controlMode.label</label>
+ <description>@text/channel-type.shelly.controlMode.description</description>
+ <state readOnly="false">
+ <options>
+ <option value="manual">@text/channel-type.shelly.controlMode.state.option.manual</option>
+ <option value="automatic">@text/channel-type.shelly.controlMode.state.option.automatic</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="controlProfile">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.controlProfile.label</label>
+ <description>@text/channel-type.shelly.controlProfile.description</description>
+ <state readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="targetTemp">
+ <item-type>Number:Temperature</item-type>
+ <label>@text/channel-type.shelly.targetTemp.label</label>
+ <description>@text/channel-type.shelly.targetTemp.description</description>
+ <category>Heating</category>
+ <tags>
+ <tag>Setpoint</tag>
+ <tag>Temperature</tag>
+ </tags>
+ <state min="4" max="31" step="0.5" pattern="%.1f %unit%" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="boostControl">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.boostControl.label</label>
+ <description>@text/channel-type.shelly.boostControl.description</description>
+ </channel-type>
+
+ <channel-type id="boostTimer">
+ <item-type>Number:Time</item-type>
+ <label>@text/channel-type.shelly.boostTimer.label</label>
+ <description>@text/channel-type.shelly.boostTimer.description</description>
+ <category>Time</category>
+ <state min="0" step="1" pattern="%.0f %unit%" readOnly="false"></state>
+ </channel-type>
+
+ <channel-type id="controlSchedule" advanced="true">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.controlSchedule.label</label>
+ <description>@text/channel-type.shelly.controlSchedule.description</description>
+ <state readOnly="false"></state>
+ </channel-type>
+
+
+ <channel-group-type id="sensorData">
+ <label>@text/channel-group-type.shelly.sensorData.label</label>
+ <description>@text/channel-group-type.shelly.sensorData.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="batteryStatus">
+ <label>@text/channel-group-type.shelly.batteryStatus.label</label>
+ <description>@text/channel-group-type.shelly.batteryStatus.description</description>
+ <category>BatteryLevel</category>
+ </channel-group-type>
+
+ <channel-group-type id="control">
+ <label>@text/channel-group-type.shelly.control.label</label>
+ <description>@text/channel-group-type.shelly.control.description</description>
+ </channel-group-type>
+
+ <channel-group-type id="buttonState">
+ <label>@text/channel-group-type.shelly.buttonState.label</label>
+ <description>@text/channel-group-type.shelly.buttonState.description</description>
+ </channel-group-type>
+
+ <channel-type id="sensorContact">
+ <item-type>Contact</item-type>
+ <label>@text/channel-type.shelly.sensorContact.label</label>
+ <description>@text/channel-type.shelly.sensorContact.description</description>
+ <state pattern="%s" readOnly="true">
+ <options>
+ <option value="OPEN">@text/channel-type.shelly.sensorContact.state.option.OPEN</option>
+ <option value="CLOSED">@text/channel-type.shelly.sensorContact.state.option.CLOSED</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorState">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.sensorState.label</label>
+ <description>@text/channel-type.shelly.sensorState.description</description>
+ <state pattern="%s" readOnly="true">
+ <options>
+ <option value="warmup">@text/channel-type.shelly.sensorState.state.option.warmup</option>
+ <option value="normal">@text/channel-type.shelly.sensorState.state.option.normal</option>
+ <option value="fault">@text/channel-type.shelly.sensorState.state.option.fault</option>
+ <option value="unknown">@text/channel-type.shelly.sensorState.state.option.unknown</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="alarmState">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.alarmState.label</label>
+ <description>@text/channel-type.shelly.alarmState.description</description>
+ <state pattern="%s" readOnly="true">
+ <options>
+ <option value="unknown">@text/channel-type.shelly.alarmState.state.option.unknown</option>
+ <option value="none">@text/channel-type.shelly.alarmState.state.option.none</option>
+ <option value="mild">@text/channel-type.shelly.alarmState.state.option.mild</option>
+ <option value="heavy">@text/channel-type.shelly.alarmState.state.option.heavy</option>
+ <option value="test">@text/channel-type.shelly.alarmState.state.option.test</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="lastEvent">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.lastEvent.label</label>
+ <description>@text/channel-type.shelly.lastEvent.description</description>
+ <state pattern="%s" readOnly="true">
+ <options>
+ <option value="S">@text/channel-type.shelly.lastEvent.state.option.S</option>
+ <option value="SS">@text/channel-type.shelly.lastEvent.state.option.SS</option>
+ <option value="SSS">@text/channel-type.shelly.lastEvent.state.option.SSS</option>
+ <option value="L">@text/channel-type.shelly.lastEvent.state.option.L</option>
+ <option value="SL">@text/channel-type.shelly.lastEvent.state.option.SL</option>
+ <option value="LS">@text/channel-type.shelly.lastEvent.state.option.LS</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="eventCount">
+ <item-type>Number</item-type>
+ <label>@text/channel-type.shelly.eventCount.label</label>
+ <description>@text/channel-type.shelly.eventCount.description</description>
+ <state pattern="%.0f" readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorTemp">
+ <item-type>Number:Temperature</item-type>
+ <label>@text/channel-type.shelly.sensorTemp.label</label>
+ <description>@text/channel-type.shelly.sensorTemp.description</description>
+ <category>Temperature</category>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Temperature</tag>
+ </tags>
+ <state readOnly="true" pattern="%.1f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorExtTemp">
+ <item-type>Number:Temperature</item-type>
+ <label>@text/channel-type.shelly.sensorExtTemp.label</label>
+ <description>@text/channel-type.shelly.sensorExtTemp.label</description>
+ <category>Temperature</category>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Temperature</tag>
+ </tags>
+ <state readOnly="true" pattern="%.1f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorExtHum">
+ <item-type>Number:Dimensionless</item-type>
+ <label>@text/channel-type.shelly.sensorExtHum.label</label>
+ <description>@text/channel-type.shelly.sensorExtHum.description</description>
+ <category>Humidity</category>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Humidity</tag>
+ </tags>
+ <state readOnly="true" pattern="%.1f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorHumidity">
+ <item-type>Number:Dimensionless</item-type>
+ <label>@text/channel-type.shelly.sensorHumidity.label</label>
+ <description>@text/channel-type.shelly.sensorHumidity.description</description>
+ <category>Humidity</category>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Humidity</tag>
+ </tags>
+ <state readOnly="true" pattern="%.1f %unit%"/>
+ </channel-type>
+
+ <channel-type id="sensorFlood">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.sensorFlood.label</label>
+ <description>@text/channel-type.shelly.sensorFlood.description</description>
+ <category>Water</category>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorSmoke">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.sensorSmoke.label</label>
+ <description>@text/channel-type.shelly.sensorSmoke.description</description>
+ <category>Smoke</category>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorLux">
+ <item-type>Number:Illuminance</item-type>
+ <label>@text/channel-type.shelly.sensorLux.label</label>
+ <description>@text/channel-type.shelly.sensorLux.description</description>
+ <state readOnly="true" pattern="%.0f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorIllumination">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.sensorIllumination.label</label>
+ <description>@text/channel-type.shelly.sensorIllumination.description</description>
+ <state readOnly="true">
+ <options>
+ <option value="dark">@text/channel-type.shelly.sensorIllumination.state.option.dark</option>
+ <option value="twilight">@text/channel-type.shelly.sensorIllumination.state.option.twilight</option>
+ <option value="bright">@text/channel-type.shelly.sensorIllumination.state.option.bright</option>
+ <option value="unknown">@text/channel-type.shelly.sensorIllumination.state.option.unknown</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="motionTimestamp">
+ <item-type>DateTime</item-type>
+ <label>@text/channel-type.shelly.motionTimestamp.label</label>
+ <description>@text/channel-type.shelly.motionTimestamp.description</description>
+ <category>Time</category>
+ <tags>
+ <tag>Timestamp</tag>
+ </tags>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="motionActive" advanced="true">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.motionActive.label</label>
+ <description>channel-type.shelly.motionActive.description</description>
+ <category>Contact</category>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorMotion">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.sensorMotion.label</label>
+ <description>@text/channel-type.shelly.sensorMotion.description</description>
+ <category>Motion</category>
+ <tags>
+ <tag>Status</tag>
+ <tag>Presence</tag>
+ </tags>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorVibration">
+ <item-type>Switch</item-type>
+ <label>@text/channel-type.shelly.sensorVibration.label</label>
+ <description>@text/channel-type.shelly.sensorVibration.description</description>
+ <category>Flow</category>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorTilt">
+ <item-type>Number:Angle</item-type>
+ <label>@text/channel-type.shelly.sensorTilt.label</label>
+ <description>@text/channel-type.shelly.sensorTilt.description</description>
+ <category>Tilt</category>
+ <state readOnly="true" pattern="%.0f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorPPM">
+ <item-type>Number:Dimensionless</item-type>
+ <label>@text/channel-type.shelly.sensorPPM.label</label>
+ <description>@text/channel-type.shelly.sensorPPM.description</description>
+ <category>Gas</category>
+ <tags>
+ <tag>Measurement</tag>
+ <tag>Gas</tag>
+ </tags>
+ <state readOnly="true" pattern="%.0f ppm">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorADC">
+ <item-type>Number:ElectricPotential</item-type>
+ <label>@text/channel-type.shelly.sensorADC.label</label>
+ <description>@text/channel-type.shelly.sensorADC.description</description>
+ <state readOnly="true" pattern="%.0f %unit%">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorPosition">
+ <item-type>Dimmer</item-type>
+ <label>@text/channel-type.shelly.sensorPosition.label</label>
+ <description>@text/channel-type.shelly.sensorPosition.description</description>
+ <category>RadiatorControl</category>
+ <state min="0" max="100" step="1" readOnly="false" pattern="%.0f %unit%"></state>
+ </channel-type>
+
+ <channel-type id="sensorValve">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.sensorValve.label</label>
+ <description>@text/channel-type.shelly.sensorValve.description</description>
+ <category>Pressure</category>
+ <state readOnly="true">
+ <options>
+ <option value="closed">@text/channel-type.shelly.sensorValve.state.option.closed</option>
+ <option value="opened">@text/channel-type.shelly.sensorValve.state.option.opened</option>
+ <option value="not_connected">@text/channel-type.shelly.sensorValve.state.option.not_connected</option>
+ <option value="failure">@text/channel-type.shelly.sensorValve.state.option.failure</option>
+ <option value="closing">@text/channel-type.shelly.sensorValve.state.option.closing</option>
+ <option value="opening">@text/channel-type.shelly.sensorValve.state.option.opening</option>
+ <option value="checking">@text/channel-type.shelly.sensorValve.state.option.checking</option>
+ <option value="unknown">@text/channel-type.shelly.sensorValve.state.option.UNKNOWN</option>
+ </options>
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorError">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.sensorError.label</label>
+ <description>@text/channel-type.shelly.sensorError.description</description>
+ <state readOnly="true">
+ </state>
+ </channel-type>
+
+ <channel-type id="sensorSleepTime" advanced="true">
+ <item-type>Number:Time</item-type>
+ <label>@text/channel-type.shelly.sensorSleepTime.label</label>
+ <description>@text/channel-type.shelly.sensorSleepTime.description</description>
+ <state readOnly="false" min="0" max="86400" pattern="%.0f %unit%"/>
+ </channel-type>
+
+ <channel-type id="senseKey">
+ <item-type>String</item-type>
+ <label>@text/channel-type.shelly.senseKey.label</label>
+ <description>@text/channel-type.shelly.senseKey.description</description>
+ </channel-type>
+
+</thing:thing-descriptions>