[OBSOLETE] Mi Connector (Xiaomi and Yeelight)

If some devices can’t be found, you have to register manually.

Hi.
Smartapp. Set a server address.

Receive a 0.0.3 docker image version.
Set a country & langauge on setting page. Then restart a docker.
If you set a us country & language maybe you see a us login page.
1

6

See a mi connector log when you control device.
If there is no control log, hub & docker can’t communicate each other.
Mi connector(docker) send a status of devices to st cloud server.
Mi connector(Smartapp) send a control data to docker from hub
Do you have a smartthings hub?

I have no idea what to put in for app_url

Also, for some reason all my browsers stopped launching the login for smarthinq refresh token. I am checking all my settings – security settings – browser settings – so far have not been able to fix this.

Address: Docker installed device

Ok. Revise that. I got the Smarthingq section to work with the new version and also removing the folder under Docker shared folder.

Can you tell me how to go about getting the App Url for the Smarthings section? I understand the Client ID and Client Secret part I believe as this is shown in the smartthings side – but I’m not sure how to get my own URL for my Smartapp.

Took a couple restarts. It all works now. The App Url filled in automagically and I see my Dryer in Smartthings now after installing the Smartapp and finding new devices. Thank you! I bought you a cup of coffee!

Ah my mistake.

If you press a save button on smartapp
that value is filled automatically.
app_url, id, token.
Or you can see that on config of section

Good.
You have to know this.
I set a data polling time 1 minute now. Before it was 3seconds.

A weeks ago Lg engineer contact me and polling data too often causes a server load.
So I just set a 1min.

The data is updating per 1 min now.

Hello everyone! I recently bought the “Xiaomi / Aqara air conditioning gateway”

It is an air conditioning controller and a hub. On github I discovered that someone wrote an integration with “Home Assistant”

GitHub

syssi/xiaomi_airconditioningcompanion

Xiaomi Mi and Aqara Air Conditioning Companion integration for Home Assistant - syssi/xiaomi_airconditioningcompanion

Is there any way that it can be used to write an integration with ST?
Greetings to the whole community.
P.

I’m not sure if its a long lag or if it is an issue…but it almost seems that the only time the status of the Dryer changes is when I restart the Docker container?

Yes - I have a ST hub v2.

This is a snapshot of the latest info in this log and to me it looks like it only receives status from the device when I change the control setting from the original MI app but not when I control the device from ST.

2019-08-07 02:42:18 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:65} >> [65]

2019-08-07 02:42:38 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:64} >> [64]

2019-08-07 02:46:03 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“pm2.5”,“value”:1} >> [1]

2019-08-07 02:48:38 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:63} >> [63]

2019-08-07 02:48:43 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.8,“unit”:“C”}} >> [23.8 C]

2019-08-07 02:51:58 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:64} >> [64]

2019-08-07 02:53:43 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.4,“unit”:“C”}} >> [23.4 C]

2019-08-07 02:54:14 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:65} >> [65]

2019-08-07 02:55:53 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:66} >> [66]

2019-08-07 02:58:43 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.6,“unit”:“C”}} >> [23.6 C]

2019-08-07 03:01:53 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:67} >> [67]

2019-08-07 03:02:53 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:66} >> [66]

2019-08-07 03:03:13 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:67} >> [67]

2019-08-07 03:03:43 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.7,“unit”:“C”}} >> [23.7 C]

2019-08-07 03:06:33 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:68} >> [68]

2019-08-07 03:08:13 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:67} >> [67]

2019-08-07 03:08:44 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.8,“unit”:“C”}} >> [23.8 C]

2019-08-07 03:08:53 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:66} >> [66]

2019-08-07 03:10:34 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:67} >> [67]

2019-08-07 03:11:54 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:68} >> [68]

2019-08-07 03:12:14 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:67} >> [67]

2019-08-07 03:13:14 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:68} >> [68]

2019-08-07 03:13:34 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:67} >> [67]

2019-08-07 03:13:49 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.6,“unit”:“C”}} >> [23.6 C]

2019-08-07 03:13:54 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:68} >> [68]

2019-08-07 03:14:14 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:67} >> [67]

2019-08-07 03:18:49 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.7,“unit”:“C”}} >> [23.7 C]

2019-08-07 03:29:54 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“filterHoursUsed”,“value”:1430} >> [1430]

2019-08-07 03:33:49 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.8,“unit”:“C”}} >> [23.8 C]

2019-08-07 03:41:09 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:68} >> [68]

2019-08-07 03:41:49 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“relativeHumidity”,“value”:67} >> [67]

2019-08-07 03:43:49 [Mi-Connector] info: Notify >> ID(132553458):type(zhimi.airpurifier.v7) state={“key”:“temperature”,“value”:{“value”:23.9,“unit”:“C”}} >> [23.9 C]

So if I change the polling time in the lg-config JSON:
“pollingTime”: 1
to
“pollingTime”: 0
or
“pollingTime”: 0.5

What happens?

I did a test. My device status in Smartthings just doens’t change at all – ever – unless I restart the Docker container :frowning:

Keep a pollingTime 1

Re download a docker image 0.0.3 version.

Thank you. I basically reinstalled it all. Docker side and Smarthings side. After doing that, my test worked. Dryer off and Dryer on was reflected inside Smartthings.

I spoke too soon. Yes, after reinstalling I saw the On event and the Dryer changed to On in Smartthings. Thoughout the day, the Dryer was used. On and off and Cycle Start and Cycle complete. Nothing beyond the initial On event was received in Smartthings and the Dryer still shows as On all day. The last event was 544AM.

Oddly when I look in smartthings log it gets events like this one below but even though the LG Dryer device still shows On in the Smartthing app.
6:04:57 PM: debug Update >> total >> {“State”:{“value”:1,“rValue”:"@WM_STATE_INITIAL_W",“sValue”:“Standby”},“Remain_Time_H”:{“value”:0,“rValue”:0},“Remain_Time_M”:{“value”:1,“rValue”:1},“Initial_Time_H”:{“value”:0,“rValue”:0},“Initial_Time_M”:{“value”:1,“rValue”:1},“Course”:{“value”:0,“rValue”:0},“Error”:{“value”:0,“rValue”:0},“DryLevel”:{“value”:0,“rValue”:"-"},“TempControl”:{“value”:0,“rValue”:"-"},“TimeDry”:{“value”:0,“rValue”:"-"},“MoreLessTime”:{“value”:0,“rValue”:0},“Option1”:{“value”:0,“rValue”:0},“Option2”:{“value”:168,“rValue”:168},“PreState”:{“value”:0,“rValue”:"@WM_STATE_POWER_OFF_W",“sValue”:“Power OFF”},“SmartCourse”:{“value”:0,“rValue”:0},“LoadItem”:{“value”:0,“rValue”:“0”},“CurrentDownloadCourse”:{“value”:100,“rValue”:100},“power”:“on”}

{“value”:1,“rValue”:"@WM_STATE_INITIAL_W",“sValue”:“Standby”} -> Not OFF.
Remain_Time_M”:{“value”:1,“rValue”:1} -> Remains 1 minute.

Nowadays LG server is weird.
Sometimes the status is not updating so long time.

It looks like a not sent packet to docker container.

Cuz when mi connector receive a command packet it print something like this.
Requested to control by ST >> rockrobo.vacuum.v1[{“id”:“234234234”,“cmd”:“clean”}]

Maybe you have to find why st hub can’t send to docker container inside raspberry or Nas.
Seperated network or other reason.