jishi / node-sonos-http-api

An HTTP API bridge for Sonos easing automation. Hostable on any node.js capable device, like a raspberry pi or similar.
http://jishi.github.io/node-sonos-http-api/
MIT License
1.83k stars 462 forks source link

Reconnect error log #839

Open olem10 opened 2 years ago

olem10 commented 2 years ago

Due to the poor battery performance of the Sonos Roam I leave it off for most of the time. This leads to a lot of errors in the console output/logs when the device is not reachable. Approx. 10 times every 8 seconds the following error shows up: 2022-05-29T10:03:13.965Z WARN resubscribing to sid null failed Error: connect EHOSTUNREACH 192.168.0.128:1400 at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1138:16)

The http-API does however still work and the Roam works fine when reconnected. Maybe there in a future update could be added support for dynamic discovery and removal of devices to avoid the error messages and resubscription to missing devices?

Thanks for a great piece of software.

jishi commented 2 years ago

Yeah, this is a known error that I haven't looked into. It was designed to "drop" players that are disconnected, but something is off with that logic. It wasn't a huge problem then, since it was rarely people disconnected individual players, but now with the cordless players, this is probably more common.

See https://github.com/jishi/node-sonos-http-api/issues/605

martin072 commented 7 months ago

Any news on this?

I have a Sonos Roam, and that is obviously on / off at random times, but flooding my syslog when not reachable with Error: connect EHOSTUNREACH Only restarting the service will fix it (temporary)

bausi2k commented 1 month ago

happens in my case too and it seems to have the negative effect on swallowing request :-(