[ipcamera] Fix bugs in Reolink handler (#18338)

* Fix bugs in Reolink handler

Signed-off-by: Simmon Yau <simmonyau@gmail.com>
pull/18348/head
Simmon Yau 2025-03-01 11:48:24 -05:00 committed by GitHub
parent d98bf37cf2
commit 8623016be8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -323,8 +323,9 @@ public class ReolinkHandler extends ChannelDuplexHandler {
}
break;
default:
// ignore responses from all Setxx commands
if (!cutDownURL.startsWith("/cgi-bin/api.cgi?cmd=Set")
|| !cutDownURL.startsWith("/api.cgi?cmd=Set")) {// ignore responses from all Setxx commands
&& !cutDownURL.startsWith("/api.cgi?cmd=Set")) {
ipCameraHandler.logger.warn(
"URL {} is not handled currently by the binding, please report this message",
cutDownURL);
@ -515,6 +516,7 @@ public class ReolinkHandler extends ChannelDuplexHandler {
} else {
ipCameraHandler.logger.warn("Unsupported command sent to enableLED channel");
}
break;
case CHANNEL_ENABLE_MOTION_ALARM:
if (OnOffType.ON.equals(command)) {
ipCameraHandler.sendHttpPOST("/api.cgi?cmd=SetMdAlarm" + ipCameraHandler.reolinkAuth);