Closed Medic97 closed 1 year ago
here is my config:
go2rtc:
webrtc:
candidates:
- stun:8555
streams:
doorbellmain:
- rtsp://****:****@192.168.3.230:554/h264Preview_01_main#backchannel=0
doorbellsub:
- rtsp://****:****@192.168.3.230:554/h264Preview_01_sub
- ffmpeg:rtsp://***********@192.168.3.230:554/h264Preview_01_sub#audio=opus
cameras:
doorbell:
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/doorbellmain
input_args: preset-rtsp-restream
roles:
- detect
- record
#- path: rtsp://127.0.0.1:8554/doorbellmain?video=copy
# input_args: preset-rtsp-restream
# roles:
# - record
output_args:
record: preset-record-generic
I use the sub channel with frigate card for two way talk and the main for recording and detect. This camera can barely deal with two streams at a time and I have an ethernet one. Make sure your power it squared away and that you are using 5G wifi or have a very solid 2.4ghz. Make sure to reduce fps and change that weird setting they have for Fluency on fps on the cameras settings page. it automatically adjusts fps and thats not a good thing, needs to be turned off. you need to open that web section to change it as the app does not have it.
The local rtsp address didn't work for me. I am checking with reolink now, if my power is an issue. I was reusing the power adapter I used with my nest cam. It shows like 2 bars but it's right below my U6-Pro so idk what the issue is. Here are my camera settings
I think that backchannel=0 on whatever stream you won’t be using two way talk on is important or put it on both if your not using talk as the voice channel seems to ruffle its feathers if not disabled on one of the streams. Not a 100 percent sure. I worked on it for a full 24 hours and am not completely sure where I stated getting it right besides that fluency fps
Oh so far not using with either, I didn't want to add complexity till after it was stable. I'll add that now to both links.
Increase your interframe rate and move fps down to 15 maybe. You might be mogging the the camera. Mine would reboot or reset from heavy load until I reduced fps and increased interframe to give the camera some space. Can you connect to rtsp with VLC?
Also you may need to hard reboot it. I noticed sometimes I would change settings and it would hang. Not applying them till I logged in and manually reboot it
Somewhere it said to put interframe at 1x instead of 2x, dont remember now where. Yes VLC links fine.
Whatever you do reduce connections as much as possible. I don’t think you can have two open connections with detect and record. My substream is only used when viewing. go2rtc duplicates main stream to reduce connections.
I’ll rephrase that. You can but it seems to not work out well and was part of my issue
Why would you record the lower res substream and not the main one? Doesnt that defeat the purpose of a high res cam?
Actually I see you are using the main for detect and sub. The docs said to avoid that. Maybe I should only have one stream for both like you do.
What does this part of your config do?
doorbellsub:
- rtsp://****:****@192.168.3.230:554/h264Preview_01_sub
- ffmpeg:rtsp://***********@192.168.3.230:554/h264Preview_01_sub#audio=opus
I record high res and detect on high res. I’d rather detect on low like you’re doing and I do with my other cameras but this camera is finniky. If you look at my config it makes a connection to main using go2rtc and one to sub go2rtc does not connect to the camera unless you’re viewing. So my sub sits ready to be viewed quickly when the door bell is rung. The main one copied by go2rtc is then duplicated by putting record and detect under the same input. So only one connection exists at most times to the camera
***sorry for typos. On my phone on the move.
What does this part of your config do?
doorbellsub: - rtsp://****:****@192.168.3.230:554/h264Preview_01_sub - ffmpeg:rtsp://***********@192.168.3.230:554/h264Preview_01_sub#audio=opus
That retranscodes the audio so it will work in frigate and homeassistant with two way talk. The device only accepts a certain Audio in two way talk
Your giving me ideas. I'll detect and record on the main one and us the sub only for notifications using HA.
Edit: Ok so I separated main from sub in go2rtc like you have and I made detect and record on the main stream. Lets hope this works better.
Your giving me ideas. I'll detect and record on the main one and us the sub only for notifications using HA.
Yeah. If you copy my config you can add frigate card and turn on the microphone as along as you access homeassistant over https. I have it notify me with an image and a direct link to a panel dashboard with frigate card and the microphone ready to chit chat
"I have it notify me with an image and a direct link to a panel dashboard with frigate card and the microphone ready to chit chat"
Would love to see that automation code so I don't have to recreate it. I use cloudflared to get inside the house so it's https.
Sure. I’ll dig it up. I use reverse proxies so I had to get creative. My local lan address is now behind a reverse proxy like my public one to give https while on Wifi. I’ll grab the automations for you.
I also turned on https for the camera as some people online said theirs wouldn’t work at all with it off. Forgot about that
Sure. I’ll dig it up. I use reverse proxies so I had to get creative. My local lan address is now behind a reverse proxy like my public one to give https while on Wifi. I’ll grab the automations for you.
I want to explore that next. I just completed my Unifi setup so between the built in firewall and making vlans and internal dns servers.... I am headed down a big rabbit whole. Not even sure which one I should start with.
Nginx proxy manager in the addon store is a perfect start. Very easy to use. Just buy a godaddy domain or another larger provider and create tons of A record subdomains till your hearts content, i say godaddy because nginx proxy manager can use their api to register ssl certificates with lets encrypt. I have about 15 subdomain reverse proxies for various things from plex and all its downloads to another homeassistant behind tailscale in the middle of nowhere running cameras. Your way is probably more secure though. Im just to the point with privacy where if someones going to hack me their going to get a whole bunch of worthless boring stuff and hours of bad python scripts and me trying to fumble my way through different things.
alias: doorbell
description: ""
trigger:
- platform: state
entity_id:
- binary_sensor.reolink_video_doorbell_poe_visitor
to: "on"
condition: []
action:
- service: script.doorbellon
data: {}
- service: notify.notify
data:
message: Doorbell was rung. Tap to respond.
data:
url: /dashboard-test/0
image: https://**********/api/doorbell/latest.jpg
enabled: false
- wait_for_trigger:
- platform: state
entity_id:
- binary_sensor.reolink_video_doorbell_poe_visitor
to: "off"
for:
hours: 0
minutes: 0
seconds: 0
timeout:
hours: 0
minutes: 0
seconds: 10
milliseconds: 0
mode: single
ignore the script.doorbellon. Thats just to trigger a raspberry pi to play a door bell noise over my house speakers. got annoyed with their lame doorbell that would never connect and my previous one was a fog horn.
i will mention I installed the reolink addon for homeassistant from hacs. Then disabled all the camera entities to reduce connections and just use the sensors.
My Reolink Duos only work properly with preset-rtsp-udp on the h265 channel. I did not test sound yet.
Edit: I spoke way too soon, log full of errors. Back to the drawing board.
Posting for others who come by the same issue. I will say to @kdill00 point about power, I did change the power cable going to the camera to the one provided by reolink. Now it's reporting above 90% wifi experience in unifi. I had to splice it which is why i didn't use it to begin with. I felt the 16v one I was using for the Nest Cam should've been fine. I would say if you are going aftermarket get a 24v one like theirs.
I just spend 5 hours in trial and error, I also gave frigate full use of my 72 cores but it still maxes out my cpu. But this config finally works, at some point recordings were choppy and green but finally all is well.
The only Errors in my log now are these, could be cuz I mapped the cache to host instead of letting it map it every time the cluster came back up.
frigate.record ERROR : Error occurred when attempting to maintain recording cache frigate.record ERROR : list index out of range
Either way hope someone else can use this in time. Now on to @kdill00 HA automation!
go2rtc:
streams:
girls_cam:
- rtsp://User:Password@192.168.##.##:554/h264Preview_01_main#backchannel=0
# - http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=User&password=Password
# - "ffmpeg:http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=User&password=Password#video=copy#audio=copy"
doorbell:
# - rtsp://User:Password@192.168.##.##:554/h265Preview_01_main#backchannel=0
- http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=User&password=Password#backchannel=0
# - "ffmpeg:http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=User&password=Password#video=copy#audio=copy#backchannel=0"
doorbell_sub:
# - rtsp://User:Password@192.168.##.##:554/h265Preview_01_sub
- http://192.168.##.##/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=User&password=Password#backchannel=0
# webrtc:
# candidates:
# - 192.168.1.11:8555
# - stun:8555
detectors:
coral:
type: edgetpu
device: usb
record:
enabled: True
retain:
mode: all
events:
pre_capture: 10
post_capture: 10
retain:
default: 90
mode: motion
snapshots:
enabled: True
clean_copy: True
timestamp: True
bounding_box: True
retain:
default: 14
cameras:
girls_cam:
detect:
width: 640
height: 360
fps: 7
ffmpeg:
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://User:Password@192.168.##.##:554/h264Preview_01_main
roles:
- record
- path: rtsp://User:Password@192.168.##.##:554/h264Preview_01_sub
roles:
- detect
doorbell:
detect:
width: 640
height: 480
fps: 5
ffmpeg:
input_args: preset-rtsp-restream
output_args:
record: preset-record-generic-audio-copy
inputs:
- path: rtsp://127.0.0.1:8554/doorbell?video=copy&audio=copy
roles:
- record
- path: rtsp://127.0.0.1:8554/doorbell_sub?video=copy
roles:
- detect
@Medic97 kust out of curiosity: did you try rtsp via udp? With the generic preset (tcp) I really had a lot of instability and constant errors.
@Medic97 kust out of curiosity: did you try rtsp via udp? With the generic preset (tcp) I really had a lot of instability and constant errors.
Yes that is one the setting I tried as well. I'm going to mess it again today and see what can be done.
This camera is different than other reolink cameras. Check and make sure you do have the latest firmware. They pushed an updated one as recently as May that fixed a lot. I bought mine at the end of may and still had to find and upgrade the firmware. The reolink settings suggested for other reolink cameras made this one worse for me(same greenscreen issues), as this one is closer to an average rtsp camera. Did you change the cameras https setting as well? I read people solved issues with that. But if you have a clear video showing in VLC then this is just finding the right settings in ffmpeg. Transcode the audio. Don’t copy it. I think that’s probably your issue. The default audio is incompatible is probably causes the connectivity/greenscreen. It will use a lot of resources as it’s a massive resolution if you don’t limit fps and increase the inter frames.
Wifi and Ethernet use completely different firmware files or I’d give you the one I have. Not holding out on you. Hope you get it tuned in more. New versions of frigate will have the ability to start recording with an http post request such as if button is hit or even triggered by another camera seeing person getting close. I may end up doing that if I ever get annoyed with its extra consumption of detect frames.
Also just for anyone else as a last resort or if you prefer, this camera works excellent through Apple Home Kit using that Scrypted app and their onvif / HomeKit plugin. If you have an Apple cloud subscription (3 bucks a month) you can have Apple run object detection and record it using HomeKit secure video and talk back through phone notifications. You’ll need an Apple device that supports Apple HomeKit for some of these feature. Appletv or somewhat recent Apple computer. Scrypted can be a resource hog so it may not be worth it to some.
Also last comment, the firmware probably won’t do much for the issue you’re facing unless the Wifi version had other issues the Ethernet one didn’t. Most firmware updates have been centered around the ONVIF bastardized profile-T they birthed for this thing to do 2 way talk as reolink has been trying hard to make it work well with any application. Wish there was one clear answer but probably won’t be till the dust settles on this new camera.
Yeah, I run with http-flv and have had no issues with my doorbell crashing at all, but I have the audio set to be transcoded and don't use the original audio.
Describe the problem you are having
My Reolink Wifi doorbell keeps crashing and my log is flooded with errors.
Version
Frigate (0.12.1-367d724)
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
Other Linux
Install method
Docker Compose
Coral version
USB
Network connection
Wired
Camera make and model
Reolink Doorbell Wifi, Latest firmware.
Any other information that may be helpful
On TrueNAS Scale using TrueCharts Frigate app. I have a Coral passed through that seems to be working fine, no GPU.
I tried to limit to relevant logs since they repeat so much. I have 2 cameras an older C1-Pro which won't work with HTTP and the doorbell. As you can see from commented out lines I was testing many different configurations. Same log problems when switching between http and rtsp streams.
Already upgraded to go2rtc 1.5 and the logs are empty aside from starting notes.