Open CooperCGN opened 5 years ago
thanks for the log. i just tried to increase the limit as a workaround in latest version because of the fact that each fan value subscribes to one listener. i need to check if there is any long term fix for this
Sorry for the late reply but I just had time to try again. I have one of my Dysons now running in HomeKit. To my surprise after whatever changed in the code now the Jet Focus button appears for me too (it was always missing before). I will test now for a few days. Question, I have a second Dyson (same model) will I maybe running again into „listener problems“? Or is the max listeners set per fan?
the max limit should be per fan so it should just work for a second device. let me know otherwise
It seems to work now, thanks for the update. I am going to test for a few days before installing my second fan. I have to get a new filter for it first (maybe you can check issue https://github.com/joe-ng/homebridge-dyson-link/issues/57)
I installed the plugin on a seperate Raspberry Pi I setup for testing reasons so no other plugin is running on that homebridge. After a while, sometimes a few minutes, sometimes a few hours the plugin stops working, the devices becomes unresponsive/not reachable in the home app. I had then homebridge running in debug mode and it gives the following output:
[3/24/2019, 8:23:28 AM] [DysonPlatform] Number of listeners - sensor:0 fan:0 [3/24/2019, 8:23:28 AM] [DysonPlatform] Request for current state update [3/24/2019, 8:23:28 AM] [DysonPlatform] {"msg":"CURRENT-STATE","time":"2019-03-24T08:23:27.000Z","mode-reason":"LAPP","state-reason":"MODE","dial":"OFF","rssi":"-61","channel":"1","product-state":{"fpwr":"OFF","fdir":"ON","auto":"OFF","oscs":"OFF","oson":"OFF","nmod":"OFF","rhtm":"ON","fnst":"OFF","ercd":"12D2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"ON","cflr":"0090","hflr":"0090","sltm":"OFF","osal":"0156","osau":"0202","ancp":"0045"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}} [3/24/2019, 8:23:28 AM] [DysonPlatform] Update fan data from CURRENT-STATE - Dyson [3/24/2019, 8:23:28 AM] [DysonPlatform] {"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2019-03-24T08:23:27.000Z","data":{"tact":"2968","hact":"0041","pm25":"0099","pm10":"0099","va10":"0042","noxl":"0000","p25r":"0293","p10r":"0281","sltm":"OFF"}} [3/24/2019, 8:23:28 AM] [DysonPlatform] Update sensor data from ENVIRONMENTAL-CURRENT-SENSOR-DATA - Dyson [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson Get air quality [3/24/2019, 9:46:21 AM] [DysonPlatform] Number of listeners - sensor:1 fan:0 [3/24/2019, 9:46:21 AM] [DysonPlatform] Request for current state update [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson Get temperture [3/24/2019, 9:46:21 AM] [DysonPlatform] Number of listeners - sensor:2 fan:0 [3/24/2019, 9:46:21 AM] [DysonPlatform] Number of listeners - sensor:2 fan:1 [3/24/2019, 9:46:21 AM] [DysonPlatform] Number of listeners - sensor:2 fan:2 [3/24/2019, 9:46:21 AM] [DysonPlatform] Number of listeners - sensor:2 fan:3 [3/24/2019, 9:46:21 AM] [DysonPlatform] Number of listeners - sensor:2 fan:4 [3/24/2019, 9:46:21 AM] [DysonPlatform] Number of listeners - sensor:2 fan:5 [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson Get humidity [3/24/2019, 9:46:21 AM] [DysonPlatform] Number of listeners - sensor:3 fan:5 [3/24/2019, 9:46:21 AM] [DysonPlatform] {"msg":"CURRENT-STATE","time":"2019-03-24T09:46:20.000Z","mode-reason":"LAPP","state-reason":"MODE","dial":"OFF","rssi":"-70","channel":"1","product-state":{"fpwr":"OFF","fdir":"ON","auto":"OFF","oscs":"OFF","oson":"OFF","nmod":"OFF","rhtm":"ON","fnst":"OFF","ercd":"12D2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"ON","cflr":"0090","hflr":"0090","sltm":"OFF","osal":"0156","osau":"0202","ancp":"0045"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}} [3/24/2019, 9:46:21 AM] [DysonPlatform] Update fan data from CURRENT-STATE - Dyson [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson - Fan Rotate: false [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson - Fan On: false [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson - Fan Speed:50 [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson - Night Mode: false [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson - Fan Auto: false [3/24/2019, 9:46:21 AM] [DysonPlatform] Return target fan value as 0 [3/24/2019, 9:46:21 AM] [DysonPlatform] {"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2019-03-24T09:46:20.000Z","data":{"tact":"2964","hact":"0043","pm25":"0099","pm10":"0099","va10":"0042","noxl":"0000","p25r":"0295","p10r":"0277","sltm":"OFF"}} [3/24/2019, 9:46:21 AM] [DysonPlatform] Update sensor data from ENVIRONMENTAL-CURRENT-SENSOR-DATA - Dyson [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson - air quality new value: 5 [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson- temperture new value: 23.399999999999977 [3/24/2019, 9:46:21 AM] [DysonPlatform] Dyson- humidity new value: 43 [3/24/2019, 10:00:36 AM] [DysonPlatform] Dyson Get air quality [3/24/2019, 10:00:36 AM] [DysonPlatform] Number of listeners - sensor:1 fan:0 [3/24/2019, 10:00:36 AM] [DysonPlatform] Request for current state update [3/24/2019, 10:00:36 AM] [DysonPlatform] Dyson Get temperture [3/24/2019, 10:00:36 AM] [DysonPlatform] Number of listeners - sensor:2 fan:0 [3/24/2019, 10:00:36 AM] [DysonPlatform] Number of listeners - sensor:2 fan:1 [3/24/2019, 10:00:36 AM] [DysonPlatform] Number of listeners - sensor:2 fan:2 [3/24/2019, 10:00:36 AM] [DysonPlatform] Number of listeners - sensor:2 fan:3 [3/24/2019, 10:00:36 AM] [DysonPlatform] Dyson Get humidity [3/24/2019, 10:00:36 AM] [DysonPlatform] Number of listeners - sensor:3 fan:3 [3/24/2019, 10:01:03 AM] [DysonPlatform] Dyson Get air quality [3/24/2019, 10:01:03 AM] [DysonPlatform] Number of listeners - sensor:4 fan:3 [3/24/2019, 10:01:03 AM] [DysonPlatform] Dyson Get temperture [3/24/2019, 10:01:03 AM] [DysonPlatform] Number of listeners - sensor:5 fan:3 [3/24/2019, 10:01:03 AM] [DysonPlatform] Number of listeners - sensor:5 fan:4 [3/24/2019, 10:01:03 AM] [DysonPlatform] Number of listeners - sensor:5 fan:5 [3/24/2019, 10:01:03 AM] [DysonPlatform] Number of listeners - sensor:5 fan:6 [3/24/2019, 10:01:03 AM] [DysonPlatform] Dyson Get humidity [3/24/2019, 10:01:03 AM] [DysonPlatform] Number of listeners - sensor:6 fan:6 [3/24/2019, 10:02:34 AM] [DysonPlatform] Number of listeners - sensor:6 fan:7 [3/24/2019, 10:02:34 AM] [DysonPlatform] Dyson Get temperture [3/24/2019, 10:02:34 AM] [DysonPlatform] Number of listeners - sensor:7 fan:7 [3/24/2019, 10:02:34 AM] [DysonPlatform] Number of listeners - sensor:7 fan:8 [3/24/2019, 10:02:34 AM] [DysonPlatform] Number of listeners - sensor:7 fan:9 [3/24/2019, 10:02:34 AM] [DysonPlatform] Number of listeners - sensor:7 fan:10 [3/24/2019, 10:02:34 AM] [DysonPlatform] Number of listeners - sensor:7 fan:11 [3/24/2019, 10:02:34 AM] [DysonPlatform] Dyson Get humidity [3/24/2019, 10:02:34 AM] [DysonPlatform] Number of listeners - sensor:8 fan:11 [3/24/2019, 10:02:34 AM] [DysonPlatform] Dyson Get air quality [3/24/2019, 10:02:35 AM] [DysonPlatform] Number of listeners - sensor:9 fan:11 [3/24/2019, 10:05:25 AM] [DysonPlatform] Number of listeners - sensor:9 fan:12 [3/24/2019, 10:05:25 AM] [DysonPlatform] Dyson Get temperture [3/24/2019, 10:05:25 AM] [DysonPlatform] Number of listeners - sensor:10 fan:12 [3/24/2019, 10:05:25 AM] [DysonPlatform] Number of listeners - sensor:10 fan:13 [3/24/2019, 10:05:25 AM] [DysonPlatform] Number of listeners - sensor:10 fan:14 [3/24/2019, 10:05:25 AM] [DysonPlatform] Number of listeners - sensor:10 fan:15 [3/24/2019, 10:05:25 AM] [DysonPlatform] Number of listeners - sensor:10 fan:16 [3/24/2019, 10:05:25 AM] [DysonPlatform] Dyson Get humidity [3/24/2019, 10:05:25 AM] [DysonPlatform] Number of listeners - sensor:11 fan:16 [3/24/2019, 10:05:25 AM] [DysonPlatform] Dyson Get air quality [3/24/2019, 10:05:25 AM] [DysonPlatform] Number of listeners - sensor:12 fan:16 (node:381) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 16 undefined listeners added. Use emitter.setMaxListeners() to increase limit (node:381) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 undefined listeners added. Use emitter.setMaxListeners() to increase limit