Skip to content

Commit

Permalink
1.0.7 version minor fixes, added Mi IR
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxmudjon committed Nov 23, 2019
1 parent 4e667ac commit e088107
Show file tree
Hide file tree
Showing 22 changed files with 1,107 additions and 460 deletions.
8 changes: 8 additions & 0 deletions .homeychangelog.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"1.0.6": {
"en": "first time publish"
},
"1.0.7": {
"en": "minor fixes"
}
}
57 changes: 0 additions & 57 deletions APPSTORE.md

This file was deleted.

9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Added support for Mi Gateways child devices.

## Version 1.0.6 - Supported devices:
## Version 1.0.7 - Supported devices:

### Zigbee subdevices Xiaomi Gateway

Expand Down Expand Up @@ -68,6 +68,7 @@ Added support for Mi Gateways child devices.
- Mi Vacuum Cleaner 1S.
- Mi Air Purifier (MJXFJ-300-G1).
- Mi Roborock Vacuum Cleaner T6.
- Mi IR remote controller.

![](https://raw.githubusercontent.com/Maxmudjon/images/master/DuplexButton86.jpg)
![](https://raw.githubusercontent.com/Maxmudjon/images/master/MiMotionSensor.jpg)
Expand Down Expand Up @@ -123,6 +124,12 @@ Added support for Mi Gateways child devices.

## Version logs

### 1.0.7 (23.11.2019)

1. minor fixes.
2. added Mi IR devices (beta).
3. 1.5 version of Homey firmware is no longer supported.

### 1.0.6 (10.11.2019)

1. added Mi Roborock Vacuum Cleaner T6.
Expand Down
129 changes: 127 additions & 2 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "com.maxmudjon.mihomey",
"version": "1.0.6",
"compatibility": ">=1.5.0",
"version": "1.0.7",
"compatibility": ">=2.0.0",
"sdk": 2,
"name": {
"en": "Mi Homey"
Expand Down Expand Up @@ -41,6 +41,10 @@
"bugs": {
"url": "https://github.com/Maxmudjon/com.maxmudjon.mihomey/issues"
},
"homeyCommunityTopicId": 19816,
"source": "https://github.com/Maxmudjon/com.maxmudjon.mihomey",
"homepage": "https://github.com/Maxmudjon/com.maxmudjon.mihomey",
"support": "mailto:[email protected]",
"flow": {
"triggers": [
{
Expand Down Expand Up @@ -4396,6 +4400,22 @@
"value": "AABBCC01LM"
}
]
},
{
"type": "group",
"label": {
"en": "Mode of operation"
},
"children": [
{
"id": "reverted",
"type": "checkbox",
"value": true,
"label": {
"en": "Reverted"
}
}
]
}
],
"images": {
Expand Down Expand Up @@ -8876,6 +8896,9 @@
"alarm_filter_work_time",
"alarm_sensor_dirty_time"
],
"energy": {
"batteries": ["OTHER"]
},
"capabilitiesOptions": {
"onoff": {
"title": {
Expand Down Expand Up @@ -9077,6 +9100,9 @@
"alarm_filter_work_time",
"alarm_sensor_dirty_time"
],
"energy": {
"batteries": ["OTHER"]
},
"capabilitiesOptions": {
"onoff": {
"title": {
Expand Down Expand Up @@ -9278,6 +9304,9 @@
"alarm_filter_work_time",
"alarm_sensor_dirty_time"
],
"energy": {
"batteries": ["OTHER"]
},
"capabilitiesOptions": {
"onoff": {
"title": {
Expand Down Expand Up @@ -9480,6 +9509,9 @@
"alarm_sensor_dirty_time",
"alarm_motion"
],
"energy": {
"batteries": ["OTHER"]
},
"capabilitiesOptions": {
"onoff": {
"title": {
Expand Down Expand Up @@ -10131,6 +10163,99 @@
}
}
]
},
{
"id": "ir_remote",
"name": {
"en": "Mi IR"
},
"class": "other",
"capabilities": ["onoff"],
"settings": [
{
"type": "group",
"label": {
"en": "Device settings"
},
"children": [
{
"id": "deviceIp",
"type": "text",
"label": {
"en": "Device IP"
},
"hint": {
"en": "Enter Mi IR remote controller IP address."
},
"value": ""
},
{
"id": "deviceToken",
"type": "text",
"label": {
"en": "Device Token"
},
"hint": {
"en": "Enter Mi IR remote controller token."
},
"value": ""
}
]
},
{
"type": "group",
"label": {
"en": "Configure sending codes"
},
"children": [
{
"id": "replay",
"type": "number",
"label": {
"en": "Replay"
},
"value": 1,
"min": 1,
"max": 10
}
]
}
],
"images": {
"large": "/drivers/ir_remote/assets/images/large.png",
"small": "/drivers/ir_remote/assets/images/small.png"
},
"pair": [
{
"id": "deviceTypes"
},
{
"id": "devices",
"navigation": {
"prev": "deviceTypes"
}
},
{
"id": "deviceCharacteristics",
"navigation": {
"next": "keys",
"prev": "devices"
}
},
{
"id": "keys",
"navigation": {
"next": "done",
"prev": "deviceCharacteristics"
}
},
{
"id": "done",
"navigation": {
"prev": "devices"
}
}
]
}
]
}
14 changes: 12 additions & 2 deletions drivers/curtain/device.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,19 @@ class Curtain extends Homey.Device {
registerCovering(name) {
let sid = this.data.sid;
this.registerCapabilityListener(name, async value => {
const settings = this.getSettings();
const states = { up: "open", idle: "stop", down: "close" };
const data = { curtain_status: states[value] };
await Homey.app.mihub.sendWrite(sid, data);

if (value == "up") {
const data = { curtain_status: states[settings.reverted ? "down" : "up"] };
await Homey.app.mihub.sendWrite(sid, data);
} else if (value == "down") {
const data = { curtain_status: states[settings.reverted ? "up" : "down"] };
await Homey.app.mihub.sendWrite(sid, data);
} else {
const data = { curtain_status: states[value] };
await Homey.app.mihub.sendWrite(sid, data);
}
});
}

Expand Down
29 changes: 29 additions & 0 deletions drivers/ir_remote/assets/airConditioner.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions drivers/ir_remote/assets/box.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e088107

Please sign in to comment.