Feature Request: Http POST Support in netcam.c (Solwise PLA-14WCAM support)
Description
I have a web camera which is connected via Homeplug Ethernet over mains, which reduces the amount of wiring which has to be run to connect a camera. It comes with its own web interface built into its firmware, and has optional Windows only software to do motion capture.
A packet sniff of the data revealed that the images are returned by a
POST /Webcam.jpg HTTP1.0
which returns a stream of JPEGs. I modified netcam.c to have
static const char *connect_req = "POST %s HTTP/1.0\r\n"
i.e. use POST rather than GET in the connect request, and with this single change (plus a configuration setting of
netcam_url http://192.168.1.30:80/Webcam.jpg
in my motion.conf) was able to get motion working with this camera.
See
http://www.solwise.co.uk/net-powerline-pla-14wcam.htm for link to the camera information.
If motion provided a way to make the HTTP method a variable (with a default of GET), either as another configuration item, e.g. 'netcam_method' POST, or some convoluted mangling of the netcam_url e.g. netcam_url http-POST://192.168.1.30:80/Webcam.jpg then adding support for this camera in the main would be a very simple change.
--
JohnLines - 25 Oct 2007
Follow up