Skip to content

Commit

Permalink
[miio] adding new devices (openhab#7273)
Browse files Browse the repository at this point in the history
Adding several new devices. including:
yeelink.light.color4 openhab#7016
Mi Home PTX Wall Switches (090615.switch.xswitch03) openhab#7000
Xiaomi Ceiling Lamp (yeelink.light.ceiling11) openhab#6787
Additional sensors and information in zhimi.airpurifier.v7 openhab#5760

fix formatting and channel
correct Shutdowm typo

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
Signed-off-by: Eugen Freiter <freiter@gmx.de>
  • Loading branch information
marcelrv authored and Eugen Freiter committed Apr 27, 2020
1 parent 7162443 commit 1ee694e
Show file tree
Hide file tree
Showing 14 changed files with 854 additions and 185 deletions.
338 changes: 277 additions & 61 deletions bundles/org.openhab.binding.miio/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ public enum MiIoDevices {
ROBOROCK_VACUUM_C1("roborock.vacuum.c1", "roborock.vacuum.c1", THING_TYPE_UNSUPPORTED),
SWEEPER2("roborock.sweeper.e2v2", "Rockrobo Xiaowa Sweeper v2", THING_TYPE_UNSUPPORTED),
SWEEPER3("roborock.sweeper.e2v3", "Rockrobo Xiaowa Sweeper v3", THING_TYPE_UNSUPPORTED),
SWITCH01("090615.switch.xswitch01", " Mijia 1 Gang Wall Smart Switch (WIFI) - PTX switch", THING_TYPE_BASIC),
SWITCH02("090615.switch.xswitch02", " Mijia 2 Gang Wall Smart Switch (WIFI) - PTX switch", THING_TYPE_BASIC),
SWITCH03("090615.switch.xswitch03", " Mijia 3 Gang Wall Smart Switch (WIFI) - PTX switch", THING_TYPE_BASIC),
WATER_PURIFIER2("yunmi.waterpuri.v2", "Mi Water Purifier v2", THING_TYPE_BASIC),
WATER_PURIFIERLX2("yunmi.waterpuri.lx2", "Mi Water Purifier lx2", THING_TYPE_BASIC),
WATER_PURIFIERLX3("yunmi.waterpuri.lx3", "Mi Water Purifier lx3", THING_TYPE_BASIC),
Expand All @@ -133,7 +136,11 @@ public enum MiIoDevices {
YEELIGHT_CEIL6("yeelink.light.ceiling6", "Yeelight LED Ceiling Lamp v6", THING_TYPE_BASIC),
YEELIGHT_CEIL7("yeelink.light.ceiling7", "Yeelight LED Ceiling Lamp v7", THING_TYPE_BASIC),
YEELIGHT_CEIL8("yeelink.light.ceiling8", "Yeelight LED Ceiling Lamp v8", THING_TYPE_BASIC),
YEELIGHT_CEIL9("yeelink.light.ceiling9", "Yeelight LED Ceiling Lamp v9", THING_TYPE_BASIC),
YEELIGHT_CEIL10("yeelink.light.ceiling10", "Yeelight LED Meteorite lamp", THING_TYPE_BASIC),
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_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),
Expand All @@ -146,7 +153,8 @@ public enum MiIoDevices {
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_WONDER("yeelink.light.color3", "Yeelight Color Bulb", 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),
UNKNOWN("unknown", "Unknown Mi IO Device", THING_TYPE_UNSUPPORTED);

public static MiIoDevices getType(String modelString) {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"deviceMapping": {
"id": [
"090615.switch.xswitch01"
],
"propertyMethod": "get_prop",
"maxProperties": 1,
"channels": [
{
"property": "switch1",
"friendlyName": "Switch 1",
"channel": "switch1state",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwitch1",
"parameterType": "NUMBER"
}
]
},
{
"property": "switchname1",
"friendlyName": "Switch Name 1",
"channel": "switch1name",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwtichname1",
"parameterType": "STRING"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"deviceMapping": {
"id": [
"090615.switch.xswitch02"
],
"propertyMethod": "get_prop",
"maxProperties": 1,
"channels": [
{
"property": "switch1",
"friendlyName": "Switch 1",
"channel": "switch1state",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwitch1",
"parameterType": "NUMBER"
}
]
},
{
"property": "switch2",
"friendlyName": "Switch 2",
"channel": "switch2state",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwitch2",
"parameterType": "NUMBER"
}
]
},
{
"property": "switchname1",
"friendlyName": "Switch Name 1",
"channel": "switch1name",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwtichname1",
"parameterType": "STRING"
}
]
},
{
"property": "switchname2",
"friendlyName": "Switch Name 2",
"channel": "switch2name",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwtichname2",
"parameterType": "STRING"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
{
"deviceMapping": {
"id": [
"090615.switch.xswitch03"
],
"propertyMethod": "get_prop",
"maxProperties": 1,
"channels": [
{
"property": "switch1",
"friendlyName": "Switch 1",
"channel": "switch1state",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwitch1",
"parameterType": "NUMBER"
}
]
},
{
"property": "switch2",
"friendlyName": "Switch 2",
"channel": "switch2state",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwitch2",
"parameterType": "NUMBER"
}
]
},
{
"property": "switch3",
"friendlyName": "Switch 3",
"channel": "switch3state",
"type": "Number",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwitch3",
"parameterType": "NUMBER"
}
]
},
{
"property": "switchname1",
"friendlyName": "Switch Name 1",
"channel": "switch1name",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwtichname1",
"parameterType": "STRING"
}
]
},
{
"property": "switchname2",
"friendlyName": "Switch Name 2",
"channel": "switch2name",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwtichname2",
"parameterType": "STRING"
}
]
},
{
"property": "switchname3",
"friendlyName": "Switch Name 3",
"channel": "switch3name",
"type": "String",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "SetSwtichname3",
"parameterType": "STRING"
}
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"deviceMapping": {
"id": [
"chuangmi.plug.v3fw"
],
"channels": [
{
"property": "power",
"friendlyName": "Power",
"channel": "power",
"type": "Switch",
"refresh": true,
"ChannelGroup": "",
"actions": [
{
"command": "set_power",
"parameterType": "ONOFF"
}
]
},
{
"property": "usb_on",
"friendlyName": "USB",
"channel": "usb",
"type": "Switch",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_usb_*",
"parameterType": "ONOFFPARA"
}
]
},
{
"property": "temperature",
"friendlyName": "Temperature",
"channel": "temperature",
"type": "Number",
"refresh": true,
"ChannelGroup": "",
"actions": []
},
{
"property": "wifi_led",
"friendlyName": "Wifi LED",
"channel": "led",
"type": "Switch",
"refresh": true,
"ChannelGroup": "actions",
"actions": [
{
"command": "set_wifi_led",
"parameterType": "ONOFF"
}
]
}
]
}
}
Loading

0 comments on commit 1ee694e

Please sign in to comment.