2
0

feat(doc): update readme

This commit is contained in:
Pierre CLEMENT
2018-01-02 11:54:08 +01:00
parent c7076ab5f9
commit 950cccb6dc
7 changed files with 47 additions and 19 deletions

4
.gitignore vendored
View File

@@ -1,6 +1,4 @@
# Created by .ignore support plugin (hsz.mobi)
*.iml
/node_modules
.log
package-lock.json

View File

@@ -1,6 +1,7 @@
# node-red-contrib-xiaomi-devices
# node-red-contrib-mi-devices
This module contains the following nodes to provide easy integration of the Xiaomi devices into node-red.
This module is a fork of [Harald Rietman module, node-red-contrib-xiaomi-devices](https://github.com/hrietman/node-red-contrib-xiaomi-devices)
The following devices are currently supported:
@@ -15,17 +16,16 @@ The following devices are currently supported:
* Power plug (wifi)
## Preperation
To receive the gateway json messages on your network you need to enable the developer mode, aka LAN mode in the gateway.
A UDP input node is needed to receive the json messages. An UDP output node to send command's to the gateway.
To interact with the gateway, you need to enable the developer mode, aka LAN mode in the gateway (see below).
To control the Wifi-Plug, extensive use is made of the miio library created by [Andreas Holstenson](https://github.com/aholstenson/miio). Make sure to check his page for compatible devices.
To control the Wifi-Plug, extensive use is made of the miio library created by [Andreas Holstenson](https://github.com/aholstenson/miio).
Make sure to check his page for compatible devices.
## Install
```
cd ~\.node-red
npm install node-red-contrib-xiaomi-devices
npm install node-red-contrib-mi-devices
```
## Usage
@@ -36,16 +36,45 @@ Note that the Wifi power plug is not configured through the configurator as it i
The Xiaomi configurator screen with ease of use to configure your different devices.
![Xiaomi configurator in node-red](https://raw.githubusercontent.com/hrietman/node-red-contrib-xiaomi-devices/master/xiaomi-configurator.png)
![Xiaomi configurator in node-red](https://raw.githubusercontent.com/pierrecle/node-red-contrib-mi-devices/master/xiaomi-configurator.png)
Tip: use the configurator from the side-panel (hamburger menu, configuration nodes) to manage your devices. Node-red doesn't update underlying edit screens if the configuration panel is opened / closed from the edit node screen. (If you do, you need to first close the edit node screen and reopen it by double-clicking the node you want to edit the properties for.)
Here an example of how to use the different nodes.
![Xiaomi devices example in node-red](https://raw.githubusercontent.com/hrietman/node-red-contrib-xiaomi-devices/master/xiaomi-devices-overview.png)
![Xiaomi devices example in node-red](/xiaomi-devices-overview.png?raw=true)
## Enable LAN mode
### Gateway
1. Install MiHome App
2. Make sure you set your region to: Mainland China under settings -> Locale - required for the moment.
Mainland China and language can set on English.
3. Select your Gateway in Mi Home
4. Then the 3 dots at the top right of the screen
5. Then click on about
6. Tap under Tutorial menu (on the blank part) repeatedly
7. You should see now 3 extra options listed in Chinese until you did now enable the developer mode. [ if not try all steps again!]
8. Choose the second new option
9. Then tap the first toggle switch to enable LAN functions. Note down the password (`A4D81977ED8A4177` in the screenshot).
10. Make sure you hit the OK button (to the right of the cancel button) to save your changes.
If you change here something, you lose your password!
![Gateway advanced mode](/xiaomi-gateway-advanced-mode.png?raw=true "Gateway advanced mode")
![Gateway LAN mode enabled](/xiaomi-gateway-lan-enabled.png?raw=true "Gateway LAN mode enabled")
## Roadmap
* ~~Support for other devices like the smart-socket WiFi~~ Done!
* Import (new) devices directly from the gateway
- [ ] Integrate Yeelight
- [ ] Handle Xiaomi Cube
## Sources
* [Harald Rietman node-red module](https://github.com/hrietman/node-red-contrib-xiaomi-devices)
* [Domoticz Instructions](https://www.domoticz.com/wiki/Xiaomi_Gateway_(Aqara))
* [louisZl Gateway Local API](https://github.com/louisZL/lumi-gateway-local-api)
* [Domoticz Gateway Code](https://github.com/domoticz/domoticz/blob/development/hardware/XiaomiGateway.cpp)
* [Node-red UDP nodes](https://github.com/node-red/node-red/blob/master/nodes/core/io/32-udp.js)

View File

@@ -1,14 +1,15 @@
{
"name": "node-red-contrib-xiaomi-devices",
"version": "1.1.0",
"description": "A set of nodes to control some of the popular Xiaomi sensors which are connected to the Xiaomi Gateway.",
"name": "node-red-contrib-mi-devices",
"version": "1.0.0",
"description": "A set of nodes to control some of the popular Xiaomi sensors which are connected to the Xiaomi Gateway, and the Gateway itself.",
"repository": {
"type": "git",
"url": "git+ssh://git@github.com:hrietman/node-red-contrib-xiaomi-devices.git"
"url": "git+ssh://git@github.com:pierrecle/node-red-contrib-mi-devices.git"
},
"license": "MIT",
"keywords": [
"Xiaomi",
"Aqara",
"node-red"
],
"node-red": {
@@ -25,9 +26,9 @@
"xiaomi-actions": "node-red-contrib-xiaomi-actions/xiaomi-actions.js"
}
},
"author": "Harald Rietman",
"author": "Pierre CLEMENT",
"bugs": {
"url": "https://github.com/hrietman/node-red-contrib-xiaomi-devices/issues"
"url": "https://github.com/pierrecle/node-red-contrib-mi-devices/issues"
},
"dependencies": {
"cryptojs": "^2.5.3",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB