Code rewrited
This commit is contained in:
@@ -3,23 +3,34 @@
|
||||
Works with Yeelight WiFi bulbs (color and monochrome).
|
||||
You need to edit you bulb IPs in main.py (not yet fixed).
|
||||
|
||||
Sample docker-compose.yml file:
|
||||
You need to activate developer mode (http://forum.yeelight.com/t/trying-to-enable-developer-mode-with-yeelight-app-lamp-always-offline/137)
|
||||
|
||||
Bridge accept following MQTT set:
|
||||
```
|
||||
"home/light/main-color/status/set" -> on
|
||||
```
|
||||
|
||||
will turn on light and translate devices state from gateway:
|
||||
```
|
||||
"home/light/main-color/status" on
|
||||
"home/light/main-color/ct" 3500
|
||||
"home/light/main-color/bright" 3
|
||||
"home/light/main-color/rgb" 1247743
|
||||
```
|
||||
|
||||
## Config
|
||||
Edit file config/config-sample.yaml and rename it to config/config.yaml
|
||||
|
||||
## Docker-Compose
|
||||
Sample docker-compose.yaml file for user:
|
||||
```
|
||||
yeelight:
|
||||
build: .
|
||||
image: "monster1025/yeelight-mqtt"
|
||||
container_name: yeelight
|
||||
environment:
|
||||
- MQTT_SERVER=192.168.1.93
|
||||
- MQTT_USER=mqtt_user
|
||||
- MQTT_PASS=passw0rd
|
||||
volumes:
|
||||
- "./config:/app/config"
|
||||
restart: always
|
||||
```
|
||||
|
||||
```
|
||||
docker-compose build && docker-compose up -d
|
||||
```
|
||||
|
||||
## Known bugs:
|
||||
- Lamp's alive status updated only at startup.
|
||||
- IP-Name list in main.py
|
||||
- Bad code style =(
|
||||
- Lamp's alive status updated only at startup.
|
||||
Reference in New Issue
Block a user