[OBSOLETE] Mi Connector (Xiaomi and Yeelight)

Me?

pi@raspberrypi:~ $ docker -v
Docker version 18.09.0, build 4d60db4

I dont see any version number when I do thislogin

That means you don’t install a test2 version.

If you re-receive a docker image, remove a container and recreate a container.

Thanks for the help :slight_smile: Now I am connected and get all the right status in the device in ST.
However I can’t control the device from ST.

I install the container with the same settings I always did, it doesn’t let me add the 10.0.0.200 network to the container I get Error response from daemon when I try. I change the Mi connector network to 172.17.0.1 and now I can’t login in the app.

I finally delete absolute everything and reinstall it, and now finally all is running smooth, I want to thank you once again for your incredible job, and ask you if you have a paypal account where I can make a contribution for your time. I saw it in the test3 version, but now I’m on test2, and cannot find the donation option. THANK YOU!!!

After this working successfully for a while it stopped working. I finally got around to doing some debugging and figured it out (for myself at least).

It appears the HubCommand HOST field does not like the protocol in it. The app_url passed in the setInfo function in the handlers has http:// (even though in the smartapp I don’t have it). I simply updated the device handlers I wanted to by updated the setInfo “state.app_url” to: state.app_url = app_url.replaceAll("^https?://", "")

Not sure if this is a firmware change on ST’s end or something that happened on my end but I’m putting this here in case anyone else is having issues and wants to try it.

Set a right IP address on smartapp.
ex) 192.168.0.100:30000

If you have entered the wrong address, erase all of the devices and proceed again.

This is my paypal.
https://paypal.me/fison67

Thank you.

You have to set a IP on a smartapp like below.

ex) 192.168.0.100:30000
Only ip + port.

That’s exactly what I had set and it was still prepending http:// in the device handler. The smartapp and handlers are all latest from github (aside from my replaceAll change to get it working).

Cuz you set a ip with ‘http://’ first time.
Even if you set an other server address
created device’s data is not updated.

I set the app to manual mode and unregistered it multiple times while testing - along with uninstalling and reinstalling all device handlers and the smartapp while troubleshooting. Then when I added the smartapp back I definitely didn’t use http://. Oh well, SmartThings must cache things weird. Wouldn’t it be more logical to just update the smartapp to ignore those though? Like I did with my device handler?

Thanks fison67! I’m going to develop a connector for 3rd party cloud with SmartThings. And i have some questions and hope you can help me:

  1. What is the prerequirement for this connector (3rd party such as Xiaomi platfroms’ clientID, PWS, authorization token and it’s API or not?
  2. Your developped this Mi-connector, what about the development cycle? or step by step , approximately how much development time is required per step?

In the clasic ST app I can see all the right data on my air purifier but I cant control it and it doesnt make any graphs. When I use the new ST app and open the device I get an net or server error

Hello everyone! I’m new to this forum but I defenetli need some help. I’v done everything as instruction told on GitHub page but I cannot get any device discovered. Miio tool also has a problem discovering my devices. I really need some help from you! ST hub v3 + Synology NAS (custom HW) + Xiaomi. Router Google WiFi. Docker runs ‘latest’ build.

I would gladly buy fison67 a cup of coffee for an explanation of 4 and 5 below. I’m trying out the LG one and step 4 I’m not sure what App URL to use (I get the ID and Token I believe from the SmartApp ). Also, step 5 just redirects (when it redirects at all it mysteriously stopped redirecting) to a Korea site I cannot read.

1. Open LG Connector web settings page (http://X.X.X.X:30020/settings)
2. Default Login ID & Password is [ admin / 12345 ]
3. Select a System IP Address. & Press a Save button.
4. Open a LG Connector of Smartapp. Fill in the blanks. Press Save button.
5. Go to the Smartthinq tab of web setting page & Press a Get Token button. 
   You can see a new window.
   Login by your lg account. When you success a login, Copy an url of brower and paste it to box of Refresh Token.

OK. I will modify it.
Thanks.

  1. Mi connector use a miio library. (Not official API).
  2. I think it took about a week to make the 0.0.1 version.
    I didn’t have much else to do.