diff --git a/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java b/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java index 4c55dbfa212..2a896967a50 100644 --- a/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java +++ b/bundles/org.openhab.binding.upnpcontrol/src/main/java/org/openhab/binding/upnpcontrol/internal/handler/UpnpRendererHandler.java @@ -1113,6 +1113,11 @@ public class UpnpRendererHandler extends UpnpHandler { long volume = Long.valueOf(value); volume = volume * 100 / config.maxvolume; + if (volume < 0) { + logger.warn("UPnP device {} received invalid volume value {}", thing.getLabel(), value); + return; + } + String upnpChannel = variable.replace("Volume", "volume").replace("Master", ""); updateState(upnpChannel, new PercentType((int) volume));