openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.86k stars 3.56k forks source link

[Squeezebox] Edge case with dont-stop-the-music #10998

Open cribskip opened 2 years ago

cribskip commented 2 years ago

I'm running into an edge case when using the squeezebox binding in rules for notification, f.e.

playSound("squeezebox:squeezeboxplayer:34E229DB-E210-420A-A958-83AD355B5A62:246f284d1ab8", "doorbell.mp3")

If I got the dont-stop-the-music plugin enabled, the update of the playlist triggers the plugin and new tracks get added to the playlist.

I think, a workaround should be to wait a short period of time after setting the repeat mode: https://github.com/openhab/openhab-addons/blob/03d9281c0b4634e5844fc28f907110a2be154e44/bundles/org.openhab.binding.squeezebox/src/main/java/org/openhab/binding/squeezebox/internal/handler/SqueezeBoxNotificationPlayer.java#L90

The edge case is already seems to be already known to the developers: https://github.com/openhab/openhab-addons/blob/64a418829f0a65cfa94448f51483dec19fc06bd6/bundles/org.openhab.binding.squeezebox/src/main/java/org/openhab/binding/squeezebox/internal/handler/SqueezeBoxNotificationPlayer.java#L165

lsiepel commented 2 weeks ago

Three year old issue. Sorry to ask, is this still happening in openHAB 4.2 milestone?

mhilbush commented 2 weeks ago

is this still happening in openHAB 4.2 milestone?

Probably. But I don't know how to fix it. I haven't seen anything in the Squeezebox server API that could help eliminate this edge case.