Updated whiteLED channel for reolink ipcamera to user timer mode (#18155)

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.

Signed-off-by: Simmon Yau <simmonyau@gmail.com>
pull/18285/head
Simmon Yau 2025-02-17 13:10:39 -05:00 committed by GitHub
parent 2e8717414c
commit d2555cbe7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -553,14 +553,17 @@ public class ReolinkHandler extends ChannelDuplexHandler {
+ 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: