I have an Amcrest IP5M-1190 with a few presets defined. I can send the following using Brave browser and the camera goes to the requested preset:
I'd like to setup a script to transition through various presets eventually on a schedule. I've tried several ways to do this in PowerShell and cmd shell with Invoke-WebRequest/credentials, ssh, curl, etc. but nothing works.
Even a simple request fails:
Any tips on how to make a simple command line request work with Amcrest?
FWIW, the Invoke-WebRequest method works with my IPC-Color4K-T:
Code:
http://admin:password@192.168.1.180/cgi-bin/ptz.cgi?action=start&channel=0&code=GotoPreset&arg1=0&arg2=5&arg3=0
I'd like to setup a script to transition through various presets eventually on a schedule. I've tried several ways to do this in PowerShell and cmd shell with Invoke-WebRequest/credentials, ssh, curl, etc. but nothing works.
Even a simple request fails:
Code:
Invoke-WebRequest "http://192.168.1.180/cgi-bin/devAudioInput.cgi?action=getCollect" -Credential $cred
Invoke-WebRequest : Error Bad Request!
At line:1 char:1
+ Invoke-WebRequest "http://192.168.1.180/cgi-bin/devAudioInput.cgi?act ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand
Any tips on how to make a simple command line request work with Amcrest?
FWIW, the Invoke-WebRequest method works with my IPC-Color4K-T:
Code:
Invoke-WebRequest "http://192.168.1.108/cgi-bin/devAudioInput.cgi?action=getCollect" -Credential $cred