Whenever I try to view the camera live stream for an extended period using the WebRTC lovelace card the stream will stop after around 9 or 10 minutes. Sometimes less.
To reproduce
Steps to reproduce the behavior:
Click 'Start P2P stream'
Expected behavior
I expect the stream to continue running until I click 'Stop P2P Stream'. However, if I try to click 'Stop P2P Stream' after the stream has cut I get the standard Lovelace error saying the stream is not longer running.
Additional information
Home Assistant Installation Type (OS - Supvervised - Core): Home Assistant OS
Home Assistant Core Version: core-2023.11.3
Eufy Security Add-on Version: RTSP Simple Server Add-on (v0.17.6)
2023-11-30 14:31:30.852 INFO (MainThread) [aiortsp.rtsp.reader] try loading stream rtsp://127.0.0.1:8558/
2023-11-30 14:31:30.863 INFO (MainThread) [aiortsp.rtsp.reader] connected!
2023-11-30 14:31:30.863 INFO (MainThread) [aiortsp.rtsp.reader] receiving interleaved RTP (0) and RTCP (1)
2023-11-30 14:31:30.867 INFO (MainThread) [aiortsp.rtsp.reader] session options: {'DESCRIBE', 'GET_PARAMETER', 'PLAY', 'PAUSE', 'RECORD', 'ANNOUNCE', 'SETUP', 'TEARDOWN'}
2023-11-30 14:31:31.277 INFO (MainThread) [aiortsp.rtsp.reader] connection to RTSP server 127.0.0.1:8558 closed (error: None)
2023-11-30 14:31:31.779 INFO (MainThread) [aiortsp.rtsp.reader] try loading stream rtsp://127.0.0.1:8558/
2023-11-30 14:31:31.780 INFO (MainThread) [aiortsp.rtsp.reader] connected!
2023-11-30 14:31:31.780 INFO (MainThread) [aiortsp.rtsp.reader] receiving interleaved RTP (0) and RTCP (1)
2023-11-30 14:31:31.782 INFO (MainThread) [aiortsp.rtsp.reader] session options: {'DESCRIBE', 'GET_PARAMETER', 'PLAY', 'PAUSE', 'RECORD', 'ANNOUNCE', 'SETUP', 'TEARDOWN'}
2023-11-30 14:31:31.784 INFO (MainThread) [aiortsp.rtsp.reader] using base url: rtsp://127.0.0.1:8558//
2023-11-30 14:31:31.785 INFO (MainThread) [aiortsp.rtsp.reader] setting up using URL: rtsp://127.0.0.1:8558//trackID=0
2023-11-30 14:31:31.795 INFO (MainThread) [aiortsp.rtsp.reader] stream correctly setup: <Response status=200 msg="OK"" headers={'cseq': '3', 'server': 'gortsplib', 'session': '489612031', 'transport': 'RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=280AE294'} content-length=0>
2023-11-30 14:31:31.795 INFO (MainThread) [aiortsp.rtsp.reader] session id: 489612031, timeout: 60, keep_alive: 54
2023-11-30 14:31:31.795 INFO (MainThread) [aiortsp.rtsp.reader] playing stream...
2023-11-30 14:31:31.796 INFO (MainThread) [aiortsp.rtsp.reader] start playing rtsp://127.0.0.1:8558// at time now and speed 1...
2023-11-30 14:31:31.933 INFO (MainThread) [aiortsp.rtsp.reader] stopping stream...
2023-11-30 14:31:31.933 INFO (MainThread) [aiortsp.rtsp.reader] stopping session/playback...
2023-11-30 14:31:31.935 INFO (MainThread) [aiortsp.rtsp.reader] connection closed, error:
2023-11-30 14:31:31.936 INFO (MainThread) [aiortsp.rtsp.reader] connection to RTSP server 127.0.0.1:8558 closed (error: None)
2023-11-30 14:33:26.981 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for switch.s330_doorbell_delivery_guard (<class 'custom_components.eufy_security.switch.EufySwitchEntity'>) took 0.510 seconds.
2023-11-30 14:39:18.904 WARN Error: AES key could not be decrypted! The entire stream is discarded.
{
error: {
cause: undefined,
message: 'Error: Error during decryption (probably incorrect key). Original error: Error: error:0200009F:rsa routines::pkcs decoding error',
context: undefined,
stacktrace: 'Error: Error during decryption (probably incorrect key). Original error: Error: error:0200009F:rsa routines::pkcs decoding error\n' +
' at module.exports.NodeRSA.$$decryptKey (/usr/src/app/node_modules/node-rsa/src/NodeRSA.js:301:19)\n' +
' at module.exports.NodeRSA.decrypt (/usr/src/app/node_modules/node-rsa/src/NodeRSA.js:249:21)\n' +
' at P2PClientProtocol.handleDataBinaryAndVideo (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1319:63)\n' +
' at P2PClientProtocol.handleData (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1259:18)\n' +
' at P2PClientProtocol.parseDataMessage (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1121:26)\n' +
' at P2PClientProtocol.handleMsg (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:957:26)\n' +
' at Socket. (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:113:56)\n' +
' at Socket.emit (node:events:517:28)\n' +
' at Socket.emit (node:domain:489:12)\n' +
' at UDP.onMessage [as onmessage] (node:dgram:942:8)'
},
stationSN: '',
key: 'aabd76d37f0ccb0febc8f96abc6b006ff71ec326bd08ded1185521116e58aac3031a4502012a04b9f85d4d4fe965ab4c971e17597768d6fa876b0bf6a51683199b89bdf0a57cda1c8fc66011dbe67de6adabbf5a86fe561f77bb6bc34dcdd7094da690b5ab015ac0ab6661c720b7d975e7651a5ca859f018c074a74f9757e539'
}
Would you share your device with me in case further debugging required? (Yes/No): Yes
Additional context
If I view the camera's live stream in the Eufy mobile app the stream runs flawlessly for as long as I wish. The Wi-Fi signal to the camera is very strong. The live stream comes up quickly and runs smoothly in HA WebRTC until is cuts off after 10 minutes or so. Streaming using the GotoRTC web page has the same behaviour as in Lovelace.
Add any other context about the problem goes here. Mainly, share everything as log files and use screenshots as last resort.
Would you share your device with me in case further debugging required? (Yes/No): Yes
Additional context
If I view the camera's live stream in the Eufy mobile app the stream runs flawlessly for as long as I wish. The Wi-Fi signal to the camera is very strong. The live stream comes up quickly and runs smoothly in HA WebRTC until is cuts off after 10 minutes or so. Streaming using the GotoRTC web page has the same behaviour as in Lovelace.
Add any other context about the problem goes here. Mainly, share everything as log files and use screenshots as last resort.
I am having the similar issue locally but I dont have a solution for the issue, it is coming from add-on, please check with bropat. I am actively watching his repositories
Describe the bug
Whenever I try to view the camera live stream for an extended period using the WebRTC lovelace card the stream will stop after around 9 or 10 minutes. Sometimes less.
To reproduce
Steps to reproduce the behavior:
Expected behavior
I expect the stream to continue running until I click 'Stop P2P Stream'. However, if I try to click 'Stop P2P Stream' after the stream has cut I get the standard Lovelace error saying the stream is not longer running.
Additional information
Hardware Information;
Camera Model: Eufy S100 Wall Light Camera
Live Streaming Protocol (RTSP/P2P): P2P
Debug Logs from Home Assistant (https://github.com/fuatakgun/eufy_security/discussions/624) - Without this, I will automatically resolve this issue
2023-11-30 14:31:30.852 INFO (MainThread) [aiortsp.rtsp.reader] try loading stream rtsp://127.0.0.1:8558/
2023-11-30 14:31:30.863 INFO (MainThread) [aiortsp.rtsp.reader] connected!
2023-11-30 14:31:30.863 INFO (MainThread) [aiortsp.rtsp.reader] receiving interleaved RTP (0) and RTCP (1)
2023-11-30 14:31:30.867 INFO (MainThread) [aiortsp.rtsp.reader] session options: {'DESCRIBE', 'GET_PARAMETER', 'PLAY', 'PAUSE', 'RECORD', 'ANNOUNCE', 'SETUP', 'TEARDOWN'}
2023-11-30 14:31:31.277 INFO (MainThread) [aiortsp.rtsp.reader] connection to RTSP server 127.0.0.1:8558 closed (error: None)
2023-11-30 14:31:31.779 INFO (MainThread) [aiortsp.rtsp.reader] try loading stream rtsp://127.0.0.1:8558/
2023-11-30 14:31:31.780 INFO (MainThread) [aiortsp.rtsp.reader] connected!
2023-11-30 14:31:31.780 INFO (MainThread) [aiortsp.rtsp.reader] receiving interleaved RTP (0) and RTCP (1)
2023-11-30 14:31:31.782 INFO (MainThread) [aiortsp.rtsp.reader] session options: {'DESCRIBE', 'GET_PARAMETER', 'PLAY', 'PAUSE', 'RECORD', 'ANNOUNCE', 'SETUP', 'TEARDOWN'}
2023-11-30 14:31:31.784 INFO (MainThread) [aiortsp.rtsp.reader] using base url: rtsp://127.0.0.1:8558//
2023-11-30 14:31:31.785 INFO (MainThread) [aiortsp.rtsp.reader] setting up using URL: rtsp://127.0.0.1:8558//trackID=0
2023-11-30 14:31:31.795 INFO (MainThread) [aiortsp.rtsp.reader] stream correctly setup: <Response status=200 msg="OK"" headers={'cseq': '3', 'server': 'gortsplib', 'session': '489612031', 'transport': 'RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=280AE294'} content-length=0>
2023-11-30 14:31:31.795 INFO (MainThread) [aiortsp.rtsp.reader] session id: 489612031, timeout: 60, keep_alive: 54
2023-11-30 14:31:31.795 INFO (MainThread) [aiortsp.rtsp.reader] playing stream...
2023-11-30 14:31:31.796 INFO (MainThread) [aiortsp.rtsp.reader] start playing rtsp://127.0.0.1:8558// at time now and speed 1...
2023-11-30 14:31:31.933 INFO (MainThread) [aiortsp.rtsp.reader] stopping stream...
2023-11-30 14:31:31.933 INFO (MainThread) [aiortsp.rtsp.reader] stopping session/playback...
2023-11-30 14:31:31.935 INFO (MainThread) [aiortsp.rtsp.reader] connection closed, error:
2023-11-30 14:31:31.936 INFO (MainThread) [aiortsp.rtsp.reader] connection to RTSP server 127.0.0.1:8558 closed (error: None)
2023-11-30 14:33:26.981 WARNING (MainThread) [homeassistant.helpers.entity] Updating state for switch.s330_doorbell_delivery_guard (<class 'custom_components.eufy_security.switch.EufySwitchEntity'>) took 0.510 seconds.
2023-11-30 14:39:18.904 WARN Error: AES key could not be decrypted! The entire stream is discarded. { error: { cause: undefined, message: 'Error: Error during decryption (probably incorrect key). Original error: Error: error:0200009F:rsa routines::pkcs decoding error', context: undefined, stacktrace: 'Error: Error during decryption (probably incorrect key). Original error: Error: error:0200009F:rsa routines::pkcs decoding error\n' + ' at module.exports.NodeRSA.$$decryptKey (/usr/src/app/node_modules/node-rsa/src/NodeRSA.js:301:19)\n' + ' at module.exports.NodeRSA.decrypt (/usr/src/app/node_modules/node-rsa/src/NodeRSA.js:249:21)\n' + ' at P2PClientProtocol.handleDataBinaryAndVideo (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1319:63)\n' + ' at P2PClientProtocol.handleData (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1259:18)\n' + ' at P2PClientProtocol.parseDataMessage (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:1121:26)\n' + ' at P2PClientProtocol.handleMsg (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:957:26)\n' + ' at Socket. (/usr/src/app/node_modules/eufy-security-client/build/p2p/session.js:113:56)\n' + ' at Socket.emit (node:events:517:28)\n' + ' at Socket.emit (node:domain:489:12)\n' + ' at UDP.onMessage [as onmessage] (node:dgram:942:8)' }, stationSN: '',
key: 'aabd76d37f0ccb0febc8f96abc6b006ff71ec326bd08ded1185521116e58aac3031a4502012a04b9f85d4d4fe965ab4c971e17597768d6fa876b0bf6a51683199b89bdf0a57cda1c8fc66011dbe67de6adabbf5a86fe561f77bb6bc34dcdd7094da690b5ab015ac0ab6661c720b7d975e7651a5ca859f018c074a74f9757e539'
}
Additional context
Add any other context about the problem goes here. Mainly, share everything as log files and use screenshots as last resort.
Additional context
Add any other context about the problem goes here. Mainly, share everything as log files and use screenshots as last resort.