Stops working after server disconnect
Darkmute fails to handle unexpected loss of connection to the Snapcast server. If the server goes offline (reboot, network failure, etc.), Darkmute continues running but no longer has any effect on Snapcast client volume.
Impact
This is a problem since we reboot the server for backups every Saturday.
Workaround
Restart darkmute (e.g. by rebooting the Pi), and everything goes back to normal.
Logs
Interestingly, the snapcast
library inside Darkmute appears to recover it's connection to the server. When experiencing this issue (mute/unmute not working, even though darkmute is running), I noticed the following in syslog:
Nov 05 13:40:35 pi-bath darkmute[491]: INFO:snapcast.control.client:updated volume on Bathroom
Nov 05 13:40:40 pi-bath darkmute[491]: INFO:snapcast.control.client:updated volume on Bedroom
Nov 05 13:40:42 pi-bath darkmute[491]: INFO:snapcast.control.client:updated volume on Living Room
Thoughts
So the snapcast
library seems to recover it's server connection just fine, but control of the client is lost. Maybe rather than re-initiating the whole connection, it would be sufficient to re-instantiate the Client object.