merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
383 stars 62 forks source link

Smartmi Standing Fan 2s Appears in HomeKit but cannot control #382

Closed NateUT99 closed 1 year ago

NateUT99 commented 1 year ago

Hoping you can help here... I've had this device in and working for some time now, but I noticed that somewhere along the way it has stopped working. The device gets published in HomeKit, but attempting to make any changes will result in a "No Response" message. The device is controllable via the Mi Home app, so I know basic connectivity is there. Based on the log, it does appear that it successfully connects to MiCloud and "finds" the device, but I did notice that it appears to login every minute (don't recall seeing that message in logs so frequently before).

Homebridge Log @ Startup

11/5/2022, 9:33:50 AM] Got SIGTERM, shutting down child bridge process... [05/11/2022, 09:33:55] [homebridge-miot] Child bridge process ended [05/11/2022, 09:33:55] [homebridge-miot] Process Ended. Code: 143, Signal: null [05/11/2022, 09:34:02] [homebridge-miot] Restarting Process... [05/11/2022, 09:34:03] [homebridge-miot] Launched child bridge with PID 12165 [11/5/2022, 9:34:03 AM] Registering platform 'homebridge-miot.miot' [05/11/2022, 09:34:03] [homebridge-miot] Loaded homebridge-miot v1.4.2 child bridge successfully [11/5/2022, 9:34:03 AM] Loaded 1 cached accessories from cachedAccessories.0EDBF4393BA5. [11/5/2022, 9:34:04 AM] [homebridge-miot] Initializing devices [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Got device configuration, initializing device with name: Doodle Den Fan [11/5/2022, 9:34:04 AM] Homebridge v1.5.1 (HAP v0.10.4) (homebridge-miot) is running on port 49570. [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Model known: zhimi.fan.za4! [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Initializing device! [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Initializing device services [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Device services: [ "fan", "physical-controls-locked", "alarm", "indicator-light" ] [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Initializing device properties [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] 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" ] [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Initializing device actions [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Successfully created a Fan device! It is a Smartmi Standing Fan 2s. [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Initializing accessory! [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Accessory successfully initialized! [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Registering 1 accessories! [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Everything looks good! Initiating property polling! [11/5/2022, 9:34:04 AM] [homebridge-miot] [Doodle Den Fan] Log in to MiCloud! [11/5/2022, 9:34:06 AM] [homebridge-miot] [Doodle Den Fan] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [11/5/2022, 9:35:06 AM] [homebridge-miot] [Doodle Den Fan] Log in to MiCloud! [11/5/2022, 9:35:09 AM] [homebridge-miot] [Doodle Den Fan] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [11/5/2022, 9:36:09 AM] [homebridge-miot] [Doodle Den Fan] Log in to MiCloud! [11/5/2022, 9:36:11 AM] [homebridge-miot] [Doodle Den Fan] Successfully connected to MiCloud! Setting up miot device from MiCloud connection! [11/5/2022, 9:37:11 AM] [homebridge-miot] [Doodle Den Fan] Log in to MiCloud! [11/5/2022, 9:37:13 AM] [homebridge-miot] [Doodle Den Fan] Successfully connected to MiCloud! Setting up miot device from MiCloud connection!

Homebridge Config

{ "micloud": { "username": "redacted@mac.com", "password": "redacted", "country": "us", "forceMiCloud": true }, "devices": [ { "name": "Doodle Den Fan", "ip": "192.168.4.168", "token": "redacted", "deviceId": "125080767", "model": "zhimi.fan.za4", "pollingInterval": 10, "deepDebugLog": false, "micloud": { "country": "us", "forceMiCloud": true }, "onlyMainService": true, "buzzerControl": false, "ledControl": false, "childLockControl": false, "modeControl": false } ], "_bridge": { "username": "0E:DB:F4:39:3B:A5", "port": 49570 }, "platform": "miot" },

merdok commented 1 year ago

You probably also have nodejs v18.x.x installed which currently causes some issues. You either have to wait till i provide a fix or you can downgrade to nodejs v16.x.x for now.

NateUT99 commented 1 year ago

Yep, you're right... I think another plugin complained about it and so I upgraded. I don't recall saying it required it, so I'll downgrade to v16.18.1 and wait a bit.

Downgrade in process now, I'll close issue if this resolves problem. Thanks! :)

NateUT99 commented 1 year ago

Confirmed; fixed by downgrading to nodejs v16.18.1.

Thanks again!

merdok commented 1 year ago

As of version 1.4.3, the plugin should now work with the recent nodejs version without any issues again