[OBSOLETE] Mi Connector (Xiaomi and Yeelight)

Can I send you the log file in a PM?

2019-07-08 07:47:14 [Mi-Connector] info: ----------------------------------
2019-07-08 07:47:14 [Mi-Connector] info: Initialize >> Auto Detect Device!
2019-07-08 07:47:14 [Mi-Connector] info: ----------------------------------
2019-07-08 07:47:14 [Mi-Connector] info: Error: Could not connect to device, token needs to be specified[192.168.1.xx] id=152603061
2019-07-08 07:47:14 [Mi-Connector] info: Error: Could not connect to device, token needs to be specified[192.168.1.xx] id=91367821
2019-07-08 07:47:15 [Mi-Connector] error: DB is disconnected >> Error: Access denied for user ‘root’@‘127.0.0.1’ (using password: YES)
2019-07-08 07:47:15 [Mi-Connector] warn: Finded >> But Mi-Connector can’t get token from this device!!! id(152603061)
2019-07-08 07:47:15 [Mi-Connector] warn: Finded >> But Mi-Connector can’t get token from this device!!! id(91367821)
2019-07-08 07:47:15 [Mi-Connector] info: Error: Could not connect to device, token needs to be specified[192.168.1.Air] id=77770020
2019-07-08 07:47:15 [Mi-Connector] warn: Finded >> But Mi-Connector can’t get token from this device!!! id(77770020)
2019-07-08 07:47:32 [Mi-Connector] warn: Find Device Manually but nothing token!!! >> 152603061
2019-07-08 07:47:32 [Mi-Connector] warn: Find Device Manually but nothing token!!! >> 91367821
2019-07-08 07:47:32 [Mi-Connector] warn: Find Device Manually but nothing token!!! >> 77770020
2019-07-08 07:47:56 [Mi-Connector] info: Save Config >> {“st”:{“app_url”:"",“app_id”:"",“access_token”:""},“connector”:{“port”:30000,“websocketPort”:30001,“address”:""},“xiaomi”:{“find_limit_time”:“30000”,“motion_reset_time”:“4900”,“find_mode”:“auto”},“devices”:{“list”:[{“ip”:“192.168.1.Air”,“token”:“53b011cfd3ca7a87c86719ff4fc0698c”}]},“db”:{“host”:“localhost”,“port”:“3306”,“password”:“password”},“graph”:{“height”:40},“log”:{“enable”:true},“ble”:{“enable”:false,“flora”:{“pollingTime”:60},“temperature”:{“pollingTime”:60}},“ir”:{},“ping”:{“list”:},“user”:{“name”:“admin”,“password”:“12345”},“token”:{“value”:“cb05decfbf040f460355dd865167306a347c3300d3f54b4639b0282f59922d7afa609ad6861881b4a41502490bb9d885”,“enable”:false}}
2019-07-08 07:47:56 [Mi-Connector] info: Initialize Wi-Fi Device >> Ip(192.168.1.Air), Token(I have hidden), Type(unknown)
2019-07-08 07:47:56 [Mi-Connector] info: Initialize Wi-Fi Device >> Ip(192.168.1.Air), Token(I have hidden), Type(zhimi.airpurifier.mc1)

Sorry, I had the ST app server address set to 3306, when I changed to 30000, the device showed up! Thanks so much!!!

Hi

For some reasons I cant add my air purifier but as it detected it to be as a not initialized device as shown in the first picture.

When I try to search for the device to add it its looks like it cant find all the needed data. Does anyone know how to fix this?

Take a token from your mihome app first.

How is this done? I cant find anywhere where token is listed.
I have tried to look into the log files and it is not shown in the app (5.5.37)

@fison67 Can you please add ‘actuator’ and ‘sensor’ capabilities to your device handlers? That way, they will show up in WebCoRE properly. Thanks!

1 Like

btw, xiaomi cameras aren’t supported right?

I heard about that issue.

Would you add a capabilities actuator manually?

There is no plan to support camera.
Can not get video data from it.

I can add it myself, but according to best practices you should really add it to all your device handlers.

I got one step forward and got the Token but now I am stuck again when I try to register the device

2019-07-10_18-45-57

The token is the same as the one I extracted from the log file

2019-07-10_18-47-35

When I try to select the found device I just get this red cross when I move the mouse to the line

2019-07-12_00-16-36

Is there no support for the airpurifier?
2019-07-11 10:47:23 [Mi-Connector] warn: Warning >> Non Support zhimi.airpurifier.v7

Thank you! I did what you say, but still no data in any of my flora devices ;-(

2019-07-10 07:02:28 [error]: Notify >> Error!! Error: getaddrinfo ENOTFOUND graph-na04-useast2.api.smartthings.com graph-na04-useast2.api.smartthings.com:443,
Error,
at Request._callback (/usr/src/app/bluetooth/bluetooth.js:279:58),
at self.callback (/usr/src/app/node_modules/request/request.js:186:22),
at Request.emit (events.js:180:13),
at Request.onRequestError (/usr/src/app/node_modules/request/request.js:878:8),
at ClientRequest.emit (events.js:180:13),
at TLSSocket.socketErrorListener (_http_client.js:395:9),
at TLSSocket.emit (events.js:180:13),
at emitErrorNT (internal/streams/destroy.js:64:8),
at process._tickCallback (internal/process/next_tick.js:178:19)

I just noticed another possible issue with the DH. I see events for Mode (cleaning, error, paused, etc) in the IDE. But there is no Mode attribute exposed to WebCoRE. How would I go about checking Mode in WebCoRE?

Install a docker version
fison67/mi-connector:test2 ( Nas )
fison67/mi-connector-arm:test2 ( Raspberry )

I added a attribute mode.
Update a vacuum DTH.

Did you make a container with same network option?

It has already been installed

What is a version?
You can see it on web.
Click the not login on top right