]> git.basschouten.com Git - openhab-addons.git/commitdiff
[miio] Add support 3 yeelights (#11492)
authorMarcel <marcel@verpaalen.com>
Thu, 4 Nov 2021 08:07:45 +0000 (09:07 +0100)
committerGitHub <noreply@github.com>
Thu, 4 Nov 2021 08:07:45 +0000 (09:07 +0100)
Add support for
yeelink.light.mono6 - Mi Smart LED Bulb
yeelink.light.monoa - Yeelight LED smart bulb W3(dimmable)
yeelink.light.monob - Yeelight GU10 Smart Bulb W1(dimmable)

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/dreame.vacuum.mc1808-miot.json
bundles/org.openhab.binding.miio/src/main/resources/database/yeelink.light.lamp1.json

index 038c6d2abc10f1f105727757571dcd5f9c208537..12a7a4729c424350406acc14b5e002081a262e71 100644 (file)
@@ -435,6 +435,9 @@ Currently the miio binding supports more than 300 different models.
 | Yeelight White Bulb v2       | miio:basic       | [yeelink.light.mono2](#yeelink-light-mono2) | Yes       |            |
 | Yeelight LED Bulb 1S(Dimmable) | miio:basic       | [yeelink.light.mono4](#yeelink-light-mono4) | Yes       |            |
 | Yeelight LED Filament Bulb   | miio:basic       | [yeelink.light.mono5](#yeelink-light-mono5) | Yes       |            |
+| Mi Smart LED Bulb            | miio:basic       | [yeelink.light.mono6](#yeelink-light-mono6) | Yes       |            |
+| Yeelight LED smart bulb W3(dimmable) | miio:basic       | [yeelink.light.monoa](#yeelink-light-monoa) | Yes       |            |
+| Yeelight GU10 Smart Bulb W1(dimmable) | miio:basic       | [yeelink.light.monob](#yeelink-light-monob) | Yes       |            |
 | Yeelight Whiteglow Panel Light | miio:basic       | [yeelink.light.panel1](#yeelink-light-panel1) | Yes       |            |
 | Yeelight Lightstrip          | miio:basic       | [yeelink.light.strip1](#yeelink-light-strip1) | Yes       |            |
 | Yeelight Lightstrip Plus     | miio:basic       | [yeelink.light.strip2](#yeelink-light-strip2) | Yes       |            |
@@ -964,6 +967,7 @@ Note, not all the values need to be in the json file, e.g. a subset of the param
 | vacuumaction         | String               | Vacuum Action                            | Value mapping `["vacuum"="Vacuum","stop"="Stop","sweep"="Sweep","stopsweep"="Stop Sweep","dock"="Goto Dock"]` |
 | BatteryLevel         | Number               | Battery-Battery Level                    |            |
 | ChargingState        | Number               | Battery-Charging State                   | Value mapping `["1"="Charging","2"="Not Charging","4"="Charging","5"="Go Charging"]` |
+| water-mode           | Number               | Water Mode                               | Value mapping `["1"="Low","2"="Medium","4"="High"]` |
 | Fault                | Number               | Robot Cleaner-Device Fault               | Value mapping `["0"="No faults"]` |
 | Status               | Number               | Robot Cleaner-Status                     | Value mapping `["1"="Sweeping","2"="Idle","3"="Paused","4"="Error","5"="Go Charging","6"="Charging"]` |
 | BrushLeftTime        | Number:Time          | Main Cleaning Brush-Brush Left Time      |            |
@@ -3657,6 +3661,39 @@ Note, not all the values need to be in the json file, e.g. a subset of the param
 | colorMode            | Number               | Color Mode                               | Note, currently only supporting switching to RGB or CT mode. Value mapping `["0"="Default","2"="CT mode","1"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"]` |
 | name                 | String               | Name                                     |            |
 
+### Mi Smart LED Bulb (<a name="yeelink-light-mono6">yeelink.light.mono6</a>) Channels
+
+| Channel              | Type                 | Description                              | Comment    |
+|----------------------|----------------------|------------------------------------------|------------|
+| power                | Switch               | Power                                    |            |
+| brightness           | Dimmer               | Brightness                               |            |
+| delayoff             | Number:Time          | Shutdown Timer                           |            |
+| colorTemperature     | Number               | Color Temperature                        |            |
+| colorMode            | Number               | Color Mode                               | Note, currently only supporting switching to RGB or CT mode. Value mapping `["0"="Default","2"="CT mode","1"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"]` |
+| name                 | String               | Name                                     |            |
+
+### Yeelight LED smart bulb W3(dimmable) (<a name="yeelink-light-monoa">yeelink.light.monoa</a>) Channels
+
+| Channel              | Type                 | Description                              | Comment    |
+|----------------------|----------------------|------------------------------------------|------------|
+| power                | Switch               | Power                                    |            |
+| brightness           | Dimmer               | Brightness                               |            |
+| delayoff             | Number:Time          | Shutdown Timer                           |            |
+| colorTemperature     | Number               | Color Temperature                        |            |
+| colorMode            | Number               | Color Mode                               | Note, currently only supporting switching to RGB or CT mode. Value mapping `["0"="Default","2"="CT mode","1"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"]` |
+| name                 | String               | Name                                     |            |
+
+### Yeelight GU10 Smart Bulb W1(dimmable) (<a name="yeelink-light-monob">yeelink.light.monob</a>) Channels
+
+| Channel              | Type                 | Description                              | Comment    |
+|----------------------|----------------------|------------------------------------------|------------|
+| power                | Switch               | Power                                    |            |
+| brightness           | Dimmer               | Brightness                               |            |
+| delayoff             | Number:Time          | Shutdown Timer                           |            |
+| colorTemperature     | Number               | Color Temperature                        |            |
+| colorMode            | Number               | Color Mode                               | Note, currently only supporting switching to RGB or CT mode. Value mapping `["0"="Default","2"="CT mode","1"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"]` |
+| name                 | String               | Name                                     |            |
+
 ### Yeelight Whiteglow Panel Light (<a name="yeelink-light-panel1">yeelink.light.panel1</a>) Channels
 
 | Channel              | Type                 | Description                              | Comment    |
@@ -5742,6 +5779,7 @@ Group G_vacuum "Mi Robot Vacuum Mop 1C STYTJ01ZHM" <status>
 String vacuumaction "Vacuum Action" (G_vacuum) {channel="miio:basic:vacuum:vacuumaction"}
 Number BatteryLevel "Battery-Battery Level" (G_vacuum) {channel="miio:basic:vacuum:BatteryLevel"}
 Number ChargingState "Battery-Charging State" (G_vacuum) {channel="miio:basic:vacuum:ChargingState"}
+Number water_mode "Water Mode" (G_vacuum) {channel="miio:basic:vacuum:water-mode"}
 Number Fault "Robot Cleaner-Device Fault" (G_vacuum) {channel="miio:basic:vacuum:Fault"}
 Number Status "Robot Cleaner-Status" (G_vacuum) {channel="miio:basic:vacuum:Status"}
 Number:Time BrushLeftTime "Main Cleaning Brush-Brush Left Time" (G_vacuum) {channel="miio:basic:vacuum:BrushLeftTime"}
@@ -8958,6 +8996,48 @@ Number colorMode "Color Mode" (G_light) {channel="miio:basic:light:colorMode"}
 String name "Name" (G_light) {channel="miio:basic:light:name"}
 ```
 
+### Mi Smart LED Bulb (yeelink.light.mono6) item file lines
+
+note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
+
+```
+Group G_light "Mi Smart LED Bulb" <status>
+Switch power "Power" (G_light) {channel="miio:basic:light:power"}
+Dimmer brightness "Brightness" (G_light) {channel="miio:basic:light:brightness"}
+Number:Time delayoff "Shutdown Timer" (G_light) {channel="miio:basic:light:delayoff"}
+Number colorTemperature "Color Temperature" (G_light) {channel="miio:basic:light:colorTemperature"}
+Number colorMode "Color Mode" (G_light) {channel="miio:basic:light:colorMode"}
+String name "Name" (G_light) {channel="miio:basic:light:name"}
+```
+
+### Yeelight LED smart bulb W3(dimmable) (yeelink.light.monoa) item file lines
+
+note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
+
+```
+Group G_light "Yeelight LED smart bulb W3(dimmable)" <status>
+Switch power "Power" (G_light) {channel="miio:basic:light:power"}
+Dimmer brightness "Brightness" (G_light) {channel="miio:basic:light:brightness"}
+Number:Time delayoff "Shutdown Timer" (G_light) {channel="miio:basic:light:delayoff"}
+Number colorTemperature "Color Temperature" (G_light) {channel="miio:basic:light:colorTemperature"}
+Number colorMode "Color Mode" (G_light) {channel="miio:basic:light:colorMode"}
+String name "Name" (G_light) {channel="miio:basic:light:name"}
+```
+
+### Yeelight GU10 Smart Bulb W1(dimmable) (yeelink.light.monob) item file lines
+
+note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
+
+```
+Group G_light "Yeelight GU10 Smart Bulb W1(dimmable)" <status>
+Switch power "Power" (G_light) {channel="miio:basic:light:power"}
+Dimmer brightness "Brightness" (G_light) {channel="miio:basic:light:brightness"}
+Number:Time delayoff "Shutdown Timer" (G_light) {channel="miio:basic:light:delayoff"}
+Number colorTemperature "Color Temperature" (G_light) {channel="miio:basic:light:colorTemperature"}
+Number colorMode "Color Mode" (G_light) {channel="miio:basic:light:colorMode"}
+String name "Name" (G_light) {channel="miio:basic:light:name"}
+```
+
 ### Yeelight Whiteglow Panel Light (yeelink.light.panel1) item file lines
 
 note: Autogenerated example. Replace the id (light) in the channel with your own. Replace `basic` with `generic` in the thing UID depending on how your thing was discovered.
index b9d5ddab06730ed3316fda5d4cb9ee0c82be5079..dbc8a17a59d9e0f40cf3ead98cad39dfe6987007 100644 (file)
@@ -317,6 +317,9 @@ public enum MiIoDevices {
     YEELINK_LIGHT_MONO2("yeelink.light.mono2", "Yeelight White Bulb v2", THING_TYPE_BASIC),
     YEELINK_LIGHT_MONO4("yeelink.light.mono4", "Yeelight LED Bulb 1S(Dimmable)", THING_TYPE_BASIC),
     YEELINK_LIGHT_MONO5("yeelink.light.mono5", "Yeelight LED Filament Bulb", THING_TYPE_BASIC),
+    YEELINK_LIGHT_MONO6("yeelink.light.mono6", "Mi Smart LED Bulb", THING_TYPE_BASIC),
+    YEELINK_LIGHT_MONOA("yeelink.light.monoa", "Yeelight LED smart bulb W3(dimmable)", THING_TYPE_BASIC),
+    YEELINK_LIGHT_MONOB("yeelink.light.monob", "Yeelight GU10 Smart Bulb W1(dimmable)", THING_TYPE_BASIC),
     YEELINK_LIGHT_PANEL1("yeelink.light.panel1", "Yeelight Whiteglow Panel Light", THING_TYPE_BASIC),
     YEELINK_LIGHT_STRIP1("yeelink.light.strip1", "Yeelight Lightstrip", THING_TYPE_BASIC),
     YEELINK_LIGHT_STRIP2("yeelink.light.strip2", "Yeelight Lightstrip Plus", THING_TYPE_BASIC),
index df25b193ecab1735cc7e7f09b5f5afed6363b603..7a79f7fd8d5b6f762227432fa9ba57f4d0ae837b 100644 (file)
                                                "parameterType": "NUMBER"
                                        }
                                ],
-                               "readmeComment": "Value mapping [\"1\"\u003d\"Low\",\"2\"\u003d\"Medium\",\"4\"\u003d\"High\"]"
+                               "readmeComment": "Value mapping `[\"1\"\u003d\"Low\",\"2\"\u003d\"Medium\",\"4\"\u003d\"High\"]`"
                        },
                        {
                                "property": "fault",
index 00417edaa58607d967d34195899583e491e43eda..6c7c0a7766a1bb2d2f80aba37a5ab2c833bd2b3d 100644 (file)
@@ -17,6 +17,9 @@
                        "yeelink.light.mono2",
                        "yeelink.light.mono4",
                        "yeelink.light.mono5",
+                       "yeelink.light.mono6",
+                       "yeelink.light.monoa",
+                       "yeelink.light.monob",
                        "yeelink.light.panel1",
                        "yeelink.light.virtual"
                ],