[OBSOLETE] Mi Connector (Xiaomi and Yeelight)

Where can I find test3 version? Thanks

Found “test3”. My docker image is :latest and to change to test3, does it affect other part of the installations?

Hi. I’ve been using the excellent Mi Connector for many months to control two wifi lights - yeelight.light.strip1 and yeelight.light.color1. I can control them from Google Home/Assistant, and from the SmartThings app, and from the YeeLight app.

Recently I realised that I cannot control the colour for the light strip from Google Home. The other light is OK. I don’t know where to troubleshoot.

I noticed that in the Mi Connector shows Type and ID for only the color1 and not the strip1 light. Could this be the trouble?

image

Hi fison67,

Doesn’t has USB control. Using docker image test3. Thanks.

It’s just different version.
Remove latest version first.

Have you re-register yeelight on mihome app?
Or you can’t control only color? or even power on/off?

See the log of docker first.
You can see the error log.

Sorry, there was a bug.
Update a smartapp first.
And then remove plug thing on ST and retsart a docker.

Not yet. I found it difficult to register last time, so I wanted to try other things first.

On and off works. Brightness works. Setting the color is the only operation that doesn’t work.

Log seems to show “data:null” for color. Example logs below showing “on” then “brightness 58” then “color”.

{"log":"2019-05-27 11:08:25 [info]: Control \u003e\u003e {\"id\":\"83894783\",\"cmd\":\"power\",\"data\":\"on\"}\n","stream":"stdout","time":"2019-05-27T11:08:25.772925308Z"}
{"log":"2019-05-27 11:08:25 [info]: Requested to control by ST \u003e\u003e [yeelink.light.strip1] \u003e\u003e {\"id\":\"83894783\",\"cmd\":\"power\",\"data\":\"on\"}\n","stream":"stdout","time":"2019-05-27T11:08:25.775125297Z"}
{"log":"\n","stream":"stdout","time":"2019-05-27T11:08:25.775292014Z"}
{"log":"2019-05-27 11:08:25 [info]: Notify \u003e\u003e ID(83894783):type(yeelink.light.strip1) state={\"key\":\"power\",\"value\":true} \u003e\u003e [true]\n","stream":"stdout","time":"2019-05-27T11:08:25.851229006Z"}
{"log":"\n","stream":"stdout","time":"2019-05-27T11:08:25.851394891Z"}

{"log":"2019-05-27 11:08:30 [info]: Control \u003e\u003e {\"id\":\"83894783\",\"cmd\":\"brightness\",\"data\":58}\n","stream":"stdout","time":"2019-05-27T11:08:30.130633461Z"}
{"log":"2019-05-27 11:08:30 [info]: Requested to control by ST \u003e\u003e [yeelink.light.strip1] \u003e\u003e {\"id\":\"83894783\",\"cmd\":\"brightness\",\"data\":58}\n","stream":"stdout","time":"2019-05-27T11:08:30.133135635Z"}
{"log":"\n","stream":"stdout","time":"2019-05-27T11:08:30.133297561Z"}
{"log":"2019-05-27 11:08:30 [info]: Notify \u003e\u003e ID(83894783):type(yeelink.light.strip1) state={\"key\":\"brightness\",\"value\":58} \u003e\u003e [58]\n","stream":"stdout","time":"2019-05-27T11:08:30.204784005Z"}
{"log":"\n","stream":"stdout","time":"2019-05-27T11:08:30.204944785Z"}

{"log":"2019-05-27 11:08:37 [info]: Control \u003e\u003e {\"id\":\"83894783\",\"cmd\":\"color\",\"data\":null}\n","stream":"stdout","time":"2019-05-27T11:08:37.457392381Z"}
{"log":"2019-05-27 11:08:37 [info]: Requested to control by ST \u003e\u003e [yeelink.light.strip1] \u003e\u003e {\"id\":\"83894783\",\"cmd\":\"color\",\"data\":null}\n","stream":"stdout","time":"2019-05-27T11:08:37.45947487Z"}
{"log":"\n","stream":"stdout","time":"2019-05-27T11:08:37.459642421Z"}

I will get the same logs for the light that works (yeelight.light.color1). But at present I have an electrical fault in my house lighting circuit so I can’t turn it on right now.

Yes. Worked. But I find that I can control both USB ports by left icon only. That mean the right icon didn’t work.

Also, my flora missing the attribute names, please view below image for this screen shot.

I update a DTH. You can test it.

Plug
Left thing means USB.
Right thing means Led.

Flora
Click the settings icon on that screen & press the save button.

Plug,
Got it. Another issue, how can you control them within routine? I tried Virtual Device Sync but didn’t work.

Flora,
Worked. Thanks. FYI. I was unable to save in Smartthings apps. So, I filled all at Smartthings web page.

Plug.
Add these attribute to DTH
attribute “led”, “string”
attribute “usb”, “string”
You can get status of led, usb power.

Flora.
Remove .0

Brilliant! Works perfectly!

So now that my fuse is not constantly tripping, the other light (yeelink.light.color1) is having similar problems, even after updating the DTH. The log shows:

{"log":"2019-05-28 11:29:18 [info]: Control \u003e\u003e {\"id\":\"87425134\",\"cmd\":\"color\",\"data\":\"6000K\",\"subData\":500}\n","stream":"stdout","time":"2019-05-28T11:29:18.648185939Z"}
{"log":"2019-05-28 11:29:18 [info]: Requested to control by ST \u003e\u003e [yeelink.light.color1] \u003e\u003e {\"id\":\"87425134\",\"cmd\":\"color\",\"data\":\"6000K\",\"subData\":500}\n","stream":"stdout","time":"2019-05-28T11:29:18.648398907Z"}
{"log":"\n","stream":"stdout","time":"2019-05-28T11:29:18.648480834Z"}
{"log":"(node:24) UnhandledPromiseRejectionWarning: Error: general error\n","stream":"stderr","time":"2019-05-28T11:29:19.00158682Z"}
{"log":"    at Object.reject (/usr/src/app/node_modules/miio/lib/network.js:475:13)\n","stream":"stderr","time":"2019-05-28T11:29:19.001762132Z"}
{"log":"    at DeviceInfo.onMessage (/usr/src/app/node_modules/miio/lib/network.js:374:8)\n","stream":"stderr","time":"2019-05-28T11:29:19.001835413Z"}
{"log":"    at Socket._socket.on (/usr/src/app/node_modules/miio/lib/network.js:160:11)\n","stream":"stderr","time":"2019-05-28T11:29:19.006482163Z"}
{"log":"    at Socket.emit (events.js:180:13)\n","stream":"stderr","time":"2019-05-28T11:29:19.009790481Z"}
{"log":"    at UDP.onMessage [as onmessage] (dgram.js:659:8)\n","stream":"stderr","time":"2019-05-28T11:29:19.010504123Z"}
{"log":"(node:24) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 22)\n","stream":"stderr","time":"2019-05-28T11:29:19.011262297Z"}

The log for the (now working) light strip for the exact same operation (change color to “snow”) is:

{"log":"2019-05-28 11:33:20 [info]: Control \u003e\u003e {\"id\":\"83894783\",\"cmd\":\"color\",\"data\":\"rgb(255, 250, 250)\",\"subData\":500}\n","stream":"stdout","time":"2019-05-28T11:33:20.722503678Z"}
{"log":"2019-05-28 11:33:20 [info]: Requested to control by ST \u003e\u003e [yeelink.light.strip1] \u003e\u003e {\"id\":\"83894783\",\"cmd\":\"color\",\"data\":\"rgb(255, 250, 250)\",\"subData\":500}\n","stream":"stdout","time":"2019-05-28T11:33:20.722706959Z"}
{"log":"\n","stream":"stdout","time":"2019-05-28T11:33:20.722868052Z"}
{"log":"2019-05-28 11:33:20 [info]: Notify \u003e\u003e ID(83894783):type(yeelink.light.strip1) state={\"key\":\"color\",\"value\":{\"values\":[255,250,250],\"model\":\"rgb\"}} \u003e\u003e [255,250,250]\n","stream":"stdout","time":"2019-05-28T11:33:20.793261657Z"}
{"log":"\n","stream":"stdout","time":"2019-05-28T11:33:20.793443843Z"}

I’ve installed docker, and believe the Mi-connector and database installs where successful. But when I try to access the Mi-connector web settings, it can’t be found. I’m attaching my docker info. Any ideas?

Running: 0
This suggests that the container has not started. What’s the output of “docker ps” and “docker images”?

I had a chance to look deeper this evening (and learn a little more about docker)… it looks like the container exits with code 139. Some sort of segmentation fault. Other containers ran successfully so far.

Looks like I’m running into the same problem on my pi zero w. Docker seems to work for Hello World and the DB containers. They exit with status 0. Did you ever get yours to work?

I have no problem on my Pi. But my architecture is armv7l, yours is armv6l. Apparently that can be a problem.

I found a forum where someone mentions altering the parent image in the dockerfile to something compatible (e.g. FROM resin/rpi-raspbian:stretch ) and build manually.

I have no idea how to find the dockerfile or build manually. :frowning: