home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
73.43k stars 30.66k forks source link

Unfi Protect errors when recording retention is set to a custom interval of 999 days after update to version 2.8.28. #96946

Closed psujek-dev closed 1 year ago

psujek-dev commented 1 year ago

The problem

Till midnight everything working fine.

At midnight Unifi Protect on my UDMPro was updated to version 2.8.28.

After that Unifi Protect integration in HA stop working.

I've remove it, but cant connect again - when i enter correct data such as ip, user name & pass error occurs "Unknown error occurred".

Unifi Network integration with this ip, user, pass working fine.

What version of Home Assistant Core has the issue?

core-2023.7.2

What was the last working version of Home Assistant Core?

core-2023.7.2

What type of installation are you running?

Home Assistant OS

Integration causing the issue

UniFi Protect

Link to integration documentation on our website

https://www.home-assistant.io/integrations/unifiprotect

Diagnostics information

home-assistant_2023-07-20T11-40-52.239Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

No response

Additional information

No response

home-assistant[bot] commented 1 year ago

Hey there @angellusmortis, @bdraco, mind taking a look at this issue as it has been labeled with an integration (unifiprotect) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `unifiprotect` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign unifiprotect` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


unifiprotect documentation unifiprotect source (message by IssueLinks)

AngellusMortis commented 1 year ago

Can you go to https://{protect_ip}/proxy/protect/api/nvr and post the result here? You can remove the mac, and IPs and the ID fields if you want, storageStats and systemInfo are the important ones.

psujek-dev commented 1 year ago

{"mac":"E063DA5ADBxx","host":"20.0.0.1","name":"Dom","canAutoUpdate":false,"isStatsGatheringEnabled":true,"timezone":"Europe/Warsaw","version":"2.8.28","ucoreVersion":"3.0.57","ulpVersion":"v1.5.11","firmwareVersion":"3.0.20","uiVersion":null,"hardwarePlatform":"al324","ports":{"ump":7449,"http":7080,"https":7443,"rtsp":7447,"rtsps":7441,"rtmp":1935,"devicesWss":7442,"cameraHttps":7444,"cameraTcp":7877,"liveWs":7445,"liveWss":7446,"tcpStreams":7451,"playback":7450,"emsCLI":7440,"emsJsonCLI":1112,"emsLiveFLV":7550,"cameraEvents":7551,"stacking":7600,"tcpBridge":7888,"ucore":11081,"piongw":7777,"discoveryClient":0},"uptime":2267460600,"lastSeen":1689859372492,"isUpdating":false,"lastUpdateAt":null,"isStation":false,"enableAutomaticBackups":true,"enableStatsReporting":false,"isSshEnabled":false,"errorCode":null,"releaseChannel":"release","ssoChannel":"release","hosts":["20.0.0.1","192.168.10.1","10.0.0.2","20.0.2.1","20.0.20.1"],"enableBridgeAutoAdoption":true,"isVaultRegistered":false,"isUCoreSetup":true,"hardwareId":"de88a99f-6466-5629-a067-4287f07014f8","hardwareRevision":"113-00723-05","hostType":59925,"hostShortname":"UDMPRO","isHardware":true,"isWirelessUplinkEnabled":true,"timeFormat":"24h","temperatureUnit":"C","recordingRetentionDurationMs":8639999999913600000,"enableCrashReporting":true,"disableAudio":false,"analyticsData":"full","anonymousDeviceId":"67fc6e9f-3009-4049-8bd8-c19c56a78a26","isRecordingDisabled":false,"isRecordingMotionOnly":false,"isInsightsEnabled":true,"cameraUtilization":33,"isRecycling":true,"disableAutoLink":false,"skipFirmwareUpdate":false,"countryCode":"PL","publicIp":"139.xxx.xxx.xxx","streamSharingAvailable":true,"corruptionState":"healthy","portStatus":[{"id":"eth0","enabled":true,"plugged":true,"type":"LAN","mac":"e0:63:da:5a:db:f5"},{"id":"eth1","enabled":true,"plugged":true,"type":"LAN","mac":"e0:63:da:5a:db:xx"},{"id":"eth10","enabled":true,"plugged":true,"type":"LAN","mac":"e0:63:da:5a:db:xx"},{"id":"eth2","enabled":true,"plugged":false,"type":"LAN","mac":"e0:63:da:5a:db:xx"},{"id":"eth3","enabled":true,"plugged":false,"type":"LAN","mac":"e0:63:da:5a:db:xx"},{"id":"eth4","enabled":true,"plugged":false,"type":"LAN","mac":"e0:63:da:5a:db:xx"},{"id":"eth5","enabled":true,"plugged":false,"type":"LAN","mac":"e0:63:da:5a:db:xx"},{"id":"eth6","enabled":false,"plugged":false,"type":"LAN","mac":"e0:63:da:5a:db:xx"},{"id":"eth7","enabled":true,"plugged":true,"type":"WAN","mac":"e0:63:da:5a:db:xx"},{"id":"eth8","enabled":true,"plugged":true,"type":"WAN2","mac":"e0:63:da:5a:db:xx"},{"id":"eth9","enabled":true,"plugged":false,"type":"LAN","mac":"e0:63:da:5a:db:xx"}],"wanIp":"100.95.xxx.xxx","hasGateway":true,"isPrimary":false,"lastDriveSlowEvent":null,"vaultCameras":[],"dbRecoveryOptions":{"canRecover":null,"hddFailing":null,"partitionReadonly":null,"hasDbBackup":null,"hasConfigBackup":null},"wifiSettings":{"useThirdPartyWifi":false,"ssid":null,"password":null},"locationSettings":{"isAway":false,"isGeofencingEnabled":true,"latitude":xx.295315313348226,"longitude":xx.103821059349343,"radius":200},"featureFlags":{"beta":false,"dev":false,"notificationsV2":true,"homekitPaired":false,"ulpRoleManagement":false},"systemInfo":{"cpu":{"averageLoad":32,"temperature":59},"memory":{"available":622936,"free":78976,"total":4040908},"storage":{"available":68614279168,"isRecycling":true,"size":7937399177216,"type":"hdd","used":7937399177216,"capability":"ok","devices":[{"model":"WDC WD80EFAX-68KNBN0","size":8001563222016,"healthy":true}]},"ustorage":{"disks":[{"slot":1,"type":"HDD","model":"WDC WD80EFAX-68KNBN0","serial":"VDGB5UBD","firmware":"81.00A81","rpm":5400,"ata":"ACS-2,","sata":"SATA 3.2","action":"none","healthy":"good","state":"normal","reason":null,"temperature":61,"poweronhrs":27388,"life_span":null,"bad_sector":0,"threshold":10,"progress":null,"estimate":null}],"space":[{"device":"sda1","health":"health","total_bytes":7937399177216,"used_bytes":7868768079872,"action":"none","progress":null,"estimate":0,"space_type":"primary"},{"device":"overlay","health":"health","total_bytes":10057830400,"used_bytes":2402914304,"action":"none","progress":null,"estimate":0,"space_type":"root"}]},"tmpfs":{"available":520120,"total":524288,"used":4168,"path":"/var/opt/unifi-protect/tmp"}},"doorbellSettings":{"defaultMessageText":"WELCOME","defaultMessageResetTimeoutMs":60000,"customMessages":[],"allMessages":[{"type":"LEAVE_PACKAGE_AT_DOOR","text":"LEAVE PACKAGE AT DOOR"},{"type":"DO_NOT_DISTURB","text":"DO NOT DISTURB"}]},"smartDetectAgreement":{"status":"agreed","lastUpdateAt":1645125994960},"storageStats":{"utilization":100,"capacity":3229878918,"remainingCapacity":0,"recordingSpace":{"total":7868679700480,"used":7868767121408,"available":0},"storageDistribution":{"recordingTypeDistributions":[{"recordingType":"rotating","size":7642175847208,"percentage":97.15166374127737},{"recordingType":"timelapse","size":15032385536,"percentage":0.19110019110019108},{"recordingType":"detections","size":209024369880,"percentage":2.6572360676224362}],"resolutionDistributions":[{"resolution":"HD","size":7866232602624,"percentage":99.96890078197171},{"resolution":"free","size":2447097856,"percentage":0.031099218028289088}]}},"globalCameraSettings":{"quality":"high","osdSettings":{"isNameEnabled":true,"isDateEnabled":true,"isLogoEnabled":false,"isDebugEnabled":false},"recordingSettings":{"prePaddingSecs":2,"postPaddingSecs":2,"minMotionEventTrigger":1000,"endMotionEventDelay":3000,"suppressIlluminationSurge":false,"mode":"always","geofencing":"off","motionAlgorithm":"stable","enableMotionDetection":true,"enablePirTimelapse":false,"useNewMotionAlgorithm":false},"recordingSchedules":[],"smartDetectSettings":{"objectTypes":["person","vehicle"],"autoTrackingObjectTypes":[],"audioTypes":["smoke_cmonx"]}},"id":"6342747801ee8503870003ea","isAway":false,"isSetup":true,"network":"Ethernet","type":"UDM-PRO","upSince":1687591911892,"maxCameraCapacity":{"4K":7,"2K":12,"HD":20},"marketName":"UDM Pro","isStacked":false,"modelKey":"nvr"}

AngellusMortis commented 1 year ago

Can you post a screenshot of your recording retention inside of Protect? should look similar to: image

psujek-dev commented 1 year ago

image

I think I found where problem was -> I had Recording Retention set to custom & 999 days, till today it was ok.

After @AngellusMortis mention about retention, I've switch it to auto, apply, then switch back to custom & 999 and then I add Unfi Protect integration without problem

issue-triage-workflows[bot] commented 1 year ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.