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

Gateway stopped working

Open Mitsosxat opened this issue 2 years ago • 12 comments

Suddenly everything on gateway stop responding. Other xiaomi items work like a charm. Nothing changed in the settings, up address etc. I tried to downgrade still won’t work

Mitsosxat avatar Aug 10 '22 21:08 Mitsosxat

[11/08/2022, 01:26:35] [miot] [Gateway] Found cached device information: lumi.gateway.mgl03 [11/08/2022, 01:26:35] [miot] [Gateway] Model known: lumi.gateway.mgl03! [11/08/2022, 01:26:35] [miot] [Gateway] Initializing device! [11/08/2022, 01:26:35] [miot] [Gateway] Creating device instance by model: lumi.gateway.mgl03! [11/08/2022, 01:26:35] [miot] [Gateway] Not a airconditioner device! Device class could not be found: ../modules/airconditioner/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a airer device! Device class could not be found: ../modules/airer/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a airmonitor device! Device class could not be found: ../modules/airmonitor/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a airpurifier device! Device class could not be found: ../modules/airpurifier/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a bathheater device! Device class could not be found: ../modules/bathheater/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a camera device! Device class could not be found: ../modules/camera/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a ceilingfan device! Device class could not be found: ../modules/ceilingfan/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a coffeemachine device! Device class could not be found: ../modules/coffeemachine/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a curtain device! Device class could not be found: ../modules/curtain/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a custom device! Device class could not be found: ../modules/custom/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a dehumidifier device! Device class could not be found: ../modules/dehumidifier/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a fan device! Device class could not be found: ../modules/fan/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a freshairsystem device! Device class could not be found: ../modules/freshairsystem/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a generic device! Device class could not be found: ../modules/generic/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a heater device! Device class could not be found: ../modules/heater/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a humidifier device! Device class could not be found: ../modules/humidifier/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a kettle device! Device class could not be found: ../modules/kettle/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a light device! Device class could not be found: ../modules/light/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a outlet device! Device class could not be found: ../modules/outlet/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a oven device! Device class could not be found: ../modules/oven/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a robotcleaner device! Device class could not be found: ../modules/robotcleaner/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a switch device! Device class could not be found: ../modules/switch/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a thermostat device! Device class could not be found: ../modules/thermostat/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Not a unknown device! Device class could not be found: ../modules/unknown/devices/lumi.gateway.mgl03.js [11/08/2022, 01:26:35] [miot] [Gateway] Did not find device class! Trying to identify device from miot spec! [11/08/2022, 01:26:35] [miot] [Gateway] Found cached miot spec for device: lumi.gateway.mgl03 [11/08/2022, 01:26:35] [miot] [Gateway] Parsing miot spec! [11/08/2022, 01:26:35] [miot] [Gateway] Using gateway type and Gateway description for device identification! [11/08/2022, 01:26:35] [miot] [Gateway] Could not identify device! [11/08/2022, 01:26:35] [miot] [Gateway] No device class found! Falling back to UnknownDevice! [11/08/2022, 01:26:35] [miot] [Gateway] Initializing device services [11/08/2022, 01:26:35] [miot] [Gateway] Device services: [ "indicator-light", "arming", "button", "accidental-deletion" ] [11/08/2022, 01:26:35] [miot] [Gateway] Initializing device properties [11/08/2022, 01:26:35] [miot] [Gateway] Device properties: [ "indicator-light:on", "arming:arming-mode", "arming:arming-change", "arming:customize-mode-1", "arming:customize-mode-2", "arming:customize-mode-3", "arming:customize-mode-4", "arming:customize-mode-5", "arming:customize-mode-6", "arming:delay-time-basic", "arming:alarm-duration-basic", "arming:alarm-volume-basic", "arming:delay-time-home", "arming:alarm-duration-home", "arming:alarm-volume-home", "arming:delay-time-away", "arming:alarm-duration-away", "arming:alarm-volume-away", "arming:delay-time-sleep", "arming:alarm-duration-sleep", "arming:alarm-volume-sleep", "arming:target-arming-mode", "arming:alarm", "arming:alarm-auto-log", "button:button", "accidental-deletion:on-off" ] [11/08/2022, 01:26:35] [miot] [Gateway] Initializing device actions [11/08/2022, 01:26:35] [miot] [Gateway] Initializing device events [11/08/2022, 01:26:35] [miot] [Gateway] Device events: [ "accidental-deletion:event-unbind", "accidental-deletion:homekit-bound" ] [11/08/2022, 01:26:35] [miot] [Gateway] !-!-! Monitoring all properties !-!-! [11/08/2022, 01:26:35] [miot] [Gateway] Device not supported! Using a generic device with limited properties! Consider requesting device support! [11/08/2022, 01:26:35] [miot] [Gateway] Found cached accessory for this device! Unregistering it first! [11/08/2022, 01:26:35] [miot] [Gateway] Initializing accessory! [11/08/2022, 01:26:35] [miot] [Gateway] Creating Unknown accessory for device Gateway! [11/08/2022, 01:26:35] [miot] [Gateway] Found accessory class at ../modules/unknown/UnknownAccessory.js! [11/08/2022, 01:26:35] [miot] [Gateway] <-W-> Creating Gateway wrapper of type Property for property indicator-light:on [11/08/2022, 01:26:35] [miot] [Gateway] <-W-> Property type: Value List! Creating list item switches! [11/08/2022, 01:26:35] [miot] [Gateway] Successfully created Gateway wrapper of type Property! [11/08/2022, 01:26:35] [miot] [Gateway] <-W-> Creating Led wrapper of type Property for property indicator-light:on [11/08/2022, 01:26:35] [miot] [Gateway] <-W-> Property type: Value List! Creating list item switches! [11/08/2022, 01:26:35] [miot] [Gateway] Successfully created Led wrapper of type Property! [11/08/2022, 01:26:35] [miot] [Gateway] =P= Creating user specified property wrappers! [11/08/2022, 01:26:35] [miot] [Gateway] <-W-> Creating Basic wrapper of type Property for property arming:arming-mode [11/08/2022, 01:26:35] [miot] [Gateway] <-W-> Property type: Fixed Value! Creating value switch! [11/08/2022, 01:26:35] [miot] [Gateway] Successfully created Basic wrapper of type Property! [11/08/2022, 01:26:35] [miot] [Gateway] =P= Successfully created property control for property: 3.1! [11/08/2022, 01:26:35] [miot] [Gateway] <-W-> Creating Away - 3 wrapper of type Property for property arming:arming-mode [11/08/2022, 01:26:35] [miot] [Gateway] <-W-> Property type: Fixed Value! Creating value switch! [11/08/2022, 01:26:35] [miot] [Gateway] Successfully created Away - 3 wrapper of type Property! [11/08/2022, 01:26:35] [miot] [Gateway] =P= Successfully created property control for property: 3.1! [11/08/2022, 01:26:35] [miot] [Gateway] Accessory successfully initialized! [11/08/2022, 01:26:35] [miot] [Gateway] Registering 1 accessories! [11/08/2022, 01:26:35] [miot] [Gateway] Everything looks good! Initiating property polling! [11/08/2022, 01:26:35] [miot] [Gateway] (Protocol) Start handshake 192.168.68.113 [11/08/2022, 01:26:35] [miot] [Gateway] (Protocol) Server listening 0.0.0.0:59639 [11/08/2022, 01:26:39] [miot] [Gateway] Error: Could not connect to device, handshake timeout [11/08/2022, 01:26:39] [miot] [Gateway] Could not connect to the device! Retrying in 40 seconds! [11/08/2022, 01:27:19] [miot] [Gateway] (Protocol) Start handshake 192.168.68.113 [11/08/2022, 01:27:23] [miot] [Gateway] Error: Could not connect to device, handshake timeout [11/08/2022, 01:27:23] [miot] [Gateway] Could not connect to the device! Retrying in 40 seconds! [11/08/2022, 01:28:03] [miot] [Gateway] (Protocol) Start handshake 192.168.68.113 [11/08/2022, 01:28:07] [miot] [Gateway] Error: Could not connect to device, handshake timeout [11/08/2022, 01:28:07] [miot] [Gateway] Could not connect to the device! Retrying in 40 seconds! [11/08/2022, 01:28:47] [miot] [Gateway] (Protocol) Start handshake 192.168.68.113 [11/08/2022, 01:28:51] [miot] [Gateway] Error: Could not connect to device, handshake timeout [11/08/2022, 01:28:51] [miot] [Gateway] Could not connect to the device! Retrying in 40 seconds!

Mitsosxat avatar Aug 10 '22 22:08 Mitsosxat

Handshake timeout usually means incorrect token. Recheck your token.

merdok avatar Aug 11 '22 06:08 merdok

I discover the device via micloud, so the token must be correct. Any chance I am missing something?

Mitsosxat avatar Aug 11 '22 08:08 Mitsosxat

That is not correct. The token in the micloud can be outdated. Let's say you did reset your device but not connected it to the cloud yet, in that case the token in the micloud will be outdated.

merdok avatar Aug 11 '22 08:08 merdok

So, you have to delete the device from plug in and discover it again or is there another way?

Mitsosxat avatar Aug 11 '22 08:08 Mitsosxat

No, you do not need to remove it from the plugin! You have to retrieve the correct token, either update the token in the cloud or get it manually.

merdok avatar Aug 11 '22 08:08 merdok

I tried your way and another one. The token I get is the same that I have in the plug-in. There is no way that the token changed and now your plug-in discovers the old one. Must be something else that causes the problem. Any idea?

Mitsosxat avatar Aug 11 '22 09:08 Mitsosxat

I am pretty certain that a handshake timeout error is related to the token. There is nothing else that I can recommend then make sure that you have the correct token.

merdok avatar Aug 11 '22 09:08 merdok

My friend. I delete gateway and discover it again from your plug in. Is there any way that your plug in don’t find the correct token? What to do to find the correct token?

Mitsosxat avatar Aug 11 '22 09:08 Mitsosxat

Again, the plugin just gets the token which is stored in your micloud account. If it is wrong then it will not work. You need to recheck your token and make sure it is correct. You can manually enter it in the config.json if you have a token.

merdok avatar Aug 11 '22 09:08 merdok

How can I recheck the token?

Mitsosxat avatar Aug 11 '22 09:08 Mitsosxat

There are ways to retrieve the token manually from the device. You would need to search for sich guides. Other then that you can reset your device and register it in the cloud again using the mi home app.

merdok avatar Aug 11 '22 10:08 merdok