koush / scrypted

Scrypted is a high performance video integration and automation platform
https://scrypted.app
Other
4.17k stars 248 forks source link

Google Nest Battery Camera not working with Rebroadcast #827

Closed johnc2k closed 1 year ago

johnc2k commented 1 year ago

Scrypted: 0.23.0 Rebroadcast Plugin: 0.9.90 Google Device Access: 0.0.96

With the Rebroadcast plugin configured to prebuffer the "WebRTC" stream I get the error message below. I can view the stream in scrypted UI however I am unable to view the RTSP stream. The stream status remain as Idle.

[WebRTC Plugin]: session start failed RPCResultError [AxiosError]: Request failed with status code 429
[WebRTC Plugin]:     at settle (/node_modules/axios/dist/node/axios.cjs:1900:12)
[WebRTC Plugin]:     at Unzip.<anonymous> (/node_modules/axios/dist/node/axios.cjs:2952:11)
[WebRTC Plugin]:     at Unzip.emit (node:events:525:35)
[WebRTC Plugin]:     at Unzip.emit (node:domain:489:12)
[WebRTC Plugin]:     at endReadableNT (node:internal/streams/readable:1359:12)
[WebRTC Plugin]:     at processTicksAndRejections (node:internal/process/task_queues:82:21)
[WebRTC Plugin]: @scrypted/google-device-access:host
[WebRTC Plugin]: host:@scrypted/webrtc {
[WebRTC Plugin]:   cause: undefined
[WebRTC Plugin]: }
[WebRTC Plugin]: webrtc/rtsp cleaning up
[WebRTC Plugin]: signalingState closed
[WebRTC Plugin]: connectionState closed
[WebRTC Plugin]: connectionState closed
[WebRTC Plugin]: webrtc/rtsp cleaning up
[WebRTC Plugin]: iceConnectionState closed
[WebRTC Plugin]: iceConnectionState closed
[Rebroadcast Plugin]: rtsp outgoing message
[Rebroadcast Plugin]:  TEARDOWN rtsp://127.0.0.1:42615 RTSP/1.0
[Rebroadcast Plugin]: CSeq: 1
[Rebroadcast Plugin]: User-Agent: Scrypted
[Rebroadcast Plugin]: 
[Rebroadcast Plugin]: prebuffer session ended with error s [Error]
[Rebroadcast Plugin]:     at Socket.o (/@scrypted/prebuffer-mixin/main.nodejs.js:1:80480)
[Rebroadcast Plugin]:     at Socket.emit (node:events:525:35)
[Rebroadcast Plugin]:     at Socket.emit (node:domain:489:12)
[Rebroadcast Plugin]:     at endReadableNT (node:internal/streams/readable:1359:12)
[Rebroadcast Plugin]:     at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
[Rebroadcast Plugin]: restarting prebuffer session in 5 seconds
[Rebroadcast Plugin]: client error Error: This socket has been ended by the other party
[Rebroadcast Plugin]:     at Socket.writeAfterFIN [as write] (node:net:541:14)
[Rebroadcast Plugin]:     at E (/@scrypted/prebuffer-mixin/main.nodejs.js:1:82986)
[Rebroadcast Plugin]:     at t.RtspClient.write (/@scrypted/prebuffer-mixin/main.nodejs.js:1:85970)
[Rebroadcast Plugin]:     at t.RtspClient.writeRequest (/@scrypted/prebuffer-mixin/main.nodejs.js:1:87138)
[Rebroadcast Plugin]:     at t.RtspClient.writeTeardown (/@scrypted/prebuffer-mixin/main.nodejs.js:1:92358)
[Rebroadcast Plugin]:     at t.RtspClient.safeTeardown (/@scrypted/prebuffer-mixin/main.nodejs.js:1:86658)
[Rebroadcast Plugin]:     at g (/@scrypted/prebuffer-mixin/main.nodejs.js:1:142457)
[Rebroadcast Plugin]:     at t.startRtspSession (/@scrypted/prebuffer-mixin/main.nodejs.js:1:145646)
[Rebroadcast Plugin]:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[Rebroadcast Plugin]:   code: 'EPIPE'
[Rebroadcast Plugin]: }
[Rebroadcast Plugin]: rebroadcast error Error: This socket has been ended by the other party
[Rebroadcast Plugin]:     at Socket.writeAfterFIN [as write] (node:net:541:14)
[Rebroadcast Plugin]:     at E (/@scrypted/prebuffer-mixin/main.nodejs.js:1:82986)
[Rebroadcast Plugin]:     at t.RtspClient.write (/@scrypted/prebuffer-mixin/main.nodejs.js:1:85970)
[Rebroadcast Plugin]:     at t.RtspClient.writeRequest (/@scrypted/prebuffer-mixin/main.nodejs.js:1:87138)
[Rebroadcast Plugin]:     at t.RtspClient.writeTeardown (/@scrypted/prebuffer-mixin/main.nodejs.js:1:92358)
[Rebroadcast Plugin]:     at t.RtspClient.safeTeardown (/@scrypted/prebuffer-mixin/main.nodejs.js:1:86658)
[Rebroadcast Plugin]:     at g (/@scrypted/prebuffer-mixin/main.nodejs.js:1:142457)
[Rebroadcast Plugin]:     at t.startRtspSession (/@scrypted/prebuffer-mixin/main.nodejs.js:1:145646)
[Rebroadcast Plugin]:     at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
[Rebroadcast Plugin]:   code: 'EPIPE'
[Rebroadcast Plugin]: }
[WebRTC Plugin]: webrtc/rtsp cleaning up
koush commented 1 year ago

429 means google is rate limiting your requests.

johnc2k commented 1 year ago

It works fine if I manually view the stream in the UI? I assume its rate limiting because it is repeatedly trying to reconnect over and over? Could we add the option for a time delay before reconnect attempts?

cubbieblue16 commented 7 months ago

They may be rate limiting it but I dont think thats the underlying cause. As someone posted in the still open issues, the rebroadcast plugin is a problem with the cameras. The solution is to downgrade a few versions, and once I did that the version he said to, everything seems to be working great now.