Skip to content

Commit

Permalink
Updated whiteLED channel for reolink ipcamera to user timer mode
Browse files Browse the repository at this point in the history
set to run from 00:00 to 23:59 instead of "Always On at Night"
because the "Always On at Night" setting would cause the floodlight
to turn off after 3 minutes during the day which is not the desired
behavior.
  • Loading branch information
simmonyau committed Jan 22, 2025
1 parent c8330a7 commit 16fc777
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -553,14 +553,17 @@ public void handleCommand(ChannelUID channelUID, Command command) {
+ ipCameraHandler.cameraConfig.getNvrChannel() + ",\"mode\": 0}}}]");
} else if (OnOffType.ON.equals(command)) {
ipCameraHandler.sendHttpPOST("/api.cgi?cmd=SetWhiteLed" + ipCameraHandler.reolinkAuth,
"[{\"cmd\": \"SetWhiteLed\",\"param\": {\"WhiteLed\": {\"state\": 1,\"channel\": "
+ ipCameraHandler.cameraConfig.getNvrChannel() + ",\"mode\": 2}}}]");
"[{\"cmd\": \"SetWhiteLed\",\"param\": {\"WhiteLed\": {\"LightingSchedule\": "
+ "{\"EndHour\": 23,\"EndMin\": 59,\"StartHour\": 0,\"StartMin\": 0},"
+ "\"state\": 1,\"channel\": " + ipCameraHandler.cameraConfig.getNvrChannel()
+ ",\"mode\": 3}}}]");
} else if (command instanceof PercentType percentCommand) {
int value = percentCommand.toBigDecimal().intValue();
ipCameraHandler.sendHttpPOST("/api.cgi?cmd=SetWhiteLed" + ipCameraHandler.reolinkAuth,
"[{\"cmd\": \"SetWhiteLed\",\"param\": {\"WhiteLed\": {\"state\": 1,\"channel\": "
+ ipCameraHandler.cameraConfig.getNvrChannel() + ",\"mode\": 2,\"bright\": " + value
+ "}}}]");
"[{\"cmd\": \"SetWhiteLed\",\"param\": {\"WhiteLed\": {\"LightingSchedule\": "
+ "{\"EndHour\": 23,\"EndMin\": 59,\"StartHour\": 0,\"StartMin\": 0},"
+ "\"state\": 1,\"channel\": " + ipCameraHandler.cameraConfig.getNvrChannel()
+ ",\"mode\": 3,\"bright\": " + value + "}}}]");
}
break;
case CHANNEL_AUTO_TRACKING:
Expand Down

0 comments on commit 16fc777

Please sign in to comment.