[OBSOLETE] Mi Connector (Xiaomi and Yeelight)

Where do I find the token ?

Menu -> Manage Device -> Search

Thanks @fison67 but only my lightstrip is detected, not my color bulb

These are not supported auto token.

  • Yeelight Desk Lamp
  • Yeelight Color Bulb
  • Yeelight White Bulb
  • Yeelight LED Strip
  • Mi Robot Vacuum

You have to add manually that devices on the Menu [ Device List ]

If you can’t find token on the search page…
Use python miio.

or

Thanks… actuakky my led strip was supported !

I installed the Ubuntu container and used the command in your README

docker run -d --restart=always -v /docker/mi-connector:/config --name=mi-connector-arm --net=host fison67/mi-connector:0.0.1

Would you tell me more detailed your status?

Web management does not work?
Web is not showed on your browser?
Did you connect this address ‘http://ubuntuIP:30000’?
or No devices on searching?

Correct, I cannot connect to the (Ubuntu) Docker container that’s supposed to be running on port 30000. I’ve tried via web browser, and via the SmartApp.

Check your docker container…
docker ps -a
This shows what you have container.

Is there a same docker container ‘mi-connector’?
What if it does, delete ‘mi connector’ container.
docker rm [id]


This command is to start docker image manually.
docker run -it -v /docker/mi-connector:/config --net=host fison67/mi-connector:0.0.1 bash
and then ‘npm start’
You can see the full log.

This is what I get:

root@linuxkit-00155d010209:/usr/src/app# npm start

> mi-connector@0.0.1 start /usr/src/app
> node ./bin/www

{ st: { app_url: '', app_id: '', access_token: '' },
  connector: { port: 30000, websocketPort: 30001 },
  xiaomi:
   { find_limit_time: '30000',
     motion_reset_time: '4900',
     find_mode: 'auto' },
  devices: { list: [] } }
info: ---------------------------------- {"label":"Mi-Connector","timestamp":"2018-03-26T15:26:51.768Z"}
info: Initialize >> Auto Detect Device! {"label":"Mi-Connector","timestamp":"2018-03-26T15:26:51.783Z"}
info: ---------------------------------- {"label":"Mi-Connector","timestamp":"2018-03-26T15:26:51.784Z"}

edit: BTW, I did a ‘docker stop CONTAINER’, instead of rm, before running it manually.

Let me know content when you open web browser.

404 error? Or other error?

I get no reply at all, even via telnet.

C:\Users\Administrator>telnet localhost 30000
Connecting To localhost…Could not open connection to the host, on port 30000: Connect failed

I don’t know why…

or change port number to 33000 from 30000 in config.json.

thanks!
i just found that i had V3 gateway. still no luck putting it into ST. (I have the dev mode enabled in mi app)
do I need to do something with the code listed below when i enabled the dev mode?

You can see gateway v3 on the dashboard with token?

Hi fison67,

i was able to add the gateway v3 into the app and see things connected to it in the web page, however the gateway v3 is not showing in ST app.
any ideas? I have added your DHT

Would you show me st live logging in Mi connector tab.
Fisrt reatart docker container.

There is any model requirement for raspberry version? mine is raspberry 2 model b and is always in loop restart. in docker ps -a I see most of time restarting (129) and some second as up.

Did you install a fison67/mi-connector-arm:0.0.1?

You can see the detailed log.
Let me know that.

docker run -it -v /docker/mi-connector:/config --net=host fison67/mi-connector-arm:0.0.1 bash
npm start

I checked too the /docker/mi-connector folder and no files are created there in any phase.

I am using the mi-connector-arm:0.0.1 version

I have the same error that appear in docker logs “Segmentation fault (core dumped)”.
I checked too the /docker/mi-connector folder and no files are created there in any phase.

pi@hassbian:/docker/mi-connector $ docker run -it -v /docker/mi-connector:/config --net=host fison67/mi-connector-arm:0.0.1 bash
root@hassbian:/usr/src/app# npm start
Segmentation fault (core dumped)