| `pan` | Dimmer | Works with ONVIF cameras that can be moved. |
| `parkingAlarm` | Switch (read only) | When an API camera detects a car, this will turn ON. |
| `pirAlarm` | Switch (read only) | When a camera with PIR ability detects motion, this turns ON. |
+| `privacyMode` | Switch | Enable or disable the Privacy Mode of newer Amcrest/Dahua cameras. The camera will move the lens way down and stop the stream. |
| `recordingGif` | Number (read only) | How many seconds recording to GIF for. 0 when file ready. |
| `recordingMp4` | Number (read only) | How many seconds recording to MP4 for. 0 when file ready. |
| `rtspUrl` | String | The URL for the cameras auto detected RTSP stream. |
String value = ipCameraHandler.returnValueFromString(content, "table.AudioDetect[0].MutationThreold=");
ipCameraHandler.setChannelState(CHANNEL_THRESHOLD_AUDIO_ALARM, PercentType.valueOf(value));
}
+ // Privacy Mode on/off
+ if (content.contains("Code=LensMaskOpen;") || content.contains("table.LeLensMask[0].Enable=true")) {
+ ipCameraHandler.setChannelState(CHANNEL_ENABLE_PRIVACY_MODE, OnOffType.ON);
+ } else if (content.contains("Code=LensMaskClose;")
+ || content.contains("table.LeLensMask[0].Enable=false")) {
+ ipCameraHandler.setChannelState(CHANNEL_ENABLE_PRIVACY_MODE, OnOffType.OFF);
+ }
} finally {
ReferenceCountUtil.release(msg);
ctx.close();
case CHANNEL_ENABLE_MOTION_ALARM:
ipCameraHandler.sendHttpGET("/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect[0]");
return;
+ case CHANNEL_ENABLE_PRIVACY_MODE:
+ ipCameraHandler.sendHttpGET("/cgi-bin/configManager.cgi?action=getConfig&name=LeLensMask[0]");
+ return;
}
return; // Return as we have handled the refresh command above and don't need to
// continue further.
ipCameraHandler.sendHttpGET("/cgi-bin/configManager.cgi?action=setConfig&AlarmOut[1].Mode=0");
}
return;
+ case CHANNEL_ENABLE_PRIVACY_MODE:
+ if (OnOffType.OFF.equals(command)) {
+ ipCameraHandler
+ .sendHttpGET("/cgi-bin/configManager.cgi?action=setConfig&LeLensMask[0].Enable=false");
+ } else if (OnOffType.ON.equals(command)) {
+ ipCameraHandler
+ .sendHttpGET("/cgi-bin/configManager.cgi?action=setConfig&LeLensMask[0].Enable=true");
+ }
+ return;
}
}
} else if (content.contains("table.VideoAnalyseRule[0][1].Enable=false")) {
ipCameraHandler.setChannelState(CHANNEL_ENABLE_LINE_CROSSING_ALARM, OnOffType.OFF);
}
+ // Privacy Mode on/off
+ if (content.contains("Code=LensMaskOpen;") || content.contains("table.LeLensMask[0].Enable=true")) {
+ ipCameraHandler.setChannelState(CHANNEL_ENABLE_PRIVACY_MODE, OnOffType.ON);
+ } else if (content.contains("Code=LensMaskClose;")
+ || content.contains("table.LeLensMask[0].Enable=false")) {
+ ipCameraHandler.setChannelState(CHANNEL_ENABLE_PRIVACY_MODE, OnOffType.OFF);
+ }
} finally {
ReferenceCountUtil.release(msg);
}
case CHANNEL_ENABLE_MOTION_ALARM:
ipCameraHandler.sendHttpGET("/cgi-bin/configManager.cgi?action=getConfig&name=MotionDetect[0]");
return;
+ case CHANNEL_ENABLE_PRIVACY_MODE:
+ ipCameraHandler.sendHttpGET("/cgi-bin/configManager.cgi?action=getConfig&name=LeLensMask[0]");
+ return;
}
return; // Return as we have handled the refresh command above and don't need to
// continue further.
ipCameraHandler.sendHttpGET("/cgi-bin/configManager.cgi?action=setConfig&AlarmOut[1].Mode=0");
}
return;
+ case CHANNEL_ENABLE_PRIVACY_MODE:
+ if (OnOffType.OFF.equals(command)) {
+ ipCameraHandler
+ .sendHttpGET("/cgi-bin/configManager.cgi?action=setConfig&LeLensMask[0].Enable=false");
+ } else if (OnOffType.ON.equals(command)) {
+ ipCameraHandler
+ .sendHttpGET("/cgi-bin/configManager.cgi?action=setConfig&LeLensMask[0].Enable=true");
+ }
+ return;
}
}
public static final String CHANNEL_LAST_MOTION_TYPE = "lastMotionType";
public static final String CHANNEL_GOTO_PRESET = "gotoPreset";
public static final String CHANNEL_START_STREAM = "startStream";
+ public static final String CHANNEL_ENABLE_PRIVACY_MODE = "enablePrivacyMode";
}
<channel id="rtspUrl" typeId="rtspUrl"/>
<channel id="imageUrl" typeId="imageUrl"/>
<channel id="hlsUrl" typeId="hlsUrl"/>
+ <channel id="enablePrivacyMode" typeId="enablePrivacyMode"/>
</channels>
<config-description>
<channel id="rtspUrl" typeId="rtspUrl"/>
<channel id="imageUrl" typeId="imageUrl"/>
<channel id="hlsUrl" typeId="hlsUrl"/>
+ <channel id="enablePrivacyMode" typeId="enablePrivacyMode"/>
</channels>
<config-description>
<category>Light</category>
</channel-type>
+ <channel-type id="enablePrivacyMode">
+ <item-type>Switch</item-type>
+ <label>Enable Privacy Mode</label>
+ <description>Turn the Privacy Mode on and off.</description>
+ </channel-type>
+
<channel-type id="autoLED" advanced="true">
<item-type>Switch</item-type>
<label>Auto LED</label>