PTZ w/stored focus points and HTTP scripting?

TheWaterbug

Getting comfortable
Joined
Oct 20, 2017
Messages
772
Reaction score
1,673
Location
Palos Verdes
My live BeeCam (Reolink RLC-423) has been working reasonably well over the last 5+ years, and it's still running fine.
Mounted.jpg

I use ffmpeg to pull RTSP from the camera and push it out to a YouTube streaming channel, and then I have another script that commands it to rotate through N preset positions, once per minute:

Code:
#!/bin/bash

for (( ; ; ))

do

ReolinkToken=`curl -s GET "http://192.168.1.11/cgi-bin/api.cgi?cmd=Login&token=null" -d '[{"cmd":"Login","action":0,"param":{"User":{"userName":"admin","password":"password"}}}]' | /opt/homebrew/bin/jq -r '.[].value.Token.name'`

echo $ReolinkToken

Positions=$1
Dwell=$2
PositionPause=4
FocusPause=3

for TheLoop in `seq 1 $Positions`;
do
    curl -s POST "http://192.168.1.11/cgi-bin/api.cgi?cmd=PtzCtrl&token=$ReolinkToken" -d '[{"cmd":"PtzCtrl","action":0,"param":{"channel":0,"op":"ToPos","speed":32,"id":'$TheLoop'}}]'

sleep $PositionPause

curl -s POST "http://192.168.1.11/cgi-bin/api.cgi?cmd=PtzCtrl&token=$ReolinkToken" -d '[{"cmd":"PtzCtrl","action":0,"param":{"channel":0,"op":"ZoomInc","speed":32}}]'

sleep $FocusPause

curl -s POST "http://192.168.1.11/cgi-bin/api.cgi?cmd=PtzCtrl&token=$ReolinkToken" -d '[{"cmd":"PtzCtrl","action":0,"param":{"channel":0,"op":"Stop"}}]'

sleep $Dwell

done

done

I'm also recording 24/7 in BI, albeit without the weather overlay.

My only major remaining issue is that the PTZ stored locations don't store focus, so I have also call a Zoom event and then rely on the camera's auto-focus every time I switch presets.

This doesn't work well when the scene is full of flying bees, and so it's often out of focus during the high season (e.g. now) when the bees are busy.

So I'm looking to replace the RLC-423 with a PTZ that has:
  1. IP/POE/PTZ/RTSP that stores focus points
  2. Works with BI
  3. Scriptable from bash, preferably with curl or something simple that I, as a non-programmer, can understand.
    1. In fact I found instructions here in IPCamTalk on how to control my RLC-423.
    2. Even if the camera's built-in "cruise" feature works properly (e.g. Reolink's doesn't), I'd still like to have scriptable control over it, as someday I'd like to have "voting" buttons on a page with the embedded stream, so viewers can vote on which preset they want to see.
  4. Solutions for mounting against a metal fence with square bars, like my existing camera.
    1. I probably didn't need to build that enclosure, as I found out after the fact that the camera supported 802.3af, so a simpler mount without a cavity would have worked fine, as long as I protected the cable ingress/egress from the camera body.
  5. Not hideously expensive. I paid $$229.99 for the RLC-423, five years ago, and I feel like I got my money's worth
  6. Decent image quality.
    1. Almost all the interesting bee stuff happens during daylight hours.
    2. But there are some very occasional exceptions to that.
  7. Will last another 5 years!
Suggestions? Thanks!
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,056
Reaction score
48,866
Location
USA
That has been an issue we have seen with PTZs is that they don't have a focus you can set it to like the fixed cams.

Not sure why.
 

TheWaterbug

Getting comfortable
Joined
Oct 20, 2017
Messages
772
Reaction score
1,673
Location
Palos Verdes
That has been an issue we have seen with PTZs is that they don't have a focus you can set it to like the fixed cams.

Not sure why.
Ugh. So this is the rule rather than the exception?

Doesn't make any sense to me.
 

wittaj

IPCT Contributor
Joined
Apr 28, 2019
Messages
25,056
Reaction score
48,866
Location
USA
In my experience and that of others yes. I have had several PTZs and none had that option.
 
Top