Help With Running CGI Command From Batch Script ON Marquis IPC-XD400(N) Camera

pepperfr

Getting the hang of it
Feb 8, 2015
137
52
Ohio
I recently purchased a cheap Marquis IPC-XD400(N) IP Cam mostly to tinker with. Using the API manual for the camera I was able to come up with a way to modify the Day/Night profile of the camera from Microsoft Edge browser. I just place the following in the address bar and it successfully changes the camera img "profile" to "day" mode (0=auto, 1=day, 2=night):

<?xml version='1.0'?><root><img ch=0 profile=1 /></root>

I have been trying to create a batch script using curl to execute the cgi command, but all my attempts have been futile. I am hoping someone with experience in creating batch scripts can help me with the correct syntax.

For reference, below is an example from the API Manual for setting IMG parameters in the camera.

Set IMG parameters
Example: Modify the sensitivity to 55 in channel 1.
Tip: must specify the channel information.
REQUEST
<?xml version='1.0'?><root><img ch=0
sensitivity=55 /></root>
RESPONSE
HTTP/1.0 200 OK
Content-type: text/plain;charset=utf-8
<?xml version="1.0" encoding="utf-8"?>
<root>
<code>0</code>
<error>successful</error>
</root>
 
Take a look at GetHub Copilot for code assist. They have a free account for 30 days or one of the other AI assist programs. It is amazing what these programs can do.

Made of list of what was wanted for a PowerShell project and 2 seconds latter it sent a 67 line script. And if one were paying for it the cost would have been 44 cents.