Hi,
I have an IP camera (Arecont vision mega video IP camera) which has an HTTP api and i have the MAC address and IP address to be able talk to it but i have never used an arduino with an Ethernet shield before and was hoping for some help/code examples of how to grab an image from the IP camera and store it on the SD card. I do have some example code for saving a file from a web page to the SD card but this does not seem to be the same as grabbing and storing an image from an IP camera.
I have an IP camera (Arecont vision mega video IP camera) which has an HTTP api and i have the MAC address and IP address to be able talk to it but i have never used an arduino with an Ethernet shield before and was hoping for some help/code examples of how to grab an image from the IP camera and store it on the SD card.
Bad choice of hardware. The same task is a one liner if you'd chosen a Raspberry Pi as your picture logger.
I'm missing the link to the manual of that HTTP API or at least to the exact hardware you're using.
I do have some example code for saving a file from a web page to the SD card but this does not seem to be the same as grabbing and storing an image from an IP camera.
Depending on the API of the camera it is the same or it's much more difficult (if the camera does only provide a video stream).
The one line command to get an image is: http://ip_address/image?res=resolution_value&x0=X0&y0=Y0&x1=X1&y1=Y1&quality=quality_value&
doublescan=doublescan_value&id=id_value (found on page 86 of the pdf)
The reason for the choice of hardware is, thats what we had available and it also the tye of camera that is used with our other remote monitoring equipment.
The reason for the choice of hardware is, thats what we had available and it also the tye of camera that is used with our other remote monitoring equipment.
By "bad choice of hardware" I meant the MKR board.
I do have some example code for saving a file from a web page to the SD card but this does not seem to be the same as grabbing and storing an image from an IP camera.
In your case it is. Post that code that does not work (don't forget the code tags!).
HOwever i am unsure how to alter this code to grab an image from the IP camera and save it to the SD card.
It's as easy as changing the request strings according to the URL and changing the storage name (that's actually only necessary if you're using a Windows machine to read it, other operating systems don't depend on the extension to get the file type although it's confusing the have an image file stored as "results.xml"). Try it, post the result if you don't succeed.