Mi Connector (Xiaomi and Yeelight)

How can i get the e-ink clock to add to smartthings?

I can see it on the WebGui, but i can’t find the device handler.

Hi all,

I’ve been asked around for a way to run the Mi-connector on Windows-but on Linux Docker mod (now that Docker is supporting it) since I’ve got 0 knowledge of how to do it I’ve ordered a Fiverr gig and the guy created a .yml file that will eventually run Mi-connector on Windows, I must say that I wasn’t be able to control my stuff with it but I guess that I’m doing something wrong.

with the approval of Fison67, here’s the code for the .yml file.

In notepad just create a new file and name it docker-compose and then change the extension to .yml
than run with windows power-shell from the same folder (location) of the docker-compose.yml this command: docker-compose up -d

here’s the code for the docker-compose.yml file:

version: ‘3’
services:
generic:
image: fison67/mi-connector:latest
restart: always
ports:
- “30000:30000”
volumes:
- ./mi-connector:/config
networks:
- host

mysql:
container_name: “mysql”
image: mysql:5.6
restart: always
volumes:
- db_data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: password1234
ports:
- “33006:3306”
networks:
- host

networks:
host:
volumes:
db_data:

Hope that someone will be able to give feedback if it’s working or not.

Xiaomi Bluetooth Weather ( E-Ink )

Hi,
Which device handler should I use for xiaomi mijia smart downlight?
they’re WIFI…

Here’s the product link:

Thanks!

can’t see that DH on the Git Rep :frowning:

Hi Rxich,

Care to share how did you configured the Mi Connector web app for Hubitat?
I am struggling with the “Smartthings Settings” configuration on the Mi Connector web app… not sure how I can obtain the appid or Access Token in Hubitat? Or if this is even necessary of not. Any help will be appreciated!

I pressed the config menu on the Hubitat smartapp, and I got:
http://192.xx.xx.xx/apps/api/737/config?access_token=null

access_token=null? what Access Token should I config in the Mi Connector web app? I tried setting Access Token to null, but no luck. “FAIL”

Any help will be highly appreciated!!

Hi fison67,

New install mi-connecter is in Synology.
It is able to scan Xiaomi Flora and E-Ink Digital Clock but unable to scan Xiaomi Temperature & Humidity Sensor. What I can do? Please advise.
Using mi-connector test2.

Use a xiaomi-bluetooth-weather

Enable a oauth on smartapp

I don’t know well.
Install a latest or 0.0.4 version.
Then let me know current logs.

Both versions didn’t work.

latest.csv

mi-connector
date stream content
31-10-19 1:27 stdout

31-10-19 1:27 stdout 2019-10-31 01:27:58 [info]: Notify >> ID(c47c8d6a11ed):type(unknown) state={\key:“fertility” value:“176.70000000000002”} >> [176.70000000000002]
"
2019-10-31 01:26:36,stdout,2019-10-31 01:26:36 [info]: Bluetooth :: Discovered ble.einktemperature @ 3f:59:c8:71:ac:cb

2019-10-31 01:26:33,stdout,2019-10-31 01:26:33 [info]: Bluetooth :: Discovered unknown @ c4:7c:8d:6a:11:ed

2019-10-31 01:26:33,stdout,2019-10-31 01:26:33 [info]: Bluetooth :: Discovery started

2019-10-31 01:26:33,stdout,2019-10-31 01:26:33 [info]: Bluetooth :: scan start

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Initialize Wi-Fi Device >> Ip(192.168.1.80)" Token(2d6f9dc352fd9e27a336bfe0f76d6be4) Type(chuangmi.ir.v2)
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Finded >> WiFi:chuangmi.ir.v2 Addrress=192.168.1.80 ID=108696245" Token=2d6f9dc352fd9e27a336bfe0f76d6be4
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(88312224)

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(259292643)

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.83] id=88312224
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(113328163)

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.86] id=259292643
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: DB is connected

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Bluetooth :: Adapter changed to to poweredOn

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Try to connect DB…

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(119451657)

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(260489337)

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.84] id=119451657
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.85] id=260489337
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.82] id=113328163
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Bluetooth :: initialize…

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: ----------------------------------

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Initialize >> Auto Detect Device!

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: ----------------------------------

2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: DB Config >> {"“host”":"“localhost”"" “port”:“3306” “user”:“root” “password”:“password1234” “database”:“mi_connector”}
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: Save Config >> {"“st”":{"“app_url”":"“https://graph-eu01-euwest1.api.smartthings.com:443/api/smartapps/installations/”"" “app_id”:“92bc4d84-e239-4364-b5da-83cc013cee73” “access_token”:“717ceb5c-018f-4258-98a2-f5f73b4e5cd7”} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:26:32,stdout,2019-10-31 01:26:32 [info]: {"“st”":{"“app_url”":"“https://graph-eu01-euwest1.api.smartthings.com:443/api/smartapps/installations/”"" “app_id”:“92bc4d84-e239-4364-b5da-83cc013cee73” “access_token”:“717ceb5c-018f-4258-98a2-f5f73b4e5cd7”} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:26:31,stdout,2019-10-31 01:26:31 [info]: ********************************

2019-10-31 01:26:31,stdout,2019-10-31 01:26:31 [info]: Mi Connector Version: 0.0.4.22

2019-10-31 01:26:31,stdout,2019-10-31 01:26:31 [info]: ********************************

2019-10-31 01:26:31,stdout,2019-10-31 01:26:31 [info]: Initiallize Ping Processor

2019-10-31 01:26:31,stdout,2019-10-31 01:26:31 [info]: WebSocket init

2019-10-31 01:26:29,stdout,

2019-10-31 01:26:29,stdout,> node ./bin/www

2019-10-31 01:26:29,stdout,> mi-connector@0.0.4 start /usr/src/app

2019-10-31 01:26:29,stdout,

2019-10-31 01:26:09,stdout,2019-10-31 01:26:09 [info]: Save Config >> {"“st”":{"“app_url”":"“https://graph-eu01-euwest1.api.smartthings.com:443/api/smartapps/installations/”"" “app_id”:“92bc4d84-e239-4364-b5da-83cc013cee73” “access_token”:“717ceb5c-018f-4258-98a2-f5f73b4e5cd7”} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:25:16,stdout,2019-10-31 01:25:16 [info]: Save Config >> {"“st”":{"“app_url”":"“https://graph-eu01-euwest1.api.smartthings.com:443/api/smartapps/installations/”"" “app_id”:“92bc4d84-e239-4364-b5da-83cc013cee73” “access_token”:“717ceb5c-018f-4258-98a2-f5f73b4e5cd7”} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:25:10,stdout,2019-10-31 01:25:10 [info]: DB is connected

2019-10-31 01:25:10,stdout,2019-10-31 01:25:10 [info]: DB is connected

2019-10-31 01:25:10,stdout,2019-10-31 01:25:10 [info]: Try to connect DB…

2019-10-31 01:25:10,stdout,2019-10-31 01:25:10 [info]: DB Config >> {"“host”":"“localhost”"" “port”:“3306” “user”:“root” “password”:“password1234” “database”:“mi_connector”}
"
2019-10-31 01:25:10,stdout,2019-10-31 01:25:10 [info]: Save Config >> {"“st”":{"“app_url”":"“https://graph-eu01-euwest1.api.smartthings.com:443/api/smartapps/installations/”"" “app_id”:“92bc4d84-e239-4364-b5da-83cc013cee73” “access_token”:“717ceb5c-018f-4258-98a2-f5f73b4e5cd7”} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:25:06,stdout,2019-10-31 01:25:06 [info]: Save Config >> {"“st”":{"“app_url”":"“https://graph-eu01-euwest1.api.smartthings.com:443/api/smartapps/installations/”"" “app_id”:“92bc4d84-e239-4364-b5da-83cc013cee73” “access_token”:“717ceb5c-018f-4258-98a2-f5f73b4e5cd7”} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:24:56,stdout,2019-10-31 01:24:56 [info]: Set Token Enable/Disable Settings. >> false

2019-10-31 01:24:56,stdout,2019-10-31 01:24:56 [info]: Save Config >> {"“st”":{"“app_url”":""""" “app_id”:"" “access_token”:""} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:24:53,stdout,2019-10-31 01:24:53 [info]: Save Config >> {"“st”":{"“app_url”":""""" “app_id”:"" “access_token”:""} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(259292643)

2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [info]: Initialize Wi-Fi Device >> Ip(192.168.1.80)" Token(2d6f9dc352fd9e27a336bfe0f76d6be4) Type(chuangmi.ir.v2)
"
2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [info]: Finded >> WiFi:chuangmi.ir.v2 Addrress=192.168.1.80 ID=108696245" Token=2d6f9dc352fd9e27a336bfe0f76d6be4
"
2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(113328163)

2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(88312224)

2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.86] id=259292643
"
2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.83] id=88312224
"
2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [error]: DB is disconnected >> Error: Access denied for user ‘root’@‘127.0.0.1’ (using password: YES)

2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(260489337)

2019-10-31 01:24:21,stdout,2019-10-31 01:24:21 [warn]: Finded >> But Mi-Connector can’t get token from this device!!! id(119451657)

2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.82] id=113328163
"
2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.85] id=260489337
"
2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: Error: Could not connect to device" token needs to be specified[192.168.1.84] id=119451657
"
2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: Save Config >> {"“st”":{"“app_url”":""""" “app_id”:"" “access_token”:""} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: Init ESP32 Bridge.

2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: ----------------------------------

2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: Initialize >> Auto Detect Device!

2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: ----------------------------------

2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: DB Config >> {"“host”":"“localhost”"" “port”:3306 “user”:“root” “password”:“password” “database”:“mi_connector”}
"
2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: Save Config >> {"“st”":{"“app_url”":""""" “app_id”:"" “access_token”:""} “connector”:{“port”:30000 “websocketPort”:30001 “address”:""}
"
2019-10-31 01:24:20,stdout,2019-10-31 01:24:20 [info]: {"“st”":{"“app_url”":""""" “app_id”:"" “access_token”:""} “connector”:{“port”:30000 “websocketPort”:30001} “xiaomi”:{“find_limit_time”:“30000”

"

Hi @fison67,

First off, thank you so much for creating this connector. I’ve tried installing it on both a raspberry pi and a Linux machine and it worked on each, but in both cases I noticed a long delay. Right now I have it running on a pi3 and it’s connecting my lumi.v3 gateway to Smartthings, but when I trigger motion or open/close on my sensors, it takes ~5 seconds for SmartThings to see it. Just wondering if that’s expected, and if not do you have any suggestions to make the delay shorter?

Thank you!

Did you turn on Bluetooth Enable button?

Hi.

It’s strange to take more than a second.
Or it is just a UI refresh delay.

See a smartthings ide logs if you want to a know exactly.

You are using a new smartthings app?

Yes. I can view 3 bluetooth devices in Dashboard

But get Xiaomi Flora update only.

unknown
ble.einktemperature
ble.mitemperature

I don’t know well.

3f:59:c8:71:ac:cb -> E-Ink
c4:7c:8d:6a:11:ed -> Flora?

Let me know log again after restart a container and do nothing.

I have a rasberry pi with hassio installed. Will the dockers work in the hassio? Or do i need to install raspbian for it work?
thanks

© 2019 SmartThings, Inc. All Rights Reserved. Terms of Use | Privacy Policy

SmartThings; SmartApps®; Physical Graph; Hello, Home; and Hello, Smart Home are all trademarks of the SmartThings, Inc.