tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
563 stars 102 forks source link

Multiple Live Videos empty the Ring battery #870

Closed NabilHanna closed 1 month ago

NabilHanna commented 1 month ago

Describe the Bug

Somthing is closing the rtsp connection and therefore the rtsp stream is reopened every some minute. Therefore the battery of the Ring device doesn't last long

Steps to Reproduce

go2rtc: connection reset by peer

Expected Behavior

Avoid multiple Live Videos on the Ring device

Log Output

2024-07-11T09:38:52.678Z ring-wrtc [Ringeling] Live stream WebRTC worker received start command
2024-07-11T09:38:52.721Z ring-wrtc [Ringeling] Live stream transcoding process is starting
2024-07-11T09:38:52.980Z ring-wrtc [Ringeling] Websocket signaling for WebRTC session connected successfully
2024-07-11T09:38:53.387Z ring-wrtc [Ringeling] Live stream transcoding process has started
2024-07-11T09:38:55.543Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"active"}
2024-07-11T09:38:55.545Z ring-wrtc [Ringeling] Live stream WebRTC session is connected
2024-07-11T09:38:55.662Z ring-rtsp [Ringeling] State indicates live stream is active
2024-07-11T09:38:57.554Z ring-rtsp [go2rtc] DBG [exec] run launch=5.425468596s
2024-07-11T09:38:57.555Z ring-rtsp [go2rtc] DBG [streams] start producer url=exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca {output}
2024-07-11T09:38:57.556Z ring-rtsp [go2rtc] DBG [streams] stop producer url=exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca {output}
2024-07-11T09:38:57.613Z ring-wrtc [Ringeling] Live stream WebRTC session has disconnected
2024-07-11T09:38:57.613Z ring-mqtt [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/state OFF
2024-07-11T09:38:57.613Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"inactive"}
2024-07-11T09:38:57.735Z ring-rtsp [Ringeling] State indicates live stream has gone inactive
2024-07-11T09:39:07.262Z ring-rtsp [go2rtc] DBG [rtsp] new consumer stream=649a63c923ca_live
2024-07-11T09:39:07.263Z ring-rtsp [go2rtc] DBG [exec] run cmd="/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f" url="exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f"
2024-07-11T09:39:07.298Z ring-rtsp [Ringeling] Sending command to activate live stream ON-DEMAND
2024-07-11T09:39:07.305Z ring-mqtt [Ringeling] Received set live stream state ON-DEMAND rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f
2024-07-11T09:39:07.305Z ring-mqtt [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/state ON
2024-07-11T09:39:07.305Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"activating"}
2024-07-11T09:39:07.306Z ring-mqtt [Ringeling] Acquiring a live stream WebRTC signaling session ticket
2024-07-11T09:39:07.467Z ring-rtsp [Ringeling] State indicates live stream is activating
2024-07-11T09:39:07.650Z ring-mqtt [Ringeling] Live stream WebRTC signaling session ticket acquired, starting live stream worker
2024-07-11T09:39:07.651Z ring-wrtc [Ringeling] Live stream WebRTC worker received start command
2024-07-11T09:39:07.663Z ring-wrtc [Ringeling] Live stream transcoding process is starting
2024-07-11T09:39:07.914Z ring-wrtc [Ringeling] Websocket signaling for WebRTC session connected successfully
2024-07-11T09:39:08.262Z ring-wrtc [Ringeling] Live stream transcoding process has started
2024-07-11T09:39:08.464Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"active"}
2024-07-11T09:39:08.465Z ring-wrtc [Ringeling] Live stream WebRTC session is connected
2024-07-11T09:39:08.612Z ring-rtsp [Ringeling] State indicates live stream is active
2024-07-11T09:39:08.904Z ring-rtsp [go2rtc] DBG [exec] run launch=1.641262308s
2024-07-11T09:39:08.904Z ring-rtsp [go2rtc] DBG [streams] start producer url=exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca {output}
2024-07-11T09:41:14.236Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/info/state {"stream_Source":"rtsp://userxxx:passwordxxx@03cfbcc8-ring-mqtt:8554/649a63c923ca_live","still_Image_URL":"https://raspberrypi:8123{{ states.camera.ringeling_snapshot.attributes.entity_picture }}","batteryLevel":71,"batteryLife":71,"firmwareStatus":"Up to Date","lastUpdate":"2024-07-11T09:38:35Z","wirelessNetwork":"userxxx-2.4GHz_EXT","wirelessSignal":-74}
2024-07-11T09:41:14.237Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/wireless/attributes {"wirelessNetwork":"userxxx-2.4GHz_EXT","wirelessSignal":-74}
2024-07-11T09:41:14.237Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/battery/attributes {"batteryLevel":71,"batteryLife":71}
2024-07-11T09:44:11.165Z ring-rtsp [go2rtc] DBG [rtsp] handle error="read tcp 172.30.33.3:8554->172.30.32.1:56448: read: connection reset by peer"
2024-07-11T09:44:11.166Z ring-rtsp [go2rtc] DBG [streams] stop producer url=exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca {output}
2024-07-11T09:44:11.166Z ring-rtsp [go2rtc] DBG [rtsp] disconnect stream=649a63c923ca_live
2024-07-11T09:44:11.273Z ring-wrtc [Ringeling] Live stream WebRTC session has disconnected
2024-07-11T09:44:11.274Z ring-mqtt [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/state OFF
2024-07-11T09:44:11.275Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"inactive"}
2024-07-11T09:44:11.397Z ring-rtsp [Ringeling] State indicates live stream has gone inactive
2024-07-11T09:44:19.424Z ring-rtsp [go2rtc] DBG [rtsp] new consumer stream=649a63c923ca_live
2024-07-11T09:44:19.426Z ring-rtsp [go2rtc] DBG [exec] run cmd="/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f" url="exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f"
2024-07-11T09:44:19.448Z ring-rtsp [Ringeling] Sending command to activate live stream ON-DEMAND
2024-07-11T09:44:19.455Z ring-mqtt [Ringeling] Received set live stream state ON-DEMAND rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f
2024-07-11T09:44:19.455Z ring-mqtt [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/state ON
2024-07-11T09:44:19.455Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"activating"}
2024-07-11T09:44:19.455Z ring-mqtt [Ringeling] Acquiring a live stream WebRTC signaling session ticket
2024-07-11T09:44:19.602Z ring-rtsp [Ringeling] State indicates live stream is activating
2024-07-11T09:44:19.936Z ring-mqtt [Ringeling] Live stream WebRTC signaling session ticket acquired, starting live stream worker
2024-07-11T09:44:19.938Z ring-wrtc [Ringeling] Live stream WebRTC worker received start command
2024-07-11T09:44:19.984Z ring-wrtc [Ringeling] Live stream transcoding process is starting
2024-07-11T09:44:20.247Z ring-wrtc [Ringeling] Websocket signaling for WebRTC session connected successfully
2024-07-11T09:44:20.651Z ring-wrtc [Ringeling] Live stream transcoding process has started
2024-07-11T09:44:20.831Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"active"}
2024-07-11T09:44:20.832Z ring-wrtc [Ringeling] Live stream WebRTC session is connected
2024-07-11T09:44:20.983Z ring-rtsp [Ringeling] State indicates live stream is active
2024-07-11T09:44:21.443Z ring-rtsp [go2rtc] DBG [exec] run launch=2.018257867s
2024-07-11T09:44:21.444Z ring-rtsp [go2rtc] DBG [streams] start producer url=exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca {output}
2024-07-11T09:46:14.233Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/info/state {"stream_Source":"rtsp://userxxx:passwordxxx@03cfbcc8-ring-mqtt:8554/649a63c923ca_live","still_Image_URL":"https://raspberrypi:8123{{ states.camera.ringeling_snapshot.attributes.entity_picture }}","batteryLevel":71,"batteryLife":71,"firmwareStatus":"Up to Date","lastUpdate":"2024-07-11T09:38:35Z","wirelessNetwork":"userxxx-2.4GHz_EXT","wirelessSignal":-74}
2024-07-11T09:46:14.234Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/wireless/attributes {"wirelessNetwork":"userxxx-2.4GHz_EXT","wirelessSignal":-74}
2024-07-11T09:46:14.234Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/battery/attributes {"batteryLevel":71,"batteryLife":71}
2024-07-11T09:49:23.643Z ring-rtsp [go2rtc] DBG [rtsp] handle error="read tcp 172.30.33.3:8554->172.30.32.1:58376: read: connection reset by peer"
2024-07-11T09:49:23.644Z ring-rtsp [go2rtc] DBG [streams] stop producer url=exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca {output}
2024-07-11T09:49:23.645Z ring-rtsp [go2rtc] DBG [rtsp] disconnect stream=649a63c923ca_live
2024-07-11T09:49:23.725Z ring-wrtc [Ringeling] Live stream WebRTC session has disconnected
2024-07-11T09:49:23.726Z ring-mqtt [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/state OFF
2024-07-11T09:49:23.726Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"inactive"}
2024-07-11T09:49:23.869Z ring-rtsp [Ringeling] State indicates live stream has gone inactive
2024-07-11T09:49:51.745Z ring-rtsp [go2rtc] DBG [rtsp] new consumer stream=649a63c923ca_live
2024-07-11T09:49:51.746Z ring-rtsp [go2rtc] DBG [exec] run cmd="/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f" url="exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f"
2024-07-11T09:49:51.787Z ring-rtsp [Ringeling] Sending command to activate live stream ON-DEMAND
2024-07-11T09:49:51.795Z ring-mqtt [Ringeling] Received set live stream state ON-DEMAND rtsp://127.0.0.1:8554/f0ffb7a864357e6ec524788e2949179f
2024-07-11T09:49:51.795Z ring-mqtt [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/state ON
2024-07-11T09:49:51.796Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"activating"}
2024-07-11T09:49:51.797Z ring-mqtt [Ringeling] Acquiring a live stream WebRTC signaling session ticket
2024-07-11T09:49:51.933Z ring-rtsp [Ringeling] State indicates live stream is activating
2024-07-11T09:49:52.322Z ring-mqtt [Ringeling] Live stream WebRTC signaling session ticket acquired, starting live stream worker
2024-07-11T09:49:52.323Z ring-wrtc [Ringeling] Live stream WebRTC worker received start command
2024-07-11T09:49:52.366Z ring-wrtc [Ringeling] Live stream transcoding process is starting
2024-07-11T09:49:52.627Z ring-wrtc [Ringeling] Websocket signaling for WebRTC session connected successfully
2024-07-11T09:49:53.036Z ring-wrtc [Ringeling] Live stream transcoding process has started
2024-07-11T09:49:54.575Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"active"}
2024-07-11T09:49:54.576Z ring-wrtc [Ringeling] Live stream WebRTC session is connected
2024-07-11T09:49:54.688Z ring-rtsp [Ringeling] State indicates live stream is active
2024-07-11T09:49:56.598Z ring-rtsp [go2rtc] DBG [exec] run launch=4.85273082s
2024-07-11T09:49:56.598Z ring-rtsp [go2rtc] DBG [streams] start producer url=exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca {output}
2024-07-11T09:51:14.257Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/info/state {"stream_Source":"rtsp://userxxx:passwordxxx@03cfbcc8-ring-mqtt:8554/649a63c923ca_live","still_Image_URL":"https://raspberrypi:8123{{ states.camera.ringeling_snapshot.attributes.entity_picture }}","batteryLevel":70,"batteryLife":70,"firmwareStatus":"Up to Date","lastUpdate":"2024-07-11T09:49:41Z","wirelessNetwork":"userxxx-2.4GHz_EXT","wirelessSignal":-74}
2024-07-11T09:51:14.258Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/wireless/attributes {"wirelessNetwork":"userxxx-2.4GHz_EXT","wirelessSignal":-74}
2024-07-11T09:51:14.259Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/battery/attributes {"batteryLevel":70,"batteryLife":70}
2024-07-11T09:54:58.317Z ring-rtsp [go2rtc] DBG [rtsp] handle error="read tcp 172.30.33.3:8554->172.30.32.1:38834: read: connection reset by peer"
2024-07-11T09:54:58.317Z ring-rtsp [go2rtc] DBG [streams] stop producer url=exec:/app/ring-mqtt/scripts/start-stream.sh 649a63c923ca live ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca {output}
2024-07-11T09:54:58.317Z ring-rtsp [go2rtc] DBG [rtsp] disconnect stream=649a63c923ca_live
2024-07-11T09:54:58.397Z ring-wrtc [Ringeling] Live stream WebRTC session has disconnected
2024-07-11T09:54:58.398Z ring-mqtt [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/state OFF
2024-07-11T09:54:58.398Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/stream/attributes {"status":"inactive"}
2024-07-11T09:54:58.521Z ring-rtsp [Ringeling] State indicates live stream has gone inactive
2024-07-11T09:56:14.360Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/info/state {"stream_Source":"rtsp://userxxx:passwordxxx@03cfbcc8-ring-mqtt:8554/649a63c923ca_live","still_Image_URL":"https://raspberrypi:8123{{ states.camera.ringeling_snapshot.attributes.entity_picture }}","batteryLevel":70,"batteryLife":70,"firmwareStatus":"Up to Date","lastUpdate":"2024-07-11T09:55:19Z","wirelessNetwork":"userxxx-2.4GHz_EXT","wirelessSignal":-74}
2024-07-11T09:56:14.360Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/wireless/attributes {"wirelessNetwork":"userxxx-2.4GHz_EXT","wirelessSignal":-74}
2024-07-11T09:56:14.360Z ring-attr [Ringeling] ring/c6ea2c94-d7b1-4245-8bd1-86934e1356d6/camera/649a63c923ca/battery/attributes {"batteryLevel":70,"batteryLife":70}

Screenshots

Screenshot_20240711_120227_Ring

Config File

mqtt_url: mqtt://userxxx:passwordxxx@10.0.0.12:1883
mqtt_options: ""
livestream_user: userxxx
livestream_pass: passwordxxx
disarm_code: ""
enable_cameras: true
enable_modes: false
enable_panic: false
branch: addon
debug: ring-*
location_ids: []

Install Type

Supervised

Version

5.6.7

Operating System

Debian

Architecture

arm64

Machine Details

Paspberry Pi 4

tsightler commented 1 month ago

If a client attempts to connect to the RTSP stream then a live stream will be started. If you restart the addon, and this problem continues to occur after the restart, then this is not a problem with the addon but rather some RTSP client that is requesting the stream.

tsightler commented 1 month ago

Closing due to no response.