diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java index 058c07310..780997463 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoHandlerFactory.java @@ -82,7 +82,7 @@ public class MiIoHandlerFactory extends BaseThingHandlerFactory { return new MiIoGenericHandler(thing, miIoDatabaseWatchService); } if (thingTypeUID.equals(THING_TYPE_BASIC)) { - return new MiIoBasicHandler(thing, miIoDatabaseWatchService); + return new MiIoBasicHandler(thing, miIoDatabaseWatchService, channelTypeRegistry); } if (thingTypeUID.equals(THING_TYPE_VACUUM)) { return new MiIoVacuumHandler(thing, miIoDatabaseWatchService, cloudConnector, channelTypeRegistry); diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoSendCommand.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoSendCommand.java index 0ccbd728f..47aa56fb5 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoSendCommand.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoSendCommand.java @@ -15,6 +15,7 @@ package org.openhab.binding.miio.internal; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; +import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -28,17 +29,17 @@ public class MiIoSendCommand { private final int id; private final MiIoCommand command; - private final String commandString; + private final JsonObject commandJson; private @Nullable JsonObject response; public void setResponse(JsonObject response) { this.response = response; } - public MiIoSendCommand(int id, MiIoCommand command, String commandString) { + public MiIoSendCommand(int id, MiIoCommand command, JsonObject fullCommand) { this.id = id; this.command = command; - this.commandString = commandString; + this.commandJson = fullCommand; } public int getId() { @@ -49,8 +50,20 @@ public class MiIoSendCommand { return command; } + public JsonObject getCommandJson() { + return commandJson; + } + public String getCommandString() { - return commandString; + return commandJson.toString(); + } + + public String getMethod() { + return commandJson.has("method") ? commandJson.get("method").getAsString() : ""; + } + + public JsonElement getParams() { + return commandJson.has("params") ? commandJson.get("params").getAsJsonArray() : new JsonArray(); } public JsonObject getResponse() { diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicChannel.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicChannel.java index 37c6bfcbe..27b1bf52d 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicChannel.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/basic/MiIoBasicChannel.java @@ -56,6 +56,9 @@ public class MiIoBasicChannel { @SerializedName("refresh") @Expose private @Nullable Boolean refresh; + @SerializedName("customRefreshCommand") + @Expose + private @Nullable String channelCustomRefreshCommand; @SerializedName("transformation") @Expose private @Nullable String transfortmation; @@ -133,7 +136,7 @@ public class MiIoBasicChannel { public String getChannelType() { final @Nullable String ct = channelType; if (ct == null || ct.isEmpty()) { - return BINDING_ID + ":" + getChannel(); + return ""; } else { return (ct.startsWith("system") ? ct : BINDING_ID + ":" + ct); } @@ -161,6 +164,15 @@ public class MiIoBasicChannel { this.refresh = refresh; } + public String getChannelCustomRefreshCommand() { + final @Nullable String channelCustomRefreshCommand = this.channelCustomRefreshCommand; + return channelCustomRefreshCommand != null ? channelCustomRefreshCommand : ""; + } + + public void setChannelCustomRefreshCommand(String channelCustomRefreshCommand) { + this.channelCustomRefreshCommand = channelCustomRefreshCommand; + } + public String getChannelGroup() { final @Nullable String channelGroup = this.channelGroup; return channelGroup != null ? channelGroup : ""; diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java index 81824519a..72068c9d0 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoBasicHandler.java @@ -50,6 +50,7 @@ import org.openhab.core.thing.ChannelUID; import org.openhab.core.thing.Thing; import org.openhab.core.thing.binding.builder.ChannelBuilder; import org.openhab.core.thing.binding.builder.ThingBuilder; +import org.openhab.core.thing.type.ChannelTypeRegistry; import org.openhab.core.thing.type.ChannelTypeUID; import org.openhab.core.types.Command; import org.openhab.core.types.RefreshType; @@ -73,7 +74,6 @@ import com.google.gson.JsonSyntaxException; */ @NonNullByDefault public class MiIoBasicHandler extends MiIoAbstractHandler { - private final Logger logger = LoggerFactory.getLogger(MiIoBasicHandler.class); private boolean hasChannelStructure; @@ -83,12 +83,16 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { }); List refreshList = new ArrayList<>(); + private Map refreshListCustomCommands = new HashMap<>(); private @Nullable MiIoBasicDevice miioDevice; private Map actions = new HashMap<>(); + private ChannelTypeRegistry channelTypeRegistry; - public MiIoBasicHandler(Thing thing, MiIoDatabaseWatchService miIoDatabaseWatchService) { + public MiIoBasicHandler(Thing thing, MiIoDatabaseWatchService miIoDatabaseWatchService, + ChannelTypeRegistry channelTypeRegistry) { super(thing, miIoDatabaseWatchService); + this.channelTypeRegistry = channelTypeRegistry; } @Override @@ -97,6 +101,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { hasChannelStructure = false; isIdentified = false; refreshList = new ArrayList<>(); + refreshListCustomCommands = new HashMap<>(); } @Override @@ -259,6 +264,7 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { final MiIoBasicDevice midevice = miioDevice; if (midevice != null) { refreshProperties(midevice); + refreshCustomProperties(midevice); refreshNetwork(); } } catch (Exception e) { @@ -266,6 +272,12 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { } } + private void refreshCustomProperties(MiIoBasicDevice midevice) { + for (MiIoBasicChannel miChannel : refreshListCustomCommands.values()) { + sendCommand(miChannel.getChannelCustomRefreshCommand()); + } + } + private boolean refreshProperties(MiIoBasicDevice device) { MiIoCommand command = MiIoCommand.getCommand(device.getDevice().getPropertyMethod()); int maxProperties = device.getDevice().getMaxProperties(); @@ -326,7 +338,12 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { if (miioDevice != null) { for (MiIoBasicChannel miChannel : miioDevice.getDevice().getChannels()) { if (miChannel.getRefresh()) { - refreshList.add(miChannel); + if (miChannel.getChannelCustomRefreshCommand().isBlank()) { + refreshList.add(miChannel); + } else { + String i = miChannel.getChannelCustomRefreshCommand().split("\\[")[0]; + refreshListCustomCommands.put(i.trim(), miChannel); + } } } } @@ -398,7 +415,6 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { return null; } ChannelUID channelUID = new ChannelUID(getThing().getUID(), channel); - ChannelTypeUID channelTypeUID = new ChannelTypeUID(channelType); // TODO: Need to understand if this harms anything. If yes, channel only to be added when not there already. // current way allows to have no issues when channels are changing. @@ -406,9 +422,17 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { logger.info("Channel '{}' for thing {} already exist... removing", channel, getThing().getUID()); thingBuilder.withoutChannel(new ChannelUID(getThing().getUID(), channel)); } - Channel newChannel = ChannelBuilder.create(channelUID, datatype).withType(channelTypeUID) - .withLabel(friendlyName).build(); - thingBuilder.withChannel(newChannel); + ChannelBuilder newChannel = ChannelBuilder.create(channelUID, datatype).withLabel(friendlyName); + if (!channelType.isBlank()) { + ChannelTypeUID channelTypeUID = new ChannelTypeUID(channelType); + if (channelTypeRegistry.getChannelType(channelTypeUID) != null) { + newChannel = newChannel.withType(channelTypeUID); + } else { + logger.debug("ChannelType '{}' is not available. Check the Json file for {}", channelTypeUID, + getThing().getUID()); + } + } + thingBuilder.withChannel(newChannel.build()); return channelUID; } @@ -528,6 +552,23 @@ public class MiIoBasicHandler extends MiIoAbstractHandler { } break; default: + if (refreshListCustomCommands.containsKey(response.getMethod())) { + logger.debug("Processing custom refresh command response for !{}", response.getMethod()); + MiIoBasicChannel ch = refreshListCustomCommands.get(response.getMethod()); + if (response.getResult().isJsonArray()) { + JsonArray cmdResponse = response.getResult().getAsJsonArray(); + final String transformation = ch.getTransfortmation(); + if (transformation == null || transformation.isBlank()) { + updateChannel(ch, ch.getChannel(), + cmdResponse.get(0).isJsonPrimitive() ? cmdResponse.get(0) + : new JsonPrimitive(cmdResponse.get(0).toString())); + } else { + updateChannel(ch, ch.getChannel(), cmdResponse); + } + } else { + updateChannel(ch, ch.getChannel(), new JsonPrimitive(response.getResult().toString())); + } + } break; } } catch (Exception e) { diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoUnsupportedHandler.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoUnsupportedHandler.java index 4dfaaf3e8..9862b92e8 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoUnsupportedHandler.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/handler/MiIoUnsupportedHandler.java @@ -30,6 +30,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; import org.eclipse.jdt.annotation.NonNullByDefault; +import org.eclipse.jdt.annotation.Nullable; import org.openhab.binding.miio.internal.MiIoBindingConfiguration; import org.openhab.binding.miio.internal.MiIoCommand; import org.openhab.binding.miio.internal.MiIoDevices; @@ -170,7 +171,9 @@ public class MiIoUnsupportedHandler extends MiIoAbstractHandler { sb.append("Properties: "); int lastCommand = -1; for (String c : channelList.keySet()) { - String cmd = "get_prop[" + c + "]"; + MiIoBasicChannel ch = channelList.get(c); + String cmd = ch.getChannelCustomRefreshCommand().isBlank() ? ("get_prop[" + c + "]") + : ch.getChannelCustomRefreshCommand(); sb.append(c); sb.append(" -> "); lastCommand = sendCommand(cmd); @@ -183,10 +186,13 @@ public class MiIoUnsupportedHandler extends MiIoAbstractHandler { logger.info("{}", sb.toString()); } - private LinkedHashMap collectProperties(String model) { + private LinkedHashMap collectProperties(@Nullable String model) { LinkedHashMap testChannelsList = new LinkedHashMap<>(); LinkedHashSet testDeviceList = new LinkedHashSet<>(); - + if (model == null || model.length() < 2) { + logger.info("Wait until the model is determined, than try again"); + return testChannelsList; + } // first add similar devices to test those channels first, then test all others int[] subset = { model.length() - 1, model.lastIndexOf("."), model.indexOf("."), 0 }; for (int i : subset) { @@ -203,9 +209,16 @@ public class MiIoUnsupportedHandler extends MiIoAbstractHandler { } for (MiIoDevices dev : testDeviceList) { for (MiIoBasicChannel ch : getBasicChannels(dev.getModel())) { - if (!ch.isMiOt() && !ch.getProperty().isBlank() && !testChannelsList.containsKey(ch.getProperty())) { + // Add all (unique) properties + if (!ch.isMiOt() && !ch.getProperty().isBlank() && ch.getChannelCustomRefreshCommand().isBlank() + && !testChannelsList.containsKey(ch.getProperty())) { testChannelsList.put(ch.getProperty(), ch); } + // Add all (unique) custom refresh commands + if (!ch.isMiOt() && !ch.getChannelCustomRefreshCommand().isBlank() + && !testChannelsList.containsKey(ch.getChannelCustomRefreshCommand())) { + testChannelsList.put(ch.getChannelCustomRefreshCommand(), ch); + } } } return testChannelsList; diff --git a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/transport/MiIoAsyncCommunication.java b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/transport/MiIoAsyncCommunication.java index 6720d5903..9fb9ccd32 100644 --- a/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/transport/MiIoAsyncCommunication.java +++ b/bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/transport/MiIoAsyncCommunication.java @@ -143,8 +143,7 @@ public class MiIoAsyncCommunication { fullCommand.addProperty("id", cmdId); fullCommand.addProperty("method", command); fullCommand.add("params", parser.parse(params)); - MiIoSendCommand sendCmd = new MiIoSendCommand(cmdId, MiIoCommand.getCommand(command), - fullCommand.toString()); + MiIoSendCommand sendCmd = new MiIoSendCommand(cmdId, MiIoCommand.getCommand(command), fullCommand); concurrentLinkedQueue.add(sendCmd); if (logger.isDebugEnabled()) { // Obfuscate part of the token to allow sharing of the logfiles diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/cgllc.airmonitor.b1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/cgllc.airmonitor.b1.json index 6bc6936cc..47a3c3149 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/cgllc.airmonitor.b1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/cgllc.airmonitor.b1.json @@ -20,6 +20,7 @@ "property": "pm25", "friendlyName": "PM2.5", "channel": "pm25", + "channelType": "pm25", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -29,6 +30,7 @@ "property": "co2e", "friendlyName": "CO2e", "channel": "co2", + "channelType": "co2", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -38,6 +40,7 @@ "property": "tvoc", "friendlyName": "tVOC", "channel": "tvoc", + "channelType": "tvoc", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -47,6 +50,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -56,6 +60,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/cgllc.airmonitor.s1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/cgllc.airmonitor.s1.json index ab1b748e4..4ad1bc81f 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/cgllc.airmonitor.s1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/cgllc.airmonitor.s1.json @@ -20,6 +20,7 @@ "property": "pm25", "friendlyName": "PM2.5", "channel": "pm25", + "channelType": "pm25", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -29,6 +30,7 @@ "property": "co2", "friendlyName": "CO2", "channel": "co2", + "channelType": "co2", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -38,6 +40,7 @@ "property": "tvoc", "friendlyName": "tVOC", "channel": "tvoc", + "channelType": "tvoc", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -47,6 +50,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -56,6 +60,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.m1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.m1.json index 3a83fce4a..1e09d2c03 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.m1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.m1.json @@ -10,6 +10,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -24,6 +25,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -33,6 +35,7 @@ "property": "wifi_led", "friendlyName": "Indicator light", "channel": "led", + "channelType": "led", "type": "Switch", "refresh": true, "ChannelGroup": "", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v1.json index 8ed1dc4ab..f9038317e 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v1.json @@ -8,6 +8,7 @@ "property": "on", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -21,6 +22,7 @@ "property": "usb_on", "friendlyName": "USB", "channel": "usb", + "channelType": "usb", "type": "Switch", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v2.json b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v2.json index 64a8a6721..79113a6a6 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v2.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v2.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -22,6 +23,7 @@ "property": "usb_on", "friendlyName": "USB", "channel": "usb", + "channelType": "usb", "type": "Switch", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3.json b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3.json index 8ef70ddc3..14801d8f9 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -21,6 +22,7 @@ "property": "usb_on", "friendlyName": "USB", "channel": "usb", + "channelType": "usb", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -35,6 +37,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -44,6 +47,7 @@ "property": "wifi_led", "friendlyName": "Wifi LED", "channel": "led", + "channelType": "led", "type": "Switch", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3fw.json b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3fw.json index 04acd4fc5..c3e5f6308 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3fw.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3fw.json @@ -11,21 +11,23 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", - "readmeComment": "If this channel does not respond to on/off replace the model with chuangmi.plug.v3old in the config or upgrade firmware", "actions": [ { "command": "set_power", "parameterType": "ONOFF" } - ] + ], + "readmeComment": "If this channel does not respond to on/off replace the model with chuangmi.plug.v3old in the config or upgrade firmware" }, { "property": "usb_on", "friendlyName": "USB", "channel": "usb", + "channelType": "usb", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -40,6 +42,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -49,6 +52,7 @@ "property": "wifi_led", "friendlyName": "Wifi LED", "channel": "led", + "channelType": "led", "type": "Switch", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.airfresh.a1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.airfresh.a1.json index 4cf1123ab..e21cee069 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.airfresh.a1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.airfresh.a1.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -21,6 +22,7 @@ "property": "mode", "friendlyName": "Mode", "channel": "airFreshMode", + "channelType": "airFreshMode", "type": "String", "refresh": true, "actions": [ @@ -34,6 +36,7 @@ "property": "ptc_on", "friendlyName": "PTC", "channel": "airFreshPTCPower", + "channelType": "airFreshPTCPower", "type": "Switch", "refresh": true, "actions": [ @@ -47,6 +50,7 @@ "property": "ptc_status", "friendlyName": "PTC Status", "channel": "airFreshPTCStatus", + "channelType": "airFreshPTCStatus", "type": "Switch", "refresh": true, "ChannelGroup": "Status", @@ -56,6 +60,7 @@ "property": "display", "friendlyName": "Display", "channel": "airFreshDisplay", + "channelType": "airFreshDisplay", "type": "Switch", "refresh": true, "actions": [ @@ -69,6 +74,7 @@ "property": "child_lock", "friendlyName": "Child Lock", "channel": "airFreshChildLock", + "channelType": "airFreshChildLock", "type": "Switch", "refresh": true, "actions": [ @@ -82,6 +88,7 @@ "property": "sound", "friendlyName": "Sound", "channel": "airFreshSound", + "channelType": "airFreshSound", "type": "Switch", "refresh": true, "actions": [ @@ -95,6 +102,7 @@ "property": "pm25", "friendlyName": "PM2.5", "channel": "airFreshPM25", + "channelType": "airFreshPM25", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -104,6 +112,7 @@ "property": "co2", "friendlyName": "CO2", "channel": "airFreshCO2", + "channelType": "airFreshCO2", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -113,6 +122,7 @@ "property": "control_speed", "friendlyName": "Current Speed", "channel": "airFreshCurrentSpeed", + "channelType": "airFreshCurrentSpeed", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -122,6 +132,7 @@ "property": "favourite_speed", "friendlyName": "Favorite Speed", "channel": "airFreshFavoriteSpeed", + "channelType": "airFreshFavoriteSpeed", "type": "Number", "refresh": true, "actions": [ @@ -135,6 +146,7 @@ "property": "temperature_outside", "friendlyName": "Temperature Outside", "channel": "airFreshTemperature", + "channelType": "airFreshTemperature", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -144,6 +156,7 @@ "property": "filter_rate", "friendlyName": "Filter Percents Remaining", "channel": "airFreshFilterPercents", + "channelType": "airFreshFilterPercents", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -153,6 +166,7 @@ "property": "filter_day", "friendlyName": "Filter Days Remaining", "channel": "airFreshFilterDays", + "channelType": "airFreshFilterDays", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -162,6 +176,7 @@ "property": "", "friendlyName": "Reset Filter", "channel": "airFreshResetFilterA1", + "channelType": "airFreshResetFilterA1", "type": "String", "refresh": false, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.airfresh.t2017.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.airfresh.t2017.json index 336e16191..39095e2af 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.airfresh.t2017.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.airfresh.t2017.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -21,6 +22,7 @@ "property": "mode", "friendlyName": "Mode", "channel": "airFreshMode", + "channelType": "airFreshMode", "type": "String", "refresh": true, "actions": [ @@ -34,6 +36,7 @@ "property": "ptc_on", "friendlyName": "PTC", "channel": "airFreshPTCPower", + "channelType": "airFreshPTCPower", "type": "Switch", "refresh": true, "actions": [ @@ -47,6 +50,7 @@ "property": "ptc_level", "friendlyName": "PTC Level", "channel": "airFreshPtcLevel", + "channelType": "airFreshPtcLevel", "type": "String", "refresh": true, "actions": [ @@ -60,6 +64,7 @@ "property": "ptc_status", "friendlyName": "PTC Status", "channel": "airFreshPTCStatus", + "channelType": "airFreshPTCStatus", "type": "Switch", "refresh": true, "ChannelGroup": "Status", @@ -69,6 +74,7 @@ "property": "screen_direction", "friendlyName": "Screen direction", "channel": "airFreshDisplayDirection", + "channelType": "airFreshDisplayDirection", "type": "String", "refresh": true, "actions": [ @@ -82,6 +88,7 @@ "property": "display", "friendlyName": "Display", "channel": "airFreshDisplay", + "channelType": "airFreshDisplay", "type": "Switch", "refresh": true, "actions": [ @@ -95,6 +102,7 @@ "property": "child_lock", "friendlyName": "Child Lock", "channel": "airFreshChildLock", + "channelType": "airFreshChildLock", "type": "Switch", "refresh": true, "actions": [ @@ -108,6 +116,7 @@ "property": "sound", "friendlyName": "Sound", "channel": "airFreshSound", + "channelType": "airFreshSound", "type": "Switch", "refresh": true, "actions": [ @@ -121,6 +130,7 @@ "property": "pm25", "friendlyName": "PM2.5", "channel": "airFreshPM25", + "channelType": "airFreshPM25", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -130,6 +140,7 @@ "property": "co2", "friendlyName": "CO2", "channel": "airFreshCO2", + "channelType": "airFreshCO2", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -139,6 +150,7 @@ "property": "control_speed", "friendlyName": "Current Speed", "channel": "airFreshCurrentSpeed", + "channelType": "airFreshCurrentSpeed", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -148,6 +160,7 @@ "property": "favourite_speed", "friendlyName": "Favorite Speed", "channel": "airFreshFavoriteSpeed", + "channelType": "airFreshFavoriteSpeed", "type": "Number", "refresh": true, "actions": [ @@ -161,6 +174,7 @@ "property": "temperature_outside", "friendlyName": "Temperature Outside", "channel": "airFreshTemperature", + "channelType": "airFreshTemperature", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -170,6 +184,7 @@ "property": "filter_intermediate", "friendlyName": "Filter Percents Remaining", "channel": "airFreshFilterPercents", + "channelType": "airFreshFilterPercents", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -179,6 +194,7 @@ "property": "filter_inter_day", "friendlyName": "Filter Days Remaining", "channel": "airFreshFilterDays", + "channelType": "airFreshFilterDays", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -188,6 +204,7 @@ "property": "filter_efficient", "friendlyName": "Filter Pro Percents Remaining", "channel": "airFreshFilterProPercents", + "channelType": "airFreshFilterProPercents", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -197,6 +214,7 @@ "property": "filter_effi_day", "friendlyName": "Filter Pro Days Remaining", "channel": "airFreshFilterProDays", + "channelType": "airFreshFilterProDays", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -206,6 +224,7 @@ "property": "", "friendlyName": "Reset Filter", "channel": "airFreshResetFilter", + "channelType": "airFreshResetFilter", "type": "String", "refresh": false, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p5.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p5.json index 35ee631c3..7c194253c 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p5.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p5.json @@ -1,133 +1,137 @@ { - "deviceMapping": { - "id": [ - "dmaker.fan.p5" - ], - "channels": [ - { - "property": "power", - "friendlyName": "Power", - "channel": "power", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "s_power", - "parameterType": "ONOFF" - } - ] - }, - { - "property": "roll", - "friendlyName": "Rotation", - "channel": "roll", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "s_roll", - "parameterType": "ONOFF" - } - ] - }, - { - "property": "mode", - "friendlyName": "Mode", - "channel": "mode", - "type": "Number", - "refresh": true, - "ChannelGroup": "actions", - "actions": [ - { - "command": "s_mode", - "parameterType": "STRING" - } - ] - }, - { - "property": "roll_angle", - "friendlyName": "Angle", - "channel": "angle", - "type": "Number", - "refresh": true, - "ChannelGroup": "actions", - "actions": [ - { - "command": "s_angle", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "timer_off", - "friendlyName": "Timer", - "channel": "timer", - "type": "Number", - "refresh": true, - "ChannelGroup": "actions", - "actions": [ - { - "command": "s_t_off", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "beep_sound", - "friendlyName": "Beep Sound", - "channel": "beep", - "type": "Switch", - "refresh": true, - "ChannelGroup": "actions", - "actions": [ - { - "command": "s_beep_sound", - "parameterType": "ONOFF" - } - ] - }, - { - "property": "light", - "friendlyName": "Light", - "channel": "light", - "type": "Number", - "refresh": true, - "ChannelGroup": "actions", - "actions": [ - { - "command": "s_light", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "child_lock", - "friendlyName": "Child Lock", - "channel": "child_lock", - "type": "Switch", - "refresh": true, - "ChannelGroup": "actions", - "actions": [ - { - "command": "s_lock", - "parameterType": "ONOFF" - } - ] - }, - { - "property": "speed", - "friendlyName": "Speed", - "channel": "speed", - "type": "Number", - "refresh": true, - "ChannelGroup": "actions", - "actions": [ - { - "command": "s_speed", - "parameterType": "NUMBER" - } - ] - } - ] - } + "deviceMapping": { + "id": [ + "dmaker.fan.p5" + ], + "channels": [ + { + "property": "power", + "friendlyName": "Power", + "channel": "power", + "channelType": "power", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "s_power", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "roll", + "friendlyName": "Rotation", + "channel": "roll", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "s_roll", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "mode", + "friendlyName": "Mode", + "channel": "mode", + "channelType": "mode", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_mode", + "parameterType": "STRING" + } + ] + }, + { + "property": "roll_angle", + "friendlyName": "Angle", + "channel": "angle", + "channelType": "angle", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_angle", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "timer_off", + "friendlyName": "Timer", + "channel": "timer", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_t_off", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "beep_sound", + "friendlyName": "Beep Sound", + "channel": "beep", + "type": "Switch", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_beep_sound", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "light", + "friendlyName": "Light", + "channel": "light", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_light", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "child_lock", + "friendlyName": "Child Lock", + "channel": "child_lock", + "type": "Switch", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_lock", + "parameterType": "ONOFF" + } + ] + }, + { + "property": "speed", + "friendlyName": "Speed", + "channel": "speed", + "channelType": "speed", + "type": "Number", + "refresh": true, + "ChannelGroup": "actions", + "actions": [ + { + "command": "s_speed", + "parameterType": "NUMBER" + } + ] + } + ] + } } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json index 344d423a9..e30682af6 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p8-miot.json @@ -1,188 +1,184 @@ { - "deviceMapping": { - "id": [ - "dmaker.fan.p8", - "dmaker.fan.1c" - ], - "propertyMethod": "get_properties", - "maxProperties": 2, - "channels": [ - { - "property": "manufacturer", - "siid": 1, - "piid": 1, - "friendlyName": "Device Information-Device Manufacturer", - "channel": "Manufacturer", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "model", - "siid": 1, - "piid": 2, - "friendlyName": "Device Information-Device Model", - "channel": "Model", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "serial-number", - "siid": 1, - "piid": 3, - "friendlyName": "Device Information-Device Serial Number", - "channel": "SerialNumber", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "firmware-revision", - "siid": 1, - "piid": 4, - "friendlyName": "Device Information-Current Firmware Version", - "channel": "FirmwareRevision", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "on", - "siid": 2, - "piid": 1, - "friendlyName": "Fan-Switch Status", - "channel": "On", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "fan-level", - "siid": 2, - "piid": 2, - "friendlyName": "Fan-Fan Level", - "channel": "FanLevel", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "horizontal-swing", - "siid": 2, - "piid": 3, - "friendlyName": "Fan-Horizontal Swing", - "channel": "HorizontalSwing", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "mode", - "siid": 2, - "piid": 7, - "friendlyName": "Fan-Mode", - "channel": "Mode", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "off-delay-time", - "siid": 2, - "piid": 10, - "friendlyName": "Fan-Power Off Delay Time", - "channel": "OffDelayTime", - "channelType": "miot_uint16", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "alarm", - "siid": 2, - "piid": 11, - "friendlyName": "Fan-Alarm", - "channel": "Alarm", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "brightness", - "siid": 2, - "piid": 12, - "friendlyName": "Fan-Brightness", - "channel": "Brightness", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "physical-controls-locked", - "siid": 3, - "piid": 1, - "friendlyName": "Physical Control Locked-Physical Control Locked", - "channel": "PhysicalControlsLocked", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - } - ] - } + "deviceMapping": { + "id": [ + "dmaker.fan.p8", + "dmaker.fan.1c" + ], + "propertyMethod": "get_properties", + "maxProperties": 2, + "channels": [ + { + "property": "manufacturer", + "siid": 1, + "piid": 1, + "friendlyName": "Device Information-Device Manufacturer", + "channel": "Manufacturer", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "model", + "siid": 1, + "piid": 2, + "friendlyName": "Device Information-Device Model", + "channel": "Model", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "serial-number", + "siid": 1, + "piid": 3, + "friendlyName": "Device Information-Device Serial Number", + "channel": "SerialNumber", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "firmware-revision", + "siid": 1, + "piid": 4, + "friendlyName": "Device Information-Current Firmware Version", + "channel": "FirmwareRevision", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "on", + "siid": 2, + "piid": 1, + "friendlyName": "Fan-Switch Status", + "channel": "On", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "fan-level", + "siid": 2, + "piid": 2, + "friendlyName": "Fan-Fan Level", + "channel": "FanLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "horizontal-swing", + "siid": 2, + "piid": 3, + "friendlyName": "Fan-Horizontal Swing", + "channel": "HorizontalSwing", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "mode", + "siid": 2, + "piid": 7, + "friendlyName": "Fan-Mode", + "channel": "Mode", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "off-delay-time", + "siid": 2, + "piid": 10, + "friendlyName": "Fan-Power Off Delay Time", + "channel": "OffDelayTime", + "channelType": "miot_uint16", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "alarm", + "siid": 2, + "piid": 11, + "friendlyName": "Fan-Alarm", + "channel": "Alarm", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "brightness", + "siid": 2, + "piid": 12, + "friendlyName": "Fan-Brightness", + "channel": "Brightness", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "physical-controls-locked", + "siid": 3, + "piid": 1, + "friendlyName": "Physical Control Locked-Physical Control Locked", + "channel": "PhysicalControlsLocked", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + } + ] + } } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p9-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p9-miot.json index a33c7058d..eb71d84ef 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p9-miot.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dmaker.fan.p9-miot.json @@ -1,236 +1,232 @@ { - "deviceMapping": { - "id": [ - "dmaker.fan.p9", - "dmaker.fan.p10" - ], - "propertyMethod": "get_properties", - "maxProperties": 2, - "channels": [ - { - "property": "manufacturer", - "siid": 1, - "piid": 1, - "friendlyName": "Device Information-Device Manufacturer", - "channel": "Manufacturer", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "model", - "siid": 1, - "piid": 2, - "friendlyName": "Device Information-Device Model", - "channel": "Model", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "serial-number", - "siid": 1, - "piid": 3, - "friendlyName": "Device Information-Device Serial Number", - "channel": "SerialNumber", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "firmware-revision", - "siid": 1, - "piid": 4, - "friendlyName": "Device Information-Current Firmware Version", - "channel": "FirmwareRevision", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "on", - "siid": 2, - "piid": 1, - "friendlyName": "Fan-Switch Status", - "channel": "On", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "fan-level", - "siid": 2, - "piid": 2, - "friendlyName": "Fan-Fan Level", - "channel": "FanLevel", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "mode", - "siid": 2, - "piid": 4, - "friendlyName": "Fan-Mode", - "channel": "Mode", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "horizontal-swing", - "siid": 2, - "piid": 5, - "friendlyName": "Fan-Horizontal Swing", - "channel": "HorizontalSwing", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "horizontal-angle", - "siid": 2, - "piid": 6, - "friendlyName": "Fan-Horizontal Angle", - "channel": "HorizontalAngle", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "alarm", - "siid": 2, - "piid": 7, - "friendlyName": "Fan-Alarm", - "channel": "Alarm", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "off-delay-time", - "siid": 2, - "piid": 8, - "friendlyName": "Fan-Power Off Delay Time", - "channel": "OffDelayTime", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "brightness", - "siid": 2, - "piid": 9, - "friendlyName": "Fan-Brightness", - "channel": "Brightness", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "motor-control", - "siid": 2, - "piid": 10, - "friendlyName": "Fan-Motor Control", - "channel": "MotorControl", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "speed-level", - "siid": 2, - "piid": 11, - "friendlyName": "Fan-Speed Level", - "channel": "SpeedLevel", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "physical-controls-locked", - "siid": 3, - "piid": 1, - "friendlyName": "Physical Control Locked-Physical Control Locked", - "channel": "PhysicalControlsLocked", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - } - ] - } + "deviceMapping": { + "id": [ + "dmaker.fan.p9", + "dmaker.fan.p10" + ], + "propertyMethod": "get_properties", + "maxProperties": 2, + "channels": [ + { + "property": "manufacturer", + "siid": 1, + "piid": 1, + "friendlyName": "Device Information-Device Manufacturer", + "channel": "Manufacturer", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "model", + "siid": 1, + "piid": 2, + "friendlyName": "Device Information-Device Model", + "channel": "Model", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "serial-number", + "siid": 1, + "piid": 3, + "friendlyName": "Device Information-Device Serial Number", + "channel": "SerialNumber", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "firmware-revision", + "siid": 1, + "piid": 4, + "friendlyName": "Device Information-Current Firmware Version", + "channel": "FirmwareRevision", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "on", + "siid": 2, + "piid": 1, + "friendlyName": "Fan-Switch Status", + "channel": "On", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "fan-level", + "siid": 2, + "piid": 2, + "friendlyName": "Fan-Fan Level", + "channel": "FanLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "mode", + "siid": 2, + "piid": 4, + "friendlyName": "Fan-Mode", + "channel": "Mode", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "horizontal-swing", + "siid": 2, + "piid": 5, + "friendlyName": "Fan-Horizontal Swing", + "channel": "HorizontalSwing", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "horizontal-angle", + "siid": 2, + "piid": 6, + "friendlyName": "Fan-Horizontal Angle", + "channel": "HorizontalAngle", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "alarm", + "siid": 2, + "piid": 7, + "friendlyName": "Fan-Alarm", + "channel": "Alarm", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "off-delay-time", + "siid": 2, + "piid": 8, + "friendlyName": "Fan-Power Off Delay Time", + "channel": "OffDelayTime", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "brightness", + "siid": 2, + "piid": 9, + "friendlyName": "Fan-Brightness", + "channel": "Brightness", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "motor-control", + "siid": 2, + "piid": 10, + "friendlyName": "Fan-Motor Control", + "channel": "MotorControl", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "speed-level", + "siid": 2, + "piid": 11, + "friendlyName": "Fan-Speed Level", + "channel": "SpeedLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "physical-controls-locked", + "siid": 3, + "piid": 1, + "friendlyName": "Physical Control Locked-Physical Control Locked", + "channel": "PhysicalControlsLocked", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + } + ] + } } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.mc1808-miot.json b/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.mc1808-miot.json index de2614c4a..b7bc045ff 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.mc1808-miot.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/dreame.vacuum.mc1808-miot.json @@ -1,510 +1,491 @@ { - "deviceMapping": { - "id": [ - "dreame.vacuum.mc1808" - ], - "propertyMethod": "get_properties", - "maxProperties": 2, - "channels": [ - { - "property": "", - "friendlyName": "Vacuum Action", - "channel": "vacuumaction", - "channelType": "dreameControl", - "type": "String", - "refresh": false, - "actions": [ - { - "command": "action", - "parameterType": "EMPTY", - "siid": 18, - "aiid": 1, - "condition": { - "name": "matchValue", - "parameters": [ - { - "matchValue": "vacuum", - "returnValue": [ - { - "piid": 1, - "value": 2 - } - ] - }, - { - "matchValue": "start", - "returnValue": [ - { - "piid": 1, - "value": 2 - } - ] - } - ] - } - }, - { - "command": "action", - "parameterType": "EMPTY", - "siid": 18, - "aiid": 2, - "condition": { - "name": "matchValue", - "parameters": [ - { - "matchValue": "stop" - } - ] - } - }, - { - "command": "action", - "parameterType": "EMPTY", - "siid": 3, - "aiid": 1, - "condition": { - "name": "matchValue", - "parameters": [ - { - "matchValue": "sweep" - } - ] - } - }, - { - "command": "action", - "parameterType": "EMPTY", - "siid": 3, - "aiid": 2, - "condition": { - "name": "matchValue", - "parameters": [ - { - "matchValue": "stopsweep" - } - ] - } - }, - { - "command": "action", - "parameterType": "EMPTY", - "siid": 2, - "aiid": 1, - "condition": { - "name": "matchValue", - "parameters": [ - { - "matchValue": "dock" - } - ] - } - } - ] - }, - { - "property": "battery-level", - "siid": 2, - "piid": 1, - "friendlyName": "Battery-Battery Level", - "channel": "BatteryLevel", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "charging-state", - "siid": 2, - "piid": 2, - "friendlyName": "Battery-Charging State", - "channel": "ChargingState", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "fault", - "siid": 3, - "piid": 1, - "friendlyName": "Robot Cleaner-Device Fault", - "channel": "Fault", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "status", - "siid": 3, - "piid": 2, - "friendlyName": "Robot Cleaner-Status", - "channel": "Status", - "channelType": "miot_int8", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "brush-left-time", - "siid": 26, - "piid": 1, - "friendlyName": "Main Cleaning Brush-Brush Left Time", - "channel": "BrushLeftTime", - "channelType": "miot_uint16", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "brush-life-level", - "siid": 26, - "piid": 2, - "friendlyName": "Main Cleaning Brush-Brush Life Level", - "channel": "BrushLifeLevel", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "filter-life-level", - "siid": 27, - "piid": 1, - "friendlyName": "Filter-Filter Life Level", - "channel": "FilterLifeLevel", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "filter-left-time", - "siid": 27, - "piid": 2, - "friendlyName": "Filter-Filter Left Time", - "channel": "FilterLeftTime", - "channelType": "miot_uint16", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "brush-left-time1", - "siid": 28, - "piid": 1, - "friendlyName": "Side Cleaning Brush-Brush Left Time", - "channel": "BrushLeftTime1", - "channelType": "miot_uint16", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "brush-life-level1", - "siid": 28, - "piid": 2, - "friendlyName": "Side Cleaning Brush-Brush Life Level", - "channel": "BrushLifeLevel1", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "work-mode", - "siid": 18, - "piid": 1, - "friendlyName": "clean-workmode", - "channel": "WorkMode", - "channelType": "miot_int32", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "area", - "siid": 18, - "piid": 4, - "friendlyName": "clean-area", - "channel": "Area", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "STRING" - } - ] - }, - { - "property": "timer", - "siid": 18, - "piid": 5, - "friendlyName": "clean-timer", - "channel": "Timer", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "STRING" - } - ] - }, - { - "property": "mode", - "siid": 18, - "piid": 6, - "friendlyName": "clean-mode", - "channel": "Mode", - "channelType": "miot_int32", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "total-clean-time", - "siid": 18, - "piid": 13, - "friendlyName": "clean-total time", - "channel": "TotalCleanTime", - "channelType": "miot_uint32", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "total-clean-times", - "siid": 18, - "piid": 14, - "friendlyName": "clean-total times", - "channel": "TotalCleanTimes", - "channelType": "miot_uint32", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "total-clean-area", - "siid": 18, - "piid": 15, - "friendlyName": "clean-Total area", - "channel": "TotalCleanArea", - "channelType": "miot_uint32", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "clean-log-start-time", - "siid": 18, - "piid": 16, - "friendlyName": "clean-Start Time", - "channel": "CleanLogStartTime", - "channelType": "miot_uint32", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "button-led", - "siid": 18, - "piid": 17, - "friendlyName": "clean-led", - "channel": "ButtonLed", - "channelType": "miot_uint16", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "task-done", - "siid": 18, - "piid": 18, - "friendlyName": "clean-task done", - "channel": "TaskDone", - "channelType": "miot_uint8", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "life-sieve", - "siid": 19, - "piid": 1, - "friendlyName": "consumable-life-sieve", - "channel": "LifeSieve", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "STRING" - } - ] - }, - { - "property": "life-brush-side", - "siid": 19, - "piid": 2, - "friendlyName": "consumable-life-brush-side", - "channel": "LifeBrushSide", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "STRING" - } - ] - }, - { - "property": "life-brush-main", - "siid": 19, - "piid": 3, - "friendlyName": "consumable-life-brush-main", - "channel": "LifeBrushMain", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "STRING" - } - ] - }, - { - "property": "enable", - "siid": 20, - "piid": 1, - "friendlyName": "annoy-enable", - "channel": "Enable", - "channelType": "miot_bool", - "type": "Switch", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "ONOFFBOOL" - } - ] - }, - { - "property": "start-time", - "siid": 20, - "piid": 2, - "friendlyName": "annoy-start-time", - "channel": "StartTime", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "STRING" - } - ] - }, - { - "property": "stop-time", - "siid": 20, - "piid": 3, - "friendlyName": "annoy-stop-time", - "channel": "StopTime", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "STRING" - } - ] - }, - { - "property": "map-view", - "siid": 23, - "piid": 1, - "friendlyName": "map-map-view", - "channel": "MapView", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - }, - { - "property": "volume", - "siid": 24, - "piid": 1, - "friendlyName": "audio-volume", - "channel": "Volume", - "channelType": "miot_int32", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "voice-packets", - "siid": 24, - "piid": 3, - "friendlyName": "audio-voiceId", - "channel": "VoicePackets", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - { - "command": "set_properties", - "parameterType": "STRING" - } - ] - }, - { - "property": "time-zone", - "siid": 25, - "piid": 1, - "friendlyName": "timezone", - "channel": "TimeZone", - "channelType": "miot_string", - "type": "String", - "refresh": true, - "actions": [ - ] - } - ] - } + "deviceMapping": { + "id": [ + "dreame.vacuum.mc1808" + ], + "propertyMethod": "get_properties", + "maxProperties": 2, + "channels": [ + { + "property": "", + "friendlyName": "Vacuum Action", + "channel": "vacuumaction", + "channelType": "dreameControl", + "type": "String", + "refresh": false, + "actions": [ + { + "command": "action", + "parameterType": "EMPTY", + "siid": 18, + "aiid": 1, + "condition": { + "name": "matchValue", + "parameters": [ + { + "matchValue": "vacuum", + "returnValue": [ + { + "piid": 1, + "value": 2 + } + ] + }, + { + "matchValue": "start", + "returnValue": [ + { + "piid": 1, + "value": 2 + } + ] + } + ] + } + }, + { + "command": "action", + "parameterType": "EMPTY", + "siid": 18, + "aiid": 2, + "condition": { + "name": "matchValue", + "parameters": [ + { + "matchValue": "stop" + } + ] + } + }, + { + "command": "action", + "parameterType": "EMPTY", + "siid": 3, + "aiid": 1, + "condition": { + "name": "matchValue", + "parameters": [ + { + "matchValue": "sweep" + } + ] + } + }, + { + "command": "action", + "parameterType": "EMPTY", + "siid": 3, + "aiid": 2, + "condition": { + "name": "matchValue", + "parameters": [ + { + "matchValue": "stopsweep" + } + ] + } + }, + { + "command": "action", + "parameterType": "EMPTY", + "siid": 2, + "aiid": 1, + "condition": { + "name": "matchValue", + "parameters": [ + { + "matchValue": "dock" + } + ] + } + } + ] + }, + { + "property": "battery-level", + "siid": 2, + "piid": 1, + "friendlyName": "Battery-Battery Level", + "channel": "BatteryLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "charging-state", + "siid": 2, + "piid": 2, + "friendlyName": "Battery-Charging State", + "channel": "ChargingState", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "fault", + "siid": 3, + "piid": 1, + "friendlyName": "Robot Cleaner-Device Fault", + "channel": "Fault", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "status", + "siid": 3, + "piid": 2, + "friendlyName": "Robot Cleaner-Status", + "channel": "Status", + "channelType": "miot_int8", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "brush-left-time", + "siid": 26, + "piid": 1, + "friendlyName": "Main Cleaning Brush-Brush Left Time", + "channel": "BrushLeftTime", + "channelType": "miot_uint16", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "brush-life-level", + "siid": 26, + "piid": 2, + "friendlyName": "Main Cleaning Brush-Brush Life Level", + "channel": "BrushLifeLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "filter-life-level", + "siid": 27, + "piid": 1, + "friendlyName": "Filter-Filter Life Level", + "channel": "FilterLifeLevel", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "filter-left-time", + "siid": 27, + "piid": 2, + "friendlyName": "Filter-Filter Left Time", + "channel": "FilterLeftTime", + "channelType": "miot_uint16", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "brush-left-time1", + "siid": 28, + "piid": 1, + "friendlyName": "Side Cleaning Brush-Brush Left Time", + "channel": "BrushLeftTime1", + "channelType": "miot_uint16", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "brush-life-level1", + "siid": 28, + "piid": 2, + "friendlyName": "Side Cleaning Brush-Brush Life Level", + "channel": "BrushLifeLevel1", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "work-mode", + "siid": 18, + "piid": 1, + "friendlyName": "clean-workmode", + "channel": "WorkMode", + "channelType": "miot_int32", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "area", + "siid": 18, + "piid": 4, + "friendlyName": "clean-area", + "channel": "Area", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "timer", + "siid": 18, + "piid": 5, + "friendlyName": "clean-timer", + "channel": "Timer", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "mode", + "siid": 18, + "piid": 6, + "friendlyName": "clean-mode", + "channel": "Mode", + "channelType": "miot_int32", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "total-clean-time", + "siid": 18, + "piid": 13, + "friendlyName": "clean-total time", + "channel": "TotalCleanTime", + "channelType": "miot_uint32", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "total-clean-times", + "siid": 18, + "piid": 14, + "friendlyName": "clean-total times", + "channel": "TotalCleanTimes", + "channelType": "miot_uint32", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "total-clean-area", + "siid": 18, + "piid": 15, + "friendlyName": "clean-Total area", + "channel": "TotalCleanArea", + "channelType": "miot_uint32", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "clean-log-start-time", + "siid": 18, + "piid": 16, + "friendlyName": "clean-Start Time", + "channel": "CleanLogStartTime", + "channelType": "miot_uint32", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "button-led", + "siid": 18, + "piid": 17, + "friendlyName": "clean-led", + "channel": "ButtonLed", + "channelType": "miot_uint16", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "task-done", + "siid": 18, + "piid": 18, + "friendlyName": "clean-task done", + "channel": "TaskDone", + "channelType": "miot_uint8", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "life-sieve", + "siid": 19, + "piid": 1, + "friendlyName": "consumable-life-sieve", + "channel": "LifeSieve", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "life-brush-side", + "siid": 19, + "piid": 2, + "friendlyName": "consumable-life-brush-side", + "channel": "LifeBrushSide", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "life-brush-main", + "siid": 19, + "piid": 3, + "friendlyName": "consumable-life-brush-main", + "channel": "LifeBrushMain", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "enable", + "siid": 20, + "piid": 1, + "friendlyName": "annoy-enable", + "channel": "Enable", + "channelType": "miot_bool", + "type": "Switch", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "ONOFFBOOL" + } + ] + }, + { + "property": "start-time", + "siid": 20, + "piid": 2, + "friendlyName": "annoy-start-time", + "channel": "StartTime", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "stop-time", + "siid": 20, + "piid": 3, + "friendlyName": "annoy-stop-time", + "channel": "StopTime", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "map-view", + "siid": 23, + "piid": 1, + "friendlyName": "map-map-view", + "channel": "MapView", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + }, + { + "property": "volume", + "siid": 24, + "piid": 1, + "friendlyName": "audio-volume", + "channel": "Volume", + "channelType": "miot_int32", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "voice-packets", + "siid": 24, + "piid": 3, + "friendlyName": "audio-voiceId", + "channel": "VoicePackets", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [ + { + "command": "set_properties", + "parameterType": "STRING" + } + ] + }, + { + "property": "time-zone", + "siid": 25, + "piid": 1, + "friendlyName": "timezone", + "channel": "TimeZone", + "channelType": "miot_string", + "type": "String", + "refresh": true, + "actions": [] + } + ] + } } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.bceiling1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.bceiling1.json index 7eee1b592..70877a941 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.bceiling1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.bceiling1.json @@ -13,6 +13,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -26,6 +27,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "actions": [ @@ -49,6 +51,7 @@ "property": "cct", "friendlyName": "Correlated Color Temperature", "channel": "cct", + "channelType": "cct", "type": "Dimmer", "refresh": true, "actions": [ @@ -62,6 +65,7 @@ "property": "snm", "friendlyName": "Scene", "channel": "scene", + "channelType": "scene", "type": "Number", "refresh": true, "actions": [ @@ -75,6 +79,7 @@ "property": "dv", "friendlyName": "DV", "channel": "dv", + "channelType": "dv", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -136,6 +141,7 @@ "property": "", "friendlyName": "Delay Off", "channel": "delayoff", + "channelType": "delayoff", "type": "Switch", "refresh": false, "ChannelGroup": "actions", @@ -160,6 +166,6 @@ ] } ], - "experimental":true + "experimental": true } } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.bulb.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.bulb.json index 4efe1b847..abee9f421 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.bulb.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.bulb.json @@ -13,6 +13,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -27,6 +28,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -51,6 +53,7 @@ "property": "cct", "friendlyName": "Correlated Color Temperature", "channel": "cct", + "channelType": "cct", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -65,6 +68,7 @@ "property": "snm", "friendlyName": "Scene", "channel": "scene", + "channelType": "scene", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -79,6 +83,7 @@ "property": "dv", "friendlyName": "DV", "channel": "dv", + "channelType": "dv", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -106,6 +111,7 @@ "property": "", "friendlyName": "Delay Off", "channel": "delayoff", + "channelType": "delayoff", "type": "Switch", "refresh": false, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.candle.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.candle.json index 4687ee4c0..ce8b6115f 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.candle.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.candle.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -23,6 +24,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -47,6 +49,7 @@ "property": "cct", "friendlyName": "Correlated Color Temperature", "channel": "cct", + "channelType": "cct", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -61,6 +64,7 @@ "property": "snm", "friendlyName": "Scene", "channel": "scene", + "channelType": "scene", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -75,6 +79,7 @@ "property": "", "friendlyName": "Delay Off", "channel": "delayoff", + "channelType": "delayoff", "type": "Switch", "refresh": false, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.cbulb.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.cbulb.json index 94f52c339..37039f9e7 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.cbulb.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.cbulb.json @@ -10,6 +10,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -24,6 +25,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -48,6 +50,7 @@ "property": "cct", "friendlyName": "Correlated Color Temperature", "channel": "cct", + "channelType": "cct", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -62,6 +65,7 @@ "property": "snm", "friendlyName": "Scene", "channel": "scene", + "channelType": "scene", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -118,6 +122,7 @@ "property": "", "friendlyName": "Delay Off", "channel": "delayoff", + "channelType": "delayoff", "type": "Switch", "refresh": false, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.ceiling.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.ceiling.json index 8a23d97aa..c21c9347c 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.ceiling.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.ceiling.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -23,6 +24,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -47,6 +49,7 @@ "property": "cct", "friendlyName": "Correlated Color Temperature", "channel": "cct", + "channelType": "cct", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -61,6 +64,7 @@ "property": "snm", "friendlyName": "Scene", "channel": "scene", + "channelType": "scene", "type": "Number", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.mono.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.mono.json index d4ecb7873..06a9479c9 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.mono.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.mono.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -22,6 +23,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -46,6 +48,7 @@ "property": "scene_num", "friendlyName": "Scene", "channel": "scene", + "channelType": "scene", "type": "Number", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.moonlight.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.moonlight.json index 13894279d..74332d9bb 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.moonlight.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.moonlight.json @@ -8,6 +8,7 @@ "property": "pow", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -22,6 +23,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -46,6 +48,7 @@ "property": "cct", "friendlyName": "Correlated Color Temperature", "channel": "cct", + "channelType": "cct", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -60,6 +63,7 @@ "property": "snm", "friendlyName": "Scene", "channel": "scene", + "channelType": "scene", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -74,6 +78,7 @@ "property": "dv", "friendlyName": "DV", "channel": "dv", + "channelType": "dv", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -87,6 +92,7 @@ "property": "", "friendlyName": "Go Night", "channel": "gonight", + "channelType": "gonight", "type": "Switch", "refresh": false, "ChannelGroup": "actions", @@ -101,6 +107,7 @@ "property": "", "friendlyName": "Delay Off", "channel": "delayoff", + "channelType": "delayoff", "type": "Switch", "refresh": false, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.rwread.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.rwread.json index 51280d0d8..3d239febc 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.rwread.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.rwread.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -22,6 +23,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -46,6 +48,7 @@ "property": "snm", "friendlyName": "Scene", "channel": "scene", + "channelType": "scene", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -73,6 +76,7 @@ "property": "dv", "friendlyName": "DV", "channel": "dv", + "channelType": "dv", "type": "Number", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.sread1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.sread1.json index 5a2b13c4c..9c993f09d 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.sread1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/philips.light.sread1.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -23,6 +24,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -47,6 +49,7 @@ "property": "ambstatus", "friendlyName": "Ambient Power", "channel": "ambientPower", + "channelType": "ambientPower", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -61,6 +64,7 @@ "property": "ambvalue", "friendlyName": "Ambient Brightness", "channel": "ambientBrightness", + "channelType": "ambientBrightness", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -75,6 +79,7 @@ "property": "dvalue", "friendlyName": "Ambient Illumination", "channel": "illumination", + "channelType": "illumination", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -84,6 +89,7 @@ "property": "eyecare", "friendlyName": "Eyecare", "channel": "eyecare", + "channelType": "eyecare", "type": "Switch", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/viomi.vacuum.v8.json b/bundles/org.openhab.binding.miio/src/main/resources/database/viomi.vacuum.v8.json index a3e7fcf1b..71b0e0bc6 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/viomi.vacuum.v8.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/viomi.vacuum.v8.json @@ -1,182 +1,178 @@ { - "deviceMapping": { - "id": [ - "viomi.vacuum.v6", - "viomi.vacuum.v7", - "viomi.vacuum.v8" - ], - "channels": [ - { - "property": "", - "friendlyName": "Vacuum Action", - "channel": "vacuumaction", - "channelType": "vacuumaction", - "type": "Number", - "refresh": false, - "actions": [ - { - "command": "set_mode_withroom", - "parameterType": "NUMBER", - "parameters": [ - 0, - "$value$", - 0 - ] - } - ] - }, - { - "property": "run_state", - "friendlyName": "State", - "channel": "state", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "mode", - "friendlyName": "Mode", - "channel": "mode", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_mode", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "err_state", - "friendlyName": "Error", - "channel": "err_state", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "battery_life", - "friendlyName": "Battery", - "channel": "battery_life", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "box_type", - "friendlyName": "Box type", - "channel": "box_type", - "type": "Number", - "refresh": true, - "actions": [ - { - } - ] - }, - { - "property": "mop_type", - "friendlyName": "mop_type", - "channel": "mop_type", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_mode", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "s_time", - "friendlyName": "Clean time", - "channel": "s_time", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_mode", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "s_area", - "friendlyName": "Clean Area", - "channel": "s_area", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_mode", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "suction_grade", - "friendlyName": "suction_grade", - "channel": "suction_grade", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_suction", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "water_grade", - "friendlyName": "water_grade", - "channel": "water_grade", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "set_suction", - "parameterType": "NUMBER" - } - ] - }, - { - "property": "remember_map", - "friendlyName": "remember_map", - "channel": "remember_map", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "has_map", - "friendlyName": "has_map", - "channel": "has_map", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "is_mop", - "friendlyName": "is_mop", - "channel": "is_mop", - "type": "Number", - "refresh": true, - "actions": [ - ] - }, - { - "property": "has_newmap", - "friendlyName": "has_newmap", - "channel": "has_newmap", - "type": "Number", - "refresh": true, - "actions": [ - ] - } - ] - } -} + "deviceMapping": { + "id": [ + "viomi.vacuum.v6", + "viomi.vacuum.v7", + "viomi.vacuum.v8" + ], + "channels": [ + { + "property": "", + "friendlyName": "Vacuum Action", + "channel": "vacuumaction", + "channelType": "vacuumaction", + "type": "Number", + "refresh": false, + "actions": [ + { + "command": "set_mode_withroom", + "parameterType": "NUMBER", + "parameters": [ + 0, + "$value$", + 0 + ] + } + ] + }, + { + "property": "run_state", + "friendlyName": "State", + "channel": "state", + "channelType": "state", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "mode", + "friendlyName": "Mode", + "channel": "mode", + "channelType": "mode", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_mode", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "err_state", + "friendlyName": "Error", + "channel": "err_state", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "battery_life", + "friendlyName": "Battery", + "channel": "battery_life", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "box_type", + "friendlyName": "Box type", + "channel": "box_type", + "type": "Number", + "refresh": true, + "actions": [ + { + "parameterType": "EMPTY" + } + ] + }, + { + "property": "mop_type", + "friendlyName": "mop_type", + "channel": "mop_type", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_mode", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "s_time", + "friendlyName": "Clean time", + "channel": "s_time", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_mode", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "s_area", + "friendlyName": "Clean Area", + "channel": "s_area", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_mode", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "suction_grade", + "friendlyName": "suction_grade", + "channel": "suction_grade", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_suction", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "water_grade", + "friendlyName": "water_grade", + "channel": "water_grade", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "set_suction", + "parameterType": "NUMBER" + } + ] + }, + { + "property": "remember_map", + "friendlyName": "remember_map", + "channel": "remember_map", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "has_map", + "friendlyName": "has_map", + "channel": "has_map", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "is_mop", + "friendlyName": "is_mop", + "channel": "is_mop", + "type": "Number", + "refresh": true, + "actions": [] + }, + { + "property": "has_newmap", + "friendlyName": "has_newmap", + "channel": "has_newmap", + "type": "Number", + "refresh": true, + "actions": [] + } + ] + } +} \ No newline at end of file diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/xjx.toilet.json b/bundles/org.openhab.binding.miio/src/main/resources/database/xjx.toilet.json index 77647ae68..206785a9c 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/xjx.toilet.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/xjx.toilet.json @@ -55,19 +55,19 @@ } ] }, - { - "property": "status_led", - "friendlyName": "Night Light", - "channel": "status_led", - "type": "Number", - "refresh": true, - "actions": [ - { - "command": "work_night_led", - "parameterType": "NUMBER" - } - ] - } + { + "property": "status_led", + "friendlyName": "Night Light", + "channel": "status_led", + "type": "Number", + "refresh": true, + "actions": [ + { + "command": "work_night_led", + "parameterType": "NUMBER" + } + ] + } ], "experimental": true } diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.bhf1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.bhf1.json index 54a868437..145318af2 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.bhf1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.bhf1.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -37,6 +38,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -61,6 +63,7 @@ "property": "delayoff", "friendlyName": "Shutdown Timer", "channel": "delayoff", + "channelType": "delayoff", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -79,6 +82,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -88,6 +92,7 @@ "property": "nl_br", "friendlyName": "Nightlight Brightness", "channel": "nightlightBrightness", + "channelType": "nightlightBrightness", "type": "Number", "refresh": true, "ChannelGroup": "", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling.json b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling.json index 79c4523fe..bb4cffb79 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling.json @@ -34,6 +34,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -48,6 +49,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -72,6 +74,7 @@ "property": "delayoff", "friendlyName": "Shutdown Timer", "channel": "delayoff", + "channelType": "delayoff", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -90,6 +93,7 @@ "property": "ct", "friendlyName": "Color Temperature", "channel": "colorTemperature", + "channelType": "colorTemperature", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -109,6 +113,7 @@ "property": "color_mode", "friendlyName": "Color Mode", "channel": "colorMode", + "channelType": "colorMode", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -132,6 +137,7 @@ "property": "", "friendlyName": "Set Scene", "channel": "customScene", + "channelType": "customScene", "type": "String", "refresh": false, "ChannelGroup": "actions", @@ -146,6 +152,7 @@ "property": "nl_br", "friendlyName": "Nightlight Brightness", "channel": "nightlightBrightness", + "channelType": "nightlightBrightness", "type": "Number", "refresh": true, "ChannelGroup": "", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling2.json b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling2.json index 9ab9149d2..919c3de8d 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling2.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling2.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -23,6 +24,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -47,6 +49,7 @@ "property": "delayoff", "friendlyName": "Shutdown Timer", "channel": "delayoff", + "channelType": "delayoff", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -65,6 +68,7 @@ "property": "ct", "friendlyName": "Color Temperature", "channel": "colorTemperature", + "channelType": "colorTemperature", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -84,6 +88,7 @@ "property": "color_mode", "friendlyName": "Color Mode", "channel": "colorMode", + "channelType": "colorMode", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -107,6 +112,7 @@ "property": "", "friendlyName": "Set Scene", "channel": "customScene", + "channelType": "customScene", "type": "String", "refresh": false, "ChannelGroup": "actions", @@ -121,6 +127,7 @@ "property": "nl_br", "friendlyName": "Nightlight Brightness", "channel": "nightlightBrightness", + "channelType": "nightlightBrightness", "type": "Number", "refresh": true, "ChannelGroup": "", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling4.json b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling4.json index 2fa408e9c..6fdec440e 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling4.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.ceiling4.json @@ -10,6 +10,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -24,6 +25,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -48,6 +50,7 @@ "property": "bg_bright", "friendlyName": "Ambient Brightness", "channel": "ambientBrightness", + "channelType": "ambientBrightness", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -62,6 +65,7 @@ "property": "delayoff", "friendlyName": "Shutdown Timer", "channel": "delayoff", + "channelType": "delayoff", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -80,6 +84,7 @@ "property": "ct", "friendlyName": "Color Temperature", "channel": "colorTemperature", + "channelType": "colorTemperature", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -99,6 +104,7 @@ "property": "color_mode", "friendlyName": "Color Mode", "channel": "colorMode", + "channelType": "colorMode", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -122,6 +128,7 @@ "property": "bg_power", "friendlyName": "Ambient Power", "channel": "ambientPower", + "channelType": "ambientPower", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -136,6 +143,7 @@ "property": "bg_rgb", "friendlyName": "Ambient Color", "channel": "ambientColor", + "channelType": "ambientColor", "type": "Color", "refresh": true, "ChannelGroup": "actions", @@ -150,6 +158,7 @@ "property": "bg_ct", "friendlyName": "Ambient Color Temperature", "channel": "ambientColorTemperature", + "channelType": "ambientColorTemperature", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -157,8 +166,6 @@ { "command": "bg_set_ct_abx", "parameterType": "NUMBER", - "parameter1": "\"smooth\"", - "parameter2": "500", "parameters": [ "$value$", "smooth", @@ -171,6 +178,7 @@ "property": "", "friendlyName": "Set Scene", "channel": "customScene", + "channelType": "customScene", "type": "String", "refresh": false, "ChannelGroup": "actions", @@ -185,6 +193,7 @@ "property": "bg_lmode", "friendlyName": "Ambient Color Mode", "channel": "ambientColorMode", + "channelType": "ambientColorMode", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -194,6 +203,7 @@ "property": "nl_br", "friendlyName": "Nightlight Brightness", "channel": "nightlightBrightness", + "channelType": "nightlightBrightness", "type": "Number", "refresh": true, "ChannelGroup": "", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.color1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.color1.json index 589510c51..07419e2e4 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.color1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.color1.json @@ -17,6 +17,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -31,6 +32,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -55,6 +57,7 @@ "property": "delayoff", "friendlyName": "Shutdown Timer", "channel": "delayoff", + "channelType": "delayoff", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -73,6 +76,7 @@ "property": "ct", "friendlyName": "Color Temperature", "channel": "colorTemperature", + "channelType": "colorTemperature", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -92,6 +96,7 @@ "property": "color_mode", "friendlyName": "Color Mode", "channel": "colorMode", + "channelType": "colorMode", "type": "String", "refresh": true, "ChannelGroup": "actions", @@ -122,14 +127,14 @@ { "command": "set_rgb", "parameterType": "COLOR", - "condition": { - "name": "HSBOnly" - }, "parameters": [ "$value$", "smooth", 500 - ] + ], + "condition": { + "name": "HSBOnly" + } }, { "command": "set_bright", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.lamp1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.lamp1.json index cc7cb909c..8194e9295 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.lamp1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.lamp1.json @@ -22,6 +22,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -36,6 +37,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Dimmer", "refresh": true, "ChannelGroup": "actions", @@ -60,6 +62,7 @@ "property": "delayoff", "friendlyName": "Shutdown Timer", "channel": "delayoff", + "channelType": "delayoff", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -78,6 +81,7 @@ "property": "ct", "friendlyName": "Color Temperature", "channel": "colorTemperature", + "channelType": "colorTemperature", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -97,6 +101,7 @@ "property": "color_mode", "friendlyName": "Color Mode", "channel": "colorMode", + "channelType": "colorMode", "type": "Number", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/yunmi.waterpurifier.json b/bundles/org.openhab.binding.miio/src/main/resources/database/yunmi.waterpurifier.json index e8ed15045..d4ae2310c 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/yunmi.waterpurifier.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/yunmi.waterpurifier.json @@ -22,6 +22,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -43,6 +44,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "actions": [] diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airmonitor.v1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airmonitor.v1.json index 1e883afcb..eea7dc8b6 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airmonitor.v1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airmonitor.v1.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -22,6 +23,7 @@ "property": "aqi", "friendlyName": "Air Quality Index", "channel": "aqi", + "channelType": "aqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.m1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.m1.json index 58703ac57..45570ce48 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.m1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.m1.json @@ -19,6 +19,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -32,6 +33,7 @@ "property": "mode", "friendlyName": "Mode", "channel": "mode", + "channelType": "mode", "type": "String", "refresh": true, "ChannelGroup": "actions", @@ -46,6 +48,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -55,6 +58,7 @@ "property": "aqi", "friendlyName": "Air Quality Index", "channel": "aqi", + "channelType": "aqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -64,6 +68,7 @@ "property": "average_aqi", "friendlyName": "Average Air Quality Index", "channel": "averageaqi", + "channelType": "averageaqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -73,6 +78,7 @@ "property": "led", "friendlyName": "LED Status", "channel": "led", + "channelType": "led", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -87,6 +93,7 @@ "property": "buzzer", "friendlyName": "Buzzer Status", "channel": "buzzer", + "channelType": "buzzer", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -101,6 +108,7 @@ "property": "f1_hour", "friendlyName": "Filter Max Life", "channel": "filtermaxlife", + "channelType": "filtermaxlife", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -110,6 +118,7 @@ "property": "f1_hour_used", "friendlyName": "Filter Hours used", "channel": "filterhours", + "channelType": "filterhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -120,6 +129,7 @@ "property": "use_time", "friendlyName": "Run Time", "channel": "usedhours", + "channelType": "usedhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -130,6 +140,7 @@ "property": "motor1_speed", "friendlyName": "Motor Speed", "channel": "motorspeed", + "channelType": "motorspeed", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -148,6 +159,7 @@ "property": "favorite_level", "friendlyName": "Favorite Level", "channel": "favoritelevel", + "channelType": "favoritelevel", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -162,6 +174,7 @@ "property": "temp_dec", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "transformation": "/10", @@ -172,6 +185,7 @@ "property": "purify_volume", "friendlyName": "Purivied Volume", "channel": "purifyvolume", + "channelType": "purifyvolume", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -181,6 +195,7 @@ "property": "child_lock", "friendlyName": "Child Lock", "channel": "childlock", + "channelType": "childlock", "type": "Switch", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v1.json index 696862ae6..5fdf71c50 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v1.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -21,6 +22,7 @@ "property": "mode", "friendlyName": "Mode", "channel": "mode", + "channelType": "mode", "type": "String", "refresh": true, "ChannelGroup": "actions", @@ -35,6 +37,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -44,6 +47,7 @@ "property": "aqi", "friendlyName": "Air Quality Index", "channel": "aqi", + "channelType": "aqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -53,6 +57,7 @@ "property": "bright", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -67,6 +72,7 @@ "property": "led", "friendlyName": "LED Status", "channel": "led", + "channelType": "led", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -81,6 +87,7 @@ "property": "act_det", "friendlyName": "Air AutoDetect", "channel": "act_det", + "channelType": "act_det", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -90,6 +97,7 @@ "property": "buzzer", "friendlyName": "Buzzer Status", "channel": "buzzer", + "channelType": "buzzer", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -104,6 +112,7 @@ "property": "f1_hour", "friendlyName": "Filter Max Life", "channel": "filtermaxlife", + "channelType": "filtermaxlife", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -113,6 +122,7 @@ "property": "filter1_life", "friendlyName": "Filter Life", "channel": "filterlive", + "channelType": "filterlive", "type": "Number", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v6.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v6.json index 1399f627d..55d700223 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v6.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v6.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -22,6 +23,7 @@ "property": "mode", "friendlyName": "Mode", "channel": "mode", + "channelType": "mode", "type": "String", "refresh": true, "ChannelGroup": "actions", @@ -36,6 +38,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -45,6 +48,7 @@ "property": "aqi", "friendlyName": "Air Quality Index", "channel": "aqi", + "channelType": "aqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -54,6 +58,7 @@ "property": "average_aqi", "friendlyName": "Average Air Quality Index", "channel": "averageaqi", + "channelType": "averageaqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -63,6 +68,7 @@ "property": "led", "friendlyName": "LED Status", "channel": "led", + "channelType": "led", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -91,6 +97,7 @@ "property": "f1_hour", "friendlyName": "Filter Max Life", "channel": "filtermaxlife", + "channelType": "filtermaxlife", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -100,6 +107,7 @@ "property": "f1_hour_used", "friendlyName": "Filter Hours used", "channel": "filterhours", + "channelType": "filterhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -110,6 +118,7 @@ "property": "use_time", "friendlyName": "Run Time", "channel": "usedhours", + "channelType": "usedhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -120,6 +129,7 @@ "property": "motor1_speed", "friendlyName": "Motor Speed", "channel": "motorspeed", + "channelType": "motorspeed", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -138,6 +148,7 @@ "property": "favorite_level", "friendlyName": "Favorite Level", "channel": "favoritelevel", + "channelType": "favoritelevel", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -152,6 +163,7 @@ "property": "temp_dec", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "transformation": "/10", @@ -162,6 +174,7 @@ "property": "purify_volume", "friendlyName": "Purivied Volume", "channel": "purifyvolume", + "channelType": "purifyvolume", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -171,6 +184,7 @@ "property": "child_lock", "friendlyName": "Child Lock", "channel": "childlock", + "channelType": "childlock", "type": "Switch", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v7.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v7.json index 0386ea8b0..38b7baa6b 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v7.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.airpurifier.v7.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -21,6 +22,7 @@ "property": "mode", "friendlyName": "Mode", "channel": "mode", + "channelType": "mode", "type": "String", "refresh": true, "ChannelGroup": "actions", @@ -35,6 +37,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -44,6 +47,7 @@ "property": "aqi", "friendlyName": "Air Quality Index", "channel": "aqi", + "channelType": "aqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -53,6 +57,7 @@ "property": "average_aqi", "friendlyName": "Average Air Quality Index", "channel": "averageaqi", + "channelType": "averageaqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -71,6 +76,7 @@ "property": "led", "friendlyName": "LED Status", "channel": "led", + "channelType": "led", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -94,6 +100,7 @@ "property": "f1_hour", "friendlyName": "Filter Max Life", "channel": "filtermaxlife", + "channelType": "filtermaxlife", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -103,6 +110,7 @@ "property": "f1_hour_used", "friendlyName": "Filter Hours used", "channel": "filterhours", + "channelType": "filterhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -113,6 +121,7 @@ "property": "motor1_speed", "friendlyName": "Motor Speed", "channel": "motorspeed", + "channelType": "motorspeed", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -140,6 +149,7 @@ "property": "favorite_level", "friendlyName": "Favorite Level", "channel": "favoritelevel", + "channelType": "favoritelevel", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -154,6 +164,7 @@ "property": "temp_dec", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "transformation": "/10", @@ -164,6 +175,7 @@ "property": "child_lock", "friendlyName": "Child Lock", "channel": "childlock", + "channelType": "childlock", "type": "Switch", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.sa1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.sa1.json index 7f692d0ac..152c41846 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.sa1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.sa1.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -22,6 +23,7 @@ "property": "angle_enable", "friendlyName": "Rotation", "channel": "angleEnable", + "channelType": "angleEnable", "type": "Switch", "refresh": true, "actions": [ @@ -35,6 +37,7 @@ "property": "use_time", "friendlyName": "Run Time", "channel": "usedhours", + "channelType": "usedhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -45,6 +48,7 @@ "property": "angle", "friendlyName": "Angle", "channel": "angle", + "channelType": "angle", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -59,6 +63,7 @@ "property": "poweroff_time", "friendlyName": "Timer", "channel": "poweroffTime", + "channelType": "poweroffTime", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -73,6 +78,7 @@ "property": "buzzer", "friendlyName": "Buzzer", "channel": "buzzer", + "channelType": "buzzer", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -115,6 +121,7 @@ "property": "speed_level", "friendlyName": "Speed Level", "channel": "speedLevel", + "channelType": "speedLevel", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -129,6 +136,7 @@ "property": "speed", "friendlyName": "Speed", "channel": "speed", + "channelType": "speed", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -143,6 +151,7 @@ "property": "natural_level", "friendlyName": "Natural Level", "channel": "naturalLevel", + "channelType": "naturalLevel", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -157,6 +166,7 @@ "property": "ac_power", "friendlyName": "AC Power", "channel": "acPower", + "channelType": "acPower", "type": "Switch", "refresh": true, "ChannelGroup": "Status", @@ -166,6 +176,7 @@ "property": "", "friendlyName": "Move Direction", "channel": "move", + "channelType": "move", "type": "String", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.v3.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.v3.json index 2f1fc7206..4bcc02819 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.v3.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.v3.json @@ -10,6 +10,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -23,6 +24,7 @@ "property": "angle_enable", "friendlyName": "Rotation", "channel": "angleEnable", + "channelType": "angleEnable", "type": "Switch", "refresh": true, "actions": [ @@ -36,6 +38,7 @@ "property": "use_time", "friendlyName": "Run Time", "channel": "usedhours", + "channelType": "usedhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -46,6 +49,7 @@ "property": "angle", "friendlyName": "Angle", "channel": "angle", + "channelType": "angle", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -60,6 +64,7 @@ "property": "poweroff_time", "friendlyName": "Timer", "channel": "poweroffTime", + "channelType": "poweroffTime", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -74,6 +79,7 @@ "property": "buzzer", "friendlyName": "Buzzer", "channel": "buzzer", + "channelType": "buzzer", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -116,6 +122,7 @@ "property": "speed_level", "friendlyName": "Speed Level", "channel": "speedLevel", + "channelType": "speedLevel", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -130,6 +137,7 @@ "property": "speed", "friendlyName": "Speed", "channel": "speed", + "channelType": "speed", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -144,6 +152,7 @@ "property": "natural_level", "friendlyName": "Natural Level", "channel": "naturalLevel", + "channelType": "naturalLevel", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -168,6 +177,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -177,6 +187,7 @@ "property": "ac_power", "friendlyName": "AC Power", "channel": "acPower", + "channelType": "acPower", "type": "String", "refresh": true, "ChannelGroup": "Status", @@ -186,6 +197,7 @@ "property": "bat_charge", "friendlyName": "Battery Charge", "channel": "mode", + "channelType": "mode", "type": "String", "refresh": true, "ChannelGroup": "actions", @@ -205,6 +217,7 @@ "property": "", "friendlyName": "Move Direction", "channel": "move", + "channelType": "move", "type": "String", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.za4.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.za4.json index d6d63cd7f..2c58d5588 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.za4.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.fan.za4.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -21,6 +22,7 @@ "property": "angle_enable", "friendlyName": "Rotation", "channel": "angleEnable", + "channelType": "angleEnable", "type": "Switch", "refresh": true, "actions": [ @@ -34,6 +36,7 @@ "property": "use_time", "friendlyName": "Run Time", "channel": "usedhours", + "channelType": "usedhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -44,6 +47,7 @@ "property": "angle", "friendlyName": "Angle", "channel": "angle", + "channelType": "angle", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -58,6 +62,7 @@ "property": "poweroff_time", "friendlyName": "Timer", "channel": "poweroffTime", + "channelType": "poweroffTime", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -72,6 +77,7 @@ "property": "buzzer", "friendlyName": "Buzzer", "channel": "buzzer", + "channelType": "buzzer", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -114,6 +120,7 @@ "property": "speed_level", "friendlyName": "Speed Level", "channel": "speedLevel", + "channelType": "speedLevel", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -128,6 +135,7 @@ "property": "speed", "friendlyName": "Speed", "channel": "speed", + "channelType": "speed", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -142,6 +150,7 @@ "property": "natural_level", "friendlyName": "Natural Level", "channel": "naturalLevel", + "channelType": "naturalLevel", "type": "Number", "refresh": true, "ChannelGroup": "actions", @@ -156,6 +165,7 @@ "property": "", "friendlyName": "Move Direction", "channel": "move", + "channelType": "move", "type": "String", "refresh": true, "ChannelGroup": "actions", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.heater.za1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.heater.za1.json index f2c924cf5..fb20b97da 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.heater.za1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.heater.za1.json @@ -10,6 +10,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -23,7 +24,7 @@ "property": "target_temperature", "friendlyName": "Target Temperature", "channel": "target_temperature", - "type": "Number", + "type": "Number", "refresh": true, "actions": [ { @@ -36,6 +37,7 @@ "property": "brightness", "friendlyName": "Brightness", "channel": "brightness", + "channelType": "brightness", "type": "Number", "refresh": true, "actions": [ @@ -49,6 +51,7 @@ "property": "buzzer", "friendlyName": "Buzzer Status", "channel": "buzzer", + "channelType": "buzzer", "type": "Switch", "refresh": true, "actions": [ @@ -59,17 +62,18 @@ ] }, { - "property": "relative_humidity", - "friendlyName": "Relative Humidity", - "channel": "relative_humidity", - "type": "Number", - "refresh": true, - "actions": [] - }, + "property": "relative_humidity", + "friendlyName": "Relative Humidity", + "channel": "relative_humidity", + "type": "Number", + "refresh": true, + "actions": [] + }, { "property": "child_lock", "friendlyName": "Child Lock", "channel": "childlock", + "channelType": "childlock", "type": "Switch", "refresh": true, "actions": [ @@ -96,6 +100,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "actions": [] @@ -104,6 +109,7 @@ "property": "use_time", "friendlyName": "Run Time", "channel": "usedhours", + "channelType": "usedhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.humidifier.cb1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.humidifier.cb1.json index d73fd79db..631bc743b 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.humidifier.cb1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.humidifier.cb1.json @@ -8,6 +8,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -21,6 +22,7 @@ "property": "mode", "friendlyName": "Humidifier Mode", "channel": "humidifierMode", + "channelType": "humidifierMode", "type": "String", "refresh": true, "ChannelGroup": "actions", @@ -35,6 +37,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -44,6 +47,7 @@ "property": "limit_hum", "friendlyName": "Humidity Set", "channel": "setHumidity", + "channelType": "setHumidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -72,6 +76,7 @@ "property": "buzzer", "friendlyName": "Buzzer Status", "channel": "buzzer", + "channelType": "buzzer", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -86,6 +91,7 @@ "property": "depth", "friendlyName": "Depth", "channel": "depth", + "channelType": "depth", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -95,6 +101,7 @@ "property": "dry", "friendlyName": "Dry", "channel": "dry", + "channelType": "dry", "type": "Switch", "refresh": true, "ChannelGroup": "Status", @@ -109,6 +116,7 @@ "property": "use_time", "friendlyName": "Run Time", "channel": "usedhours", + "channelType": "usedhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -119,6 +127,7 @@ "property": "speed", "friendlyName": "Motor Speed", "channel": "motorspeed", + "channelType": "motorspeed", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -128,6 +137,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -137,6 +147,7 @@ "property": "child_lock", "friendlyName": "Child Lock", "channel": "childlock", + "channelType": "childlock", "type": "Switch", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.humidifier.v1.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.humidifier.v1.json index af2e69201..941c5b8e9 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.humidifier.v1.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zhimi.humidifier.v1.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "actions": [ @@ -22,6 +23,7 @@ "property": "mode", "friendlyName": "Mode", "channel": "mode", + "channelType": "mode", "type": "String", "refresh": true, "ChannelGroup": "actions", @@ -36,6 +38,7 @@ "property": "humidity", "friendlyName": "Humidity", "channel": "humidity", + "channelType": "humidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -45,6 +48,7 @@ "property": "limit_hum", "friendlyName": "Humidity Set", "channel": "setHumidity", + "channelType": "setHumidity", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -59,6 +63,7 @@ "property": "aqi", "friendlyName": "Air Quality Index", "channel": "aqi", + "channelType": "aqi", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -68,6 +73,7 @@ "property": "trans_level", "friendlyName": "Trans_level", "channel": "translevel", + "channelType": "translevel", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -91,6 +97,7 @@ "property": "buzzer", "friendlyName": "Buzzer Status", "channel": "buzzer", + "channelType": "buzzer", "type": "Switch", "refresh": true, "ChannelGroup": "actions", @@ -105,6 +112,7 @@ "property": "depth", "friendlyName": "Depth", "channel": "depth", + "channelType": "depth", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -114,6 +122,7 @@ "property": "dry", "friendlyName": "Dry", "channel": "dry", + "channelType": "dry", "type": "Switch", "refresh": true, "ChannelGroup": "Status", @@ -128,6 +137,7 @@ "property": "use_time", "friendlyName": "Run Time", "channel": "usedhours", + "channelType": "usedhours", "type": "Number", "refresh": true, "transformation": "SecondsToHours", @@ -138,6 +148,7 @@ "property": "speed", "friendlyName": "Motor Speed", "channel": "motorspeed", + "channelType": "motorspeed", "type": "Number", "refresh": true, "ChannelGroup": "Status", @@ -147,6 +158,7 @@ "property": "temp_dec", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "transformation": "/10", @@ -157,6 +169,7 @@ "property": "child_lock", "friendlyName": "Child Lock", "channel": "childlock", + "channelType": "childlock", "type": "Switch", "refresh": true, "ChannelGroup": "Status", diff --git a/bundles/org.openhab.binding.miio/src/main/resources/database/zimi.powerstrip.v2.json b/bundles/org.openhab.binding.miio/src/main/resources/database/zimi.powerstrip.v2.json index 7803fc22a..de647068a 100644 --- a/bundles/org.openhab.binding.miio/src/main/resources/database/zimi.powerstrip.v2.json +++ b/bundles/org.openhab.binding.miio/src/main/resources/database/zimi.powerstrip.v2.json @@ -9,6 +9,7 @@ "property": "power", "friendlyName": "Power", "channel": "power", + "channelType": "power", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -23,6 +24,7 @@ "property": "power_consume_rate", "friendlyName": "Power Consumption", "channel": "powerUsage", + "channelType": "powerUsage", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -36,6 +38,7 @@ "property": "wifi_led", "friendlyName": "wifi LED", "channel": "led", + "channelType": "led", "type": "Switch", "refresh": true, "ChannelGroup": "", @@ -64,6 +67,7 @@ "property": "current", "friendlyName": "Current", "channel": "current", + "channelType": "current", "type": "Number", "refresh": true, "ChannelGroup": "", @@ -73,6 +77,7 @@ "property": "temperature", "friendlyName": "Temperature", "channel": "temperature", + "channelType": "temperature", "type": "Number", "refresh": true, "ChannelGroup": "",