mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
Updated whiteLED channel for reolink ipcamera so that when the (#16663)
light is turned on, it will stay on forever and if the light is turned off, it will stay off forever. Signed-off-by: Simmon Yau <simmonyau@gmail.com> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
762d7b4933
commit
da56333001
@ -496,16 +496,16 @@ public class ReolinkHandler extends ChannelDuplexHandler {
|
||||
if (OnOffType.OFF.equals(command) || PercentType.ZERO.equals(command)) {
|
||||
ipCameraHandler.sendHttpPOST("/api.cgi?cmd=SetWhiteLed" + ipCameraHandler.reolinkAuth,
|
||||
"[{\"cmd\": \"SetWhiteLed\",\"param\": {\"WhiteLed\": {\"state\": 0,\"channel\": "
|
||||
+ ipCameraHandler.cameraConfig.getNvrChannel() + ",\"mode\": 1}}}]");
|
||||
+ 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\": 0}}}]");
|
||||
+ ipCameraHandler.cameraConfig.getNvrChannel() + ",\"mode\": 2}}}]");
|
||||
} 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\": 1,\"bright\": " + value
|
||||
+ ipCameraHandler.cameraConfig.getNvrChannel() + ",\"mode\": 2,\"bright\": " + value
|
||||
+ "}}}]");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user