D-Link Forums

The Graveyard - Products No Longer Supported => IP Cameras => DCS-2230 => Topic started by: altercamera12 on May 15, 2012, 11:21:13 AM

Title: URL command to get a single snapshot on 2210 2230 and 7110
Post by: altercamera12 on May 15, 2012, 11:21:13 AM
Hi All,
I am considering some new cameras form D-Link but before I buy i'd like to make sure there is one feature I especially care about.

I need to get a single snapshot from the camera as result of just sending an URL command with the browser, of course snapshot should only be sent to authenticated/authorized users, so login should occur in some way before giving the result.

After some searches I found d-link documentations describing url commands for various camera models, but not for the ones I am considering to buy. The url command has generally this sintax:
http://<servername>/cgi-bin/video.jpg

I need to know if this command is supported for models DCS 2210 2230 and 7110
  
I'd like someone who actually tried / or so kind to try for me on his camera, describing what happens. I need to avoid the video stream thing and just get a single snapshot thus working also with smartphones not supporting activex video client and/or with narrow bandwidth.

Thank you so much for your support and buying guide.
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: max13 on May 16, 2012, 01:26:30 AM
Hi !

With my DCS-2210 i could get a snapshot jpg with login required

with that URL : http://<servername>/dms?nowprofileid=1
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: altercamera12 on May 16, 2012, 03:33:07 AM
Hi!
Thanks so much for the answer.
Where did you learn that url sintax? It's different from any other d-link camera for wich I found url cmds doc  ???
Did you authenticate through the typical authentication mask dialog box or you provided uid+pwd via url with another commmand?
Thanks again
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: altercamera12 on May 16, 2012, 03:36:58 AM
sorry, fogot to ask, do you have any parameter on url command to set the snapshot resolution? What resolution is your snapshot? Thanks
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: max13 on May 16, 2012, 04:52:11 AM
http://<servername>/dms?nowprofileid=1          => typical authentication dialog box

http://usr:pwd@<servername>/dms?nowprofileid=1        => doesn't work with ie9 but it's working with firefox

snapshot resolution is the same as the video profile configured in audio&video settings
(nowprofileid=1   =>  videoprofile 1, nowprofileid=2   =>  videoprofile 2)

in my case i got a 1080p image

i found that url with firefox when i was trying to found a HTTP streaming url which match the video profile i set up
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: altercamera12 on May 16, 2012, 06:59:35 AM
thanks again.
D-link should document these useful functions  :'(
Now if only I could find someone with the DCS-7110 to test it for me...I dont' want to play buy and return game >:(
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Joe Public on May 17, 2012, 03:01:47 AM
For DCS-2230 you have to use fwg URL command:

http://ipcamaddress:port/image/jpeg.cgi
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: altercamera12 on May 17, 2012, 03:14:23 AM
Hi Joe, thank you ;-)
Hos did you discover this syntax? I see every model has different syntax, is there a D-link site/doc that explain url commands syntax?
Thank you
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: max13 on May 17, 2012, 06:06:19 AM
with my dcs-2210

http://ipcamaddress:port/image/jpeg.cgi gave me jpg snapshot matching videoprofile2
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: altercamera12 on May 17, 2012, 06:31:59 AM
with my dcs-2210

http://ipcamaddress:port/image/jpeg.cgi gave me jpg snapshot matching videoprofile2
I guess apart from PoE/Wan difference the 2210 and 2230 are pretty much the same product
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: max13 on May 17, 2012, 06:47:49 AM
Hi Joe Public !!

With your DCS-2230 can you get a H264 HTTP stream ? (in my case video1.mjpg is mjpg bad quality instead of H264 good quality video profile 1)

Thanks
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: altercamera12 on May 17, 2012, 08:24:49 AM
Hi guys, forgot to ask: is there a way to attach these ipcams (2210&2230) to a standard photo camera tripod?
Thanks
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Geezer22 on May 18, 2012, 12:00:23 PM
These are useful suggestions, and they are not documented anywhere, as far as I know. I have seen the URL command document for other cameras, and I can confirm that it does not apply to the DCS-2230.

The command I would most like to have is the ability to turn a programmed event on or off. For example, I would like use a smartphone to turn on motion detected recording when I leave the house, and turn it off when I return. If anyone knows a way to do this, I would like to hear it. At this point, the best I can do is http://username:password@ipcamaddress:port.setup.htm.
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: slickster on May 19, 2012, 12:44:40 AM
The command I would most like to have is the ability to turn a programmed event on or off. For example, I would like use a smartphone to turn on motion detected recording when I leave the house, and turn it off when I return. If anyone knows a way to do this, I would like to hear it. At this point, the best I can do is http://username:password@ipcamaddress:port.setup.htm.

Is that ":port.setup.htm" ending correct? I would think the ":port#/setup.htm" ending would be a more typical syntax.
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: slickster on May 19, 2012, 12:49:17 AM
Hi !

With my DCS-2210 i could get a snapshot jpg with login required

with that URL : http://<servername>/dms?nowprofileid=1

Where would that snapshot be stored? But in any case, I think most cam viewer apps have a snapshot taking button and it seems to me that they are simpler to use than this URL method.
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Joe Public on May 19, 2012, 01:51:51 PM
Dear sirs,
in order to have a photo or direct streaming on web browser with DCS-2230, I've found URL addresses on internet.

So for a photo we have to use:
http://IPCamAddress:port/image/jpeg.cgi

While for direct video streaming we have to use:
http://IPCamAddress:port/video/mjpg.cgi?profileid=n
n is 0,1,2,3,.... (according to video profiles).

Furthermore, as DCS-2230 IP cam is compatible with "NVSCGI APIs" (search this string on a search engine and you will find some useful PDF docs), many features of this IP Cam may be enabled or disabled using any web browsers, for example we can manage the motion detect.

So to get informations about the current settings of motion detect, we have to write the following phrase/string on any browser:
http://IPCamAddress:port/config/motion.cgi
it shows some parameters related to motion detect. Logically the IP cam will ask you admin's user-id and password.

To disable motion detect, we have to write:
http://IPCamAddress:port/config/motion.cgi?enable=no

To enable it again:
http://IPCamAddress:port/config/motion.cgi?enable=yes

To set some parameters such as sensitivity and percentage we have to use following parameters:
http://IPCamAddress:port/config/motion.cgi?sensitivity=[number]
http://IPCamAddress:port/config/motion.cgi?percentage=[number]

To set several parameters, we have to use digit "&" inside string - for example
http://IPCamAddress:port/config/motion.cgi?sensitivity=[number]&percentage=[number]

I suggest you to read the documentation because using "NVSCGI APIs" it is possible to manage the IP cam DCS-2230 everywhere and quickly.

Hope this may help you.
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Geezer22 on May 19, 2012, 04:10:43 PM
Joe Public,

This is exactly what I need. Thanks! I noticed that many of the commands listed in the pdf (for example, the command to get an event handler) do not seem to be implemented for the 2230 -- unless I am doing something wrong. However, I can easily turn off an event triggered by motion, for example, by using the command:

IPCamAddress:port/config/motion.cgi?enable=no

Disabling the motion trigger would in effect disable the event. I did not see a comparable command for disabling the built-in PIR sensor, but maybe I need to read the document more carefully. Again, thanks for providing this information.

Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Joe Public on May 22, 2012, 07:22:46 AM
Joe Public,

This is exactly what I need. Thanks! I noticed that many of the commands listed in the pdf (for example, the command to get an event handler) do not seem to be implemented for the 2230 -- unless I am doing something wrong. However, I can easily turn off an event triggered by motion, for example, by using the command:

IPCamAddress:port/config/motion.cgi?enable=no

Disabling the motion trigger would in effect disable the event. I did not see a comparable command for disabling the built-in PIR sensor, but maybe I need to read the document more carefully. Again, thanks for providing this information.


Do you mean ICR / IR LIGHT options normally included in web management under "Advanced -> ICR and IR" menu item?

If yes, for ICR you have to use "/config/icr.cgi", while for IR light you have to use "/config/irled.cgi".

Regarding ICR returned values, I've checked:
mode=auto       just means "ICR -> automatic"
mode=on          just means "ICR -> day mode"
mode=off          just means "ICR -> night mode"
mode=schedule  just means "ICR -> Schedule mode"

Regarding IR LIGHT returned values, I've checked:
mode=off           just means "IR Light Control -> Off"
mode=on            just means "IR Light Control -> On"
mode=auto         just means "IR Light Control -> Sync with ICR"
mode=schedule   just means "IR Light Control -> Schedule mode"

To set the schedule mode, you have to use:
/config/xxxxxx.cgi?mode=schedule&starttime=time&endtime=time

For example to set the schedule mode for IR LIGHT from 15:00 to 07:00:
config/irled.cgi?mode=schedule&starttime=15:00&endtime=07:00

Hope may help you.
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: slickster on May 22, 2012, 10:48:19 AM
Wouldn't these kind of commands require HTTPS commands than http? If not, just where would one use https connection?
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Geezer22 on May 25, 2012, 09:25:23 AM
Do you mean ICR / IR LIGHT options normally included in web management under "Advanced -> ICR and IR" menu item?

If yes, for ICR you have to use "/config/icr.cgi", while for IR light you have to use "/config/irled.cgi".

Regarding ICR returned values, I've checked:
mode=auto       just means "ICR -> automatic"
mode=on          just means "ICR -> day mode"
mode=off          just means "ICR -> night mode"
mode=schedule  just means "ICR -> Schedule mode"

Regarding IR LIGHT returned values, I've checked:
mode=off           just means "IR Light Control -> Off"
mode=on            just means "IR Light Control -> On"
mode=auto         just means "IR Light Control -> Sync with ICR"
mode=schedule   just means "IR Light Control -> Schedule mode"

To set the schedule mode, you have to use:
/config/xxxxxx.cgi?mode=schedule&starttime=time&endtime=time

For example to set the schedule mode for IR LIGHT from 15:00 to 07:00:
config/irled.cgi?mode=schedule&starttime=15:00&endtime=07:00

Hope may help you.


Joe Public,

No, this is not for the ICR/IR settings (although your discussion of this is helpful). The DCS-2230 has a built-in Passive Infrared Sensor (PIR), which senses changes in infrared radiation -- body heat -- to be used in triggering an event.

In the NVSCGI document I found, I do not see a command for enabling the PIR sensor. On the camera interface, the control for PIR is simply listed along with the other triggers (motion, digital input, etc.) on the event setup page. The NVSCGI document does have commands to Get and Set event handlers, but those commands do not work (unless I am doing it incorrectly).

The document I am using, by the way, is version 1.0 of Network Video Server CGI Application Programming
Interface (NVSCGI API).
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Joe Public on June 12, 2012, 01:02:13 PM
I've studied part of the source code and I've found an interesting file (named "request.c" in folder "\apps\public\boa-0.94.131\src"), there is an array named "httpUri" that shows so many CGI calls, including all ones included in NVSCGI standard (that D-Link calls "NIPCA" inside the a/m source file). But unfortunately I've not found any CGI call related to event server. But some of you give a look to a/m file or to other source files, may be that someone may help you to find a way to change events via CGI scripts (anyway avoiding to change using the web management's feature).

List of all NIPCA calls is very long, but if you are interested we can open another thread (but only after admins' permission) to let all users have an idea of many CGI/HTML calls (many of them are not documented inside D-Link manuals), for example to view video/image not only there are the classic CGI calls such as "/video/mjpg.cgi", "/video/video.cgi", "/image/jpeg.cgi", but there are also "/video/AVCS.cgi", "/video/AVCS-H264.cgi", "/audio/ACAS.cgi" and "/audio/audio.cgi".

To be correct, I inform anyway the administrators that I've discovered an internal address of IP Cam that displays all settings inside the IP cam, unfortunately including also the password of many settings, clearly shown without any crypted way). This is a big-big-big security hole, and this is an ugly bug inside IP cam (that may exploited by an external attacker to know some personal and private settings). Logically I will not mention the a/m internal address of the IP cam in order to avoid to spread this exploit.
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Geezer22 on June 12, 2012, 06:00:03 PM
Good work Joe! I would be very interested in this, and perhaps a new thread would be appropriate. Did you actually try some of these commands?

Edit: Also, I think I found the GPL, but it is about 1600MB, and the site downloads VERY slowly. Was that your experience?

Regarding the configuration file, I know that the full configuration is saved in clear text on your hard drive as sysenv.dat. Are you saying this is accessible from the internet? Wouldn't it at least require your camera admin password to access it?
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Joe Public on June 13, 2012, 03:19:50 PM
Good work Joe! I would be very interested in this, and perhaps a new thread would be appropriate. Did you actually try some of these commands?

Edit: Also, I think I found the GPL, but it is about 1600MB, and the site downloads VERY slowly. Was that your experience?

Regarding the configuration file, I know that the full configuration is saved in clear text on your hard drive as sysenv.dat. Are you saying this is accessible from the internet? Wouldn't it at least require your camera admin password to access it?
If someone has problems to download the source code from Global D-Link site (it is really so slow), you can use the russian ftp site (inside /Multimedia/Sources there is the source code for DCS-2210 cam - this is the file I've downloaded).
I've tried many of these commands, mainly the NIPCA commands. All commands marked with folder "CGI-BIN" are private, and should be not used to change settings.

Anyway I prefer to change the IPCAM settings using the web management's interface as I have a very poor opinion about CGI scripts (they are generally full of security holes) - in case of IP cams they may create many damages on settings (or even on camera itself!!!) if not-properly used.
Title: Re: URL command to get a single snapshot on 2210 2230 and 7110
Post by: Geezer22 on June 14, 2012, 10:45:51 AM
I've tried many of these commands, mainly the NIPCA commands. All commands marked with folder "CGI-BIN" are private, and should be not used to change settings.
I also tried many of them and found that some work, some don't. I have not been able to detect a pattern for determining which commands are operative. For the reasons you cite, I only tried commands where I was pretty sure I understood their function. There are also many .htm commands that only return information.

Still, this is all very interesting. Thanks for bringing it to our attention.