-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UniFi Protect discussion #1538
Comments
@AlexxIT regarding your comment on #1520 (comment) Unifi does not accept my newly uploaded config, just throws an error. I did change the values as you described, do I have to edit anything else? |
Are you sure your JSON valid (whole cameras.json file)? |
Yes, checked it. |
Have you copied another ONVIF camera? Because I'm copied another go2rtc camera. I have added it via WebUI. Maybe other JSON values important. I don't know. I'll check it later. |
Yes, I've copied another ONVIF camera. Could you share your config for one of your go2rtc cams? |
I got it right ? Doing this way I don't need to have one instance of go2rtc for each camera ? Or I only don't need to have one IP for each instance? |
Wondering if I could connect directly to RTSP camera doing this way. Will test later |
@blockiindahood this is my file https://gist.github.com/AlexxIT/d91b828171de3f2af2ca43b60d187c81 @BrunoTCouto one go2rtc, one IP, unlimited cameras. This will work directly with any RTSP camera. Also without go2rtc. |
@AlexxIT Thank you for sharing. From your configuration I only changed My best guess is |
@AlexxIT seems to be a zipping problem: downloading the config, unzipping it, not changing anything, zipping it, and uploading it, does not work. only uploading an original downloaded zip file work for me |
Maybe your archiver has a problem. I'm using the built in TotalCmd. |
I'll test this. I am using macOS's native one. |
Hey @AlexxIT, I tried connecting directly, but Protect still need some api responses from ONVIF. Anyways, thank you for the hack on protect. It will help a lot to manage just one go2rtsp instance :D 🎉 |
My config for reference: go2rtc
protect
On protect configuration, I changed
You will also need to change the host as yours will be different from mine |
RateControl fix |
I have been trying for some hours to get this done, but no luck. I can get the go2rtc camera to show up in unify but its just offline. Just something that I though: |
|
|
@michael-blue2 the IP of go2rtc is the local ip of your HA instance together with port 1984 |
@blockiindahood thank you for that, now everything does click! ahahah |
Hey @AlexxIT I am not sure if this is another thing that broke after the onvif refactor, but now I only can use the auto stream, before I was able to select low, auto and high on Protect About audio, looks like the protect onvif integration does not work with audio at all. Even direct camera access. |
If I'm not mistaken, the stream worked fine for my Tapo camera. There's PCMA audio. Audio can be ignored in different ways:
|
i haven't been able to manually add an rtsp camera from go2rtc I tried taking your example configs from above and editing for my camera, no luck unifi just says the cameras are offline i created a separate go2rtc lxc in proxmox with a simple config
and this is the config im using in unifi...
any ideas why it just says offline? |
@artinbastani remove go2rtc authentication. The admin+admin that I used is just a dummy value to make Protect happy that it is sending something to the "camera" Try this:
Question: Your camera doesnt have user and password ? |
@BrunoTCouto This is a second LXC in proxmox running go2rtc, so this is simply connecting to my main go2rtc instance. I can view the streams fine in the go2rtc web interface. |
Same issue. Add camera, restart protect, device offline.
I have no idea what are these. Changed MAC address and IP and device id and nothing worked. |
@xrh0905 check your thirdPartyCameraInfo > port. The log says it's trying to use port 22. Port 22 is used by ssh
|
@xrh0905 can you guide me on where did you find that logs? is it on protect logs? or unifi system? I am also having problems and when I check my protect logs theres nothing showing on try to connect on third party. |
I am too, did you find a solution @blockiindahood? I even tried to zip with 7zip but still it does not work.
I get an error every time I try to upload it. Also I tried to check for syntax errors in the cameras.json but no errors I can find. Importing the exported file works fine. This is my 7zip command:
|
@corvy no, sadly not, just gave up for the moment |
I'm quite sure that's not the issue. Looks like the protect simply try to SSH every camera that isn't actived. |
Hey @blockiindahood I found a solution. Installed Commander One:
After giving it some permissions etc I just edited directly inside Commander One. It does not extract the file, you just enter the zip archive, open the cameras.json and when you close the file it saves it into the zip file and it just magically works. |
Well I have a UDM Pro and the log is located in /srv/unifi-protect/logs. |
I had a similar issue but on windows. I looked through some of the logs and the issue seemed to be with the stored fingerprints on my g4 pro doorbell settings not wanting to import back in properly. Any chance you have a unifi device that stores credentials of some sort as those get included in the json file? My solution was to delete that info from the protect ui then export the backup again. Since then its been working ok. I never used the fingerprint functionality for anything so that was fine for me, but you may actually need that in which case this isn't really a solution. edit: I should also add that while I can import the cameras ok I too am not able to get the streams to work whereas I have been able to get it to work with this tool: https://github.com/p10tyr/rtsp-to-onvif/. I've been having connectivity issues with that one so I wanted to switch to go2rtc, but haven't had luck getting the video stream to work, only the snapshots seem to update. |
I was able to finally get it to work
was the line that got the right stream for Unifi I forgot that the community proxmox script for go2rtc doesn't run it in docker so ffmpeg isn't built in and it wasn't able to transcode the stream Oddly I can view the stream in the protect app, but it won't stream in the web interface |
Check in the web interface the quality of the stream is set to |
Can go2rtc access Ubiquiti camera feeds directly via RTSP without having Unifi Protect installed? |
Anyone got any idea why I only get the snapshot photo on this setup?
This is the go2rtc setup:
When I open VLC and open network with the following URL I get live video: rtsp://10.2.2.12:8554/doorbell |
Maybe problems with audio, as I said earlier #1538 (comment) |
Here are some logs from go2rtc, just for info. I see that there are some strange requests going to .1 IP which is my default gateway. 10.0.99.7 is the client opening Unifi Protect. Logs from go2rtc
|
Changed my go2rtc config, but the same problem remains.
Also tried with ffmpeg:doorbell (removing #audio=aac#media=video) but that made no difference. |
Hey guys, I believe that I found the backend log which unifi used to retrieve and transcode. It's a program called /srv/ms/logs/ms.00.log
Above are a sample of my machine. I'm wondering where did it get the |
Hey @corvy, I had a similar issue on my protect, changing the quality on |
@corvy open the stream, even if it is stuck and change it here. |
Thanks @BrunoTCouto, sadly this made no difference for me. |
This issue is for discussing the operation of UniFi Protect software. Related links:
The text was updated successfully, but these errors were encountered: