Skip to content

Commit

Permalink
[ipcamera] Fix bugs in Reolink handler (#18338)
Browse files Browse the repository at this point in the history
* Fix bugs in Reolink handler

Signed-off-by: Simmon Yau <[email protected]>
  • Loading branch information
simmonyau authored Mar 1, 2025
1 parent d98bf37 commit 8623016
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,9 @@ public void channelRead(@Nullable ChannelHandlerContext ctx, @Nullable Object ms
}
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);
Expand Down Expand Up @@ -515,6 +516,7 @@ public void handleCommand(ChannelUID channelUID, Command command) {
} 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);
Expand Down

0 comments on commit 8623016

Please sign in to comment.