Hey guys, I spent the better part of this morning attempting to move 4 reolink cameras from ZoneMinder to Home Assistant. I wanted to remove ZoneMinder from my device because it can be a resource hog and I wasn’t capturing video with it. When attempting to move these cameras to HA, I ran into problems.
- I found that the generic ip camera never worked for me with reolink and RTSP or RTMP feeds. The funny part of this is that the configuration that works on the forums originated from me back when I first implemented the cameras in ZoneMinder. I made a casual mention to @hunterjm that the rstp feed had a specific url found in this post. Turns out, that doesn’t work for me inside Home Assistant. But it does work for some.
- I found that RTSP feeds tend to smear. This does not sit well with me. I’m not sure what is causing this but it makes watching the feeds unbearable.
This ultimately made me settle on the FFMPEG integration using an RTMP feed. As I was setting this up, I ran into another odd problem that took quite a bit to figure out. This issue is ultimately what is leading me to make this post. I’m not sure if it affects other camera brands. The 2 cameras that were not working kept hitting the FFMPEG integration timeout. Meaning, the integration wasn’t getting a full response from the camera within the timeout period. So before even setting up FFMPEG, inside reolink a user must set the bitrate on the camera to a high enough amount. From what I can tell, the iOS app no longer has this configuration option. In order to do this, you must log into the camera through a browser on a PC. Expand Basic Settings and the Encode tab, set the Maximum Bitrate(kbps) as high as you can go. 1024 was not high enough and this was ultimately my problem. I’ve noticed that wifi connected cameras have a max rate of 4096 and wired is 6144 to 8192 depending on the camera.
Next, these are the URLs for the feeds. These should work for Generic IP Camera Integration or FFMPEG. (I found working results with FFMPEG).
|rtsp||clear (high)||rtsp://user:[email protected]:554/h264Preview_01_main|
|rtsp||fluent (low)||rtsp://user:[email protected]:554/h264Preview_01_sub|
|rtsp||blend (mix)||rtsp://user:[email protected]:554/h264Preview_01_ext|
You’d have to change the IP, user, and password in whatever url you are using. For RTMP, change the user and password after the equal sign. Ex:
Generic IP Camera Integration
- platform: generic name: My Camera still_image_url: 'http://192.168.x.x/cgi-bin/api.cgi?cmd=Snap&;channel=0&;rs=wuuPhkmUCeI9WG7C&;user=user&;password=password' stream_source: 'rtsp://user:[email protected]:554/h264Preview_01_main'
You can swap stream_source for the RTMP version if you like.
FFMPEG Integration (Best Quality in my opinion)
- platform: ffmpeg name: My Camera input: 'rtmp://192.168.x.x/bcs/channel0_main.bcs?channel=0&stream=0&user=user&password=password'
You can swap stream_source for the RTSP version if you like.