Mi Connector (Xiaomi and Yeelight)

This is the log from within the ST hub.
So it looks like the hub is trying to send to the docker container

f5d43371-55a3-4ff0-8feb-b781d80322c9 10:07:37 AM: debug setModeStrong >> 132553458

f5d43371-55a3-4ff0-8feb-b781d80322c9 10:07:25 AM: debug relativeHumidity : 63

f5d43371-55a3-4ff0-8feb-b781d80322c9 10:07:10 AM: debug favoriteLevel : 7

f5d43371-55a3-4ff0-8feb-b781d80322c9 10:07:05 AM: debug mode : favorite

f5d43371-55a3-4ff0-8feb-b781d80322c9 10:06:41 AM: debug Off >> 132553458

f5d43371-55a3-4ff0-8feb-b781d80322c9 10:06:34 AM: debug setDim >> 132553458

f5d43371-55a3-4ff0-8feb-b781d80322c9 10:06:10 AM: debug setModeAuto >> 132553458

f5d43371-55a3-4ff0-8feb-b781d80322c9 10:04:45 AM: debug relativeHumidity : 62

So the SmarthinQ iOS app doesn’t appear to have this issue. No lag with that. You would think this App uses the same backend the Docker code is using? I now just get nothing – no messages. Its like the Smartthing side just went silent. Its not that the updates don’t come in every minute into Smartthings – but my device in Smartthings still says on and this is the latest log message. I think the DTH is the issue.
7:48:29 AM: 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”}

You have to know that LG Connector use non official API.
And LG engineers noticed the use of non official api recently.
They want people to not use it.

That’s why I limit 1 min polling time from 3 second.

Like your word official app is not appeared this issue. It’s a matter of course.

You don’t have to use lg thinq app with LG Connector.
If you don’t LG server send same data without not updating.

And take a look log of docker container. There might be occurred error.

And Washer & Dryer doesn’t send status every minute if they power is off.

I just tried to stop and start (not restart) the Docker container and it now just turned the device in Smarthings off. I put debug statements in the DTH. The events do not change unless I stop and start the container (re-start doesnt change anything). I use Synology NAS.

Something is not right

I updated a LG connector.
Re download a docker image.
Current version is a 0.0.3.11
42

Thank you. This corrected the on/off. I tested on/off and Smartthings received and updated properly. However, I then tested running the dryer and its not reflecting and there is an exception in the log:

1:54:25 PM: error java.lang.NullPointerException: Cannot get property ‘str’ on null object @line 188 (setStatus)

4295c53c-8c2e-4f1e-a7c8-0b49e1ff1c6d 1:54:25 PM: debug Update >> total >> {“State”:{“value”:50,“rValue”:"@WM_STATE_DRYING_W",“sValue”:“Drying”},“Remain_Time_H”:{“value”:0,“rValue”:0},“Remain_Time_M”:{“value”:59,“rValue”:59},“Initial_Time_H”:{“value”:1,“rValue”:1},“Initial_Time_M”:{“value”:3,“rValue”:3},“Course”:{“value”:3,“rValue”:3},“Error”:{“value”:0,“rValue”:0},“DryLevel”:{“value”:3,“rValue”:"@WM_DRY27_DRY_LEVEL_NORMAL_W"},“TempControl”:{“value”:3,“rValue”:"@WM_DRY27_TEMP_MEDIUM_W"},“TimeDry”:{“value”:0,“rValue”:"-"},“MoreLessTime”:{“value”:0,“rValue”:0},“Option1”:{“value”:0,“rValue”:0},“Option2”:{“value”:170,“rValue”:170},“PreState”:{“value”:1,“rValue”:"@WM_STATE_INITIAL_W",“sValue”:“Standby”},“SmartCourse”:{“value”:0,“rValue”:0},“LoadItem”:{“value”:0,“rValue”:“0”},“CurrentDownloadCourse”:{“value”:100,“rValue”:100},“power”:“on”}

So I removed the Smartapp and Device from Smartthings in an attempt to see if this was the issue. For some reason (maybe I never noticed this) but when I add the app back in it overwrites the AppID and AppToken. I tried ‘Adding a thing’ with these overwritten values and then put back in my own OATH ones – but it will not Find my device any longer :frowning:

Add a this line on dth.
@Field
STATE_VALUE = [

50: [val: “@ WM_STATE_DRYING_W”, str: [“EN”:“Drying”, “KR”:“건조중”] ], <------------- THIS

]

Here is the latest exception
4:24:01 PM: error java.lang.NullPointerException: Cannot get property ‘str’ on null object @line 189 (setStatus)

987d1d7d-2145-4ac9-b5b6-6666f84a34f8 4:24:01 PM: debug Update >> total >> {“State”:{“value”:51,“rValue”:"@WM_STATE_COOLING_W",“sValue”:“Cooling”},“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”:38,“rValue”:38},“Course”:{“value”:1,“rValue”:1},“Error”:{“value”:0,“rValue”:0},“DryLevel”:{“value”:3,“rValue”:"@WM_DRY27_DRY_LEVEL_NORMAL_W"},“TempControl”:{“value”:5,“rValue”:"@WM_DRY27_TEMP_HIGH_W"},“TimeDry”:{“value”:0,“rValue”:"-"},“MoreLessTime”:{“value”:0,“rValue”:0},“Option1”:{“value”:0,“rValue”:0},“Option2”:{“value”:168,“rValue”:168},“PreState”:{“value”:50,“rValue”:"@WM_STATE_DRYING_W",“sValue”:“Drying”},“SmartCourse”:{“value”:0,“rValue”:0},“LoadItem”:{“value”:0,“rValue”:“0”},“CurrentDownloadCourse”:{“value”:100,“rValue”:100},“power”:“on”}

I added this:

51: [val: “@WM_STATE_COOLING_W”, str: [“EN”:“Cooling”, “KR”:“건조중”] ],

I am still having the events issue even with 0.0.3.11 over time though. Eventually, the events go static and do not change regardless of actually what happens with the Dryer. I see errors in the Docker log:

2019-08-12 06:46:53 [LG-Connector] error: [object Object]
2019-08-12 06:46:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:46:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:47:53 [LG-Connector] error: [object Object]
2019-08-12 06:47:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:47:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:48:53 [LG-Connector] error: [object Object]
2019-08-12 06:48:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:48:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:49:53 [LG-Connector] error: [object Object]
2019-08-12 06:49:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:49:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:50:53 [LG-Connector] error: [object Object]
2019-08-12 06:50:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:50:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:51:53 [LG-Connector] error: [object Object]
2019-08-12 06:51:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:51:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:52:53 [LG-Connector] error: [object Object]
2019-08-12 06:52:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:52:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:53:53 [LG-Connector] error: [object Object]
2019-08-12 06:53:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:53:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:54:53 [LG-Connector] error: [object Object]
2019-08-12 06:54:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:54:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:55:53 [LG-Connector] error: [object Object]
2019-08-12 06:55:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:55:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:56:53 [LG-Connector] error: [object Object]
2019-08-12 06:56:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:56:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:57:53 [LG-Connector] error: [object Object]
2019-08-12 06:57:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:57:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:58:53 [LG-Connector] error: [object Object]
2019-08-12 06:58:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:58:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 06:59:53 [LG-Connector] error: [object Object]
2019-08-12 06:59:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 06:59:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 07:00:53 [LG-Connector] error: [object Object]
2019-08-12 07:00:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 07:00:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 07:01:53 [LG-Connector] error: [object Object]
2019-08-12 07:01:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 07:01:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 07:02:53 [LG-Connector] error: [object Object]
2019-08-12 07:02:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 07:02:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 07:03:53 [LG-Connector] error: [object Object]
2019-08-12 07:03:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 07:03:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 07:04:53 [LG-Connector] error: [object Object]
2019-08-12 07:04:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 07:04:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 07:05:53 [LG-Connector] error: [object Object]
2019-08-12 07:05:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 07:05:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 07:06:53 [LG-Connector] error: [object Object]
2019-08-12 07:06:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 07:06:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}
2019-08-12 07:07:53 [LG-Connector] error: [object Object]
2019-08-12 07:07:53 [LG-Connector] info: Refresh a sesion…
2019-08-12 07:07:54 [LG-Connector] error: {“code”:9003,“msg”:“세션생성실패”}

(I will gladly buy you another cup of coffee if you please fix this :))

Hi Chals
I can’t found the DTH for Xiaomi AC Partner ( lumi.acpartner.v3).
Regards

I have my DHT setup, my smartapp with app url and client secret etc as well as mi connector configured.

I can see my Xiaomi devices in Smartthings but i can’t return their states nor can i interact with them.

Any ideas?

Hello @fison67 I was trying to add the S6 vacuum assuming it would be compatible. Turns out that it’s not, will you make it compatible?

code 9003 means that ‘Failed to make a session’.
Does the error still occur after an hour?

I’m gonna fix that.

But if you fix it temporarily you just restart a docker

It’s a Xiaomi Gateway2.

What’s the exact name of the model?
ex) rockrobo.vacuum.v1

Did you set a right address with port? ex) 192.168.0.100:30000
If you set a wrong address before, remove all xiaomi devices first and then restart a docker.
Nas or raspberry and hub has to be in same network.

If all devices can’t get a current status, it looks like a gateway issue.

Roborock.vacuum.s6

Thanks Chris for the answer. I’ve used already and it’s not quiet properly work. It’s has not mode select (cool, heat, dry, etc), and when I change the temperature Its turn on/off the AC.
I’ll send you some screen capture



Regards
P.

Once the 9003 error starts it does not go away. I figured out restarting the container does clear it up – but it happens pretty soon there after and it just never goes away once it starts. :frowning:

@fison67 roborock.vacuum.s6

© 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.