joe-ng / homebridge-dyson-link

MIT License
207 stars 40 forks source link

"Too many listerner" ? #85

Closed stannie closed 4 years ago

stannie commented 5 years ago

On a clean install of Homebridge, with this plugin only, all seems to run fine, paired to Homekit okay, but the new (Dyson) accessories on the Home App are either Updating or No Response.

Looking at the log there seems to be an issue indeed:

[14/05/2019, 12:33:59] [DysonPlatform] Finished launching. Start to create accessory from config
[14/05/2019, 12:33:59] Homebridge is running on port 51826.
[14/05/2019, 12:33:59] [DysonPlatform] Use device password from config file
[14/05/2019, 12:33:59] [DysonPlatform] Dyson IP:192.168.178.10 Serial Number:DYSON-PT4-EU-HXXXXXXA-445
[14/05/2019, 12:33:59] [DysonPlatform] Device serial number format valids
[14/05/2019, 12:33:59] [DysonPlatform] Device cached. Try to update this
[14/05/2019, 12:33:59] [DysonPlatform] Init Sensor for Dyson
[14/05/2019, 12:33:59] [DysonPlatform] Init Fan State for Dyson
[14/05/2019, 12:34:00] [DysonPlatform] Auto switch found. Remove this now
[14/05/2019, 12:34:00] [DysonPlatform] Night mode button is added
HAP Warning: Characteristic 000000BF-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 000000B7-0000-1000-8000-0026BB765291. Adding anyway.
[14/05/2019, 12:34:00] [DysonPlatform] Connected to PT4-EU-HXXXXXXA. subscribe now
[14/05/2019, 12:34:11] [DysonPlatform] Request for current state update
[14/05/2019, 12:34:11] [DysonPlatform] Client is connected. Publish request now.
[14/05/2019, 12:35:26] [DysonPlatform] Request for current state update
[14/05/2019, 12:35:26] [DysonPlatform] Too many listerner. Do another publish now
[14/05/2019, 12:35:26] [DysonPlatform] Client is connected. Publish request now.
[14/05/2019, 12:35:26] [DysonPlatform] Request for current state update
** last 3 lines repeat a couple of times every time I open the Home App on my iPhone **
(node:17658) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 undefined listeners added. Use emitter.setMaxListeners() to increase limit

Any thoughts?

joe-ng commented 5 years ago

the log suggested that it could not get the update from dyson device and therefore it tried to continue to publish (and listen to that) and ran out of listeners. so i would suggest to check if your router/network has blocked the mqtt /port/ ip of that

stannie commented 4 years ago

Pretty sure it was a network issue indeed... The Dyson was connected via one of the Unifi nanoHD access points in my house, which appearently blocks (some) traffic between devices in the network. Connecting it to the WiFi of the router itself solved it. Thanks!