[ipcamera] Refactor labels and defaults for openHAB 3 (#8752)
Signed-off-by: Matthew Skinner <matt@pcmus.com>
This commit is contained in:
parent
3dbcf37b74
commit
459ee8d7cd
|
@ -34,9 +34,22 @@ Some cameras allow the key frame to be created every second or a different amoun
|
|||
### ESP32 Cameras
|
||||
|
||||
These cameras do not have the ability to create H.264 streams and hence can not be used with HLS, however all other features should work.
|
||||
See the [Full Example](#full-example) section for how to setup these cameras.
|
||||
Due to many custom firmwares available, you may need to ask the firmware developer what the URLs are for snapshots and MJPEG streams if they have changed the defaults from what the Arduino IDE sample code uses.
|
||||
|
||||
Example:
|
||||
|
||||
```
|
||||
Thing ipcamera:generic:Esp32Cam
|
||||
[
|
||||
ipAddress="192.168.1.181", serverPort=54322,
|
||||
gifPreroll=1,
|
||||
snapshotUrl="http://192.168.1.181/capture",
|
||||
mjpegUrl="http://192.168.1.181:81/stream",
|
||||
ffmpegInputOptions="-f mjpeg",
|
||||
ffmpegOutput="/tmp/Esp32Camera/", ffmpegInput="http://192.168.1.181:81/stream"
|
||||
]
|
||||
```
|
||||
|
||||
### Amcrest
|
||||
|
||||
It is better to always setup your Amcrest camera as a `dahua` thing type.
|
||||
|
@ -115,9 +128,11 @@ Thing ipcamera:hikvision:West "West Camera"
|
|||
## Discovery
|
||||
|
||||
The discovery feature of openHAB can be used to find and setup any ONVIF cameras.
|
||||
This method should be preferred as it will discover the camera, ports and URLs for you, making the setup much easier.
|
||||
This method should be preferred as it will discover the cameras IP, ports and URLs for you, making the setup much easier.
|
||||
The binding needs to use UDP port 3702 to discover the cameras with, so this port needs to be unblocked by your firewall or add the camera manually if the camera is not auto found.
|
||||
To use the discovery, just press the `+` icon located in the Inbox, then select the IpCamera binding from the list of installed bindings.
|
||||
If your camera is not found after a few searches, it may not be ONVIF and in this case you will need to manually add via the UI your camera as a `generic` thing type and provide the URLs manually.
|
||||
If your camera is not found after a few searches, it may not be ONVIF and in this case you will need to manually add the camera via the UI.
|
||||
Cameras that are not ONVIF should be added as a `generic` thing type and you will need to provide the URLs manually.
|
||||
|
||||
## Supported Things
|
||||
|
||||
|
@ -662,197 +677,48 @@ end
|
|||
|
||||
This section is about how to get things working in HABpanel.
|
||||
|
||||
I highly recommend you check out the easy to use WIDGETS of which there are now 3 that are discussed on the forum here.
|
||||
I highly recommend you check out the easy to use widgets of which there are now 3 that are discussed on the forum here.
|
||||
<https://community.openhab.org/t/custom-widget-camera-clickable-thumbnails-that-open-a-stream/101275>
|
||||
|
||||
The widgets in the link above are the easiest way to get an advanced stream working in openHAB and you are welcome to open them up, look at how they work and change them to something even better that suits your needs.
|
||||
|
||||
## Group Displays
|
||||
|
||||
The [Full Example](#full-example) section shows how to setup a group of cameras to be displayed like they are a single camera.
|
||||
The `group` thing allows up to 4 cameras to be displayed like they are a single camera that rotates from one to the next.
|
||||
The display order can be allowed to change if one or more of the cameras detects motion.
|
||||
|
||||
Some additional things to check to get it working are:
|
||||
Some additional checks to get it working are:
|
||||
|
||||
+ If using the groups HLS feature, the poll time of the group must be the same or less than the total time contained in each cameras m3u8 file.
|
||||
If you have 3 seconds worth of video segments in each cameras HLS stream, this is the max you can set the poll time of the group to.
|
||||
+ All cameras in a group should have the same HLS segment size setting, 1 and 2 second long segments have been tested to work.
|
||||
+ Mixing cameras with different aspect ratios may cause issues when cast.
|
||||
|
||||
This is still a very new feature and if you have any issues, please send some TRACE level log output of when the problem occurs.
|
||||
## Sitemap Example
|
||||
|
||||
## Full Example
|
||||
|
||||
Use the following examples to base your setup on to save some time if you wish to use textual config.
|
||||
Textual config should only be used by advanced users as the [Discovery](#discovery) method should be preferred by new users.
|
||||
|
||||
You can do a find and replace on the thing type from `dahua`, as all cameras use consistent naming of channels and configs so changing between them is easy.
|
||||
|
||||
In the examples you will see the format is: `bindingID:thingType:UID` [param1="string",param2=x,param3=x]
|
||||
|
||||
bindingID: is always ipcamera.
|
||||
thingType: is found listed above under [Supported Things](#supported-things).
|
||||
UID: Can be made up but it must be UNIQUE, hence why it is called uniqueID.
|
||||
|
||||
openHAB's discovery method will use the IP address with the dots removed as the UID.
|
||||
By using textual config, you can name it something useful like "DrivewayCamera" if you wish, or stick with the same convention.
|
||||
|
||||
*.things
|
||||
|
||||
```java
|
||||
|
||||
Thing ipcamera:group:OutsideCameras
|
||||
[
|
||||
pollTime=2000, serverPort=54320,
|
||||
ffmpegOutput="/tmpfs/OutsideGroup/",
|
||||
firstCamera="001",
|
||||
secondCamera="002",
|
||||
thirdCamera="TestCam",
|
||||
forthCamera="",
|
||||
motionChangesOrder=true
|
||||
]
|
||||
|
||||
Thing ipcamera:dahua:001
|
||||
[
|
||||
ipAddress="192.168.0.5", password="suitcase123456",
|
||||
username="admin",
|
||||
serverPort=54321,
|
||||
ffmpegOutput="/tmpfs/camera1/"
|
||||
]
|
||||
|
||||
Thing ipcamera:hikvision:002
|
||||
[
|
||||
ipAddress="192.168.0.6", password="suitcase123456",
|
||||
username="admin",
|
||||
serverPort=54322,
|
||||
ffmpegOutput="/tmpfs/camera2/"
|
||||
]
|
||||
|
||||
Thing ipcamera:generic:TestCam
|
||||
[
|
||||
ipAddress="192.168.0.7", password="pass123", username="admin", serverPort=54323,
|
||||
snapshotUrl="http://192.168.1.65/tmpfs/snap.jpg", //remove this line if your camera has none
|
||||
mjpegUrl="ffmpeg",
|
||||
ffmpegOutput="/tmpfs/HttpTest/",
|
||||
ffmpegInput="rtsp://192.168.1.65:554/11"
|
||||
]
|
||||
|
||||
Thing ipcamera:generic:TTGoCamera "ESP32 TTGo Camera" @ "Cameras"
|
||||
[
|
||||
ipAddress="192.168.1.181",
|
||||
serverPort=51321,
|
||||
port=80,
|
||||
gifPreroll=1,
|
||||
snapshotUrl="http://192.168.1.181/capture",
|
||||
mjpegUrl="http://192.168.1.181:81/stream",
|
||||
ffmpegOutput="/tmpfs/TTGoCamera/",
|
||||
ffmpegInput="http://192.168.1.181:81/stream",
|
||||
ffmpegInputOptions="-f mjpeg",
|
||||
ipWhitelist="(192.168.2.8)(192.168.2.83)(192.168.2.99)"
|
||||
]
|
||||
|
||||
```
|
||||
|
||||
*.items
|
||||
|
||||
```java
|
||||
|
||||
Number BabyCamDirection "Camera Direction"
|
||||
Switch BabyCamEnableMotion "MotionAlarm on/off" { channel="ipcamera:dahua:001:enableMotionAlarm" }
|
||||
Switch BabyCamMotionAlarm "Motion detected" { channel="ipcamera:dahua:001:motionAlarm" }
|
||||
Switch BabyCamEnableAudioAlarm "AudioAlarm on/off" { channel="ipcamera:dahua:001:enableAudioAlarm" }
|
||||
Switch BabyCamAudioAlarm "Audio detected" { channel="ipcamera:dahua:001:audioAlarm" }
|
||||
Dimmer BabyCamAudioThreshold "Audio Threshold [%d]" { channel="ipcamera:dahua:001:thresholdAudioAlarm" }
|
||||
Dimmer BabyCamLED "IR LED [%d]" { channel="ipcamera:dahua:001:enableLED" }
|
||||
Switch BabyCamAutoLED "Auto IR LED" { channel="ipcamera:dahua:001:autoLED" }
|
||||
String BabyCamTextOverlay "Text to overlay" { channel="ipcamera:dahua:001:textOverlay" }
|
||||
String BabyCamHlsUrl "HLS Stream" { channel="ipcamera:dahua:BabyCamera:hlsUrl" }
|
||||
DateTime BabyCamLastMotionTime "Time motion was last detected [%1$ta %1$tR]"
|
||||
String BabyCamLastMotionType "Last Motion Type" { channel="ipcamera:dahua:BabyCamera:lastMotionType" }
|
||||
Switch BabyCamStartHLS { channel="ipcamera:dahua:BabyCamera:startStream" }
|
||||
|
||||
Dimmer GenericMotionControl "Motion Threshold [%d]" { channel="ipcamera:generic:TestCam:ffmpegMotionControl" }
|
||||
Switch GenericMotionAlarm "Motion detected" { channel="ipcamera:generic:TestCam:motionAlarm" }
|
||||
Dimmer GenericAudioThreshold "Audio Threshold [%d]" { channel="ipcamera:generic:TestCam:thresholdAudioAlarm" }
|
||||
Switch GenericAudioAlarm "Audio detected" { channel="ipcamera:generic:TestCam:audioAlarm" }
|
||||
|
||||
String OutsideCameraGroupHlsUrl "Outside Cameras" { channel="ipcamera:group:OutsideCameras:hlsUrl", ga="Camera" [ protocols="hls" ] }
|
||||
Switch OutsideCameraGroupStartHLS "Start outside HLS" { channel="ipcamera:group:OutsideCameras:startStream" }
|
||||
|
||||
```
|
||||
Use the following example to base your sitemap on to save some time.
|
||||
If you use the `Create Equipment from Thing` feature to auto create your items, the following will need minimal editing to change the camera name from `BabyCam` to what you choose to name the camera.
|
||||
|
||||
*.sitemap
|
||||
|
||||
```java
|
||||
Text label="Outside Camera Group" icon="camera"{Image url="http://192.168.0.2:54320/ipcamera.jpg" refresh=1000}
|
||||
|
||||
Text label="BabyMonitor" icon="camera"{
|
||||
Default item=BabyCamMotionAlarm icon=siren
|
||||
Default item=BabyCamAudioAlarm icon=siren
|
||||
Text label="Advanced Controls" icon="settings"{
|
||||
Switch item=BabyCamEnableMotion
|
||||
Default item=BabyCamEnableAudioAlarm
|
||||
Default item=BabyCamAudioThreshold icon=recorder
|
||||
Slider item=BabyCamLED
|
||||
Default item=BabyCamAutoLED
|
||||
}
|
||||
Text label="Last Movement" icon="motion"{
|
||||
Webview url="http://192.168.0.2:54321/ipcamera.gif" height=9
|
||||
Default item=BabyCamMotionAlarm icon=siren
|
||||
Default item=BabyCamLastMotionTime
|
||||
Default item=BabyCamLastMotionType
|
||||
}
|
||||
Text label="Cameras MJPEG Stream" icon="camera"{Video url="http://192.168.0.2:54321/ipcamera.mjpeg" encoding="mjpeg"}
|
||||
Text label="Snapshot 1FPS Stream" icon="camera"{Video url="http://192.168.0.2:54321/snapshots.mjpeg" encoding="mjpeg"}
|
||||
Text label="autofps Stream" icon="camera"{Video url="http://192.168.0.2:54321/autofps.mjpeg" encoding="mjpeg"}
|
||||
Text label="HLS Video Stream" icon="camera"{Video url="http://192.168.0.2:54321/ipcamera.m3u8" encoding="hls"}
|
||||
Text label="HLS Webview Stream" icon="camera"{Webview url="http://192.168.0.2:54321/ipcamera.m3u8" height=15}
|
||||
Text label="Image using JPG method" icon="camera"{Image url="http://192.168.0.2:54321/ipcamera.jpg" refresh=2000}
|
||||
}
|
||||
|
||||
Text label="Generic Camera" icon="camera"{
|
||||
Switch item=GenericMotionControl
|
||||
Slider item=GenericMotionControl
|
||||
Default item=GenericMotionAlarm
|
||||
Switch item=GenericAudioThreshold
|
||||
Slider item=GenericAudioThreshold
|
||||
Default item=GenericAudioAlarm
|
||||
Text label="MJPEG Stream" icon="camera"{Video url="http://192.168.0.2:54323/ipcamera.mjpeg" encoding="mjpeg"}
|
||||
Text label="snapshots 1FPS Stream" icon="camera"{Video url="http://192.168.0.2:54323/snapshots.mjpeg" encoding="mjpeg"}
|
||||
Text label="autofps Stream" icon="camera"{Video url="http://192.168.0.2:54323/autofps.mjpeg" encoding="mjpeg"}
|
||||
Text label="HLS Video Stream" icon="camera"{Video url="http://192.168.0.2:54323/ipcamera.m3u8" encoding="hls"}
|
||||
Text label="HLS Stream" icon="camera"{Webview url="http://192.168.0.2:54323/ipcamera.m3u8" height=15}
|
||||
Text label="Image JPG method" icon="camera"{Image url="http://192.168.0.2:54323/ipcamera.jpg" refresh=1000}
|
||||
Switch item=BabyCam_GoToPreset icon=movecontrol label="Camera Direction" mappings=[1="Room", 2="Chair", 3="Cot"]
|
||||
Text label="Advanced Controls" icon="settings"{
|
||||
Default item=BabyCam_AutoLED
|
||||
Default item=BabyCam_AudioAlarmThreshold icon=recorder
|
||||
Switch item=BabyCam_AudioAlarm
|
||||
Default item=BabyCam_EnableMotionAlarm
|
||||
Default item=BabyCam_MotionAlarm
|
||||
Slider item=BabyCam_Pan icon=movecontrol
|
||||
Slider item=BabyCam_Tilt icon=movecontrol
|
||||
Slider item=BabyCam_Zoom icon=zoom
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
*.rules
|
||||
|
||||
```java
|
||||
rule "Camera detected crying"
|
||||
when
|
||||
Item BabyCamAudioAlarm changed from OFF to ON
|
||||
then
|
||||
if(BabyMonitor.state==ON){
|
||||
|
||||
if(MumAlerts.state==ON){
|
||||
sendNotification("mum@parentCo.com", "Mum, the baby is awake.")
|
||||
}
|
||||
|
||||
if(DadAlerts.state==ON){
|
||||
sendNotification("dad@parentCo.com", "Dad, the baby is awake.")
|
||||
}
|
||||
|
||||
if(TvAlerts.state==ON){
|
||||
myKodi_notification.sendCommand("Baby is crying.")
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
rule "Create time of last movement"
|
||||
when
|
||||
Item BabyCamLastMotionType received update
|
||||
then
|
||||
BabyCamLastMotionTime.postUpdate( new DateTimeType() )
|
||||
end
|
||||
Default item=BabyCam_StartHLSStream
|
||||
Text label="Mjpeg Stream" icon="camera"{Video url="http://192.168.0.2:54321/ipcamera.mjpeg" encoding="mjpeg"}
|
||||
Text label="HLS Stream" icon="camera"{Webview url="http://192.168.0.2:54321/ipcamera.m3u8" height=15}
|
||||
Video url="http://192.168.0.2:54321/autofps.mjpeg" encoding="mjpeg"
|
||||
}
|
||||
|
||||
```
|
||||
|
|
|
@ -96,7 +96,6 @@ public class AmcrestHandler extends ChannelDuplexHandler {
|
|||
String value = ipCameraHandler.returnValueFromString(content, "table.AudioDetect[0].MutationThreold=");
|
||||
ipCameraHandler.setChannelState(CHANNEL_THRESHOLD_AUDIO_ALARM, PercentType.valueOf(value));
|
||||
}
|
||||
|
||||
} finally {
|
||||
ReferenceCountUtil.release(msg);
|
||||
ctx.close();
|
||||
|
|
|
@ -110,7 +110,6 @@ public class Helper {
|
|||
try {
|
||||
processed = URLEncoder.encode(text, "UTF-8").replace("+", "%20");
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
|
||||
}
|
||||
return processed;
|
||||
}
|
||||
|
|
|
@ -230,7 +230,6 @@ public class HikvisionHandler extends ChannelDuplexHandler {
|
|||
|
||||
// This does debouncing of the alarms
|
||||
void countDown() {
|
||||
|
||||
if (lineCount > 1) {
|
||||
lineCount--;
|
||||
} else if (lineCount == 1) {
|
||||
|
|
|
@ -28,12 +28,11 @@ import org.openhab.core.thing.ThingTypeUID;
|
|||
*/
|
||||
@NonNullByDefault
|
||||
public class IpCameraBindingConstants {
|
||||
|
||||
private static final String BINDING_ID = "ipcamera";
|
||||
public final static String AUTH_HANDLER = "authorizationHandler";
|
||||
public final static String AMCREST_HANDLER = "amcrestHandler";
|
||||
public final static String COMMON_HANDLER = "commonHandler";
|
||||
public final static String INSTAR_HANDLER = "instarHandler";
|
||||
public static final String AUTH_HANDLER = "authorizationHandler";
|
||||
public static final String AMCREST_HANDLER = "amcrestHandler";
|
||||
public static final String COMMON_HANDLER = "commonHandler";
|
||||
public static final String INSTAR_HANDLER = "instarHandler";
|
||||
|
||||
public static enum FFmpegFormat {
|
||||
HLS,
|
||||
|
|
|
@ -42,7 +42,7 @@ public class IpCameraDiscoveryService extends AbstractDiscoveryService {
|
|||
private final Logger logger = LoggerFactory.getLogger(IpCameraDiscoveryService.class);
|
||||
|
||||
public IpCameraDiscoveryService() {
|
||||
super(SUPPORTED_THING_TYPES, 30, false);
|
||||
super(SUPPORTED_THING_TYPES, 0, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -69,10 +69,10 @@ public class IpCameraDiscoveryService extends AbstractDiscoveryService {
|
|||
OnvifDiscovery onvifDiscovery = new OnvifDiscovery(this);
|
||||
try {
|
||||
onvifDiscovery.discoverCameras(3702);// WS discovery
|
||||
onvifDiscovery.discoverCameras(1900);// SSDP
|
||||
} catch (UnknownHostException | InterruptedException e) {
|
||||
logger.warn(
|
||||
"IpCamera Discovery has an issue discovering the network settings to find cameras with. Try setting up the camera manually.");
|
||||
}
|
||||
stopScan();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ public class MyNettyAuthHandler extends ChannelDuplexHandler {
|
|||
// nonce is reused if authenticate is null so the NC needs to increment to allow this//
|
||||
public void processAuth(String authenticate, String httpMethod, String requestURI, boolean reSend) {
|
||||
if (authenticate.contains("Basic realm=\"")) {
|
||||
if (ipCameraHandler.useDigestAuth == true) {
|
||||
if (ipCameraHandler.useDigestAuth) {
|
||||
// Possible downgrade authenticate attack avoided.
|
||||
return;
|
||||
}
|
||||
|
@ -106,8 +106,7 @@ public class MyNettyAuthHandler extends ChannelDuplexHandler {
|
|||
}
|
||||
|
||||
String stale = Helper.searchString(authenticate, "stale=\"");
|
||||
if (stale.isEmpty()) {
|
||||
} else if (stale.equalsIgnoreCase("true")) {
|
||||
if (stale.equalsIgnoreCase("true")) {
|
||||
logger.debug("Camera reported stale=true which normally means the NONCE has expired.");
|
||||
}
|
||||
|
||||
|
|
|
@ -177,19 +177,14 @@ public class StreamServerHandler extends ChannelInboundHandlerAdapter {
|
|||
}
|
||||
if (msg instanceof HttpContent) {
|
||||
HttpContent content = (HttpContent) msg;
|
||||
int index = 0;
|
||||
if (recievedBytes == 0) {
|
||||
incomingJpeg = new byte[content.content().capacity()];
|
||||
incomingJpeg = new byte[content.content().readableBytes()];
|
||||
content.content().getBytes(0, incomingJpeg, 0, content.content().readableBytes());
|
||||
} else {
|
||||
byte[] temp = incomingJpeg;
|
||||
incomingJpeg = new byte[recievedBytes + content.content().capacity()];
|
||||
|
||||
for (; index < temp.length; index++) {
|
||||
incomingJpeg[index] = temp[index];
|
||||
}
|
||||
}
|
||||
for (int i = 0; i < content.content().capacity(); i++) {
|
||||
incomingJpeg[index++] = content.content().getByte(i);
|
||||
incomingJpeg = new byte[recievedBytes + content.content().readableBytes()];
|
||||
System.arraycopy(temp, 0, incomingJpeg, 0, temp.length);
|
||||
content.content().getBytes(0, incomingJpeg, temp.length, content.content().readableBytes());
|
||||
}
|
||||
recievedBytes = incomingJpeg.length;
|
||||
if (content instanceof LastHttpContent) {
|
||||
|
|
|
@ -326,11 +326,10 @@ public class IpCameraGroupHandler extends BaseThingHandler {
|
|||
for (IpCameraHandler handler : cameraOrder) {
|
||||
String channelPrefix = "ipcamera:" + handler.getThing().getThingTypeUID() + ":"
|
||||
+ handler.getThing().getUID().getId() + ":";
|
||||
|
||||
handler.handleCommand(new ChannelUID(channelPrefix + CHANNEL_START_STREAM), OnOffType.ON);
|
||||
}
|
||||
} else {
|
||||
// TODO: Do we turn all controls OFF or do we remember the state before we turned them all on?
|
||||
// Do we turn all controls OFF, or do we remember the state before we turned them all on?
|
||||
hlsTurnedOn = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -161,7 +161,6 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
private String mp4Filename = "ipcamera";
|
||||
private int mp4RecordTime;
|
||||
private int gifRecordTime = 5;
|
||||
private int mp4Preroll;
|
||||
private LinkedList<byte[]> fifoSnapshotBuffer = new LinkedList<byte[]>();
|
||||
private int snapCount;
|
||||
private boolean updateImageChannel = false;
|
||||
|
@ -409,7 +408,7 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
|
||||
// false clears the stored user/pass hash, true creates the hash
|
||||
public boolean setBasicAuth(boolean useBasic) {
|
||||
if (useBasic == false) {
|
||||
if (!useBasic) {
|
||||
logger.debug("Clearing out the stored BASIC auth now.");
|
||||
basicAuth = "";
|
||||
return false;
|
||||
|
@ -495,7 +494,6 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
// The authHandler will generate a digest string and re-send using this same function when needed.
|
||||
@SuppressWarnings("null")
|
||||
public void sendHttpRequest(String httpMethod, String httpRequestURLFull, @Nullable String digestString) {
|
||||
|
||||
int port = getPortFromShortenedUrl(httpRequestURLFull);
|
||||
String httpRequestURL = getTinyUrl(httpRequestURLFull);
|
||||
|
||||
|
@ -818,8 +816,8 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
|
||||
// sends direct to ctx so can be either snapshots.mjpeg or normal mjpeg stream
|
||||
public void sendMjpegFirstPacket(ChannelHandlerContext ctx) {
|
||||
final String BOUNDARY = "thisMjpegStream";
|
||||
String contentType = "multipart/x-mixed-replace; boundary=" + BOUNDARY;
|
||||
final String boundary = "thisMjpegStream";
|
||||
String contentType = "multipart/x-mixed-replace; boundary=" + boundary;
|
||||
HttpResponse response = new DefaultHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK);
|
||||
response.headers().add(HttpHeaderNames.CONTENT_TYPE, contentType);
|
||||
response.headers().set(HttpHeaderNames.CACHE_CONTROL, HttpHeaderValues.NO_CACHE);
|
||||
|
@ -830,10 +828,10 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
}
|
||||
|
||||
public void sendMjpegFrame(byte[] jpg, ChannelGroup channelGroup) {
|
||||
final String BOUNDARY = "thisMjpegStream";
|
||||
final String boundary = "thisMjpegStream";
|
||||
ByteBuf imageByteBuf = Unpooled.copiedBuffer(jpg);
|
||||
int length = imageByteBuf.readableBytes();
|
||||
String header = "--" + BOUNDARY + "\r\n" + "content-type: image/jpeg" + "\r\n" + "content-length: " + length
|
||||
String header = "--" + boundary + "\r\n" + "content-type: image/jpeg" + "\r\n" + "content-length: " + length
|
||||
+ "\r\n\r\n";
|
||||
ByteBuf headerBbuf = Unpooled.copiedBuffer(header, 0, header.length(), StandardCharsets.UTF_8);
|
||||
ByteBuf footerBbuf = Unpooled.copiedBuffer("\r\n", 0, 2, StandardCharsets.UTF_8);
|
||||
|
@ -959,22 +957,17 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
ffmpegRecord = new Ffmpeg(this, format, cameraConfig.getFfmpegLocation(), inputOptions, rtspUri,
|
||||
cameraConfig.getMp4OutOptions(), cameraConfig.getFfmpegOutput() + mp4Filename + ".mp4",
|
||||
cameraConfig.getUser(), cameraConfig.getPassword());
|
||||
if (mp4Preroll > 0) {
|
||||
// fetchFromHLS(); todo: not done yet
|
||||
}
|
||||
if (ffmpegRecord != null) {
|
||||
ffmpegRecord.startConverting();
|
||||
if (mp4History.isEmpty()) {
|
||||
mp4History = mp4Filename;
|
||||
} else if (!mp4Filename.equals("ipcamera")) {
|
||||
mp4History = mp4Filename + "," + mp4History;
|
||||
if (mp4HistoryLength > 49) {
|
||||
int endIndex = mp4History.lastIndexOf(",");
|
||||
mp4History = mp4History.substring(0, endIndex);
|
||||
}
|
||||
ffmpegRecord.startConverting();
|
||||
if (mp4History.isEmpty()) {
|
||||
mp4History = mp4Filename;
|
||||
} else if (!mp4Filename.equals("ipcamera")) {
|
||||
mp4History = mp4Filename + "," + mp4History;
|
||||
if (mp4HistoryLength > 49) {
|
||||
int endIndex = mp4History.lastIndexOf(",");
|
||||
mp4History = mp4History.substring(0, endIndex);
|
||||
}
|
||||
setChannelState(CHANNEL_MP4_HISTORY, new StringType(mp4History));
|
||||
}
|
||||
setChannelState(CHANNEL_MP4_HISTORY, new StringType(mp4History));
|
||||
break;
|
||||
case RTSP_ALARMS:
|
||||
if (ffmpegRtspHelper != null) {
|
||||
|
@ -984,7 +977,7 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
}
|
||||
}
|
||||
String input = (cameraConfig.getAlarmInputUrl().isEmpty()) ? rtspUri : cameraConfig.getAlarmInputUrl();
|
||||
String OutputOptions = "-f null -";
|
||||
String outputOptions = "-f null -";
|
||||
String filterOptions = "";
|
||||
if (!audioAlarmEnabled) {
|
||||
filterOptions = "-an";
|
||||
|
@ -993,7 +986,7 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
}
|
||||
if (!motionAlarmEnabled && !ffmpegSnapshotGeneration) {
|
||||
filterOptions = filterOptions.concat(" -vn");
|
||||
} else if (motionAlarmEnabled == true) {
|
||||
} else if (motionAlarmEnabled) {
|
||||
filterOptions = filterOptions
|
||||
.concat(" -vf select='gte(scene," + motionThreshold + ")',metadata=print");
|
||||
}
|
||||
|
@ -1001,7 +994,7 @@ public class IpCameraHandler extends BaseThingHandler {
|
|||
filterOptions += " ";// add space as the Framework does not allow spaces at start of config.
|
||||
}
|
||||
ffmpegRtspHelper = new Ffmpeg(this, format, cameraConfig.getFfmpegLocation(), inputOptions, input,
|
||||
filterOptions + cameraConfig.getMotionOptions(), OutputOptions, cameraConfig.getUser(),
|
||||
filterOptions + cameraConfig.getMotionOptions(), outputOptions, cameraConfig.getUser(),
|
||||
cameraConfig.getPassword());
|
||||
ffmpegRtspHelper.startConverting();
|
||||
break;
|
||||
|
|
|
@ -4,6 +4,6 @@
|
|||
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
|
||||
|
||||
<name>IpCamera Binding</name>
|
||||
<description>This binding helps you to use IP Cameras in Openhab 2.</description>
|
||||
<description>This binding interfaces IP cameras of various vendors via open protocols.</description>
|
||||
<author>Matthew Skinner</author>
|
||||
</binding:binding>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="serverPort" type="integer" required="true" min="-1" max="65535" groupName="Settings">
|
||||
|
@ -151,6 +151,7 @@
|
|||
per the readme.
|
||||
</description>
|
||||
<default>0</default>
|
||||
<advanced>true</advanced>
|
||||
<options>
|
||||
<option value="0">Image channel never updates (0)</option>
|
||||
<option value="1">Image channel follows pollImage (1)</option>
|
||||
|
@ -220,7 +221,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="hlsOutOptions" type="text" required="false" groupName="FFmpeg Setup">
|
||||
|
@ -391,6 +392,7 @@
|
|||
per the readme.
|
||||
</description>
|
||||
<default>0</default>
|
||||
<advanced>true</advanced>
|
||||
<options>
|
||||
<option value="0">Image channel never updates (0)</option>
|
||||
<option value="1">Image channel follows pollImage (1)</option>
|
||||
|
@ -440,7 +442,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="hlsOutOptions" type="text" required="false" groupName="FFmpeg Setup">
|
||||
|
@ -683,7 +685,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="hlsOutOptions" type="text" required="false" groupName="FFmpeg Setup">
|
||||
|
@ -767,6 +769,7 @@
|
|||
per the readme.
|
||||
</description>
|
||||
<default>0</default>
|
||||
<advanced>true</advanced>
|
||||
<options>
|
||||
<option value="0">Image channel never updates (0)</option>
|
||||
<option value="1">Image channel follows pollImage (1)</option>
|
||||
|
@ -966,7 +969,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="hlsOutOptions" type="text" required="false" groupName="FFmpeg Setup">
|
||||
|
@ -1034,6 +1037,7 @@
|
|||
per the readme.
|
||||
</description>
|
||||
<default>0</default>
|
||||
<advanced>true</advanced>
|
||||
<options>
|
||||
<option value="0">Image channel never updates (0)</option>
|
||||
<option value="1">Image channel follows pollImage (1)</option>
|
||||
|
@ -1231,7 +1235,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="hlsOutOptions" type="text" required="false" groupName="FFmpeg Setup">
|
||||
|
@ -1315,6 +1319,7 @@
|
|||
per the readme.
|
||||
</description>
|
||||
<default>0</default>
|
||||
<advanced>true</advanced>
|
||||
<options>
|
||||
<option value="0">Image channel never updates (0)</option>
|
||||
<option value="1">Image channel follows pollImage (1)</option>
|
||||
|
@ -1493,7 +1498,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="hlsOutOptions" type="text" required="false" groupName="FFmpeg Setup">
|
||||
|
@ -1577,6 +1582,7 @@
|
|||
per the readme.
|
||||
</description>
|
||||
<default>0</default>
|
||||
<advanced>true</advanced>
|
||||
<options>
|
||||
<option value="0">Image channel never updates (0)</option>
|
||||
<option value="1">Image channel follows pollImage (1)</option>
|
||||
|
@ -1780,7 +1786,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="hlsOutOptions" type="text" required="false" groupName="FFmpeg Setup">
|
||||
|
@ -1864,6 +1870,7 @@
|
|||
per the readme.
|
||||
</description>
|
||||
<default>0</default>
|
||||
<advanced>true</advanced>
|
||||
<options>
|
||||
<option value="0">Image channel never updates (0)</option>
|
||||
<option value="1">Image channel follows pollImage (1)</option>
|
||||
|
@ -2054,7 +2061,7 @@
|
|||
<description>The full path where FFmpeg has the ability to write files to ending with a slash. For windows use this
|
||||
format, c:\openhabconf\html\ipcamera\
|
||||
</description>
|
||||
<default>/etc/openhab2/html/camera1/</default>
|
||||
<default>/etc/openhab/html/camera1/</default>
|
||||
</parameter>
|
||||
|
||||
<parameter name="hlsOutOptions" type="text" required="false" groupName="FFmpeg Setup">
|
||||
|
@ -2138,6 +2145,7 @@
|
|||
per the readme.
|
||||
</description>
|
||||
<default>0</default>
|
||||
<advanced>true</advanced>
|
||||
<options>
|
||||
<option value="0">Image channel never updates (0)</option>
|
||||
<option value="1">Image channel follows pollImage (1)</option>
|
||||
|
@ -2225,14 +2233,14 @@
|
|||
</config-description>
|
||||
</thing-type>
|
||||
|
||||
<channel-type id="image">
|
||||
<channel-type id="image" advanced="true">
|
||||
<item-type>Image</item-type>
|
||||
<label>Image</label>
|
||||
<description>Low frame rate image from your camera. Recommend this is NOT used unless you have large pollTime.</description>
|
||||
<category>Camera</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="pollImage">
|
||||
<channel-type id="pollImage" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Poll Image</label>
|
||||
<description>This can be used to trigger snapshot updates when an external PIR, button or other form of sensor turns
|
||||
|
@ -2241,7 +2249,7 @@
|
|||
|
||||
<channel-type id="recordingGif">
|
||||
<item-type>Number</item-type>
|
||||
<label>GIF Recording (Seconds)</label>
|
||||
<label>GIF Recording</label>
|
||||
<description>Indicates how long the recording will occur for and when the file is created, the channel will
|
||||
change to 0
|
||||
by itself.</description>
|
||||
|
@ -2249,13 +2257,13 @@
|
|||
<state min="0" max="10800" step="1" pattern="%.1f Seconds" readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="gifHistory">
|
||||
<channel-type id="gifHistory" advanced="true">
|
||||
<item-type>String</item-type>
|
||||
<label>Gif Filename History</label>
|
||||
<label>GIF History</label>
|
||||
<description>A history of the last GIFs created in a CSV formatted string.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="gifHistoryLength">
|
||||
<channel-type id="gifHistoryLength" advanced="true">
|
||||
<item-type>Number</item-type>
|
||||
<label>GIF History Length</label>
|
||||
<description>How many GIFs are stored in the history.</description>
|
||||
|
@ -2263,7 +2271,7 @@
|
|||
|
||||
<channel-type id="recordingMp4">
|
||||
<item-type>Number</item-type>
|
||||
<label>MP4 Recording (Seconds)</label>
|
||||
<label>MP4 Recording</label>
|
||||
<description>Indicates how long the recording will occur for and when the file is created, the channel will
|
||||
change to 0
|
||||
by itself.</description>
|
||||
|
@ -2271,15 +2279,15 @@
|
|||
<state min="0" max="10800" step="1" pattern="%.1f Seconds" readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="mp4History">
|
||||
<channel-type id="mp4History" advanced="true">
|
||||
<item-type>String</item-type>
|
||||
<label>Mp4 Filename History</label>
|
||||
<label>MP4 History</label>
|
||||
<description>A history of the last mp4 recordings created in a CSV formatted string.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="mp4HistoryLength">
|
||||
<channel-type id="mp4HistoryLength" advanced="true">
|
||||
<item-type>Number</item-type>
|
||||
<label>mp4HistoryLength</label>
|
||||
<label>MP4 History Length</label>
|
||||
<description>How many mp4 recordings are stored in the history.</description>
|
||||
</channel-type>
|
||||
|
||||
|
@ -2291,7 +2299,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="rtspUrl">
|
||||
<channel-type id="rtspUrl" advanced="true">
|
||||
<item-type>String</item-type>
|
||||
<label>RTSP URL</label>
|
||||
<description>A link that the camera uses for RTSP.</description>
|
||||
|
@ -2309,34 +2317,34 @@
|
|||
|
||||
<channel-type id="hlsUrl">
|
||||
<item-type>String</item-type>
|
||||
<label>HLS URL (m3u8)</label>
|
||||
<label>HLS URL</label>
|
||||
<description>A link you can use in openHAB to cast video feeds.</description>
|
||||
<category>Camera</category>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="pan">
|
||||
<channel-type id="pan" advanced="true">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Pan</label>
|
||||
<description>Pan the camera to a new position.</description>
|
||||
<category>MoveControl</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="tilt">
|
||||
<channel-type id="tilt" advanced="true">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Tilt</label>
|
||||
<description>Tilt the camera to a new position.</description>
|
||||
<category>MoveControl</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="zoom">
|
||||
<channel-type id="zoom" advanced="true">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Zoom</label>
|
||||
<description>Zoom the camera to a new value.</description>
|
||||
<category>Zoom</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="lastMotionType">
|
||||
<channel-type id="lastMotionType" advanced="true">
|
||||
<item-type>String</item-type>
|
||||
<label>Last Motion Type</label>
|
||||
<description>A string that contains the type of motion alarm that was last triggered.</description>
|
||||
|
@ -2351,36 +2359,36 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="fieldDetectionAlarm">
|
||||
<channel-type id="fieldDetectionAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Intrusion/Field Alarm ON/OFF</label>
|
||||
<label>Field Alarm</label>
|
||||
<description>Intrusion has detected movement. AKA Field Detection Alarm.</description>
|
||||
<category>Motion</category>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="enableFieldDetectionAlarm">
|
||||
<channel-type id="enableFieldDetectionAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Intrusion/Field Alarm</label>
|
||||
<label>Enable Field Alarm</label>
|
||||
<description>By using this feature you can stop the camera from sending e-mails when you are actually home.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="enablePirAlarm">
|
||||
<channel-type id="enablePirAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>PIR Alarm ON/OFF</label>
|
||||
<label>Enable PIR Alarm</label>
|
||||
<description>Enable/Disable the PIR Alarm.</description>
|
||||
<category>Motion</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="cellMotionAlarm">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Cell Motion Detection Alarm</label>
|
||||
<label>Cell Motion Alarm</label>
|
||||
<description>Cell based motion has been detected.</description>
|
||||
<category>Motion</category>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="pirAlarm">
|
||||
<channel-type id="pirAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>PIR Alarm</label>
|
||||
<description>PIR motion has been detected.</description>
|
||||
|
@ -2388,7 +2396,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="tamperAlarm">
|
||||
<channel-type id="tamperAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Tamper Alarm</label>
|
||||
<description>Camera may be stolen or damaged.</description>
|
||||
|
@ -2396,7 +2404,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="tooDarkAlarm">
|
||||
<channel-type id="tooDarkAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Too Dark Alarm</label>
|
||||
<description>Image is too dark.</description>
|
||||
|
@ -2404,7 +2412,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="sceneChangeAlarm">
|
||||
<channel-type id="sceneChangeAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Scene Change Alarm</label>
|
||||
<description>Camera may have been moved.</description>
|
||||
|
@ -2412,7 +2420,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="tooBrightAlarm">
|
||||
<channel-type id="tooBrightAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Too Bright Alarm</label>
|
||||
<description>Image is too bright.</description>
|
||||
|
@ -2420,7 +2428,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="tooBlurryAlarm">
|
||||
<channel-type id="tooBlurryAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Too Blurry Alarm</label>
|
||||
<description>Image is out of focus.</description>
|
||||
|
@ -2428,7 +2436,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="storageAlarm">
|
||||
<channel-type id="storageAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Storage Alarm</label>
|
||||
<description>An issue with the cameras storage has been reported.</description>
|
||||
|
@ -2436,7 +2444,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="ffmpegMotionAlarm">
|
||||
<channel-type id="ffmpegMotionAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>FFmpeg Motion Alarm</label>
|
||||
<description>FFmpeg has detected motion.</description>
|
||||
|
@ -2452,7 +2460,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="faceDetected">
|
||||
<channel-type id="faceDetected" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Face Detected Alarm</label>
|
||||
<description>A face has been detected.</description>
|
||||
|
@ -2460,7 +2468,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="itemLeft">
|
||||
<channel-type id="itemLeft" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Item Left Alarm</label>
|
||||
<description>An item has been left.</description>
|
||||
|
@ -2468,15 +2476,15 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="parkingAlarm">
|
||||
<channel-type id="parkingAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Car Parking Alarm</label>
|
||||
<description>A car has triggered the ParkingDetection.</description>
|
||||
<label>Parking Alarm</label>
|
||||
<description>A car has triggered the Parking Detection.</description>
|
||||
<category>Alarm</category>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="itemTaken">
|
||||
<channel-type id="itemTaken" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Item Taken Alarm</label>
|
||||
<description>An item may have been stolen.</description>
|
||||
|
@ -2484,7 +2492,7 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="audioAlarm">
|
||||
<channel-type id="audioAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Audio Alarm</label>
|
||||
<description>Audio has triggered an Alarm.</description>
|
||||
|
@ -2492,29 +2500,29 @@
|
|||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="enableExternalAlarmInput">
|
||||
<channel-type id="enableExternalAlarmInput" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Alarm In 1 ON/OFF</label>
|
||||
<label>Enable Alarm Input 1</label>
|
||||
<description>Turn the External Alarm Input feature on and off.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="triggerExternalAlarmInput">
|
||||
<channel-type id="triggerExternalAlarmInput" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Alarm In 1 TRIGGER high ON/low OFF</label>
|
||||
<description>Change the External Alarm Input to trigger on high or low states.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="externalAlarmInput">
|
||||
<channel-type id="externalAlarmInput" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Alarm In 1</label>
|
||||
<label>Alarm Input 1</label>
|
||||
<description>Some cameras have alarm input wires which can be used to connect to door bells or external PIR sensors.</description>
|
||||
<category>Alarm</category>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="externalAlarmInput2">
|
||||
<channel-type id="externalAlarmInput2" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Alarm In 2</label>
|
||||
<label>Alarm Input 2</label>
|
||||
<description>Some cameras have alarm input wires which can be used to connect to door bells or external PIR sensors.</description>
|
||||
<category>Alarm</category>
|
||||
<state readOnly="true"/>
|
||||
|
@ -2522,56 +2530,56 @@
|
|||
|
||||
<channel-type id="enableMotionAlarm">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Motion Alarm ON/OFF</label>
|
||||
<label>Enable Motion Alarm</label>
|
||||
<description>By using this feature you can stop the camera from sending e-mails when you are actually home.</description>
|
||||
<category>Motion</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="externalMotion">
|
||||
<channel-type id="externalMotion" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>External Motion Sensor Input</label>
|
||||
<description>Use other sensors external to the camera like a ZWave PIR sensor to flag that the camera has motion in
|
||||
<label>External Motion</label>
|
||||
<description>Use any external sensor like a ZWave PIR sensor to flag that the camera has motion in
|
||||
its field of view.</description>
|
||||
<category>Motion</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="ffmpegMotionControl">
|
||||
<channel-type id="ffmpegMotionControl" advanced="true">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>FFmpeg Motion Alarm ON/OFF/DIMMER</label>
|
||||
<label>Control FFmpeg Motion Alarm</label>
|
||||
<description>Enable/Disable the motion alarm and control the sensitivity.</description>
|
||||
<category>Motion</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="enableLineCrossingAlarm">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Line Crossing ON/OFF</label>
|
||||
<label>Enable Line Crossing Alarm</label>
|
||||
<description>By using this feature you can stop the camera from sending e-mails when you are actually home.</description>
|
||||
<category>Motion</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="enableAudioAlarm">
|
||||
<channel-type id="enableAudioAlarm" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Audio Alarm ON/OFF</label>
|
||||
<label>Enable Audio Alarm</label>
|
||||
<description>By using this feature you can stop the camera from sending e-mails when you are having a party.</description>
|
||||
<category>SoundVolume</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="thresholdAudioAlarm">
|
||||
<channel-type id="thresholdAudioAlarm" advanced="true">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>Audio Alarm Threshold ON/OFF/DIMMER</label>
|
||||
<label>Audio Alarm Threshold</label>
|
||||
<description>By moving this control you should be able to change how sensitive the audio alarm is to soft or loud
|
||||
noises.</description>
|
||||
<category>SoundVolume</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="activateAlarmOutput">
|
||||
<channel-type id="activateAlarmOutput" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Alarm Output 1 ON/OFF</label>
|
||||
<description>You can use the cameras output to trigger a device like a burglar alarm.</description>
|
||||
<category>Alarm</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="activateAlarmOutput2">
|
||||
<channel-type id="activateAlarmOutput2" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Alarm Output 2 ON/OFF</label>
|
||||
<description>You can use the cameras output 2 to trigger a device like a burglar alarm.</description>
|
||||
|
@ -2580,46 +2588,46 @@
|
|||
|
||||
<channel-type id="startStream">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Start Stream (HLS .m3u8)</label>
|
||||
<label>Start HLS Stream</label>
|
||||
<description>Lower the delay to start casting the camera by creating the files non stop in case they are needed.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="enableLED">
|
||||
<channel-type id="enableLED" advanced="true">
|
||||
<item-type>Dimmer</item-type>
|
||||
<label>LED ON/OFF/Dimmer controls.</label>
|
||||
<description>Turn the LED on and off and if supported allow Dimming.</description>
|
||||
<label>LED Controls</label>
|
||||
<description>Turn the LED ON and OFF and if supported also 0-100% dimming.</description>
|
||||
<category>Light</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="autoLED">
|
||||
<channel-type id="autoLED" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Auto LED ON/OFF</label>
|
||||
<description>Turn automatic mode for the LED on and off.</description>
|
||||
<label>Auto LED</label>
|
||||
<description>Turn the automatic mode for the LED ON and OFF.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="externalLight">
|
||||
<channel-type id="externalLight" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>External Light ON/OFF</label>
|
||||
<description>Turn the lights on and off.</description>
|
||||
<label>External Light</label>
|
||||
<description>Turn the relay for external lights ON and OFF.</description>
|
||||
<category>Light</category>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="doorBell">
|
||||
<channel-type id="doorBell" advanced="true">
|
||||
<item-type>Switch</item-type>
|
||||
<label>Doorbell Pushed</label>
|
||||
<label>Door Bell</label>
|
||||
<description>The button has been pushed.</description>
|
||||
<state readOnly="true"/>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="textOverlay">
|
||||
<channel-type id="textOverlay" advanced="true">
|
||||
<item-type>String</item-type>
|
||||
<label>Text Overlay</label>
|
||||
<description>Some custom text you wish to overlay over the cameras snapshot and video streams.</description>
|
||||
<description>Enter some text you wish to overlay on top of the cameras snapshot and video streams.</description>
|
||||
</channel-type>
|
||||
|
||||
<channel-type id="gotoPreset">
|
||||
<channel-type id="gotoPreset" advanced="true">
|
||||
<item-type>String</item-type>
|
||||
<label>gotoPreset</label>
|
||||
<label>Go To Preset</label>
|
||||
<description>Move a P.T.Z camera to this ONVIF preset location.</description>
|
||||
<state readOnly="false">
|
||||
<options>
|
||||
|
|
Loading…
Reference in New Issue