homebridge-miot icon indicating copy to clipboard operation
homebridge-miot copied to clipboard

Why I get this message?

Open Mitsosxat opened this issue 3 years ago • 56 comments

CEFF5448-D5D5-405B-8ADB-F952DB696A0F

is this normal? Or am I doing something wrong?

Mitsosxat avatar Feb 09 '22 10:02 Mitsosxat

Does the device still work in HomeKit? If yes you would need to provide a debug log so I can have a look at what might be the cause.

merdok avatar Feb 09 '22 11:02 merdok

[09/02/2022, 15:55:45] [miot] [Cleaner] (Protocol) 192.168.68.105 <- !1 �A�hx�p�����,S�{�^ [09/02/2022, 15:55:45] [miot] [Cleaner] (Protocol) 192.168.68.105 <- Reached maximum number of retries, giving up get_properties - [{"did":"428491177","siid":2,"piid":1},{"did":"428491177","siid":2,"piid":19},{"did":"428491177","siid":2,"piid":2},{"did":"428491177","siid":3,"piid":1},{"did":"428491177","siid":4,"piid":11},{"did":"428491177","siid":4,"piid":10},{"did":"428491177","siid":4,"piid":9},{"did":"428491177","siid":4,"piid":8},{"did":"428491177","siid":4,"piid":13},{"did":"428491177","siid":4,"piid":12},{"did":"428491177","siid":4,"piid":26},{"did":"428491177","siid":4,"piid":27}] [09/02/2022, 15:55:45] [miot] [Cleaner] Poll failed 1 times! [09/02/2022, 15:55:45] [miot] [Cleaner] Poll failed! Error: Error: Call to device timed out [09/02/2022, 15:55:46] [miot] [Cleaner] (Protocol) 192.168.68.105 -> Handshake reply [09/02/2022, 15:55:46] [miot] [Cleaner] (Protocol) 192.168.68.105 <- (-1) {"method":"get_properties","params":[{"did":"428491177","siid":2,"piid":1},{"did":"428491177","siid":2,"piid":19},{"did":"428491177","siid":2,"piid":2},{"did":"428491177","siid":3,"piid":1},{"did":"428491177","siid":4,"piid":11},{"did":"428491177","siid":4,"piid":10},{"did":"428491177","siid":4,"piid":9},{"did":"428491177","siid":4,"piid":8},{"did":"428491177","siid":4,"piid":13},{"did":"428491177","siid":4,"piid":12},{"did":"428491177","siid":4,"piid":26},{"did":"428491177","siid":4,"piid":27}],"id":2527}

i think this is what you need

Mitsosxat avatar Feb 09 '22 13:02 Mitsosxat

Seems like your device requires a micloud connection. You need to specify your micloud credentials in the config.json and set the forceMiCloud flag to true on the device.

merdok avatar Feb 09 '22 14:02 merdok

what if country is not in the list. i live in greece so in xiaomi app the region is Greece

Mitsosxat avatar Feb 09 '22 14:02 Mitsosxat

I think Greece would be assigned to "de" servers.

merdok avatar Feb 09 '22 14:02 merdok

[09/02/2022, 16:35:51] [miot] [Cleaner] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: FetchError: network timeout at: https://de.api.io.mi.com/app/miotspec/prop/get

Mitsosxat avatar Feb 09 '22 14:02 Mitsosxat

[09/02/2022, 16:36:31] [miot] [Cleaner] Device found: viomi.vacuum.v19 [09/02/2022, 16:36:31] [miot] [Cleaner] Setting up miot device! [09/02/2022, 16:36:31] [miot] [Cleaner] Device requires MiCloud! Trying to connect! [09/02/2022, 16:36:32] [miot] [Cleaner] Successfully connected to MiCloud! [09/02/2022, 16:36:32] [miot] [Cleaner] Device setup finished! Miot device ready! [09/02/2022, 16:36:32] [miot] [Cleaner] [Miot Device] Connected to device: viomi.vacuum.v19 [09/02/2022, 16:36:32] [miot] [Cleaner] Doing initial property fetch. [09/02/2022, 16:36:33] [miot] [Cleaner] Main brush left time: 334 hours. [09/02/2022, 16:36:33] [miot] [Cleaner] Main brush life level: 92%. [09/02/2022, 16:36:33] [miot] [Cleaner] Side brush left time: 154 hours. [09/02/2022, 16:36:33] [miot] [Cleaner] Side brush life level: 85%. [09/02/2022, 16:36:33] [miot] [Cleaner] Filter life level: 85%. [09/02/2022, 16:36:33] [miot] [Cleaner] Starting property polling. [09/02/2022, 16:37:18] [miot] [Cleaner] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: FetchError: network timeout at: https://de.api.io.mi.com/app/miotspec/prop/get

Mitsosxat avatar Feb 09 '22 14:02 Mitsosxat

I mean then you should find out on what server your device is. You can use homebridge ui for that, under the plugin settings there is a "Discover" button which will connect to the cloud and get all devices and also list the sever where your device is located.

merdok avatar Feb 09 '22 14:02 merdok

i did it and is indeed de server. After 2 loops of the log i sent you i stop getting this message [09/02/2022, 16:35:02] [miot] [Cleaner] Successfully created a RobotCleaner device! It is a Viomi Robot Vacuum SE. [09/02/2022, 16:35:02] [miot] [Cleaner] Initializing accessory! [09/02/2022, 16:35:02] [miot] [Cleaner] Accessory successfully initialized! [09/02/2022, 16:35:02] [miot] [Cleaner] Registering 1 accessories! [09/02/2022, 16:35:02] [miot] [Cleaner] Everything looks good! Initiating property polling! [09/02/2022, 16:35:02] [miot] [Cleaner] Device found: viomi.vacuum.v19 [09/02/2022, 16:35:02] [miot] [Cleaner] Setting up miot device! [09/02/2022, 16:35:02] [miot] [Cleaner] Device requires MiCloud! Trying to connect! [09/02/2022, 16:35:05] [miot] [Cleaner] Successfully connected to MiCloud! [09/02/2022, 16:35:05] [miot] [Cleaner] Getting device info from MiCloud! [09/02/2022, 16:35:05] [miot] [Cleaner] Device setup finished! Miot device ready! [09/02/2022, 16:35:05] [miot] [Cleaner] [Miot Device] Connected to device: viomi.vacuum.v19 [09/02/2022, 16:35:05] [miot] [Cleaner] Doing initial property fetch. [09/02/2022, 16:35:06] [miot] [Cleaner] Main brush left time: 334 hours. [09/02/2022, 16:35:06] [miot] [Cleaner] Main brush life level: 92%. [09/02/2022, 16:35:06] [miot] [Cleaner] Side brush left time: 154 hours. [09/02/2022, 16:35:06] [miot] [Cleaner] Side brush life level: 85%. [09/02/2022, 16:35:06] [miot] [Cleaner] Filter life level: 85%. [09/02/2022, 16:35:06] [miot] [Cleaner] Starting property polling. [09/02/2022, 16:35:34] [Toyotomi] Scan finished. [09/02/2022, 16:35:51] [miot] [Cleaner] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: FetchError: network timeout at: https://de.api.io.mi.com/app/miotspec/prop/get [09/02/2022, 16:36:31] [miot] [Cleaner] Device found: viomi.vacuum.v19 [09/02/2022, 16:36:31] [miot] [Cleaner] Setting up miot device! [09/02/2022, 16:36:31] [miot] [Cleaner] Device requires MiCloud! Trying to connect! [09/02/2022, 16:36:32] [miot] [Cleaner] Successfully connected to MiCloud! [09/02/2022, 16:36:32] [miot] [Cleaner] Device setup finished! Miot device ready! [09/02/2022, 16:36:32] [miot] [Cleaner] [Miot Device] Connected to device: viomi.vacuum.v19 [09/02/2022, 16:36:32] [miot] [Cleaner] Doing initial property fetch. [09/02/2022, 16:36:33] [miot] [Cleaner] Main brush left time: 334 hours. [09/02/2022, 16:36:33] [miot] [Cleaner] Main brush life level: 92%. [09/02/2022, 16:36:33] [miot] [Cleaner] Side brush left time: 154 hours. [09/02/2022, 16:36:33] [miot] [Cleaner] Side brush life level: 85%. [09/02/2022, 16:36:33] [miot] [Cleaner] Filter life level: 85%. [09/02/2022, 16:36:33] [miot] [Cleaner] Starting property polling. [09/02/2022, 16:37:18] [miot] [Cleaner] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: FetchError: network timeout at: https://de.api.io.mi.com/app/miotspec/prop/get [09/02/2022, 16:37:58] [miot] [Cleaner] Device found: viomi.vacuum.v19 [09/02/2022, 16:37:58] [miot] [Cleaner] Setting up miot device! [09/02/2022, 16:37:58] [miot] [Cleaner] Device requires MiCloud! Trying to connect! [09/02/2022, 16:38:00] [miot] [Cleaner] Successfully connected to MiCloud! [09/02/2022, 16:38:00] [miot] [Cleaner] Device setup finished! Miot device ready! [09/02/2022, 16:38:00] [miot] [Cleaner] [Miot Device] Connected to device: viomi.vacuum.v19 [09/02/2022, 16:38:00] [miot] [Cleaner] Doing initial property fetch. [09/02/2022, 16:38:00] [miot] [Cleaner] Main brush left time: 334 hours. [09/02/2022, 16:38:00] [miot] [Cleaner] Main brush life level: 92%. [09/02/2022, 16:38:00] [miot] [Cleaner] Side brush left time: 154 hours. [09/02/2022, 16:38:00] [miot] [Cleaner] Side brush life level: 85%. [09/02/2022, 16:38:00] [miot] [Cleaner] Filter life level: 85%. [09/02/2022, 16:38:00] [miot] [Cleaner] Starting property polling.

any idea what is this?

Mitsosxat avatar Feb 09 '22 14:02 Mitsosxat

It seems to me like you have some kind of network issues, you could try to increase the timeout to lets say 10000 and increase your pollingInterval to also at least 10000 and see if that helps

merdok avatar Feb 09 '22 18:02 merdok

I have similar msg on cuco.plug.sp5 image

danielkit83 avatar Feb 11 '22 04:02 danielkit83

@danielkit83 i guess your issue is due to bad network connectivity, like mentioned above you can try to increase the timeout and polling interval.

merdok avatar Feb 11 '22 08:02 merdok

Thanks. Let me try to adjust the timeout and polling interval. It is very strange, because the error message only happned on one miot device....another miot devices are ok

danielkit83 avatar Feb 11 '22 08:02 danielkit83

Depends if other devices also use micloud and to what country server they connect.

merdok avatar Feb 11 '22 08:02 merdok

This issue happened to me AFTER I updated the plugin to v1.0.4 and updated the Node.js to 16.x from 14.x I've rolled back both the plugin and Node.js to previous versions and now issue got resolved. I don't think I had issue with my network and I don't want to expose my Mi account to third-party. Anyway, it's good to stick with the old version.

charleszhai1991 avatar Feb 15 '22 15:02 charleszhai1991

@charleszhai1991 what third party are you talking about?

merdok avatar Feb 15 '22 17:02 merdok

@charleszhai1991 what third party are you talking about?

Thanks for your efforts in developing such great plugin! I'm just very careful with my micloud credentials for privacy matters and I mistakenly assumed that my issue involved to micloud which was not required previously.

charleszhai1991 avatar Feb 16 '22 09:02 charleszhai1991

First of there is no third party involved here. All your code is on your machine. Second, only certain older devices require a micloud connection. Most of the device which natively use the miot protocol does not require a micloud connection.

merdok avatar Feb 16 '22 10:02 merdok

I have similar msg on cuco.plug.sp5

image

Mine too on cuco.plug.cp1(Gosund smart plug).

and I try to install the old version 0.9.x my gosund plug works well. When updating 1.0.x it doesn't work. My config files never change. So I think there is a bug or else? Hope to help me.🙏

sidxul avatar Feb 18 '22 15:02 sidxul

Hmmm, I wonder if this is due to the encrypted micloud connection...

merdok avatar Feb 18 '22 15:02 merdok

Hmmm, I wonder if this is due to the encrypted micloud connection...

Ha,then how to solve it? Are there some good alternatives?

sidxul avatar Feb 18 '22 16:02 sidxul

I still have the problem if you solve it it would be awesome

Mitsosxat avatar Feb 18 '22 16:02 Mitsosxat

I mean if there is a problem then it first needs to be identified. I myself also use micloud for some devices and they seems to work fine. So my question would be, even if you guys see the error, does the devices still work? I would need to know a little bit more how it affects your device control and if it is all the time there or only sporadically

merdok avatar Feb 18 '22 16:02 merdok

For me it works great. It just keep coming up but this message won’t affect the plug in

Mitsosxat avatar Feb 18 '22 16:02 Mitsosxat

That there is sometimes a timeout should be fine. Sometimes the servers have more load so the sync might run into a timeout...

merdok avatar Feb 18 '22 17:02 merdok

For me, it’s the only plug in with the only device. So I don’t get how the server has more load. Am I right?

Mitsosxat avatar Feb 18 '22 17:02 Mitsosxat

I mean if there is a problem then it first needs to be identified. I myself also use micloud for some devices and they seems to work fine. So my question would be, even if you guys see the error, does the devices still work? I would need to know a little bit more how it affects your device control and if it is all the time there or only sporadically

My issue happened on cuco.plug.cp1(Gosund smart plug) too. Besides the log "Pull failed 4 times...", the Gosund CP1 smart plug in Apple Home App appeared to be out-of-sync, i.e the HomeBridge/Apple Home could not get the real time ON/OFF status, however, I was able to control the smart plug when I toggled the smart plug button in Apple Home. I also noticed the status of the smart plug in Apple Home changed itself between ON and OFF at the interval of every couple minutes.

charleszhai1991 avatar Feb 18 '22 17:02 charleszhai1991

My both chuangmi.plug.m1 and lumi.acpartner.mcn02 work fine use micloud. My cuco.plug.cp1 doesn't work, and every time run "poll failed 4 times in a row!...trying to reconnect..." my gosund plug of mijia app is offline then online, and HomeKit doesn't respond. It only occur gosund plug.

sidxul avatar Feb 18 '22 17:02 sidxul

Oh, that is interesting. I wonder why are mostly the plugs affected? Can any of you guys try out some local code changes and see if it helps? For that you would need to comment out the return await this._requestEncrypted(path, data); and uncomment out the //return await this._requestUnencrypted(path, data); https://github.com/merdok/homebridge-miot/blob/main/lib/protocol/MiCloud.js#L102-L103

merdok avatar Feb 18 '22 18:02 merdok

Both are the same result!!! 1 2 3 4 .

sidxul avatar Feb 19 '22 03:02 sidxul