Skip to content

Commit ca2d574

Browse files
committed
1.1.1 version added Mi Smart Humidifier
1 parent 68cb11f commit ca2d574

File tree

78 files changed

+1266
-283
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+1266
-283
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Added support for Mi Gateways child devices.
44

5-
## Version 1.1.0 - Supported devices:
5+
## Version 1.1.1 - Supported devices:
66

77
### Zigbee subdevices Xiaomi Gateway
88

@@ -124,6 +124,11 @@ Added support for Mi Gateways child devices.
124124

125125
## Version logs
126126

127+
### 1.1.1 (14.01.2020)
128+
129+
1. added Mi ClearGlass Air Detector.
130+
2. minor fixes.
131+
127132
### 1.1.0 (27.12.2019)
128133

129134
1. fixed Mi Air Purifier (MJXFJ-300-G1) set favorite speed and settings.

app.json

Lines changed: 265 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"id": "com.maxmudjon.mihomey",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"compatibility": ">=2.0.0",
55
"sdk": 2,
66
"name": {
@@ -1818,7 +1818,7 @@
18181818
{
18191819
"name": "device",
18201820
"type": "device",
1821-
"filter": "driver_id=mi_humidifier_v1|mi_humidifier_ca1"
1821+
"filter": "driver_id=mi_humidifier_v1|mi_humidifier_ca1|deerma_humidifier_mjjsq"
18221822
}
18231823
]
18241824
},
@@ -1831,7 +1831,7 @@
18311831
{
18321832
"name": "device",
18331833
"type": "device",
1834-
"filter": "driver_id=mi_humidifier_v1|mi_humidifier_ca1"
1834+
"filter": "driver_id=mi_humidifier_v1|mi_humidifier_ca1|deerma_humidifier_mjjsq"
18351835
}
18361836
]
18371837
},
@@ -1915,6 +1915,49 @@
19151915
}
19161916
]
19171917
},
1918+
{
1919+
"id": "humidifier_deerma_mode",
1920+
"title": {
1921+
"en": "Set humidifier mode"
1922+
},
1923+
"args": [
1924+
{
1925+
"name": "device",
1926+
"type": "device",
1927+
"filter": "driver_id=deerma_humidifier_mjjsq"
1928+
},
1929+
{
1930+
"type": "dropdown",
1931+
"name": "modes",
1932+
"values": [
1933+
{
1934+
"id": "low",
1935+
"label": {
1936+
"en": "Low"
1937+
}
1938+
},
1939+
{
1940+
"id": "medium",
1941+
"label": {
1942+
"en": "Medium"
1943+
}
1944+
},
1945+
{
1946+
"id": "high",
1947+
"label": {
1948+
"en": "High"
1949+
}
1950+
},
1951+
{
1952+
"id": "humidity",
1953+
"label": {
1954+
"en": "Humidity"
1955+
}
1956+
}
1957+
]
1958+
}
1959+
]
1960+
},
19181961
{
19191962
"id": "send_ir_code",
19201963
"title": {
@@ -2461,6 +2504,43 @@
24612504
"getable": true,
24622505
"setable": true
24632506
},
2507+
"humidifier_deerma_mode": {
2508+
"type": "enum",
2509+
"title": {
2510+
"en": "Humidifier Mode"
2511+
},
2512+
"desc": {
2513+
"en": "Humidifier Mode"
2514+
},
2515+
"values": [
2516+
{
2517+
"id": "low",
2518+
"title": {
2519+
"en": "Low"
2520+
}
2521+
},
2522+
{
2523+
"id": "medium",
2524+
"title": {
2525+
"en": "Medium"
2526+
}
2527+
},
2528+
{
2529+
"id": "high",
2530+
"title": {
2531+
"en": "High"
2532+
}
2533+
},
2534+
{
2535+
"id": "humidity",
2536+
"title": {
2537+
"en": "Humidity"
2538+
}
2539+
}
2540+
],
2541+
"getable": true,
2542+
"setable": true
2543+
},
24642544
"measure_voc": {
24652545
"title": {
24662546
"en": "VOC",
@@ -10001,6 +10081,116 @@
1000110081
}
1000210082
]
1000310083
},
10084+
{
10085+
"id": "deerma_humidifier_mjjsq",
10086+
"name": {
10087+
"en": "Mi Smart Humidifier"
10088+
},
10089+
"class": "sensor",
10090+
"capabilities": ["onoff", "dim", "humidifier_deerma_mode", "measure_temperature", "measure_humidity", "alarm_water", "alarm_motion.tank"],
10091+
"capabilitiesOptions": {
10092+
"onoff": {
10093+
"title": {
10094+
"en": "Power"
10095+
}
10096+
},
10097+
"dim": {
10098+
"title": {
10099+
"en": "Set humidity"
10100+
}
10101+
},
10102+
"alarm_water": {
10103+
"title": {
10104+
"en": "Water level"
10105+
}
10106+
},
10107+
"alarm_motion.tank": {
10108+
"title": {
10109+
"en": "Water tank status"
10110+
}
10111+
}
10112+
},
10113+
"settings": [
10114+
{
10115+
"type": "group",
10116+
"label": {
10117+
"en": "Mi Smart Humidifier settings"
10118+
},
10119+
"children": [
10120+
{
10121+
"id": "deviceIP",
10122+
"type": "text",
10123+
"value": "192.168.xxx.xxx",
10124+
"label": {
10125+
"en": "IP Address"
10126+
}
10127+
},
10128+
{
10129+
"id": "deviceToken",
10130+
"type": "text",
10131+
"value": "",
10132+
"label": {
10133+
"en": "Device Token"
10134+
}
10135+
},
10136+
{
10137+
"id": "updateTimer",
10138+
"type": "number",
10139+
"value": 60,
10140+
"attr": {
10141+
"min": 5,
10142+
"max": 3600
10143+
},
10144+
"label": {
10145+
"en": "Device update timer"
10146+
}
10147+
}
10148+
]
10149+
},
10150+
{
10151+
"type": "group",
10152+
"label": {
10153+
"en": "Extra settings"
10154+
},
10155+
"children": [
10156+
{
10157+
"id": "led",
10158+
"type": "checkbox",
10159+
"value": true,
10160+
"label": {
10161+
"en": "LED"
10162+
}
10163+
},
10164+
{
10165+
"id": "buzzer",
10166+
"type": "checkbox",
10167+
"value": true,
10168+
"label": {
10169+
"en": "Buzzer"
10170+
}
10171+
}
10172+
]
10173+
}
10174+
],
10175+
"images": {
10176+
"large": "/drivers/deerma_humidifier_mjjsq/assets/images/large.png",
10177+
"small": "/drivers/deerma_humidifier_mjjsq/assets/images/small.png"
10178+
},
10179+
"pair": [
10180+
{
10181+
"id": "xiaomi",
10182+
"navigation": {
10183+
"next": "done"
10184+
}
10185+
},
10186+
{
10187+
"id": "done",
10188+
"navigation": {
10189+
"prev": "xiaomi"
10190+
}
10191+
}
10192+
]
10193+
},
1000410194
{
1000510195
"id": "zhimi_airfresh_va2",
1000610196
"name": {
@@ -10221,6 +10411,78 @@
1022110411
}
1022210412
]
1022310413
},
10414+
{
10415+
"id": "cgllc_airmonitor_s1",
10416+
"name": {
10417+
"en": "Mi ClearGlass Air Detector",
10418+
"nl": ""
10419+
},
10420+
"class": "sensor",
10421+
"capabilities": ["measure_temperature", "measure_humidity", "measure_pm25", "measure_co2", "measure_voc", "measure_battery", "alarm_battery"],
10422+
"energy": {
10423+
"batteries": ["OTHER"]
10424+
},
10425+
"settings": [
10426+
{
10427+
"type": "group",
10428+
"label": {
10429+
"en": "Mi ClearGlass Air Detector settings",
10430+
"nl": ""
10431+
},
10432+
"children": [
10433+
{
10434+
"id": "deviceIP",
10435+
"type": "text",
10436+
"value": "192.168.xxx.xxx",
10437+
"label": {
10438+
"en": "IP Address",
10439+
"nl": ""
10440+
}
10441+
},
10442+
{
10443+
"id": "deviceToken",
10444+
"type": "text",
10445+
"value": "",
10446+
"label": {
10447+
"en": "Device Token",
10448+
"nl": ""
10449+
}
10450+
},
10451+
{
10452+
"id": "updateTimer",
10453+
"type": "number",
10454+
"value": 60,
10455+
"attr": {
10456+
"min": 5,
10457+
"max": 3600
10458+
},
10459+
"label": {
10460+
"en": "Device update timer",
10461+
"nl": ""
10462+
}
10463+
}
10464+
]
10465+
}
10466+
],
10467+
"images": {
10468+
"large": "/drivers/cgllc_airmonitor_s1/assets/images/large.png",
10469+
"small": "/drivers/cgllc_airmonitor_s1/assets/images/small.png"
10470+
},
10471+
"pair": [
10472+
{
10473+
"id": "xiaomi",
10474+
"navigation": {
10475+
"next": "done"
10476+
}
10477+
},
10478+
{
10479+
"id": "done",
10480+
"navigation": {
10481+
"prev": "xiaomi"
10482+
}
10483+
}
10484+
]
10485+
},
1022410486
{
1022510487
"id": "ir_remote",
1022610488
"name": {

drivers/button_switch.aq2/device.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class AqaraButtonSwitch extends Homey.Device {
77
this.driver = this.getDriver();
88
this.data = this.getData();
99
this.initialize();
10-
this.log("Mi Homey device init | " + "name: " + this.getName() + " - " + "class: " + this.getClass() + " - " + "data: " + JSON.stringify(this.data));
10+
this.log("Mi Homey device init | name: " + this.getName() + " - class: " + this.getClass() + " - data: " + JSON.stringify(this.data));
1111
}
1212

1313
async initialize() {
@@ -76,10 +76,10 @@ class AqaraButtonSwitch extends Homey.Device {
7676
if (this.getCapabilityValue(name) != value) {
7777
this.setCapabilityValue(name, value)
7878
.then(() => {
79-
this.log("[" + this.data.sid + "]" + " [" + name + "] [" + value + "] Capability successfully updated");
79+
this.log("[" + this.data.sid + "] [" + name + "] [" + value + "] Capability successfully updated");
8080
})
8181
.catch(error => {
82-
this.log("[" + this.data.sid + "]" + " [" + name + "] [" + value + "] Capability not updated because there are errors: " + error.message);
82+
this.log("[" + this.data.sid + "] [" + name + "] [" + value + "] Capability not updated because there are errors: " + error.message);
8383
});
8484
this.triggerFlow(trigger, name, value);
8585
}

drivers/button_switch.aq3/device.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ class AqaraButtonSwitch extends Homey.Device {
77
this.driver = this.getDriver();
88
this.data = this.getData();
99
this.initialize();
10-
this.log("Mi Homey device init | " + "name: " + this.getName() + " - " + "class: " + this.getClass() + " - " + "data: " + JSON.stringify(this.data));
10+
this.log("Mi Homey device init | name: " + this.getName() + " - class: " + this.getClass() + " - data: " + JSON.stringify(this.data));
1111
}
1212

1313
async initialize() {
@@ -84,10 +84,10 @@ class AqaraButtonSwitch extends Homey.Device {
8484
if (this.getCapabilityValue(name) != value) {
8585
this.setCapabilityValue(name, value)
8686
.then(() => {
87-
this.log("[" + this.data.sid + "]" + " [" + name + "] [" + value + "] Capability successfully updated");
87+
this.log("[" + this.data.sid + "] [" + name + "] [" + value + "] Capability successfully updated");
8888
})
8989
.catch(error => {
90-
this.log("[" + this.data.sid + "]" + " [" + name + "] [" + value + "] Capability not updated because there are errors: " + error.message);
90+
this.log("[" + this.data.sid + "] [" + name + "] [" + value + "] Capability not updated because there are errors: " + error.message);
9191
});
9292
this.triggerFlow(trigger, name, value);
9393
}

0 commit comments

Comments
 (0)