hjdhjd / homebridge-unifi-protect

:video_camera: Complete HomeKit integration for all UniFi Protect device types with full support for most features including HomeKit Secure Video, and more. https://homebridge.io
Other
1.45k stars 93 forks source link

"Unable to retrieve a snapshot" for just one camera #1044

Closed nyirsh closed 7 months ago

nyirsh commented 7 months ago

Homebridge UniFi Protect Version

v6.18.0

Homebridge Platform and OS

Raspberry Pi 4B+ / Raspbian GNU/Linux Bullseye (11)

Homebridge Version

v1.7.0

Node Version

v20.11.1

UniFi OS Version

v3.2.9

UniFi Protect Controller Version

v2.11.21

Describe the problem

I'm not totally sure exactly when this issue started or what could have caused it, but the plugin was working flawlessly until a couple of weeks ago. I have 5 different cameras connected and only one of them recently started not updating its snapshot in the Home app, but if I try to livestream everything works correctly.

It is worth noting that I only just updated the node version because I thought it could help solving my issue but I actually was on v18 (sorry, don't remember exactly which subversion and I totally forgot to write it down).

The cameras and the Raspberry Pi running HB are on two separate VLANs but I know that the firewall rules have been set up correctly and that every device is on the proper subnet etc.

Thank you for your attention!

Homebridge HBUP JSON configuration

{
    "controllers": [
        {
            "address": "192.168.9.1",
            "password": "REDACTED",
            "username": "REDACTED"
        }
    ],
    "name": "UniFi Protect",
    "options": [
        "Enable.Device.SyncName",
        "Enable.Doorbell.Trigger",
        "Enable.Log.Motion",
        "Enable.Video.Transcode.Hardware",
        "Disable.Motion.Switch.E4388377FC7D",
        "Enable.Motion.SmartDetect",
        "Enable.Motion.SmartDetect.ObjectSensors"
    ],
    "_bridge": {
        "username": "REDACTED",
        "port": 47855
    },
    "platform": "UniFi Protect"
}

Relevant log output

[19/02/2024, 11:27:58] [UniFi Protect] Dream Machine Pro [UDM-PRO] Driveway [G5 Pro + Enhancer]: Unable to retrieve a snapshot.
[19/02/2024, 11:28:18] [UniFi Protect] Dream Machine Pro [UDM-PRO] Driveway [G5 Pro + Enhancer]: Unable to retrieve a snapshot.
[19/02/2024, 11:28:19] [UniFi Protect] Dream Machine Pro [UDM-PRO] Driveway [G5 Pro + Enhancer]: Streaming request from 192.168.8.208: 1280x720@30fps, 299 kbps. Using 1280x720@30fps (Medium), 2,000 kbps.
[19/02/2024, 11:28:27] [UniFi Protect] Dream Machine Pro [UDM-PRO] Driveway [G5 Pro + Enhancer]: Streaming parameters adjustment requested by HomeKit: 640x360, 30 fps, 132 kbps.
[19/02/2024, 11:28:30] [UniFi Protect] Dream Machine Pro [UDM-PRO] Driveway [G5 Pro + Enhancer]: Stopped video streaming session.

Acknowledgment that you are only running UniFi OS and UniFi Protect releases from the Ubiquiti Official release channel

hjdhjd commented 7 months ago

Thanks for the report, unfortunately there’s not much I can do here. Snapshot errors occur when the Protect controller is unable to generate them. You might try rebooting the Protect controller and see if that helps, but I’m afraid I don’t have something else to point you toward on this one.

Best of luck.

nyirsh commented 7 months ago

Ah, I feel stupid, that's the only thing I didn't try and well... it worked. Thank you very much for your assistance, keep up the good work!

acect commented 7 months ago

FIXED - Snapshot Error Message Problem

I had the same issue and somehow got the snapshots working again last night.

Until a couple of weeks ago, I had no problems with the plugin for the last 2-3 years I've run this plugin. I was starting to have a full-blown meltdown and very close to proper rage quit of all things HomeBridge.

Fortunately, cooler heads prevailed when I remembered that as a teenager, I lived through the years of Windows ME. Sometimes you just have to start from scratch. Unfortunately, I'm not sure exactly what I did that actually fixed the problem.

It was a bit like the scene in National Lampoon's Christmas Vacation where Chevy Chase trying to fix the Christmas lights on his house. Something in the steps below resolved the problem, and it wasn't Ellen flipping a GD light switch.

Steps I uninstalled this plugin and removed the child bridge running the plugin. I 'stopped' (paused) my UniFi Protect application via the UniFi OS Controller, then started UniFi Protect back up after about 5 minutes of downtime. I suppose a restart of the controller itself would accomplish the same thing.

Next, I created a dedicated local admin account with its own UN and PW just for the plugin. I knew I should have done this from the very beginning three years ago, but it was never a problem until recently. Then, I reinstalled the plugin and added the bridge to HomeKit with the plugin's default settings. I've turned on my various advanced settings one by one, and all seem to be working as expected.

All of that seemed to 'fix' the problem, but I'm not sure which step actually did the trick. Perhaps it was the whole process.

I would have saved a lot of time if I just did all of this from the first sign of the error. It took much longer to tinker with a variety of settings and variables. I will say the performance of the plugin via HomeKit seems to be much better now, but that could be due to the fact that I finally got the thing to work again. You serious, Clark?

I hope this works for you

plugging-in-clark-griswold plug-in-sparks i-fixed-it-clark-griswold

github-actions[bot] commented 7 months ago

This issue is locked to prevent necroposting on closed issues. Please create a new issue for related support requests, bug reports, or feature suggestions.