Closed gianmarco-mameli closed 2 years ago
Which version of the proxy are you using?
Hi @keshavdv latest version from pip, 0.1.4. I've tried also with Docker Version but nothing changes
Hi, today I've updated to Protect 1.21, but nothing has changed
Can you share logs from your Dream Machine from /srv/unifi-protect/logs/service.log during the crash?
Hi, yes of course. This is the log from starting the command to exiting with ctrl-c to prevent looping on errors
2022-02-04T20:56:47.596Z - info: addConnection, mac: AABBCCDDEEFF
2022-02-04T20:56:47.598Z - verbose: RECEIVED ubnt_avclient_hello FROM G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 1
2022-02-04T20:56:47.599Z - verbose: SENT ubnt_avclient_hello TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 10034
2022-02-04T20:56:47.612Z - verbose: RECEIVED ubnt_avclient_hello FROM G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 1
2022-02-04T20:56:47.613Z - verbose: SENT ubnt_avclient_hello TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 10035
2022-02-04T20:56:47.870Z - verbose: Updated nvr.storageStats
{
utilization: 2.049173469676581,
capacity: 205591267219,
remainingCapacity: 203512842945,
recordingSpace: { total: 914710286336, used: 18744000512, available: 895966285824 },
storageDistribution: {
recordingTypeDistributions: [
{
recordingType: 'rotating',
size: 4897723064,
percentage: 26.831529727753473
},
{
recordingType: 'timelapse',
size: 4294967296,
percentage: 23.52941176470588
},
{
recordingType: 'detections',
size: 9060920648,
percentage: 49.639058507540646
}
],
resolutionDistributions: [
{
resolution: 'HD',
size: 18253611008,
percentage: 1.9955620135329835
},
{
resolution: 'free',
size: 896456675328,
percentage: 98.00443798646702
}
]
}
}
2022-02-04T20:56:48.119Z - verbose: SENT ubnt_avclient_paramAgreement TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 10038
2022-02-04T20:56:48.127Z - verbose: SENT ubnt_avclient_paramAgreement TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 10039
2022-02-04T20:56:48.137Z - verbose: SENT StopService TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]. MESSAGE ID: 10040
2022-02-04T20:56:48.138Z - info: Update Complete for G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]
2022-02-04T20:56:48.139Z - info: Checking for updates for G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]
2022-02-04T20:56:48.162Z - info: response
{
cliCustomParameters: null,
data: {
privateStreamName: 'IrBAXAUHDm2NZTqP',
publicStreamName: 'AABBCCDDEEFF_0'
},
description: 'Ingest point created',
requestId: 7,
requestTimestamp: 1644008208,
responseTimestamp: 1644008208,
status: 'SUCCESS'
}
2022-02-04T20:56:48.163Z - info: response
{
cliCustomParameters: null,
data: {
privateStreamName: 'ilOVtWy4ntYwwG9A',
publicStreamName: 'AABBCCDDEEFF_1'
},
description: 'Ingest point created',
requestId: 8,
requestTimestamp: 1644008208,
responseTimestamp: 1644008208,
status: 'SUCCESS'
}
2022-02-04T20:56:48.164Z - info: response
{
cliCustomParameters: null,
data: {
privateStreamName: 'GUwWjVuQpVrjFfIZ',
publicStreamName: 'AABBCCDDEEFF_2'
},
description: 'Ingest point created',
requestId: 9,
requestTimestamp: 1644008208,
responseTimestamp: 1644008208,
status: 'SUCCESS'
}
2022-02-04T20:56:48.173Z - info: Start recording G3 Bullet [AABBCCDDEEFF @ 192.168.1.10] - CH 0
2022-02-04T20:56:48.174Z - info: Start recording G3 Bullet [AABBCCDDEEFF @ 192.168.1.10] - CH 2
2022-02-04T20:56:48.184Z - info: response
{
cliCustomParameters: {
_camera: '61fbe5a501027f03870003f2',
_channel: 0,
_streamName: 'AABBCCDDEEFF_0'
},
data: {
_camera: '61fbe5a501027f03870003f2',
_channel: 0,
_streamName: 'AABBCCDDEEFF_0',
chunkLength: 6,
computedPathToFile: '/var/opt/unifi-protect/tmp/AABBCCDDEEFF_0.ubv',
configId: 3,
keepAlive: true,
localStreamName: 'AABBCCDDEEFF_0',
operationType: 4,
overwrite: true,
pathToFile: '/var/opt/unifi-protect/tmp/AABBCCDDEEFF_0.ubv',
type: 'ubv',
waitForIDR: true,
winQtCompat: true
},
description: 'Recording Stream',
requestId: 10,
requestTimestamp: 1644008208,
responseTimestamp: 1644008208,
status: 'SUCCESS'
}
2022-02-04T20:56:48.185Z - info: response
{
cliCustomParameters: {
_camera: '61fbe5a501027f03870003f2',
_channel: 2,
_streamName: 'AABBCCDDEEFF_2'
},
data: {
_camera: '61fbe5a501027f03870003f2',
_channel: 2,
_streamName: 'AABBCCDDEEFF_2',
chunkLength: 6,
computedPathToFile: '/var/opt/unifi-protect/tmp/AABBCCDDEEFF_2.ubv',
configId: 4,
keepAlive: true,
localStreamName: 'AABBCCDDEEFF_2',
operationType: 4,
overwrite: true,
pathToFile: '/var/opt/unifi-protect/tmp/AABBCCDDEEFF_2.ubv',
type: 'ubv',
waitForIDR: true,
winQtCompat: true
},
description: 'Recording Stream',
requestId: 11,
requestTimestamp: 1644008208,
responseTimestamp: 1644008208,
status: 'SUCCESS'
}
2022-02-04T20:56:48.187Z - info: Opening stream... AABBCCDDEEFF_0 IrBAXAUHDm2NZTqP
2022-02-04T20:56:48.188Z - verbose: SENT ChangeVideoSettings TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]. MESSAGE ID: 10041
2022-02-04T20:56:48.189Z - info: Opening stream... AABBCCDDEEFF_1 ilOVtWy4ntYwwG9A
2022-02-04T20:56:48.189Z - verbose: SENT ChangeVideoSettings TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]. MESSAGE ID: 10042
2022-02-04T20:56:48.190Z - info: Opening stream... AABBCCDDEEFF_2 GUwWjVuQpVrjFfIZ
2022-02-04T20:56:48.191Z - verbose: SENT ChangeVideoSettings TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]. MESSAGE ID: 10043
2022-02-04T20:56:48.216Z - info: G3 Bullet [AABBCCDDEEFF @ 192.168.1.10] authenticated.
2022-02-04T20:56:48.219Z - verbose: RECEIVED ChangeVideoSettings FROM G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]. MESSAGE ID: 4
2022-02-04T20:56:48.226Z - verbose: RECEIVED ChangeVideoSettings FROM G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]. MESSAGE ID: 5
2022-02-04T20:56:48.242Z - info: Transcoder encodings
{
'0': {
rescale: { width: 640, height: 360, algorithm: 'lanczos' },
encoding: {
codecName: 'h264',
bitrate: 600000,
profile: 'high',
preset: 'slower',
tuning: 'film',
rcLookAhead: 5,
gopSize: 30
},
filter: { periodMillis: 14900 },
onFramesAvailable: [Function: onFramesAvailable],
onStreamOpened: [Function: onStreamOpened],
onGopsAvailable: [AsyncFunction: onGopsAvailable]
},
'1': {
rescale: { width: 320, height: 180, algorithm: 'lanczos' },
encoding: {
codecName: 'h264',
bitrate: 150000,
profile: 'high',
preset: 'slower',
tuning: 'film',
rcLookAhead: 5,
gopSize: 30
},
filter: { periodMillis: 59500 },
onFramesAvailable: [Function: onFramesAvailable],
onStreamOpened: [Function: onStreamOpened],
onGopsAvailable: [AsyncFunction: onGopsAvailable]
}
}
2022-02-04T20:56:48.252Z - verbose: RECEIVED ChangeVideoSettings FROM G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]. MESSAGE ID: 6
2022-02-04T20:56:48.286Z - info: G3 Bullet [AABBCCDDEEFF @ 192.168.1.10] authenticated.
2022-02-04T20:56:48.386Z - verbose: transcoder.feed complete in 138 ms 1 /var/opt/unifi-protect/tmp/68D79AE365A3_0_00000002_00000000.ubv addon:opTime 136 ms {"id":13,"name":"transcoderFeed","poolName":"Transcode","timedOut":false,"apiCallTime":1644008208248,"operationStartTime":1644008208248,"operationEndTime":1644008208384,"callbackTime":1644008208385}
2022-02-04T20:56:49.071Z - info: Attempting firmware update for G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]: 4.23.8 -> 4.48.44
2022-02-04T20:56:49.074Z - verbose: SENT UpdateFirmwareRequest TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]. MESSAGE ID: 10044
2022-02-04T20:56:49.075Z - info: Stop recording G3 Bullet [AABBCCDDEEFF @ 192.168.1.10] - CH 0. CONFIG ID: 3
2022-02-04T20:56:49.081Z - info: Stop recording G3 Bullet [AABBCCDDEEFF @ 192.168.1.10] - CH 2. CONFIG ID: 4
2022-02-04T20:56:49.083Z - info: response
{
cliCustomParameters: null,
data: null,
description: 'Configuration terminated',
requestId: 12,
requestTimestamp: 1644008209,
responseTimestamp: 1644008209,
status: 'SUCCESS'
}
2022-02-04T20:56:49.084Z - info: response
{
cliCustomParameters: null,
data: null,
description: 'Configuration terminated',
requestId: 13,
requestTimestamp: 1644008209,
responseTimestamp: 1644008209,
status: 'SUCCESS'
}
2022-02-04T20:56:49.100Z - info: Successfully triggered updateFirmware to version 4.48.44 for device G3 Bullet [AABBCCDDEEFF @ 192.168.1.10]
{
uri: 'https://192.168.1.254:7444/internal/update?platform=s5l&product=uvc&updateType=firmware&version=4.48.44',
timeoutMs: 600000
}
2022-02-04T20:56:49.171Z - info: Found firmware update file /srv/unifi-protect/downloads/191d-s5l-4.48.44-0f7789aa82f64e838cdc3640cd3fa301.bin for uvc:s5l sending...
2022-02-04T20:56:51.301Z - info: addConnection, mac: AABBCCDDEEFF
2022-02-04T20:56:51.302Z - warn: remove duplicateConn: AABBCCDDEEFF
2022-02-04T20:56:51.304Z - warn: G3 Bullet [AABBCCDDEEFF @ 192.168.1.14] disconnected. CODE: undefined REASON: null
2022-02-04T20:56:51.307Z - verbose: RECEIVED ubnt_avclient_hello FROM G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 7
2022-02-04T20:56:51.308Z - verbose: SENT ubnt_avclient_hello TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 10045
2022-02-04T20:56:51.317Z - verbose: RECEIVED ubnt_avclient_hello FROM G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 7
2022-02-04T20:56:51.318Z - verbose: SENT ubnt_avclient_hello TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 10046
2022-02-04T20:56:51.332Z - verbose: motion.event.stop G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]
{ motionAlgorithm: 'enhanced', end: 1644008211331, data: {} }
2022-02-04T20:56:51.363Z - error: Error: Notification (events.cameras.disconnect) was cancelled.
at next (/usr/share/unifi-protect/app/node_modules/handoff/handoff.js:51:17)
at /usr/share/unifi-protect/app/node_modules/handoff/handoff.js:37:16
at tryCatcher (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/promise.js:729:18)
at _drainQueueStep (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/async.js:93:12)
at _drainQueue (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/async.js:86:9)
at Async._drainQueues (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/async.js:102:5)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/share/unifi-protect/app/node_modules/bluebird/js/release/async.js:15:14)
at processImmediate (internal/timers.js:461:21)
2022-02-04T20:56:51.821Z - verbose: SENT ubnt_avclient_paramAgreement TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 10047
2022-02-04T20:56:51.826Z - verbose: SENT ubnt_avclient_paramAgreement TO G3 Bullet [AABBCCDDEEFF @ 192.168.1.14]. MESSAGE ID: 10048
2022-02-04T20:56:51.845Z - error: unhandledRejection, shutting down...
2022-02-04T20:56:51.846Z - error: TypeError: Cannot read property '0' of undefined
at I (/usr/share/unifi-protect/app/webpack:/unifi-protect/src/middleware/cameras/avclient/index.js:135:75)
2022-02-04T20:56:51.905Z - info: Stopping MiddlewareService...
2022-02-04T20:56:51.908Z - info: Detaching api middleware
2022-02-04T20:56:51.908Z - info: Detaching auth middleware
2022-02-04T20:56:51.909Z - info: Detaching backups middleware
2022-02-04T20:56:51.910Z - info: Detaching cameras middleware
2022-02-04T20:56:51.927Z - info: Detaching cleanup middleware
2022-02-04T20:56:51.928Z - info: Detaching clientnotify middleware
2022-02-04T20:56:51.929Z - info: Detaching cloud middleware
2022-02-04T20:56:51.931Z - info: Detaching cvAnalytics middleware
2022-02-04T20:56:51.931Z - info: Detaching dbBackups middleware
2022-02-04T20:56:51.932Z - info: Detaching detections middleware
2022-02-04T20:56:51.933Z - info: Detaching deviceCrashReport middleware
2022-02-04T20:56:51.933Z - info: Detaching devices middleware
2022-02-04T20:56:51.936Z - info: Detaching discovery middleware
2022-02-04T20:56:51.936Z - info: Detaching events middleware
2022-02-04T20:56:51.936Z - info: Detaching gc middleware
2022-02-04T20:56:51.937Z - info: Detaching geofencing middleware
2022-02-04T20:56:51.937Z - info: Detaching liveviews middleware
2022-02-04T20:56:51.938Z - info: Detaching notifications middleware
2022-02-04T20:56:51.938Z - info: Detaching notificationsV2 middleware
2022-02-04T20:56:51.938Z - info: Detaching nvr middleware
2022-02-04T20:56:51.941Z - info: Detaching schedule middleware
2022-02-04T20:56:51.941Z - info: Detaching sentry middleware
2022-02-04T20:56:51.943Z - info: Detaching sdnotify middleware
2022-02-04T20:56:51.943Z - info: Detaching sql middleware
2022-02-04T20:56:51.944Z - info: Detaching ssh middleware
2022-02-04T20:56:51.946Z - info: Detaching stats middleware
2022-02-04T20:56:51.946Z - info: Detaching support middleware
2022-02-04T20:56:51.948Z - info: Detaching trace middleware
2022-02-04T20:56:51.948Z - info: Detaching ucore middleware
2022-02-04T20:56:51.949Z - info: Detaching updates middleware
2022-02-04T20:56:51.950Z - info: Detaching userGroups middleware
2022-02-04T20:56:51.952Z - info: Detaching users middleware
2022-02-04T20:56:51.953Z - info: Detaching video middleware
2022-02-04T20:56:51.953Z - info: Detaching webrtc middleware
2022-02-04T20:56:51.955Z - info: Detaching health middleware
2022-02-04T20:56:51.956Z - info: Detaching fingerprint middleware
2022-02-04T20:56:51.956Z - info: Detaching thumbnails middleware
2022-02-04T20:56:51.961Z - verbose: Detached auth middleware 0.053s
2022-02-04T20:56:51.961Z - verbose: Detached cleanup middleware 0.034s
2022-02-04T20:56:51.962Z - verbose: Detached clientnotify middleware 0.033s
2022-02-04T20:56:51.962Z - verbose: Detached cloud middleware 0.033s
2022-02-04T20:56:51.962Z - verbose: Detached detections middleware 0.03s
2022-02-04T20:56:51.962Z - verbose: Detached deviceCrashReport middleware 0.029s
2022-02-04T20:56:51.962Z - verbose: Detached gc middleware 0.026s
2022-02-04T20:56:51.962Z - verbose: Detached geofencing middleware 0.026s
2022-02-04T20:56:51.962Z - verbose: Detached liveviews middleware 0.025s
2022-02-04T20:56:51.962Z - verbose: Detached nvr middleware 0.024s
2022-02-04T20:56:51.962Z - verbose: Detached schedule middleware 0.021s
2022-02-04T20:56:51.963Z - verbose: Detached sentry middleware 0.022s
2022-02-04T20:56:51.963Z - verbose: Detached sdnotify middleware 0.02s
2022-02-04T20:56:51.963Z - verbose: Detached ssh middleware 0.019s
2022-02-04T20:56:51.963Z - verbose: Detached stats middleware 0.017s
2022-02-04T20:56:51.963Z - verbose: Detached support middleware 0.017s
2022-02-04T20:56:51.963Z - verbose: Detached userGroups middleware 0.013s
2022-02-04T20:56:51.963Z - verbose: Detached users middleware 0.012s
2022-02-04T20:56:51.963Z - verbose: Detached webrtc middleware 0.01s
2022-02-04T20:56:51.964Z - verbose: Detached health middleware 0.008s
2022-02-04T20:56:51.964Z - verbose: Detached fingerprint middleware 0.008s
2022-02-04T20:56:51.964Z - verbose: Detached thumbnails middleware 0.008s
2022-02-04T20:56:51.966Z - error: TypeError: Cannot read property '0' of undefined
at I (/usr/share/unifi-protect/app/webpack:/unifi-protect/src/middleware/cameras/avclient/index.js:135:75)
at runMicrotasks (
Thanks, can you also share output from the proxy from the time you start the command until the first crash?
no problem
root@rpitest:/home/pi/camera# unifi-cam-proxy --host 192.168.1.254 --cert ./client.pem --token 6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf --model "UVC G4 Pro" frigate -s rtsp://rpibox:8554/unicast --mqtt-host localhost --frigate-camera camera_1
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Spawning stream for snapshots: ffmpeg -nostdin -y -re -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -vf fps=1 -update 1 /tmp/tmpvf672jm7/screen.jpg
2022-02-05 00:01:45 rpitest Core[7925] INFO Creating ws connection to wss://192.168.1.254:7442/camera/1.0/ws?token=6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Adopting with token [6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf] and mac [AABBCCDDEEFF]
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_hello] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Connected to localhost:1883
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_hello] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [StopService] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [NetworkStatus] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ChangeVideoSettings] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Spawning ffmpeg for video1 (KkIzMcFugMgYP4tz): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=KkIzMcFugMgYP4tz -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Processing [ChangeVideoSettings] message
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Spawning ffmpeg for video2 (1fPfZ1m9C2Rtp3s2): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=1fPfZ1m9C2Rtp3s2 -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Processing [ChangeVideoSettings] message
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Spawning ffmpeg for video3 (N0r8vRwREAEehiTr): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=N0r8vRwREAEehiTr -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Processing [GetSystemStats] message
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Processing [UpdateFirmwareRequest] message
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Reconnecting...
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Cleaning up instance
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Stopping stream video1
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Stopping stream video2
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Stopping stream video3
2022-02-05 00:01:47 rpitest Core[7925] INFO Backing off connect(...) for 2.0s (True)
2022-02-05 00:01:49 rpitest Core[7925] INFO Creating ws connection to wss://192.168.1.254:7442/camera/1.0/ws?token=6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Adopting with token [6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf] and mac [AABBCCDDEEFF]
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Connected to localhost:1883
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_hello] message
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_hello] message
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Cleaning up instance
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Stopping stream video1
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Stopping stream video2
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Stopping stream video3
2022-02-05 00:01:49 rpitest Core[7925] INFO Backing off connect(...) for 4.0s (True)
2022-02-05 00:01:53 rpitest Core[7925] INFO Creating ws connection to wss://192.168.1.254:7442/camera/1.0/ws?token=6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf
2022-02-05 00:01:53 rpitest Core[7925] INFO Backing off connect(...) for 8.0s (True)
^CTraceback (most recent call last):
File "/usr/local/bin/unifi-cam-proxy", line 8, in
Does the rtsp implementation work?
unifi-cam-proxy --host 192.168.1.254 --cert ./client.pem --token 6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf --model "UVC G4 Pro" rtsp -s rtsp://rpibox:8554/unicast
Hi, it seems to work but in fact I only see the preview snapshot in Protect, live video doesn't start, with the animation of three dots blinking in the down-left corner Here is the output of command:
root@rpitest:/home/pi/camera# unifi-cam-proxy --host 192.168.1.254 --cert ./client.pem --token 6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf --model "UVC G4 Pro" frigate -s rtsp://rpibox:8554/unicast --mqtt-host localhost --frigate-camera camera_1
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Spawning stream for snapshots: ffmpeg -nostdin -y -re -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -vf fps=1 -update 1 /tmp/tmpvf672jm7/screen.jpg
2022-02-05 00:01:45 rpitest Core[7925] INFO Creating ws connection to wss://192.168.1.254:7442/camera/1.0/ws?token=6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Adopting with token [6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf] and mac [AABBCCDDEEFF]
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_hello] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Connected to localhost:1883
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_hello] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [StopService] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [NetworkStatus] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Processing [ChangeVideoSettings] message
2022-02-05 00:01:45 rpitest FrigateCam[7925] INFO Spawning ffmpeg for video1 (KkIzMcFugMgYP4tz): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=KkIzMcFugMgYP4tz -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Processing [ChangeVideoSettings] message
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Spawning ffmpeg for video2 (1fPfZ1m9C2Rtp3s2): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=1fPfZ1m9C2Rtp3s2 -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Processing [ChangeVideoSettings] message
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Spawning ffmpeg for video3 (N0r8vRwREAEehiTr): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=N0r8vRwREAEehiTr -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Processing [GetSystemStats] message
2022-02-05 00:01:46 rpitest FrigateCam[7925] INFO Processing [UpdateFirmwareRequest] message
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Reconnecting...
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Cleaning up instance
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Stopping stream video1
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Stopping stream video2
2022-02-05 00:01:47 rpitest FrigateCam[7925] INFO Stopping stream video3
2022-02-05 00:01:47 rpitest Core[7925] INFO Backing off connect(...) for 2.0s (True)
2022-02-05 00:01:49 rpitest Core[7925] INFO Creating ws connection to wss://192.168.1.254:7442/camera/1.0/ws?token=6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Adopting with token [6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf] and mac [AABBCCDDEEFF]
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Connected to localhost:1883
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_hello] message
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_hello] message
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Cleaning up instance
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Stopping stream video1
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Stopping stream video2
2022-02-05 00:01:49 rpitest FrigateCam[7925] INFO Stopping stream video3
2022-02-05 00:01:49 rpitest Core[7925] INFO Backing off connect(...) for 4.0s (True)
2022-02-05 00:01:53 rpitest Core[7925] INFO Creating ws connection to wss://192.168.1.254:7442/camera/1.0/ws?token=6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf
2022-02-05 00:01:53 rpitest Core[7925] INFO Backing off connect(...) for 8.0s (True)
^CTraceback (most recent call last):
File "/usr/local/bin/unifi-cam-proxy", line 8, in
root@rpitest:/home/pi/camera# unifi-cam-proxy --host 192.168.1.254 --cert ./client.pem --token 6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf --model "UVC G4 Pro" rtsp -s rtsp://rpibox:8554/unicast
2022-02-05 14:14:28 rpitest RTSPCam[29824] INFO Spawning stream for snapshots: ffmpeg -nostdin -y -re -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -vf fps=1 -update 1 /tmp/tmpmrp1xo8h/screen.jpg
2022-02-05 14:14:28 rpitest Core[29824] INFO Creating ws connection to wss://192.168.1.254:7442/camera/1.0/ws?token=6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf
2022-02-05 14:14:28 rpitest RTSPCam[29824] INFO Adopting with token [6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf] and mac [AABBCCDDEEFF]
2022-02-05 14:14:28 rpitest RTSPCam[29824] INFO Processing [ubnt_avclient_hello] message
2022-02-05 14:14:28 rpitest RTSPCam[29824] INFO Processing [ubnt_avclient_hello] message
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Processing [StopService] message
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Spawning ffmpeg for video1 (W6nC3GSGsVbS4dbS): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=W6nC3GSGsVbS4dbS -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Spawning ffmpeg for video2 (31P7BbIKXX1qLPIo): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=31P7BbIKXX1qLPIo -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:29 rpitest RTSPCam[29824] INFO Spawning ffmpeg for video3 (XxtCUlwnC3AgWzzF): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=XxtCUlwnC3AgWzzF -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 14:14:30 rpitest RTSPCam[29824] INFO Processing [UpdateFirmwareRequest] message
2022-02-05 14:14:30 rpitest RTSPCam[29824] INFO Reconnecting...
2022-02-05 14:14:30 rpitest RTSPCam[29824] INFO Cleaning up instance
2022-02-05 14:14:30 rpitest RTSPCam[29824] INFO Stopping stream video1
2022-02-05 14:14:30 rpitest RTSPCam[29824] INFO Stopping stream video2
2022-02-05 14:14:30 rpitest RTSPCam[29824] INFO Stopping stream video3
2022-02-05 14:14:30 rpitest Core[29824] INFO Backing off connect(...) for 2.0s (True)
2022-02-05 14:14:32 rpitest Core[29824] INFO Creating ws connection to wss://192.168.1.254:7442/camera/1.0/ws?token=6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf
2022-02-05 14:14:32 rpitest RTSPCam[29824] INFO Adopting with token [6IFdS7H34E4wOU5rH5VAzvqUgc5UP6tf] and mac [AABBCCDDEEFF]
2022-02-05 14:14:32 rpitest RTSPCam[29824] INFO Processing [ubnt_avclient_hello] message
2022-02-05 14:14:32 rpitest RTSPCam[29824] INFO Processing [ubnt_avclient_hello] message
2022-02-05 14:14:33 rpitest RTSPCam[29824] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 14:14:33 rpitest RTSPCam[29824] INFO Processing [ubnt_avclient_paramAgreement] message
2022-02-05 14:14:33 rpitest RTSPCam[29824] INFO Processing [StopService] message
2022-02-05 14:14:34 rpitest RTSPCam[29824] INFO Processing [ChangeDeviceSettings] message
2022-02-05 14:14:34 rpitest RTSPCam[29824] INFO Processing [NetworkStatus] message
2022-02-05 14:14:34 rpitest RTSPCam[29824] INFO Processing [GetSystemStats] message
2022-02-05 14:14:36 rpitest RTSPCam[29824] INFO Processing [NetworkStatus] message
2022-02-05 14:14:36 rpitest RTSPCam[29824] INFO Processing [GetSystemStats] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeIspSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeOsdSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeAudioEventsSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeSoundLedSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeSmartMotionSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [EnableLogging] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeDeviceSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeDeviceSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [SmartMotionTest] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [UpdateUsernamePassword] message
2022-02-05 14:14:39 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:40 rpitest RTSPCam[29824] INFO Processing [GetRequest] message
2022-02-05 14:14:40 rpitest RTSPCam[29824] INFO Spawning stream for snapshots: ffmpeg -nostdin -y -re -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -vf fps=1 -update 1 /tmp/tmpmrp1xo8h/screen.jpg
2022-02-05 14:14:44 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:44 rpitest RTSPCam[29824] INFO Spawning ffmpeg for video2 (31P7BbIKXX1qLPIo): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=31P7BbIKXX1qLPIo -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 14:14:46 rpitest RTSPCam[29824] INFO Processing [NetworkStatus] message
2022-02-05 14:14:46 rpitest RTSPCam[29824] INFO Processing [GetSystemStats] message
2022-02-05 14:14:47 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:47 rpitest RTSPCam[29824] INFO Spawning ffmpeg for video1 (W6nC3GSGsVbS4dbS): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=W6nC3GSGsVbS4dbS -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 14:14:47 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:14:47 rpitest RTSPCam[29824] INFO Spawning ffmpeg for video3 (XxtCUlwnC3AgWzzF): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=XxtCUlwnC3AgWzzF -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 14:14:52 rpitest RTSPCam[29824] INFO Processing [GetRequest] message
2022-02-05 14:14:56 rpitest RTSPCam[29824] INFO Processing [NetworkStatus] message
2022-02-05 14:14:56 rpitest RTSPCam[29824] INFO Processing [GetSystemStats] message
2022-02-05 14:15:02 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:15:02 rpitest RTSPCam[29824] INFO Spawning ffmpeg for video1 (W6nC3GSGsVbS4dbS): ffmpeg -nostdin -y -stimeout 15000000 -rtsp_transport tcp -i "rtsp://rpibox:8554/unicast" -c:v copy -ar 32000 -ac 1 -codec:a aac -b:a 32k -metadata streamname=W6nC3GSGsVbS4dbS -f flv - | /usr/bin/python3 -m unifi.clock_sync | nc 192.168.1.254 7550
2022-02-05 14:15:02 rpitest RTSPCam[29824] INFO Processing [ChangeVideoSettings] message
2022-02-05 14:15:04 rpitest RTSPCam[29824] INFO Processing [GetRequest] message
2022-02-05 14:15:06 rpitest RTSPCam[29824] INFO Processing [NetworkStatus] message
2022-02-05 14:15:06 rpitest RTSPCam[29824] INFO Processing [GetSystemStats] message
^CTraceback (most recent call last):
File "/usr/local/bin/unifi-cam-proxy", line 8, in
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Describe the bug Hi, i'm trying to connect a raspberry pi camera to Unifi Protect in my Unifi Dream Machine, using frigate with unifi-cam-proxy. The raspberrypi streams video using v4l2rtspserver, the rtsp source was configured in frigate unifi-cam-proxy but when I launch the application, after a few seconds Unifi Protect Crash and reboot application constantly. All get back to work if I kill unifi-cam-proxy
Thanks in advance for any solution or clue
To Reproduce
Expected behavior The camera works in Unifi Protect without crashing
Camera (please complete the following information):