Closed thelightningist closed 2 years ago
I am interested in this as well.
I was trying to write a python script to extract the internal RTSP url from the panel but the API broke after Vivint had their maintenance, I'm hoping they fix it soon so I can share with you guys
EDIT: As I wrote this comment, the repository was update and was able to finish this script https://gist.github.com/DarellAdams/1721590ab83443f43eea0c6391c39380
usage as following: python camRTSP.py [username] [password]
output
DEBUG:root: Device: <Camera, Cam1>
Internal rtsp URL non-hd: [URL]
Internal rtsp URL hd: [URL]
External rtsp URL non-hd: rtsp[URL]
External rtsp URL hd: rtsp[URL]
DEBUG:root: Device: <Camera, Cam2>
Internal rtsp URL non-hd: [URL]
Internal rtsp URL hd: [URL]
External rtsp URL non-hd: rtsp[URL]
External rtsp URL hd: [URL]
It wouldn't be hard to expose this at all. If I recall, I even exposed it at one point in my initial iteration of the component as an attribute on the camera, but then decided to remove it from the published file because it could be a security issue (especially for external sources). But this section https://github.com/natekspencer/hacs-vivint/blob/a189ea2fc289db464f6ebc112e5d211091ad5556/custom_components/vivint/camera.py#L78 is where you would get the stream source, which is the RTSP url.
Hi @DarellAdams
Thanks so much for sharing your script! Just so I understand this correctly, where exactly do you place the cameraRTSP script at? The vivint folder under custom_componets?
When I try running it from the terminal in Visual Studio Code after adding the file, I get the same error from running the script if it's in the config folder or custom_componets/vivint/ folder:
Traceback (most recent call last):
File "camRTSP.py", line 5, in <module>
from vivintpy.account import Account
ModuleNotFoundError: No module named 'vivintpy'
@thelightningist Sorry for the late reply. You actually need to run this on a laptop/client computer.
I just released version 2021.9.5 that includes the ability to enable logging of the rtsp urls via the configure option on the integration. Please note that you also have to have logging enabled in your configuration.yaml file with custom_components.vivint
set to a minimum of info
. Here's an example:
logger:
default: error
logs:
custom_components.vivint: info
Awesome! Thanks so much!
a "low tech" alternative is if you just navigate to home assistant dashboard, which should load all the vivint cameras (at least my default & minimal install does), then it'll run an ffmpeg command in the background. So, if you just do this it'll show you the full rtsp stream:
sudo ps -aux | grep '[f]fmpeg'
at least that's works for me on 2024.4.0
Every time I enabled the "Log camera RTSP URLS" option in the config I got this:
rtsp://****:****@<IP>:554/stream1,audio=opus
Where the *
were actual *
& not me replacing for sensitive information.
To be clear, I'm not complaining & honestly I don't need a native way to handle it (so this isn't me trying to get any extra work done for the project), I just wanted to post it as an alternative way to find the URLs.
Thank you so much to all the contributors for all the hard work on this project! It's amazing :grin: :tada:
I was able to get this integration working wonderfully but wanted to try and take it a step further. I was curious about feeding the added camera entity's RTSP stream into frigate via their configuration file. However, I am unable to determine what the RTSP stream URL is of the existing entities (for example, camera.doorbell entity) in order to add them into Frigate.
These clearly are added as RTSP streams already and I can view them in Lovelace. Is there some sort of simple method to find this information so that I can add these cameras into frigate?