snapshot.cgi not working -- IP8M-2496EW-V2

Have some questions or having issues with your IP Camera(s), Post them here for the mods and other users to assist you with.
Post Reply
msturtz
Posts: 8
Joined: Wed Jun 22, 2022 7:46 am

snapshot.cgi not working -- IP8M-2496EW-V2

Post by msturtz »

Hi, I'm having an issue with snapshot.cgi. The camera is deployed at a remote site with only cellular, it sends a single picture once an hour (like a cellular trail cam). I do have remote access to it, I can get to the GUI and that works fine but I don't watch live video since that will burn through data plan. :(

When I try http://CAM-IP/cgi-bin/snapshot.cgi -- I get a 500 error after exactly 15 seconds. Support initially suggested I add ?subtype=0 but I get the same behavior. They haven't answered email in a few days now, so I thought I'd post here. My plan is actually to hit that URL with curl, and the output of that is below -- but I get the same exact behavior with a regular browser.

Any suggestions appreciated

# curl -v --digest -u "admin:AdminPW" 'http://192.168.1.100/cgi-bin/snapshot.cgi?subtype=0'
> GET /cgi-bin/snapshot.cgi?subtype=0 HTTP/1.1
> User-Agent: curl/7.19.0 (arm-unknown-linux-gnu) libcurl/7.19.0 OpenSSL/1.0.1u zlib/1.2.3 libssh2/1.2.5
> Host: 192.168.1.100
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< WWW-Authenticate: Digest realm="Login to AMC0654277F9C7B67A", qop="auth", nonce="183299877", opaque="ecebb3d70153d3253d16f9fa4d970cfde8f3406a"
< Connection: close
< Set-Cookie:secure; HttpOnly
< CONTENT-LENGTH: 0
<
> GET /cgi-bin/snapshot.cgi?subtype=0 HTTP/1.1
> Authorization: Digest username="admin", realm="Login to AMC0654277F9C7B67A", nonce="183299877", uri="/cgi-bin/snapshot.cgi?subtype=0", cnonce="MjAwMzMy", nc=00000001, qop="auth", response="8d49ed09280dbfb6a5e63b4fca507875", opaque="ecebb3d70153d3253d16f9fa4d970cfde8f3406a"
> User-Agent: curl/7.19.0 (arm-unknown-linux-gnu) libcurl/7.19.0 OpenSSL/1.0.1u zlib/1.2.3 libssh2/1.2.5
> Host: 192.168.1.100
> Accept: */*
>
< HTTP/1.1 500 Internal Server Error
< CONNECTION: close
< Set-Cookie:secure; HttpOnly
< CONTENT-LENGTH: 0
<
#
User avatar
Revo2Maxx
Site Admin
Posts: 5820
Joined: Sat Jun 15, 2019 3:05 pm

Re: snapshot.cgi not working -- IP8M-2496EW-V2

Post by Revo2Maxx »

Don't know my 2495EW-V2 I can run

http colon // admin:[email protected]/cgi-bin/snapshot.cgi
Here to help the best I can.
Be Safe
msturtz
Posts: 8
Joined: Wed Jun 22, 2022 7:46 am

Re: snapshot.cgi not working -- IP8M-2496EW-V2

Post by msturtz »

I don't have a lab, or any way to test this. The setup is on an island, hanging off a cellular router (which fortunately runs Linux and I have SSH to it).

After thinking it through, a couple times, I did a factory reset on the camera. Once it came up, I reset the password, I disabled P2P, configured the timezone and NTP. I reconfigured Camera -> Video -> Snapshot, quality 1, interval 3600s. I reconfigured Storage -> Destination -> FTP, and then Storage -> Schedule. It's back to sending a picture every hour, as intended.

It still errors on cgi-bin/snapshot.cgi.

I remember reading another post saying snapshot.cgi wouldn't work with snapshot quality set to highest -- I assumed that was due to memory or something, I'm set the lowest, so I didn't figure that would be a problem. But just as a test, I set quality to 5 -- the pics coming in via FTP are now more like 550-600k instead of 450-480k. I guess I'm OK with that.

But more importantly the snapshot.cgi is working now. I tried Quality 4, that doesn't work. Quality 3 worked once, but hasn't worked since.

And now that I've changed the Quality setting away from 5, snapshot.cgi is back to not working, even after I set it back to 5.

Seems like a firmware bug.
User avatar
Revo2Maxx
Site Admin
Posts: 5820
Joined: Sat Jun 15, 2019 3:05 pm

Re: snapshot.cgi not working -- IP8M-2496EW-V2

Post by Revo2Maxx »

Here is some info that might help with that.

If you have changed the time to regular image past 1 second the camera will only produce a image every so often as you setup.

What I mean is if you want to have it send FTP then let it do the FTP send of the images and if you run a command and then ran a second one before a hour is up the image won't fire. It can't be set both ways.

Want to Fire when you want don't setup for FTP. If you want it to fire at every 60min to a FTP Server then set it up as such. I personally found this out when I was trying to setup some images on a few cameras that I had setup to send images every so long. Ones I didn't setup any time fired without issue ones I had setup wouldn't fire until that time had gone by..

Also please note that there is Trigger and Timed. Trigger means on Motion or IVS event and time is what you have setup in the Schedule of the snapshot..
Here to help the best I can.
Be Safe
msturtz
Posts: 8
Joined: Wed Jun 22, 2022 7:46 am

Re: snapshot.cgi not working -- IP8M-2496EW-V2

Post by msturtz »

I definitely want timed, not trigger. Trigger is based on motion -- this cam is pointed out at the water, there's always motion. Timed is just what the doctor ordered. I absolutely adjusted the interval -- 300 for testing, 3600 normally. Cellular plan doesn't give me a lot of data, although its cheap enough I could increase it, but I'm not looking for anything close to real-time. Storage also won't support one second interval. I want one picture per hour for several years. I'll attach a picture below, so yo have some idea why I'm doing this. :D

I want one picture per hour... But I also wrote a script (will run on the cellular box) which figures out the time of sunset, and grabs a picture of that. It turns out right now sunset is near the top of the hour, but I don't have a single sunset picture in all of July, the last good one was in the middle of June. If I can get that script to work, I can also send an SMS to the cellular box for a "picture on demand".

If I'm understanding what you're saying, interval being set above one second causes the camera to only take a snapshot that often, no matter what. Explains why I see a new picture via FTP any time I change that setting.

If that be the case, it would seem like my life will be a lot simpler if I completely disable FTP on the camera, set the interval back to 1 second, and use the script to get all the pictures rather than only on-demand. That would also mean I can control the directory structure, and get rid of 001/jpg/ and sane filenames. (the camera does have an SD card, I could let it do motion snapshots or something, and check them out next year when I'm there).
00.00[R][0@0][0].jpg
00.00[R][0@0][0].jpg (352.98 KiB) Viewed 1507 times
User avatar
Revo2Maxx
Site Admin
Posts: 5820
Joined: Sat Jun 15, 2019 3:05 pm

Re: snapshot.cgi not working -- IP8M-2496EW-V2

Post by Revo2Maxx »

Well it is a very nice Scene. It is very busy and if your only going to look at data on the camera 1 time a year there are a few things you will want to do to keep your camera going the whole year.

First you will want to setup your camera to Reboot and because of the type of camera I would reboot it daily. Choose a time that isn't busy for your picture pleasure taking time. Meaning if there isn't much going on at 3am then do it then..

Second, You will want to get the Largest Micro SD card you can afford. 256gb is the Max the camera can take.

Next if your working with Motion and as you said your scene has loads of motion and to be honest I would turn off motion at night time because with IR on and if your using the one on the camera it will pickup everything even if you setup IVS for the camera and turn off motion it will trigger on spiders web, spiders floating in the web and all bugs that is around.

Then in the Event setup of the Snapshot I would change that to an area that isn't the best if you leave full time motion enabled. Meaning don't leave Event snapshot on 5 I would lower the quality to 3 or 2 maybe.. However if you were to change the motion for off at night and this is time of earlier night not normal summer night time because if you setup for 8pm fall and winter your motion events will or could be very high in the 3 or 4 hours of darkness.

Then if you setup IVS rather then motion, change the Schedule for the events to only do day times. I would maybe set Snapshot to 1 maybe 3 but I think 1 for a Metered Cell connection.

Now keep in mind also if your looking to save your files to MSD every time you do a command for a snapshot it will show up in your MSD or FTP if setup every time you command it. Now I am not 100% sure that is the case with MSD but I know it is with FTP and will show up with F in your FTP server. My camera right now is without a MSD because the one I had in it failed early and have not added a new one yet.. Seeing it is connected to 2 NVR's and my FTP anyway there is no rush.

So tested it on MSD in a different camera, when I command for a image it didn't save to the MSD so that is good to know at least not on my 1046EW-AI camera..

Just some ideas..
Here to help the best I can.
Be Safe
msturtz
Posts: 8
Joined: Wed Jun 22, 2022 7:46 am

Re: snapshot.cgi not working -- IP8M-2496EW-V2

Post by msturtz »

Thanks for your recommendations. Just to be clear, I look at the pictures regularly -- one of the reasons I wanted this setup, not a cheap hunting/game/trail camera. None of the family has ever seen what it looks like there in winter.

It does seem like disabling FTP (and for good measure removing the server info), and adjusting the Interval back to standard 1S, makes snapshot.cgi work reliably. I did enable the automatic reboot, daily at 3am per your suggestion. There's a micro-SD card, I'm guessing 32gig but not sure -- but I'm probably close to 2,000 miles away, so I'm not changing it any time soon. I haven't enabled ANY motion detection or IVS, I'll deal with that later, if ever, I'm already way over on my cellular data from messing with it so much this month.

I now have my cron script running on the cellular router, and it seems to be working reliably (received pictures the last 5 hours). I have a second which figures out what time sunset will be, and kicks off the first script at that time (just need to cron it to run before sunset).

Anybody reading this later, I'd be happy to share the details of my setup. It's more complicated than a cellular trail-cam, definitely DIY with some required background know-how, but it suits my needs and I'm pretty happy with it.
Omn
Posts: 1
Joined: Sun Mar 26, 2023 11:08 am

Re: snapshot.cgi not working -- IP8M-2496EW-V2

Post by Omn »

I found that "HTTP:500 Internal Server Error" (in response to a snapshot request) can/will? be triggered if a (subscribed) motion event is triggered *during* the request.

By "motion event", I mean an event subscribed to via http://{url}/cgi-bin/eventManager.cgi?action=attach&codes=[VideoMotion]
Post Reply