]> git.basschouten.com Git - openhab-addons.git/commitdiff
[miio] add chungmi plug (#8728)
authorMarcel <marcelrv@users.noreply.github.com>
Sun, 11 Oct 2020 18:58:09 +0000 (20:58 +0200)
committerGitHub <noreply@github.com>
Sun, 11 Oct 2020 18:58:09 +0000 (11:58 -0700)
add
chuangmi.plug.hmi206
chuangmi.plug.hmi208

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
bundles/org.openhab.binding.miio/README.md
bundles/org.openhab.binding.miio/src/main/java/org/openhab/binding/miio/internal/MiIoDevices.java
bundles/org.openhab.binding.miio/src/main/resources/database/chuangmi.plug.v3fw.json

index 0c4baba6b36663a212197ca5d01d660aa0604dd8..328b5c5653928ada184b7dae6b382354ba0817ea 100644 (file)
@@ -185,6 +185,8 @@ or in case of unknown models include the model information e.g.:
 | Mi Power-plug v3             | miio:basic       | [chuangmi.plug.v3](#chuangmi-plug-v3) | Yes       |            |
 | Mi Power-plug                | miio:basic       | [chuangmi.plug.m3](#chuangmi-plug-m3) | Yes       |            |
 | Mi Smart Plug                | miio:basic       | [chuangmi.plug.hmi205](#chuangmi-plug-hmi205) | Yes       |            |
+| Mi Smart Plug                | miio:basic       | [chuangmi.plug.hmi206](#chuangmi-plug-hmi206) | Yes       |            |
+| Mi Smart Plug                | miio:basic       | [chuangmi.plug.hmi208](#chuangmi-plug-hmi208) | Yes       |            |
 | Qing Mi Smart Power Strip v1 | miio:basic       | [qmi.powerstrip.v1](#qmi-powerstrip-v1) | Yes       |            |
 | Mi Power-strip v2            | miio:basic       | [zimi.powerstrip.v2](#zimi-powerstrip-v2) | Yes       |            |
 | Mi Toothbrush                | miio:unsupported | soocare.toothbrush.x3  | No        |            |
@@ -329,7 +331,7 @@ The thing will go offline and will come back online as basic device, supporting
 The database file may need to be modified to display the right channel names.
 After validation, please share the logfile and json files on the openHAB forum or the openHAB GitHub to build future support for this model.
 
-# Advanced: adding local database files to support new devices
+## Advanced: adding local database files to support new devices
 
 Things using the basic handler (miio:basic things) are driven by json 'database' files.
 This instructs the binding which channels to create, which properties and actions are associated with the channels etc.
@@ -337,7 +339,7 @@ The conf/misc/miio (e.g. in Linux `/opt/openhab2/conf/misc/miio/`) is scanned fo
 Note that local database files take preference over build-in ones, hence if a json file is local and in the database the local file will be used. 
 For format, please check the current database files in openHAB GitHub.
 
-## Channels
+# Channels
 
 Depending on the device, different channels are available.
 
@@ -1685,6 +1687,24 @@ e.g. `smarthome:send actionCommand 'upd_timer["1498595904821", "on"]'` would ena
 | temperature      | Number  | Temperature                         |            |
 | led              | Switch  | Indicator light                     |            |
 
+### Mi Smart Plug (<a name="chuangmi-plug-hmi206">chuangmi.plug.hmi206</a>) Channels
+
+| Channel          | Type    | Description                         | Comment    |
+|------------------|---------|-------------------------------------|------------|
+| power            | Switch  | Power                               | If this channel does not respond to on/off replace the model with chuangmi.plug.v3old in the config or upgrade firmware |
+| usb              | Switch  | USB                                 |            |
+| temperature      | Number  | Temperature                         |            |
+| led              | Switch  | Wifi LED                            |            |
+
+### Mi Smart Plug (<a name="chuangmi-plug-hmi208">chuangmi.plug.hmi208</a>) Channels
+
+| Channel          | Type    | Description                         | Comment    |
+|------------------|---------|-------------------------------------|------------|
+| power            | Switch  | Power                               | If this channel does not respond to on/off replace the model with chuangmi.plug.v3old in the config or upgrade firmware |
+| usb              | Switch  | USB                                 |            |
+| temperature      | Number  | Temperature                         |            |
+| led              | Switch  | Wifi LED                            |            |
+
 ### Qing Mi Smart Power Strip v1 (<a name="qmi-powerstrip-v1">qmi.powerstrip.v1</a>) Channels
 
 | Channel          | Type    | Description                         | Comment    |
@@ -4568,6 +4588,30 @@ Number temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"
 Switch led "Indicator light" (G_plug) {channel="miio:basic:plug:led"}
 ```
 
+### Mi Smart Plug (chuangmi.plug.hmi206) item file lines
+
+note: Autogenerated example. Replace the id (plug) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
+
+```java
+Group G_plug "Mi Smart Plug" <status>
+Switch power "Power" (G_plug) {channel="miio:basic:plug:power"}
+Switch usb "USB" (G_plug) {channel="miio:basic:plug:usb"}
+Number temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"}
+Switch led "Wifi LED" (G_plug) {channel="miio:basic:plug:led"}
+```
+
+### Mi Smart Plug (chuangmi.plug.hmi208) item file lines
+
+note: Autogenerated example. Replace the id (plug) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
+
+```java
+Group G_plug "Mi Smart Plug" <status>
+Switch power "Power" (G_plug) {channel="miio:basic:plug:power"}
+Switch usb "USB" (G_plug) {channel="miio:basic:plug:usb"}
+Number temperature "Temperature" (G_plug) {channel="miio:basic:plug:temperature"}
+Switch led "Wifi LED" (G_plug) {channel="miio:basic:plug:led"}
+```
+
 ### Qing Mi Smart Power Strip v1 (qmi.powerstrip.v1) item file lines
 
 note: Autogenerated example. Replace the id (powerstrip) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
index c927e9bc980edfb270cf53ca96cb231b67306644..7619224fc82e1844978a8bf91505fe1c56471cba 100644 (file)
@@ -127,6 +127,8 @@ public enum MiIoDevices {
     POWERPLUG3("chuangmi.plug.v3", "Mi Power-plug v3", THING_TYPE_BASIC),
     POWERPLUGM3("chuangmi.plug.m3", "Mi Power-plug", THING_TYPE_BASIC),
     POWERPLUG_HMI205("chuangmi.plug.hmi205", "Mi Smart Plug", THING_TYPE_BASIC),
+    CHUANGMI_PLUG_HMI206("chuangmi.plug.hmi206", "Mi Smart Plug", THING_TYPE_BASIC),
+    CHUANGMI_PLUG_HMI208("chuangmi.plug.hmi208", "Mi Smart Plug", THING_TYPE_BASIC),
     POWERSTRIP("qmi.powerstrip.v1", "Qing Mi Smart Power Strip v1", THING_TYPE_BASIC),
     POWERSTRIP2("zimi.powerstrip.v2", "Mi Power-strip v2", THING_TYPE_BASIC),
     TOOTHBRUSH("soocare.toothbrush.x3", "Mi Toothbrush", THING_TYPE_UNSUPPORTED),
index b6dcffe29c7c446f277925073afa9c8ea75260c8..04acd4fc574e2779c55ea7906eb5b4ffccb3d1f5 100644 (file)
@@ -2,7 +2,9 @@
        "deviceMapping": {
                "id": [
                        "chuangmi.plug.v3",
-                       "chuangmi.plug.v3fw"
+                       "chuangmi.plug.v3fw",
+                       "chuangmi.plug.hmi206",
+                       "chuangmi.plug.hmi208"
                ],
                "channels": [
                        {