Navigation

    Home
    All Categories
    • KEEN Trail Camera
    • Top #ReolinkCaptures Awards
    • Announcements and News
    • Wishlist
    • #ReolinkTrial
    • Discussion About Products
    • Reolink Captures
    • Reolink Client & APP
    #ReolinkTrial
    Reolink Captures
    Log in to post
    Guest
    • Guest
    • Register
    • Login

    Learn More

    Reolink updates Learn More

    Meet Reolink at IFA 2024! Learn More

    Reolink Q&A Learn More

    Workaround for lack of auto-auto-focus in Cruise mode

    Reolink Client & APP
    1
    1
    228
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Steven Kan_61128021664
      Steven Kan last edited by

      My BeeCam has 5 defined preset positions, but Cruise doesn't really work very well because the focus points are different for each preset, they're not stored, and the RLC-423S doesn't auto-focus automatically after moving to a preset.

      So I wrote a script to do the following:


      • Ask for username and password

      • Cruise to each position

      • Zoom inward to force an autofocus

      • Stop

      • Repeat



      This works best if the desired zoom point is all the way in (or all the way out), so that the zoom inward doesn't change the desired field of view.

      I have this running on a Raspberry Pi, after testing it first on my Mac. The syntax for a bash "for" loop may vary slightly from Unix to Unix, and you'll need jq installed to parse the json from the camera. But it works, and it works better (for me) than the built-in Cruise mode.

      Furthermore, I couldn't paste the code in verbatim, because it includes angle quote characters that screw up the BBCode "code" tags. So you'll have to change the outermost quote characters in "ReolinkToken='curl . . . [].value.Token.name''" from normal single quotes ' to angle quotes.

      #!/bin/bash

      echo "username:"

      read UserName

      echo "password:"

      read Password

      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":"'$UserName'","password":"'$Password'"}}}]' | jq -r '.[].value.Token.name''

      echo $ReolinkToken

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

      for ((TheLoop=1; TheLoop<=$Positions; TheLoop++))
      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'}}]'

      echo "Panning to new preset . . . "
      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}}]'

      echo "Focusing . . . "
      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"}}]'

      echo "Dwelling for " $Dwell "seconds . . . "
      sleep $Dwell

      done

      done

      Reply Quote
      Share
      • Share this Post
      • Facebook
      • Twitter
      • copy the link
        Copied!
      0
        View 0 replies
      • First post
        Last post
      All Categories
      Announcements and News Reolink Client & APP Discussion About Products #ReolinkTrial Reolink Captures Wishlist KEEN Trail Camera
      Never miss Reolink hot deals, news, and updates tailored for you.

      Thanks for your subscription!

      Please enter a valid email address.

      Oops… Something went wrong. Please try again later.

      You are already subscribed to this email list. :)

      Submission failed. Please try again later.

      Reolink Store|Support|About Us|Privacy Policy|Terms and Conditions

      Copyright 2025 © Reolink All Rights Reserved.

      Welcome Back!

      Hi there! Join the Commnunity to get all the latest news, tips and more!

      Join Now