[miio] Add many new Yeelights models (#8668)

* [miio] Add many new Yeelights models

closing #8082
* [miio] update doc

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
This commit is contained in:
Marcel
2020-10-05 19:35:00 +02:00
committed by GitHub
parent e32a262c30
commit a980dbfb4d
8 changed files with 962 additions and 14 deletions

View File

@@ -167,6 +167,9 @@ public enum MiIoDevices {
WIFISPEAKER("xiaomi.wifispeaker.v1", "Mi Internet Speaker", THING_TYPE_UNSUPPORTED),
YEELIGHT_BSLAMP("yeelink.light.bslamp1", "Yeelight Lamp", THING_TYPE_BASIC),
YEELIGHT_BSLAMP2("yeelink.light.bslamp2", "Yeelight Lamp", THING_TYPE_BASIC),
YEELIGHT_BSLAMP3("yeelink.light.bslamp3", "Yeelight Lamp", THING_TYPE_BASIC),
YEELIGHT_BHFLIGHT1("yeelink.bhf_light.v1", "Yeelight BadHeater", THING_TYPE_BASIC),
YEELIGHT_BHFLIGHT2("yeelink.bhf_light.v2", "Yeelight BadHeater", THING_TYPE_BASIC),
YEELIGHT_CEIL1("yeelink.light.ceiling1", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL2("yeelink.light.ceiling2", "Yeelight LED Ceiling Lamp v2", THING_TYPE_BASIC),
YEELIGHT_CEIL3("yeelink.light.ceiling3", "Yeelight LED Ceiling Lamp v3", THING_TYPE_BASIC),
@@ -181,20 +184,45 @@ public enum MiIoDevices {
YEELIGHT_CEIL11("yeelink.light.ceiling11", "Yeelight LED Ceiling Lamp v11", THING_TYPE_BASIC),
YEELIGHT_CEIL12("yeelink.light.ceiling12", "Yeelight LED Ceiling Lamp v12", THING_TYPE_BASIC),
YEELIGHT_CEIL13("yeelink.light.ceiling13", "Yeelight LED Ceiling Lamp v13", THING_TYPE_BASIC),
YEELIGHT_CEIL14("yeelink.light.ceiling14", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL15("yeelink.light.ceiling15", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL16("yeelink.light.ceiling16", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL17("yeelink.light.ceiling17", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL18("yeelink.light.ceiling18", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL19("yeelink.light.ceiling19", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL20("yeelink.light.ceiling20", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL21("yeelink.light.ceiling21", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL22("yeelink.light.ceiling22", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL23("yeelink.light.ceiling23", "Yeelight LED Ceiling Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL4_A("yeelink.light.ceiling4.ambi", "Yeelight LED Ceiling Ambi Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL10_A("yeelink.light.ceiling10.ambi", "Yeelight LED Ceiling Ambi Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL19_A("yeelink.light.ceiling19.ambi", "Yeelight LED Ceiling Ambi Lamp", THING_TYPE_BASIC),
YEELIGHT_CEIL20_A("yeelink.light.ceiling20.ambi", "Yeelight LED Ceiling Ambi Lamp", THING_TYPE_BASIC),
YEELIGHT_CT2("yeelink.light.ct2", "Yeelight ct2", THING_TYPE_BASIC),
YEELIGHT_DOLPHIN("yeelink.light.mono1", "Yeelight White Bulb", THING_TYPE_BASIC),
YEELIGHT_DOLPHIN2("yeelink.light.mono2", "Yeelight White Bulb v2", THING_TYPE_BASIC),
YEELIGHT_FLUTE("yeelink.light.mono5", "Yeelight White", THING_TYPE_BASIC),
YEELIGHT_DONUT("yeelink.wifispeaker.v1", "Yeelight Wifi Speaker", THING_TYPE_UNSUPPORTED),
YEELIGHT_MANGO("yeelink.light.lamp1", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_MANGO2("yeelink.light.lamp2", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_MANGO3("yeelink.light.lamp3", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_MANGO4("yeelink.light.lamp4", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_MANGO5("yeelink.light.lamp5", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_MANGO6("yeelink.light.lamp6", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_MANGO7("yeelink.light.lamp7", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_MANGO8("yeelink.light.lamp8", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_PANEL1("yeelink.light.panel1", "Yeelight Panel", THING_TYPE_BASIC),
YEELIGHT_STRIP("yeelink.light.strip1", "Yeelight Strip", THING_TYPE_BASIC),
YEELIGHT_STRIP2("yeelink.light.strip2", "Yeelight Strip", THING_TYPE_BASIC),
YEELIGHT_STRIP4("yeelink.light.strip4", "Yeelight Strip", THING_TYPE_BASIC),
YEELIGHT_VIRT("yeelink.light.virtual", "Yeelight", THING_TYPE_BASIC),
YEELIGHT_C1("yeelink.light.color1", "Yeelight Color Bulb", THING_TYPE_BASIC),
YEELIGHT_C2("yeelink.light.color2", "Yeelight Color Bulb YLDP06YL 10W", THING_TYPE_BASIC),
YEELIGHT_C3("yeelink.light.color3", "Yeelight Color Bulb YLDP02YL 9W", THING_TYPE_BASIC),
YEELIGHT_C4("yeelink.light.color4", "Yeelight Bulb YLDP13YL (8,5W)", THING_TYPE_BASIC),
YL_CEILING1("yilai.light.ceiling1", "Yeelight yilai ceiling", THING_TYPE_BASIC),
YL_CEILING2("yilai.light.ceiling2", "Yeelight yilai ceiling", THING_TYPE_BASIC),
YL_CEILING3("yilai.light.ceiling3", "Yeelight yilai ceiling", THING_TYPE_BASIC),
UNKNOWN("unknown", "Unknown Mi IO Device", THING_TYPE_UNSUPPORTED);
public static MiIoDevices getType(String modelString) {

View File

@@ -12,6 +12,7 @@
"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",

View File

@@ -0,0 +1,98 @@
{
"deviceMapping": {
"id": [
"yeelink.bhf_light.v1",
"yeelink.bhf_light.v2"
],
"channels": [
{
"property": "power",
"friendlyName": "Power",
"channel": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
]
},
{
"property": "bh_mode",
"friendlyName": "Bath Heater mode",
"channel": "bh_mode",
"type": "String",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_bh_mode",
"parameterType": "STRING"
}
]
},
{
"property": "bright",
"friendlyName": "Brightness",
"channel": "brightness",
"type": "Dimmer",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_bright",
"parameterType": "NUMBER",
"condition": {
"name": "BrightnessExisting"
}
},
{
"command": "set_power",
"parameterType": "ONOFF",
"condition": {
"name": "BrightnessOnOff"
}
}
]
},
{
"property": "delayoff",
"friendlyName": "Shutdown Timer",
"channel": "delayoff",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "cron_add",
"parameterType": "NUMBER",
"parameters": [
0,
"$value$"
]
}
]
},
{
"property": "temperature",
"friendlyName": "Temperature",
"channel": "temperature",
"type": "Number",
"refresh": true,
"ChannelGroup": "",
"actions": []
},
{
"property": "nl_br",
"friendlyName": "Nightlight Brightness",
"channel": "nightlightBrightness",
"type": "Number",
"refresh": true,
"ChannelGroup": "",
"actions": []
}
]
}
}

View File

@@ -10,7 +10,24 @@
"yeelink.light.ceiling9",
"yeelink.light.ceiling11",
"yeelink.light.ceiling12",
"yeelink.light.ceiling13"
"yeelink.light.ceiling13",
"yeelink.light.ceiling14",
"yeelink.light.ceiling15",
"yeelink.light.ceiling16",
"yeelink.light.ceiling17",
"yeelink.light.ceiling18",
"yeelink.light.ceiling19",
"yeelink.light.ceiling20",
"yeelink.light.ceiling21",
"yeelink.light.ceiling22",
"yeelink.light.ceiling23",
"yeelink.light.ceiling4.ambi",
"yeelink.light.ceiling10.ambi",
"yeelink.light.ceiling19.ambi",
"yeelink.light.ceiling20.ambi",
"yilai.light.ceiling1",
"yilai.light.ceiling2",
"yilai.light.ceiling3"
],
"channels": [
{

View File

@@ -1,7 +1,8 @@
{
"deviceMapping": {
"id": [
"yeelink.light.ceiling2"
"yeelink.light.ceiling2",
"yeelink.light.panel1"
],
"channels": [
{

View File

@@ -8,7 +8,8 @@
"yeelink.light.strip1",
"yeelink.light.strip2",
"yeelink.light.bslamp1",
"yeelink.light.bslamp2"
"yeelink.light.bslamp2",
"yeelink.light.bslamp3"
],
"maxProperties": 7,
"channels": [

View File

@@ -4,9 +4,17 @@
"yeelink.light.lamp1",
"yeelink.light.lamp2",
"yeelink.light.lamp3",
"yeelink.light.lamp4",
"yeelink.light.lamp5",
"yeelink.light.lamp6",
"yeelink.light.lamp7",
"yeelink.light.lamp8",
"yeelink.light.strip4",
"yeelink.light.ct2",
"yeelink.light.mono1",
"yeelink.light.mono2",
"yeelink.light.mono5",
"yeelink.light.panel1",
"yeelink.light.virtual"
],
"channels": [