I have **Motion** installed on my PI and having difficulty trying to control the threshold via the command line.

Motion's [wiki][1] suggests that this type of control can be done using cron like this:

    0 9 * * * root /usr/bin/lwp-request http://localhost:8080/0/detection/start > /dev/null




So i tried this on the command line:

  

     /usr/bin/wget http://localhost:8091/0/config/set?threshold=4000 > /dev/null

and goth this:

    Resolving localhost (localhost)... 127.0.0.1, ::1
    Connecting to localhost (localhost)|127.0.0.1|:8091... connected.
    HTTP request sent, awaiting response... 401 Authorization Required
    Authorization failed.


1) Did this not work because of having [control_authentication][2] set up?

2) Is it possible to control motion in this way with authentication set up if so how?

3) Am I approaching this in the correct way?


  [1]: http://www.lavrsen.dk/foswiki/bin/view/Motion/RemoteControlHttp
  [2]: http://www.lavrsen.dk/foswiki/bin/view/Motion/ConfigOptionControlAuthentication