joe-ng / homebridge-dyson-link

MIT License
206 stars 40 forks source link

After recent plugin update Homekit reports fan as 'not responding' but it works fine #135

Open verisgit opened 3 years ago

verisgit commented 3 years ago

I recently updated my homebridge-dyson-link plugin and now homekit permanently shows the device as "Not responding" however it's actually working fine and I can control all elements of the fan fine even though the device is offline in home kit.

In the logs I see some errors such as:

[3/9/2021, 11:49:14 PM] [DysonPlatform] Connected to XXXXXXXXXXXXXXXXXX. subscribe now
[3/9/2021, 11:49:15 PM] [DysonPlatform] Fan Get temperture
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:1 fan:0
[3/9/2021, 11:49:15 PM] [DysonPlatform] Request for current state update
[3/9/2021, 11:49:15 PM] [DysonPlatform] Client is connected. Publish request now.
[3/9/2021, 11:49:15 PM] [DysonPlatform] Fan Get humidity
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:2 fan:0
[3/9/2021, 11:49:15 PM] [DysonPlatform] Fan Get air quality
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:0
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:1
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:2
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:3
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:4
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:5
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:6
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:7
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:8
[3/9/2021, 11:49:15 PM] [DysonPlatform] Number of listeners - sensor:3 fan:9
[3/9/2021, 11:49:16 PM] [DysonPlatform] {"msg":"CURRENT-STATE","time":"2021-03-09T15:49:14.000Z","mode-reason":"","state-reason":"MODE","dial":"OFF","rssi":"-62","product-state":{"fmod":"OFF","fnst":"OFF","fnsp":"0001","qtar":"0003","oson":"OFF","rhtm":"OFF","filf":"3640","ercd":"02C0","nmod":"OFF","wacd":"NONE"},"scheduler":{"srsc":"d168","dstv":"0000","tzid":"0001"}}
[3/9/2021, 11:49:16 PM] [DysonPlatform] Update fan data from CURRENT-STATE - Fan
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Fan On: false
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Fan Rotate: false
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Fan Speed:10
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Filter Change Required:false
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Filter Life(%):83.10502283105023
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Night Mode: false
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Filter Change Required:false
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Filter Life(%):83.10502283105023
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Fan Auto: false
[3/9/2021, 11:49:16 PM] [DysonPlatform] Return target fan value as 0
[3/9/2021, 11:49:16 PM] [DysonPlatform] {"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2021-03-09T15:49:14.001Z","data":{"tact":"OFF","hact":"OFF","pact":"0000","vact":"0001","sltm":"OFF"}}
[3/9/2021, 11:49:16 PM] [DysonPlatform] Update sensor data from ENVIRONMENTAL-CURRENT-SENSOR-DATA - Fan
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Temperature new value: NaN
[3/9/2021, 11:49:16 PM] [homebridge-dyson-link] This plugin generated a warning from the characteristic 'Current Temperature': characteristic was expected valid number and received NaN. See https://git.io/JtMGR for more info.
[3/9/2021, 11:49:16 PM] [homebridge-dyson-link] Error: 
    at Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2164:105)
    at Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1966:16)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1517:24
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/homebridge-dyson-link/DysonLinkDevice.js:500:21)
    at Object.onceWrapper (events.js:422:28)
    at EventEmitter.emit (events.js:328:22)
    at MqttClient.<anonymous> (/usr/local/lib/node_modules/homebridge-dyson-link/DysonLinkDevice.js:69:47)
    at MqttClient.emit (events.js:316:20)
    at MqttClient._handlePublish (/usr/local/lib/node_modules/homebridge-dyson-link/node_modules/mqtt/lib/client.js:940:12)
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Humidity new value: NaN
[3/9/2021, 11:49:16 PM] [homebridge-dyson-link] This plugin generated a warning from the characteristic 'Current Relative Humidity': characteristic was expected valid number and received NaN. See https://git.io/JtMGR for more info.
[3/9/2021, 11:49:16 PM] [homebridge-dyson-link] Error: 
    at Characteristic.characteristicWarning (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:2164:105)
    at Characteristic.validateUserInput (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1966:16)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:1517:24
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:9:18
    at EventEmitter.<anonymous> (/usr/local/lib/node_modules/homebridge-dyson-link/DysonLinkDevice.js:522:21)
    at Object.onceWrapper (events.js:422:28)
    at EventEmitter.emit (events.js:328:22)
    at MqttClient.<anonymous> (/usr/local/lib/node_modules/homebridge-dyson-link/DysonLinkDevice.js:69:47)
    at MqttClient.emit (events.js:316:20)
    at MqttClient._handlePublish (/usr/local/lib/node_modules/homebridge-dyson-link/node_modules/mqtt/lib/client.js:940:12)
[3/9/2021, 11:49:16 PM] [DysonPlatform] Fan - Air quality new value: 2
[3/10/2021, 12:22:22 AM] [DysonPlatform] {"msg":"CURRENT-STATE","time":"2021-03-09T16:22:21.000Z","mode-reason":"","state-reason":"MODE","dial":"OFF","rssi":"-62","product-state":{"fmod":"OFF","fnst":"OFF","fnsp":"0001","qtar":"0003","oson":"OFF","rhtm":"OFF","filf":"3640","ercd":"02C0","nmod":"OFF","wacd":"NONE"},"scheduler":{"srsc":"d168","dstv":"0000","tzid":"0001"}}
[3/10/2021, 12:22:22 AM] [DysonPlatform] Update fan data from CURRENT-STATE - Fan
[3/10/2021, 12:22:22 AM] [DysonPlatform] {"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2021-03-09T16:22:21.001Z","data":{"tact":"OFF","hact":"OFF","pact":"0000","vact":"0000","sltm":"OFF"}}

My config is in the following format:

{
            "platform": "DysonPlatform",
            "name": "DysonPlatform",
            "accessories": [
                {
                    "ip": "xxx.xxx.xxx.xxx",
                    "displayName": "Fan",
                    "serialNumber": "DYSON-ND1-XX-XXXXXXXX-XXX",
                    "password": "xxxxxxxxxxx"
                }
            ]
        },

Any ideas on how to get it to return to a normal state and show online?

codyc1515 commented 3 years ago

You may want to use the config UI to remove this accessory specifically via. Homebridge settings. Sometimes this platform doesn't gracefully handle changes and you have to do this.