merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
388 stars 61 forks source link

Log entries if Stand Fan is OPower off #369

Closed Spy-1 closed 1 year ago

Spy-1 commented 1 year ago

How do I prevent the many log entries when the fan is off? This was not the case with the previous version of the plugin. [10/28/2022, 9:47:02 AM] [Homebridge UI] [homebridge-miot] Terminating child process... [10/28/2022, 9:47:02 AM] [Homebridge UI] [homebridge-miot] Child process ended [10/28/2022, 9:47:38 AM] [miot] [Stand Ventilator] Starting property polling. [10/28/2022, 9:48:07 AM] [miot] [Stand Ventilator] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: Error: The device with id 123616617 is not online! [10/28/2022, 9:49:07 AM] [miot] [Stand Ventilator] Starting property polling. [10/28/2022, 9:49:35 AM] [miot] [Stand Ventilator] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: Error: The device with id 123616617 is not online! [10/28/2022, 9:50:35 AM] [miot] [Stand Ventilator] Starting property polling. [10/28/2022, 9:51:03 AM] [miot] [Stand Ventilator] Poll failed 4 times in a row! Stopping polling and trying to reconnect! Reason: Error: The device with id 123616617 is not online!

merdok commented 1 year ago

I mean you have a point here! It is indeed questionable whether to show a warning in the terminal when a device is offline, maybe in the case when a device is offline I can make it a debug log as this is expected...

Spy-1 commented 1 year ago

I think the problem goes deeper than that. I still have a hot air fryer and a tower fan running through the plugin. Both are offline and do not show log entries?!

The standing Fan which shows log entries is a zhimi.fan.za4, SmartMi Standing Fan S2.

merdok commented 1 year ago

Your air fryer and tower fan are probably local device and there I already hide the log when a device is offline. The standing fan is a cloud device and is handled slightly different.

Spy-1 commented 1 year ago

OK. all 3 devices are connected via the Mi app. The standing fan and the hot air fryer via the German cloud, the tower fan via China. But no matter what. It would be nice if the log entries disappeared.

merdok commented 1 year ago

Then the other devices are online and do not throw the error. The device in question is definitely not reachable hence the warning.

Spy-1 commented 1 year ago

No, wether the Aitfryer nor the Tower Fan is online! All three devices are definitely offline.

merdok commented 1 year ago

Then you need to provide some context about what devices are we talking here. There are some devices which require a cloud connection and some not and use a local connection. It is very likely that the other two devices are local devices.

Spy-1 commented 1 year ago

Now i get this. Seems to be a cloud Problem?

[10/28/2022, 1:03:11 PM] [Homebridge UI] [homebridge-miot] Terminating child process... [10/28/2022, 1:03:11 PM] [Homebridge UI] [homebridge-miot] Child process ended [10/28/2022, 1:03:35 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:03:35 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:03:36 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:03:36 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection!

merdok commented 1 year ago

That is a normal info log which indicates that a connection to micloud has been made, that will not be removed.

Spy-1 commented 1 year ago

Then you need to provide some context about what devices are we talking here. There are some devices which require a cloud connection and some not and use a local connection. It is very likely that the other two devices are local devices.

how do you define local devices? All devices are logged into the Mi Cloud. Standfan 2s, Towerfan, Mi Airfryer and Mi Desklamp pro (native Homekit). StandFan2S , Airfryer and Desklamp via the European server, the Towerfan via the China server.

Spy-1 commented 1 year ago

That is a normal info log which indicates that a connection to micloud has been made, that will not be removed.

In this amount, this is a normal log info ??

[10/28/2022, 1:08:38 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:08:38 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:08:38 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:08:38 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:09:38 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:09:38 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:09:39 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:09:39 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:10:39 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:10:39 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:10:39 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:10:39 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:11:39 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:11:39 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:11:40 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:11:40 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:12:40 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:12:40 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:12:40 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:12:40 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:13:40 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:13:40 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:13:41 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:13:41 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:14:41 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:14:41 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:14:41 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:14:41 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:15:41 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:15:41 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:15:42 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:15:42 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:16:42 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:16:42 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:16:42 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:16:42 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:17:42 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:17:42 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:17:43 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:17:43 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:18:43 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:18:43 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:18:43 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:18:43 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:19:43 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:19:43 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:19:44 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:19:44 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:20:44 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:20:44 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:20:44 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:20:44 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:21:44 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:21:44 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:21:44 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:21:44 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:22:44 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:22:44 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:22:45 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:22:45 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:23:45 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:23:45 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:23:45 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:23:45 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:24:45 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:24:45 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:24:46 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:24:46 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:25:46 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:25:46 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:25:46 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:25:46 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:26:46 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:26:46 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:26:47 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:26:47 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:27:47 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:27:47 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:27:47 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:27:47 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:28:47 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:28:47 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:28:48 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:28:48 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:29:48 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 1:29:48 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 1:29:49 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/28/2022, 1:29:49 PM] [homebridge-miot] [Tower Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection!

merdok commented 1 year ago

If your devices have issues then certainly yes, there must be some kind of an issues with your device as they reconnect. You need to provide a debug log output to check what is happening.

Spy-1 commented 1 year ago

Please excuse the delay. I exclude that the devices have a problem, because there was no problem with the V1.3.1 of the plugin. Nevertheless I attach a debug log.

[10/28/2022, 4:15:50 PM] [homebridge-miot] Initializing devices [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Got device configuration, initializing device with name: Stand Ventilator [10/28/2022, 4:15:50 PM] [homebridge-miot] [Tower Ventilator] Got device configuration, initializing device with name: Tower Ventilator [10/28/2022, 4:15:50 PM] [homebridge-miot] [Heißluftfritteuse] Got device configuration, initializing device with name: Heißluftfritteuse [10/28/2022, 4:15:50 PM] Homebridge v1.5.1 (HAP v0.10.4) (homebridge-miot) is running on port 54376. [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Model known: zhimi.fan.za4! [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Initializing device! [10/28/2022, 4:15:50 PM] [homebridge-miot] [Tower Ventilator] Model known: dmaker.fan.p9! [10/28/2022, 4:15:50 PM] [homebridge-miot] [Tower Ventilator] Initializing device! [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Initializing device services [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Device services: [ "fan", "physical-controls-locked", "alarm", "indicator-light" ] [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Initializing device properties [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Device properties: [ "fan:on", "fan:fan-level", "fan:horizontal-swing", "fan:horizontal-angle", "fan:mode", "physical-controls-locked:physical-controls-locked", "alarm:alarm", "indicator-light:on" ] [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Initializing device actions [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Successfully created a Fan device! It is a Smartmi Standing Fan 2s. [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Initializing accessory! [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Accessory successfully initialized! [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Registering 1 accessories! [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Everything looks good! Initiating property polling! [10/28/2022, 4:15:50 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/28/2022, 4:15:51 PM] [Sonos] found 1 households [10/28/2022, 4:15:51 PM] [Sonos] Sonos_FsU91l5qyYCxTDTDVJcHzqAUcW: RINCON_949F3E2587E001400 [192.168.178.31]: associated S2 zoneplayer [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Initializing device services [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Device services: [ "fan", "physical-controls-locked" ] [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Initializing device properties [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Device properties: [ "fan:on", "fan:fan-level", "fan:mode", "fan:horizontal-swing", "fan:horizontal-angle", "fan:alarm", "fan:off-delay-time", "fan:brightness", "fan:motor-control", "fan:speed-level", "physical-controls-locked:physical-controls-locked" ] [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Initializing device actions [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Device actions: [ "fan:toggle" ] [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Successfully created a Fan device! It is a Mi Smart Tower Fan. [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Initializing accessory! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Accessory successfully initialized! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Registering 1 accessories! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Everything looks good! Initiating property polling! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Tower Ventilator] Log in to MiCloud! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Model known: careli.fryer.maf02! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Initializing device! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Initializing device services [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Device services: [ "air-fryer", "custom" ] [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Initializing device properties [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Device properties: [ "air-fryer:status", "air-fryer:fault", "air-fryer:target-time", "air-fryer:target-temperature", "air-fryer:left-time", "custom:recipe-id", "custom:work-time", "custom:work-temp", "custom:appoint-time", "custom:food-quanty", "custom:preheat-switch", "custom:appoint-time-left", "custom:turn-pot" ] [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Initializing device actions [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Device actions: [ "air-fryer:start-cook", "air-fryer:cancel-cooking", "air-fryer:pause", "custom:start-custom-cook", "custom:resume-cooking" ] [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Successfully created a AirFryer device! It is a Mi Smart Air Fryer. [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Initializing accessory! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Accessory successfully initialized! [10/28/2022, 4:15:51 PM] [homebridge-miot] [Heißluftfritteuse] Registering 1 accessories!

merdok commented 1 year ago

Not quite sure what your issue is at this point, those log entries all look good and are fine. Yes there have been added a couple of new ones in 1.4.0, and is that your issue?

Spy-1 commented 1 year ago

My problem is that I get the homebridge log cluttered with hundreds of entries. Every minute (!!) I get an entry like this : "[10/29/2022, 12:35:41 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/29/2022, 12:35:42 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/29/2022, 12:36:42 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/29/2022, 12:36:42 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/29/2022, 12:37:42 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/29/2022, 12:37:43 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/29/2022, 12:38:43 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/29/2022, 12:38:43 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/29/2022, 12:39:43 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/29/2022, 12:39:44 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/29/2022, 12:40:44 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/29/2022, 12:40:44 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [10/29/2022, 12:41:44 PM] [homebridge-miot] [Stand Ventilator] Log in to MiCloud! [10/29/2022, 12:41:45 PM] [homebridge-miot] [Stand Ventilator] Successfully connected to MiCloud! Setting up miot device from MiCloud connection!"

Every Minute an only from the Standing Fan with this config: "{ "name": "Stand Ventilator", "ip": "192.168.178.159", "token": "5a7a9ca112360230f6305268b524d082", "deviceId": "123616617", "model": "zhimi.fan.za4", "pollingInterval": 7, "deepDebugLog": false, "micloud": { "username": "info@xxxxxxxxxxxx.com", "password": "xxxxxx", "country": "de", "forceMiCloud": false, "timeout": 5000 }, "buzzerControl": false, "ledControl": false, "childLockControl": true, "modeControl": true, "swingControl": true, "moveControl": false, "fanLevelControl": false, "horizontalAngleButtons": [ 30, 60 ] },"

merdok commented 1 year ago

Something is wrong with your micloud connection when it is constantly reconnecting...

Spy-1 commented 1 year ago

Now it gets curious. I uninstalled all the plugin, cleaned the Homebridge cache and removed all devices in the Mi app and restarted the Homebridge. Then I re-added all devices in the Mi app and generated a new token. After reinstalling the miot plugin, I can now no longer retrieve the token via the plugin (discover all devices viua Micloud). With the token_extractor I get the token.

After configuring the plugin I can no longer control any device. All devices are passed through to Homebridge and Apple but are not controllable. I attach the debuglog [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Model known: dmaker.fan.p9! [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Initializing device! [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Model known: zhimi.fan.za4! [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Initializing device! [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Initializing device services [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Device services: [ "fan", "physical-controls-locked" ] [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Initializing device properties [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Device properties: [ "fan:on", "fan:fan-level", "fan:mode", "fan:horizontal-swing", "fan:horizontal-angle", "fan:alarm", "fan:off-delay-time", "fan:brightness", "fan:motor-control", "fan:speed-level", "physical-controls-locked:physical-controls-locked" ] [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Initializing device actions [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Device actions: [ "fan:toggle" ] [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Successfully created a Fan device! It is a Mi Smart Tower Fan. [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Initializing accessory! [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Accessory successfully initialized! [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Registering 1 accessories! [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Everything looks good! Initiating property polling! [10/30/2022, 1:59:25 PM] [miot] [Tower Ventilator] Log in to MiCloud! [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Initializing device services [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Device services: [ "fan", "physical-controls-locked", "alarm", "indicator-light" ] [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Initializing device properties [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Device properties: [ "fan:on", "fan:fan-level", "fan:horizontal-swing", "fan:horizontal-angle", "fan:mode", "physical-controls-locked:physical-controls-locked", "alarm:alarm", "indicator-light:on" ] [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Initializing device actions [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Successfully created a Fan device! It is a Smartmi Standing Fan 2s. [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Initializing accessory! [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Accessory successfully initialized! [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Registering 1 accessories! [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Everything looks good! Initiating property polling! [10/30/2022, 1:59:25 PM] [miot] [Stand Ventilator] Log in to MiCloud! [10/30/2022, 1:59:25 PM] [Sonos] listening on http://0.0.0.0:46586/notify [10/30/2022, 1:59:25 PM] [Sonos] hardware: x64 [10/30/2022, 1:59:25 PM] [Sonos] os: Ubuntu 20.04.5 LTS [10/30/2022, 1:59:25 PM] [Sonos] restored 3 accessories from cache [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Model known: careli.fryer.maf02! [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Initializing device! [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Initializing device services [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Device services: [ "air-fryer", "custom" ] [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Initializing device properties [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Device properties: [ "air-fryer:status", "air-fryer:fault", "air-fryer:target-time", "air-fryer:target-temperature", "air-fryer:left-time", "custom:recipe-id", "custom:work-time", "custom:work-temp", "custom:appoint-time", "custom:food-quanty", "custom:preheat-switch", "custom:appoint-time-left", "custom:turn-pot" ] [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Initializing device actions [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Device actions: [ "air-fryer:start-cook", "air-fryer:cancel-cooking", "air-fryer:pause", "custom:start-custom-cook", "custom:resume-cooking" ] [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Successfully created a AirFryer device! It is a Mi Smart Air Fryer. [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Initializing accessory! [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Accessory successfully initialized! [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Registering 1 accessories! [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Everything looks good! Initiating property polling! [10/30/2022, 1:59:25 PM] [miot] [Heißluftfritteuse] Log in to MiCloud!

merdok commented 1 year ago

Not only is your log very badly formatted which makes it unreadable but it also does not contain any useful information since you are pasting the wrong snippets. Nevertheless, if you cannot control your device then your token is invalid.

Spy-1 commented 1 year ago

The problem is solved and was obviously related to node v 18.12.0. After returning to node 16.18.0, the devices work as usual again. Apparently the plugin does not get along with the current node version. All other plugins run without problems with node 18.12.0

merdok commented 1 year ago

I will investigate to what this is related and see if I can provide a fix! Thanks for the update!

merdok commented 1 year ago

The log should now be gone in version 1.4.1