diff --git a/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/HikvisionHandler.java b/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/HikvisionHandler.java index 0e6dda744d03f..824b480d04250 100644 --- a/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/HikvisionHandler.java +++ b/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/HikvisionHandler.java @@ -15,7 +15,6 @@ import static org.openhab.binding.ipcamera.internal.IpCameraBindingConstants.*; import java.nio.charset.StandardCharsets; -import java.util.ArrayList; import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.Nullable; @@ -423,12 +422,4 @@ public void handleCommand(ChannelUID channelUID, Command command) { return; } } - - // If a camera does not need to poll a request as often as snapshots, it can be - // added here. Binding steps through the list. - public ArrayList getLowPriorityRequests() { - ArrayList lowPriorityRequests = new ArrayList(1); - lowPriorityRequests.add("/ISAPI/System/IO/inputs/" + nvrChannel + "/status"); // must stay in element 0. - return lowPriorityRequests; - } } diff --git a/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/handler/IpCameraHandler.java b/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/handler/IpCameraHandler.java index 1e15c338035a8..12b3daf2dc1e5 100644 --- a/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/handler/IpCameraHandler.java +++ b/bundles/org.openhab.binding.ipcamera/src/main/java/org/openhab/binding/ipcamera/internal/handler/IpCameraHandler.java @@ -1270,9 +1270,6 @@ public void handleCommand(ChannelUID channelUID, Command command) { case HIKVISION_THING: HikvisionHandler hikvisionHandler = new HikvisionHandler(getHandle(), cameraConfig.getNvrChannel()); hikvisionHandler.handleCommand(channelUID, command); - if (lowPriorityRequests.isEmpty()) { - lowPriorityRequests = hikvisionHandler.getLowPriorityRequests(); - } break; case FOSCAM_THING: FoscamHandler foscamHandler = new FoscamHandler(getHandle(), cameraConfig.getUser(), @@ -1631,6 +1628,9 @@ public void initialize() { if (snapshotUri.isEmpty()) { snapshotUri = "/ISAPI/Streaming/channels/" + cameraConfig.getNvrChannel() + "01/picture"; } + if (lowPriorityRequests.isEmpty()) { + lowPriorityRequests.add("/ISAPI/System/IO/inputs/" + cameraConfig.getNvrChannel() + "/status"); + } break; case INSTAR_THING: if (snapshotUri.isEmpty()) {