Skip to content

Commit

Permalink
v5.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
seydx committed Jan 15, 2022
1 parent d728150 commit 5fcba93
Show file tree
Hide file tree
Showing 12 changed files with 1,028 additions and 912 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
# Changelog
All notable changes to this project will be documented in this file.

# v5.0.7 - 2022-01-15

## Other Changes
- Videoanalysis: Reduced the dwell time from 90s to 60s (camera.ui)
- Videoanalysis: Removed `-hwaccel` from FFMPEG parameters (camera.ui)
- Videoanalysis: Added `pixel/color difference` slider to be able to adjust the video analysis even more precisely within ui (camera.ui)
- Prebuffering: Added `-preset:v ultrafast` if `forcePrebuffering` is enabled (camera.ui)
- Added the possibility to control the motion sensor (OFF state) via the camera instead of via motionTimeout (set `"motionTimeout": 0`, the camera must be able to send a `OFF` message e.g. via MQTT or Videoanalysis)
- Removed motionTimeout for DOORBELLs
- More translation added (camera.ui)
- Config.schema.json improvements
- Minor improvements (camera.ui)

## Bugfixes
- Fixed an isue where crashing FFmpeg did not display an error message in the log (camera.ui)
- Fixed an issue where the dwell time could start before the motion handler was initialized (camera.ui)
- Fixed an issue where the restart timer for prebuffering and videoanalysis were calculated wrong (camera.ui)
- Fixed an issue where removing the camera through interface crashed the process
- Fixed an issue where the interface link was not displayed in homebridge-config-ui-x if no port was set in config.json
- Minor Bugfixes

# v5.0.6 - 2022-01-14

Expand Down
244 changes: 130 additions & 114 deletions config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,25 @@
"switches": {
"title": "Enable Dummy Switches",
"type": "boolean",
"description": "Enables dummy switches to trigger motion and/or doorbell, if either of those are enabled. When enabled there will be an additional switch that triggers the motion or doorbell event."
"description": "Enables dummy switches to trigger motion and/or doorbell, if either of those are enabled. When enabled there will be an additional switch that triggers the motion or doorbell event.",
"condition": {
"functionBody": "return model.cameras[arrayIndices[0]].motion === true || model.cameras[arrayIndices[0]].doorbell === true;"
}
},
"motionTimeout": {
"title": "Automatic Motion Reset (Seconds)",
"type": "integer",
"placeholder": 15,
"minimum": 15,
"description": "The number of seconds after triggering to reset the motion sensor. Set to 0 to disable resetting of motion trigger for MQTT or HTTP. This will also affect the interface timeout."
"description": "The number of seconds after triggering to reset the motion sensor. Set to 0 to disable resetting of motion trigger. This will also affect the interface timeout."
},
"motionDoorbell": {
"title": "Trigger Doorbell with Motion",
"type": "boolean",
"description": "Rings the doorbell when motion is activated. This allows for motion alerts to appear on Apple TVs."
"description": "Rings the doorbell when motion is activated. This allows for motion alerts to appear on Apple TVs.",
"condition": {
"functionBody": "return model.cameras[arrayIndices[0]].motion === true && model.cameras[arrayIndices[0]].doorbell === true;"
}
},
"unbridge": {
"title": "Unbridge Camera (Recommended)",
Expand All @@ -285,15 +291,21 @@
"forcePrebuffering": {
"title": "Force Prebuffering",
"type": "boolean",
"description": "For cameras without a H264 stream. If set, camera.ui will start prebuffering with reencoding the stream. Caution: This will lead to a higher CPU load!"
"description": "For cameras without a H264 stream. If set, camera.ui will start prebuffering with reencoding the stream. Caution: This will lead to a higher CPU load!",
"condition": {
"functionBody": "return model.cameras[arrayIndices[0]].prebuffering === true;"
}
},
"prebufferLength": {
"title": "Prebuffer Length",
"type": "integer",
"default": 4,
"minimum": 4,
"maximum": 8,
"description": "The length of the requested prebuffered video (s)"
"description": "The length of the requested prebuffered video (s)",
"condition": {
"functionBody": "return model.cameras[arrayIndices[0]].prebuffering === true;"
}
},
"videoConfig": {
"title": "Video Configuration",
Expand Down Expand Up @@ -325,7 +337,8 @@
"title": "RTSP Transport",
"required": true,
"type": "string",
"oneOf": [{
"oneOf": [
{
"title": "udp",
"enum": ["udp"]
},
Expand Down Expand Up @@ -528,7 +541,7 @@
"properties": {
"active": {
"title": "Active",
"description": "Activates Video Analysis for motion detection. (Prebuffer needs to be enabled for video analysis to work)",
"description": "Activates Video Analysis for motion detection (a low resolution sub stream is preferred or prebuffering enabled)",
"type": "boolean",
"default": false
}
Expand All @@ -538,7 +551,8 @@
}
}
},
"layout": [{
"layout": [
{
"type": "section",
"title": "Interface",
"expandable": true,
Expand All @@ -562,111 +576,113 @@
"title": "Cameras",
"expandable": true,
"expanded": false,
"items": [{
"key": "cameras",
"type": "tabarray",
"title": "{{ value.name || 'new Camera' }}",
"items": [
"cameras[].name",
"cameras[].unbridge",
"cameras[].hsv",
"cameras[].prebuffering",
"cameras[].forcePrebuffering",
"cameras[].prebufferLength",
{
"key": "cameras[]",
"type": "section",
"title": "Branding",
"expandable": true,
"expanded": false,
"items": ["cameras[].manufacturer", "cameras[].model", "cameras[].serialNumber"]
},
{
"key": "cameras[]",
"type": "section",
"title": "Stream Configuration",
"expandable": true,
"expanded": false,
"items": [
"cameras[].videoConfig.source",
"cameras[].videoConfig.subSource",
"cameras[].videoConfig.stillImageSource",
"cameras[].videoConfig.maxStreams",
"cameras[].videoConfig.maxWidth",
"cameras[].videoConfig.maxHeight",
"cameras[].videoConfig.maxFPS",
"cameras[].videoConfig.maxBitrate",
"cameras[].videoConfig.audio",
"cameras[].videoConfig.forceMax",
"cameras[].videoConfig.debug"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Advanced Stream Configuration",
"expandable": true,
"expanded": false,
"items": [
"cameras[].videoConfig.readRate",
"cameras[].videoConfig.acodec",
"cameras[].videoConfig.vcodec",
"cameras[].videoConfig.rtspTransport",
"cameras[].videoConfig.analyzeDuration",
"cameras[].videoConfig.probeSize",
"cameras[].videoConfig.reorderQueueSize",
"cameras[].videoConfig.maxDelay",
"cameras[].videoConfig.stimeout",
"cameras[].videoConfig.packetSize",
"cameras[].videoConfig.mapvideo",
"cameras[].videoConfig.mapaudio",
"cameras[].videoConfig.videoFilter",
"cameras[].videoConfig.encoderOptions",
"cameras[].videoConfig.returnAudioTarget",
"cameras[].videoConfig.debugReturn"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Sensors and Switches",
"expandable": true,
"expanded": false,
"items": [
"cameras[].motion",
"cameras[].doorbell",
"cameras[].switches",
"cameras[].motionTimeout",
"cameras[].motionDoorbell",
"cameras[].excludeSwitch",
"cameras[].privacySwitch"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "MQTT Options",
"expandable": true,
"expanded": false,
"items": [
"cameras[].mqtt.motionTopic",
"cameras[].mqtt.motionMessage",
"cameras[].mqtt.motionResetTopic",
"cameras[].mqtt.motionResetMessage",
"cameras[].mqtt.doorbellTopic",
"cameras[].mqtt.doorbellMessage"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Video Analysis",
"expandable": true,
"expanded": false,
"items": ["cameras[].videoanalysis.active"]
}
]
}]
"items": [
{
"key": "cameras",
"type": "tabarray",
"title": "{{ value.name || 'new Camera' }}",
"items": [
"cameras[].name",
"cameras[].unbridge",
"cameras[].hsv",
"cameras[].prebuffering",
"cameras[].forcePrebuffering",
"cameras[].prebufferLength",
{
"key": "cameras[]",
"type": "section",
"title": "Branding",
"expandable": true,
"expanded": false,
"items": ["cameras[].manufacturer", "cameras[].model", "cameras[].serialNumber"]
},
{
"key": "cameras[]",
"type": "section",
"title": "Stream Configuration",
"expandable": true,
"expanded": false,
"items": [
"cameras[].videoConfig.source",
"cameras[].videoConfig.subSource",
"cameras[].videoConfig.stillImageSource",
"cameras[].videoConfig.maxStreams",
"cameras[].videoConfig.maxWidth",
"cameras[].videoConfig.maxHeight",
"cameras[].videoConfig.maxFPS",
"cameras[].videoConfig.maxBitrate",
"cameras[].videoConfig.audio",
"cameras[].videoConfig.forceMax",
"cameras[].videoConfig.debug"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Advanced Stream Configuration",
"expandable": true,
"expanded": false,
"items": [
"cameras[].videoConfig.readRate",
"cameras[].videoConfig.acodec",
"cameras[].videoConfig.vcodec",
"cameras[].videoConfig.rtspTransport",
"cameras[].videoConfig.analyzeDuration",
"cameras[].videoConfig.probeSize",
"cameras[].videoConfig.reorderQueueSize",
"cameras[].videoConfig.maxDelay",
"cameras[].videoConfig.stimeout",
"cameras[].videoConfig.packetSize",
"cameras[].videoConfig.mapvideo",
"cameras[].videoConfig.mapaudio",
"cameras[].videoConfig.videoFilter",
"cameras[].videoConfig.encoderOptions",
"cameras[].videoConfig.returnAudioTarget",
"cameras[].videoConfig.debugReturn"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Sensors and Switches",
"expandable": true,
"expanded": false,
"items": [
"cameras[].motion",
"cameras[].doorbell",
"cameras[].switches",
"cameras[].motionTimeout",
"cameras[].motionDoorbell",
"cameras[].excludeSwitch",
"cameras[].privacySwitch"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "MQTT Options",
"expandable": true,
"expanded": false,
"items": [
"cameras[].mqtt.motionTopic",
"cameras[].mqtt.motionMessage",
"cameras[].mqtt.motionResetTopic",
"cameras[].mqtt.motionResetMessage",
"cameras[].mqtt.doorbellTopic",
"cameras[].mqtt.doorbellMessage"
]
},
{
"key": "cameras[]",
"type": "section",
"title": "Video Analysis",
"expandable": true,
"expanded": false,
"items": ["cameras[].videoanalysis.active"]
}
]
}
]
},
{
"key": "options",
Expand Down Expand Up @@ -713,4 +729,4 @@
"items": ["ftp.active", "ftp.port"]
}
]
}
}
13 changes: 5 additions & 8 deletions homebridge-ui/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,12 @@ class UiServer extends HomebridgePluginUiServer {
async getInterfaceConfig() {
const config = await fs.readJSON(this.homebridgeConfigPath, { throws: false });
const cameraUI = config?.platforms?.find((plugin) => plugin?.platform === 'CameraUI');
const isHttps = Boolean(cameraUI?.ssl?.active && cameraUI?.ssl?.key && cameraUI?.ssl?.cert);

if (cameraUI?.port) {
const isHttps = Boolean(cameraUI?.ssl?.active && cameraUI?.ssl?.key && cameraUI?.ssl?.cert);

return {
protocol: isHttps ? 'https' : 'http',
port: cameraUI.port,
};
}
return {
protocol: isHttps ? 'https' : 'http',
port: cameraUI?.port || 8081,
};

return false;
}
Expand Down
2 changes: 0 additions & 2 deletions homebridge-ui/ui/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ export default {
this.interfaceLink = `${protocol}://${window.location.hostname}:${port}`;
}
console.log(this.interfaceLink);
window.homebridge.hideSpinner();
});
},
Expand Down
Loading

0 comments on commit 5fcba93

Please sign in to comment.