Mi Connector (Xiaomi and Yeelight)

smartapp_misc
dth_sensors
requires_server
smartapp_appliances

(Gregoiredore) #21

Where do I find the token ?


(Chals) #22

Menu -> Manage Device -> Search


(Gregoiredore) #23

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


(Chals) #24

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


(Gregoiredore) #25

Thanks… actuakky my led strip was supported !


(TOO FLY FOR A FLY GUY) #26

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


(Chals) #27

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?


(TOO FLY FOR A FLY GUY) #28

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.


(Chals) #29

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.


(TOO FLY FOR A FLY GUY) #30

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.


(Chals) #31

Let me know content when you open web browser.

404 error? Or other error?


(TOO FLY FOR A FLY GUY) #32

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


(Chals) #33

I don’t know why…

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


(Ds4213) #34

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?


(Chals) #35

You can see gateway v3 on the dashboard with token?


(Ds4213) #39

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


(Chals) #40

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


(Tiago Gonçalves) #41

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.


(Chals) #42

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


(Tiago Gonçalves) #43

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)