Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[miio] add support for Yeelight 1S (mono4) #10763

Merged
merged 2 commits into from
May 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions bundles/org.openhab.binding.miio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,12 @@ Currently the miio binding supports more than 290 different models.
| Yeelight | miio:basic | [yeelink.light.lamp6](#yeelink-light-lamp6) | Yes | |
| Yeelight LED Light Sensor Desk Lamp V1 | miio:basic | [yeelink.light.lamp7](#yeelink-light-lamp7) | Yes | |
| Yeelight | miio:basic | [yeelink.light.lamp8](#yeelink-light-lamp8) | Yes | |
| Yeelight Star LED Table Lamp | miio:basic | [yeelink.light.lamp9](#yeelink-light-lamp9) | Yes | |
| Yeelight Star Floor Lamp | miio:basic | [yeelink.light.lamp10](#yeelink-light-lamp10) | Yes | |
| Yeelight Screen Light Bar | miio:basic | [yeelink.light.lamp15](#yeelink-light-lamp15) | Yes | |
| Yeelight Bulb | miio:basic | [yeelink.light.mono1](#yeelink-light-mono1) | Yes | |
| 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 | |
| Yeelight Whiteglow Panel Light | miio:basic | [yeelink.light.panel1](#yeelink-light-panel1) | Yes | |
| Yeelight Lightstrip | miio:basic | [yeelink.light.strip1](#yeelink-light-strip1) | Yes | |
Expand Down Expand Up @@ -3395,6 +3398,28 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| 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"]` |
| name | String | Name | |

### Yeelight Star LED Table Lamp (<a name="yeelink-light-lamp9">yeelink.light.lamp9</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"]` |
| name | String | Name | |

### Yeelight Star Floor Lamp (<a name="yeelink-light-lamp10">yeelink.light.lamp10</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"]` |
| name | String | Name | |

### Yeelight Screen Light Bar (<a name="yeelink-light-lamp15">yeelink.light.lamp15</a>) Channels

| Channel | Type | Description | Comment |
Expand Down Expand Up @@ -3433,6 +3458,17 @@ e.g. `openhab:send actionCommand 'upd_timer["1498595904821", "on"]'` would enabl
| 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"]` |
| name | String | Name | |

### Yeelight LED Bulb 1S(Dimmable) (<a name="yeelink-light-mono4">yeelink.light.mono4</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"]` |
| name | String | Name | |

### Yeelight LED Filament Bulb (<a name="yeelink-light-mono5">yeelink.light.mono5</a>) Channels

| Channel | Type | Description | Comment |
Expand Down Expand Up @@ -8484,6 +8520,34 @@ Number colorMode "Color Mode" (G_light) {channel="miio:basic:light:colorMode"}
String name "Name" (G_light) {channel="miio:basic:light:name"}
```

### Yeelight Star LED Table Lamp (yeelink.light.lamp9) 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 Star LED Table Lamp" <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 Star Floor Lamp (yeelink.light.lamp10) 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 Star Floor Lamp" <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 Screen Light Bar (yeelink.light.lamp15) 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 Expand Up @@ -8531,6 +8595,20 @@ Number colorMode "Color Mode" (G_light) {channel="miio:basic:light:colorMode"}
String name "Name" (G_light) {channel="miio:basic:light:name"}
```

### Yeelight LED Bulb 1S(Dimmable) (yeelink.light.mono4) 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 Bulb 1S(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 LED Filament Bulb (yeelink.light.mono5) 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 @@ -303,9 +303,12 @@ public enum MiIoDevices {
YEELINK_LIGHT_LAMP6("yeelink.light.lamp6", "Yeelight", THING_TYPE_BASIC),
YEELINK_LIGHT_LAMP7("yeelink.light.lamp7", "Yeelight LED Light Sensor Desk Lamp V1", THING_TYPE_BASIC),
YEELINK_LIGHT_LAMP8("yeelink.light.lamp8", "Yeelight", THING_TYPE_BASIC),
YEELINK_LIGHT_LAMP9("yeelink.light.lamp9", "Yeelight Star LED Table Lamp", THING_TYPE_BASIC),
YEELINK_LIGHT_LAMP10("yeelink.light.lamp10", "Yeelight Star Floor Lamp", THING_TYPE_BASIC),
YEELINK_LIGHT_LAMP15("yeelink.light.lamp15", "Yeelight Screen Light Bar", THING_TYPE_BASIC),
YEELINK_LIGHT_MONO1("yeelink.light.mono1", "Yeelight Bulb", THING_TYPE_BASIC),
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_PANEL1("yeelink.light.panel1", "Yeelight Whiteglow Panel Light", THING_TYPE_BASIC),
YEELINK_LIGHT_STRIP1("yeelink.light.strip1", "Yeelight Lightstrip", THING_TYPE_BASIC),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@
"yeelink.light.lamp6",
"yeelink.light.lamp7",
"yeelink.light.lamp8",
"yeelink.light.lamp9",
"yeelink.light.lamp10",
"yeelink.light.strip4",
"yeelink.light.ct2",
"yeelink.light.mono1",
"yeelink.light.mono2",
"yeelink.light.mono4",
"yeelink.light.mono5",
"yeelink.light.panel1",
"yeelink.light.virtual"
Expand Down