• March 28, 2024, 09:38:12 AM
  • 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.

Pages: 1 [2]

Author Topic: Api control or change settings with script  (Read 36437 times)

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: Api control or change settings with script
« Reply #15 on: January 02, 2017, 09:46:33 AM »

D-Link may have removed script support due to security reasons.

In the latest DCS-932L firmware (1.14.04), direct access to these URLs are no longer possible and results in the message: "The request is forbidden."

Has anyone figured out a way around this that they could share? I have tried downgrading the firmware but then you cannot use the mydlink remote viewing service.
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.

zdavstvuy

  • Level 1 Member
  • *
  • Posts: 2
Re: Api control or change settings with script
« Reply #16 on: February 09, 2017, 07:32:48 PM »

I wanted to write a program on Linux that can get motion alerts. How do they work? Does the camera visit a link at the DLink site and provide its ID number, which is hashed to my mydlink account only (thus making this impossible)? Or can I somehow receive the data from the camera to my software? If the latter is the case, how? Many thanks!
Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: Api control or change settings with script
« Reply #17 on: February 10, 2017, 06:54:04 AM »

You have it right. There is a unique ID number for D-Link products that get associated to there Cloud services.
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.

Dangar

  • Level 1 Member
  • *
  • Posts: 1
Re: Api control or change settings with script
« Reply #18 on: October 24, 2017, 01:58:24 AM »

In the latest DCS-932L firmware (1.14.04), direct access to these URLs are no longer possible and results in the message: "The request is forbidden."

Has anyone figured out a way around this that they could share? I have tried downgrading the firmware but then you cannot use the mydlink remote viewing service.

I think you have to add

--referer http://URL-CAM/email.htm

I had similar problem with enabling/disabling motion detection and in this case referer url was motion.htm

Logged

FurryNutz

  • Poweruser
  •   ▲
    ▲ ▲
  • *****
  • Posts: 49923
  • D-Link Global Forum Moderator
    • Router Troubleshooting
Re: Api control or change settings with script
« Reply #19 on: October 24, 2017, 10:02:44 AM »

Thanks for posting this info. Hope it helps future users...   ;)
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.

Pain123

  • Level 1 Member
  • *
  • Posts: 2
Re: Api control or change settings with script
« Reply #20 on: March 23, 2018, 06:30:19 AM »

In the latest DCS-932L firmware (1.14.04), direct access to these URLs are no longer possible and results in the message: "The request is forbidden."

Has anyone figured out a way around this that they could share? I have tried downgrading the firmware but then you cannot use the mydlink remote viewing service.

I think you have to add

--referer http://URL-CAM/email.htm

I had similar problem with enabling/disabling motion detection and in this case referer url was motion.htm

Hello, im back on this project and cant get it to work with Day/Night Mode.

Motion works fine with "http://admin:PASSWORD@192.168.0.XX/motion.cgi?MotionDetectionEnable=0&MotionDetectionSensitivity=75&ConfigReboot=No&ConfigSystemMotion=Save".
Both for setting Sensitivity and activate/deactivate motion.

What must i do to activate/deactivate Night Mode? The only response i get is "The request is forbidden.".
It dont matter if i add "--referer http://your_camera_ip/night.htm" in the call.
Can someone help me out?  :)

Best regards Andreas
« Last Edit: March 23, 2018, 11:00:07 AM by Pain123 »
Logged

rjms

  • Level 1 Member
  • *
  • Posts: 13
Re: Api control or change settings with script
« Reply #21 on: April 06, 2018, 04:25:33 PM »

with curl, this works for me:

Code: [Select]
USER=admin
PW=yourpassword
# HOST is whatever is your cam IP, below is example
HOST=192.168.1.150

# Day/Night modes DN
# 0 = Auto
# 1 = Manual
# 2 = Always Day Mode
# 3 = Always Night Mode
# (mode 4 is for schedule, I'll leave to you the details...)
DN = 2

# Define this to keep things short
ipCamDNOpt="DayNightMode=$DN&ReplySuccessPage=night.htm&ReplyErrorPage=errrnght.htm&ConfigDayNightMode=Save"

# We can now proceed
curl --user $USER:$PW http://$HOST/setDayNightMode --referer http://$HOST --data "$ipCamDNOpt" >/dev/null 2>&1

(Note: --referer http://$HOST/night.htm also works... in fact even --referer http://$HOST/fake.htm works! It's the host origin that's important)

Let's hope this still works in an upcoming firmware (which hopefully will come because KRACK attack vulnerability still isn't fixed for DCS-930L/933L and many others  :o  >:(  :'(  )
Logged

TurboTronix

  • Level 1 Member
  • *
  • Posts: 1
Re: Api control or change settings with script
« Reply #22 on: December 30, 2021, 07:35:52 AM »

Where can I find all the available functions? I am trying to reboot the camera if it gets a "no signal" outcome.
Logged
Pages: 1 [2]