• April 18, 2024, 06:12:38 PM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: [SOLVED] Curl command in motion  (Read 3713 times)

rebelo

  • Level 1 Member
  • *
  • Posts: 2
[SOLVED] Curl command in motion
« on: January 23, 2017, 10:14:14 AM »

Hi.

Firmware 2.14
Trying to enable/ disable the motion detection feature by a curl command like:

Code: [Select]
curl -u userid:password http://IPaddress/setSystemMotion –referer http://IPaddress/motion.htm -d « ReplySuccessPage=motion.htm&ReplyErrorPage=motion.htm&MotionDetectionEnable=1&MotionDetectionScheduleDay=0&MotionDetectionScheduleMode=0&MotionDetectionSensitivity=30&ConfigSystemMotion=Save » > /dev/null 2>&1
but keeping getting error
Code: [Select]
<html><body><h1>The request is forbidden.</h1></body></html>
curl: (6) Could not resolve host: xn--referer-t16c
<html><body><h1>The request is forbidden.</h1></body></html>
curl: (6) Could not resolve host: ReplySuccessPage=motion.htm

The end use is to append this to a virtual switch in Domoticz that allows me to turn this function on/ off remotely via its own control panel. 
Any help would be appreciated.

Tks
Rebelo
« Last Edit: January 24, 2017, 10:15:32 AM by rebelo »
Logged

rebelo

  • Level 1 Member
  • *
  • Posts: 2
Re: Curl command in motion
« Reply #1 on: January 24, 2017, 10:14:48 AM »

Well found it using the help form this post:
http://forums.dlink.com/index.php?topic=58573.0

A simple http request assigned in the switch did the trick
http://username:password@cameraIP:port/config/motion.cgi?enable=yes

Try with and without port number.

Tks all
Rebelo

Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: [SOLVED] Curl command in motion
« Reply #2 on: March 07, 2017, 06:56:58 AM »

Thanks for posting. Hope this help future users.
Enjoy.  ;)
Logged
Cable: 1Gb/50Mb>NetGear CM1200>DIR-882>HP 24pt Gb Switch. COVR-1202/2202/3902,DIR-2660/80,3xDGL-4500s,DIR-LX1870,857,835,827,815,890L,880L,868L,836L,810L,685,657,3x655s,645,628,601,DNR-202L,DNS-345,DCS-933L,936L,960L and 8000LH.