-
-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Config Changes Not Being Saved #579
Comments
I was able to reproduce it too. Was playing with different params for hours to find the best set and in the end realized I didn't even change anything 😭 |
I’m having the same issue. Rolled back to 1.3.0 |
I experienced the same issue. I think I found a temporary workaround which is to change the camera name when you make a change. For example, I renamed "Cam Driveway" to "Cam Driveway2" to force changes to be picked up. |
Is this only happening on the latest version of camera-ffmpeg? Meaning is the plugin really the cause of this? |
I've also reproduced this issue. I'm able to temporarily fix this by removing the cameras in the Homebridge Config UI X > Homebridge Settings > Remove Single Cached Accessory. When Homebridge is restarted, then the new config is loaded. |
I suspect this was related to how v2.0.0 shows cameras a bridged instead of accessories in v1.3.0. I suspect maybe homebridge caches the config of bridged camera differently to accessories. |
homebridge-camera-ffmpeg/src/index.ts Line 53 in 585b8f6
the plugin stores the configuration made when the camera was first set up and will ignore any further changes to the config made, as it will always just use the stored value |
but still I get this [2020-7-2 19:02:08] [Camera-ffmpeg] FFMPEG: [http @ 0x2f5b360] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy' [2020-7-2 19:02:08] [Camera-ffmpeg] FFMPEG: [tcp @ 0x2f5ce60] Successfully connected to 192.168.8.166 port 554 [2020-7-2 19:02:08] [Camera-ffmpeg] FFMPEG: [http @ 0x2f5b360] HTTP error 400 Bad Request [2020-7-2 19:02:08] [Camera-ffmpeg] FFMPEG: rtsp://ciava:[email protected]:554/videoMain: Input/output error [2020-7-2 19:02:08] [Camera-ffmpeg] [FFMPEG] ffmpeg exited with code: 1 and signal: null (error) |
…rovided by the config file homebridge-plugins#579
@longzheng should be fixed in last merged and latest beta. |
@donavanbecker Latest beta is definitely an improvement to solving the streaming issues BUT I'm noticing that once I add a cam in the latest v2.0.2 beta 39 that any subsequent changes to that cam through the Plugin's\Settings option results in Homebridge not being able to restart as it kicks out the error below. Only way to resolve is to remove Platform, remove cached device and start over. Thoughts on this ? Thanks again Cannot add a Service with the same UUID 'xxxxxxxx7xxxxx5xx91' as another Service in this Accessory without also defining a unique 'subtype' property. |
I wonder if you got this be cause the cache was still there. Has it happen again? |
I can literally replicate this over and over. What is weird is it gets into that loop RE: (another service with same UUID) even if I use cam names I had before installing this beta. Steps to reproduce this and then fix are: To Cause The Issue: To Fix The Issue The problem of course is 1) somewhere, previous cam names are being stored so seemingly can only be used once and 2) that due to the error being seen, if you need to adjust ANYTHING or add a new camera you will be forced to remove the existing cameras completely, remove cached cams and start from scratch Thoughts on how to get around this or can be fixed in the plugin @donavanbecker ? |
@donavanbecker to follow up to my comment above, even just removing cached cam or renaming cam (for update in config) by themselves does not appear to fix the issue. Only removing the cam then removing the cache and restarting does it resolve the restart issue of 'service with same name'. This means that to update or add any extra cams you literally have to start from scratch each time. |
I can confirm v2.0.2-beta.39 fixes the config issue for me. I can
|
@longzheng
Could you post you config.json specifically cam settings. Call out the cam's you are using (I'm using Dahua & Hik, Axis etc) and then the platform and version you are running on (I'm running macOS Hombridge UI 4.23.2, Node.js Version | v12.16.3, NPM v6.14.5) ? Maybe that will help pinpoint the issue with caching and response too Thanks |
Can I suggest you try null out your camera config, save, restart Homebridge, then add it all back in?
My config.json is very simple. I'm connecting to a Dahua NVR.
In my test, I added My versions are
|
* Update CHANGELOG.md * Add MQTT to motion Detect (#572) * Update package.json * Update config.schema.json * Update index.ts * Add files via upload * Update index.ts * Update config.schema.json * Update config.schema.json * add prettier back * Bump ts-jest from 25.5.1 to 26.1.1 (#578) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.5.1 to 26.1.1. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](kulshekhar/ts-jest@v25.5.1...v26.1.1) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump jest from 26.0.1 to 26.1.0 (#577) Bumps [jest](https://github.com/facebook/jest) from 26.0.1 to 26.1.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](jestjs/jest@v26.0.1...v26.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump typescript from 3.9.3 to 3.9.5 (#576) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.3 to 3.9.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v3.9.3...v3.9.5) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * fix files in package.json * Update package.json * Update CHANGELOG.md * Update index.ts (#585) Just publish message to topic homebridge/motion message is the name of camera with no space replace with _ { "platform": "Camera-ffmpeg", "mqtt": "127.0.0.1", "topics": "homebridge/motion", "cameras": [ { "name": "Camera name", "motion": true, "videoConfig": { "source": "-re -i http://10.0.0.1", "stillImageSource": "-i http://10.0.0.1", "maxStreams": 5, "maxWidth": 1280, "maxHeight": 720, "maxFPS": 15, "maxBitrate": 1000 } } ] } * Bump typescript from 3.9.3 to 3.9.5 (#582) Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.3 to 3.9.5. - [Release notes](https://github.com/Microsoft/TypeScript/releases) - [Commits](microsoft/TypeScript@v3.9.3...v3.9.5) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Donavan Becker <[email protected]> * Bump jest from 26.0.1 to 26.1.0 (#581) Bumps [jest](https://github.com/facebook/jest) from 26.0.1 to 26.1.0. - [Release notes](https://github.com/facebook/jest/releases) - [Changelog](https://github.com/facebook/jest/blob/master/CHANGELOG.md) - [Commits](jestjs/jest@v26.0.1...v26.1.0) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Bump ts-jest from 25.5.1 to 26.1.1 (#580) Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 25.5.1 to 26.1.1. - [Release notes](https://github.com/kulshekhar/ts-jest/releases) - [Changelog](https://github.com/kulshekhar/ts-jest/blob/master/CHANGELOG.md) - [Commits](kulshekhar/ts-jest@v25.5.1...v26.1.1) Signed-off-by: dependabot-preview[bot] <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> * Update streamingDelegate.ts * Update streamingDelegate.ts * Update streamingDelegate.ts * Update streamingDelegate.ts * Update streamingDelegate.ts * Update streamingDelegate.ts * Update streamingDelegate.ts * Update streamingDelegate.ts * Update streamingDelegate.ts * Update streamingDelegate.ts * Update config.schema.json * Update index.ts * Update index.ts * Update index.ts * Update index.ts * reverting * Update index.ts * Update index.ts * switches config option * Update config.schema.json * Update config.schema.json * Update config.schema.json * add doorbell switch * move doorbell switch * Update config.schema.json * Update config.schema.json * Update index.ts * Update CHANGELOG.md * Update config.schema.json * Update config.schema.json * Update config.schema.json * Update index.ts * Fix packetsize config and various refactoring (#591) * Fix duplicate debug * Set ffmpeg pkt_size to either config packetize or fallback to video.mtu * Refactor ffmpegOpt to class properties * Log "Starting video stream" without debug This was the behaviour in v1.3.0 https://github.com/homebridge-plugins/homebridge-camera-ffmpeg/blob/2d07a3899059ae2c4326bc7d985de5af5d3228ae/ffmpeg.js#L429 * Also log "stopped streaming" without debug * Tweak start video stream log to contain name of camera * Ensure that configureAccessory always uses the latest configuration provided by the config file #579 (#593) * Only create an mqtt client if a mqtt host is configured (#592) * Update index.ts (#600) * Update index.ts (#601) * Tweak image snapshot to use -frames:v instead of -t (#602) * Fix duplicate debug * Set ffmpeg pkt_size to either config packetize or fallback to video.mtu * Refactor ffmpegOpt to class properties * Log "Starting video stream" without debug This was the behaviour in v1.3.0 https://github.com/homebridge-plugins/homebridge-camera-ffmpeg/blob/2d07a3899059ae2c4326bc7d985de5af5d3228ae/ffmpeg.js#L429 * Also log "stopped streaming" without debug * Tweak start video stream log to contain name of camera * Tweak snapshot capture to use -frames:v instead of -t The HAP-NodeJS camera example uses `-vframes 1` to capture just one frame https://github.com/homebridge/HAP-NodeJS/blob/master/src/accessories/Camera_accessory.ts#L71 `-frames:v` is the newer version of `-vframes` which is deprecated https://ffmpeg.org/ffmpeg.html#Video-Options * Update index.ts (#605) Just post same name that camera in message on topic homebridge/motion * Support for MQTT Resetting of Motion Sensor (#606) * Cleaned up formatting. * Added support for MQTT resetting of motion sensor. * Logging updates (#607) * Update streamingDelegate.ts * fix show of logs * clean up * Update streamingDelegate.ts * Update CHANGELOG.md Co-authored-by: fennec622 <[email protected]> Co-authored-by: Brandon McFarlin <[email protected]> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: Long Zheng <[email protected]> Co-authored-by: Andi <[email protected]> Co-authored-by: california444 <[email protected]> Co-authored-by: David Maher <[email protected]> Co-authored-by: Igor Ramos <[email protected]>
Describe The Bug:
Starting in 2.0.x seeing that any changes to cameras after initial setup do not get reflected in config. NOTE: Seeing this in the release version of 2.0.x and the beta
To Reproduce:
Using 2.0.x add a camera in with a set criteria (regular -re -i {stream} etc).
Expected behavior:
Expect this to update the config.JSON and the camera-ffmpeg plugin to read the updated config
Logs:
Not seeing anything in the logs that pinpoints this issue currently but happy to provide.
Screenshots
So here is an example. When I run v2.0.x here is what the logs show when accessing the camera:
[6/29/2020, 4:48:41 PM] [Camera-ffmpeg] ffmpeg -rtsp_transport http -re -i rtsp://xxxxxxx:[email protected]:554/cam/realmonitor?channel=1&subtype=0 -t 1 -vf scale=1280:720 -f image2 -
HOWEVER, here is what the Plugins / Settings section shows (notice the lack of -rtsp_transport in the config):
Same can be said if you look at the config.JSON therefore its as if after initial setup of v2.0.x that NO changes/updates even in the JSON are being read by the plugin
Here is what is shown in the Homebridge-UI logs which shows the config.json is being saved and again the config file itself reflects those changes BUT camera-ffmpeg is not reading them:
[6/29/2020, 5:04:21 PM] [Config] Changes to config.json saved.
[1593471861811] INFO (90189 on mycomputer.localdomain): request completed
reqId: 10
res: {
"statusCode": 201
The text was updated successfully, but these errors were encountered: