Skip to content

Commit

Permalink
[miio] add support Mi Smart LED Bulb Essential (yeelink.light.color5) (
Browse files Browse the repository at this point in the history
…openhab#10531)

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
  • Loading branch information
marcelrv authored and thinkingstone committed Nov 7, 2021
1 parent 9c21f41 commit 45214f7
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 17 deletions.
54 changes: 41 additions & 13 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ Currently the miio binding supports more than 280 different models.
| Yeelight LED Bulb (Color) | miio:basic | [yeelink.light.color2](#yeelink-light-color2) | Yes | |
| Mi LED Smart Bulb (White and Color) | miio:basic | [yeelink.light.color3](#yeelink-light-color3) | Yes | |
| Yeelight LED Bulb 1S(Color) | miio:basic | [yeelink.light.color4](#yeelink-light-color4) | Yes | |
| Mi Smart LED Bulb Essential (White and Color) | miio:basic | [yeelink.light.color5](#yeelink-light-color5) | Yes | |
| Yeelight Smart LED Bulb 1SE (color) | miio:basic | [yeelink.light.colora](#yeelink-light-colora) | Yes | |
| Yeelight LED Bulb (Tunable) | miio:basic | [yeelink.light.ct2](#yeelink-light-ct2) | Yes | |
| Mi LED Desk Lamp | miio:basic | [yeelink.light.lamp1](#yeelink-light-lamp1) | Yes | |
Expand Down Expand Up @@ -890,7 +891,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl

| Channel | Type | Description | Comment |
|----------------------|----------------------|------------------------------------------|------------|
| vacuumaction | String | Vacuum Action | Value mapping ["sweep"="Sweep","stopsweep"="Stop Sweep","dock"="Goto Dock"] |
| vacuumaction | String | Vacuum Action | Value mapping ["sweep"="Sweep","stopsweep"="Stop Sweep","dock"="Goto Dock","findme"="Find me","testsound"="Test Sound"] |
| status | Number | Robot Cleaner - Status | Value mapping ["1"="Sweeping","2"="Idle","3"="Paused","4"="Error","5"="Go Charging","6"="Charging","7"="Mopping"] |
| fault | Number | Robot Cleaner - Device Fault | |
| battery-level | Number:Dimensionless | Battery - Battery Level | |
Expand Down Expand Up @@ -932,7 +933,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl

| Channel | Type | Description | Comment |
|----------------------|----------------------|------------------------------------------|------------|
| vacuumaction | String | Vacuum Action | Value mapping ["sweep"="Sweep","stopsweep"="Stop Sweep","dock"="Goto Dock"] |
| vacuumaction | String | Vacuum Action | Value mapping ["sweep"="Sweep","stopsweep"="Stop Sweep","dock"="Goto Dock","findme"="Find me","testsound"="Test Sound"] |
| status | Number | Robot Cleaner - Status | Value mapping ["1"="Sweeping","2"="Idle","3"="Paused","4"="Error","5"="Go Charging","6"="Charging","7"="Mopping"] |
| fault | Number | Robot Cleaner - Device Fault | |
| battery-level | Number:Dimensionless | Battery - Battery Level | |
Expand Down Expand Up @@ -1058,7 +1059,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl

| Channel | Type | Description | Comment |
|----------------------|----------------------|------------------------------------------|------------|
| vacuumaction | String | Vacuum Action | Value mapping ["sweep"="Sweep","stopsweep"="Stop Sweep","dock"="Goto Dock"] |
| vacuumaction | String | Vacuum Action | Value mapping ["sweep"="Sweep","stopsweep"="Stop Sweep","dock"="Goto Dock","findme"="Find me","testsound"="Test Sound"] |
| status | Number | Robot Cleaner - Status | Value mapping ["1"="Sweeping","2"="Idle","3"="Paused","4"="Error","5"="Go Charging","6"="Charging","7"="Mopping"] |
| fault | Number | Robot Cleaner - Device Fault | |
| battery-level | Number:Dimensionless | Battery - Battery Level | |
Expand Down Expand Up @@ -2829,7 +2830,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand All @@ -2841,7 +2842,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand All @@ -2853,7 +2854,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand Down Expand Up @@ -3226,7 +3227,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand All @@ -3238,7 +3239,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand All @@ -3250,7 +3251,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand All @@ -3262,7 +3263,19 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

### Mi Smart LED Bulb Essential (White and Color) (<a name="yeelink-light-color5">yeelink.light.color5</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 | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand All @@ -3274,7 +3287,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand Down Expand Up @@ -3431,7 +3444,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand All @@ -3443,7 +3456,7 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| brightness | Dimmer | Brightness | |
| delayoff | Number:Time | Shutdown Timer | |
| colorTemperature | Number | Color Temperature | |
| colorMode | Number | Color Mode | |
| colorMode | Number | Color Mode | Value mapping ["0"="Default","1"="CT mode","2"="RGB mode","3"="HSV mode","4"="Color Flow mode","5"="Night Light mode"] |
| rgbColor | Color | RGB Color | |
| name | String | Name | |

Expand Down Expand Up @@ -8294,6 +8307,21 @@ Color rgbColor "RGB Color" (G_light) {channel="miio:basic:light:rgbColor"}
String name "Name" (G_light) {channel="miio:basic:light:name"}
```

### Mi Smart LED Bulb Essential (White and Color) (yeelink.light.color5) 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 Essential (White and Color)" <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"}
Color rgbColor "RGB Color" (G_light) {channel="miio:basic:light:rgbColor"}
String name "Name" (G_light) {channel="miio:basic:light:name"}
```

### Yeelight Smart LED Bulb 1SE (color) (yeelink.light.colora) 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ public enum MiIoDevices {
YEELINK_LIGHT_COLOR2("yeelink.light.color2", "Yeelight LED Bulb (Color)", THING_TYPE_BASIC),
YEELINK_LIGHT_COLOR3("yeelink.light.color3", "Mi LED Smart Bulb (White and Color)", THING_TYPE_BASIC),
YEELINK_LIGHT_COLOR4("yeelink.light.color4", "Yeelight LED Bulb 1S(Color)", THING_TYPE_BASIC),
YEELINK_LIGHT_COLOR5("yeelink.light.color5", "Mi Smart LED Bulb Essential (White and Color)", THING_TYPE_BASIC),
YEELINK_LIGHT_COLORA("yeelink.light.colora", "Yeelight Smart LED Bulb 1SE (color)", THING_TYPE_BASIC),
YEELINK_LIGHT_CT2("yeelink.light.ct2", "Yeelight LED Bulb (Tunable)", THING_TYPE_BASIC),
YEELINK_LIGHT_LAMP1("yeelink.light.lamp1", "Mi LED Desk Lamp", THING_TYPE_BASIC),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"aiid": 1,
"condition": {
"name": "matchValue",
"parameters" : [
"parameters": [
{
"matchValue": "findme"
}
Expand All @@ -102,15 +102,15 @@
"aiid": 2,
"condition": {
"name": "matchValue",
"parameters" : [
"parameters": [
{
"matchValue": "testsound"
}
]
}
}
],
"readmeComment": "Value mapping [\"sweep\"\u003d\"Sweep\",\"stopsweep\"\u003d\"Stop Sweep\",\"dock\"\u003d\"Goto Dock\"]"
"readmeComment": "Value mapping [\"sweep\"\u003d\"Sweep\",\"stopsweep\"\u003d\"Stop Sweep\",\"dock\"\u003d\"Goto Dock\",\"findme\"\u003d\"Find me\",\"testsound\"\u003d\"Test Sound\"]"
},
{
"property": "status",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"yeelink.light.color2",
"yeelink.light.color3",
"yeelink.light.color4",
"yeelink.light.color5",
"yeelink.light.strip1",
"yeelink.light.strip2",
"yeelink.light.bslamp1",
Expand Down Expand Up @@ -164,7 +165,8 @@
"tags": [
"Control",
"Light"
]
],
"readmeComment": "Value mapping [\"0\"\u003d\"Default\",\"1\"\u003d\"CT mode\",\"2\"\u003d\"RGB mode\",\"3\"\u003d\"HSV mode\",\"4\"\u003d\"Color Flow mode\",\"5\"\u003d\"Night Light mode\"]"
},
{
"property": "rgb",
Expand Down

0 comments on commit 45214f7

Please sign in to comment.