Hi,
My camera is PTZ with protocol : curl 'http://localhost:4000/setcameraparam'.
Could me test command with this protocol in Zoneminder.
I have seen another Camera use HTTP with api : ptzcontrol.cgi?, decoder_control.cgi?command=0&.
In my case, please give me a advise.
Thanks adn Best Regards,
How to test command curl 'http://localhost:4000/setcameraparam'
-
- Posts: 8
- Joined: Tue Aug 20, 2019 9:36 am
Re: How to test command curl 'http://localhost:4000/setcameraparam'
You need to take one of the existing control scripts and modify it to use your urls.
This is not entirely easy. It might be in your interest to provide access to your camera and pay someone to do it for you, and include it in the official ZM dist.
This is not entirely easy. It might be in your interest to provide access to your camera and pay someone to do it for you, and include it in the official ZM dist.
-
- Posts: 8
- Joined: Tue Aug 20, 2019 9:36 am
Re: How to test command curl 'http://localhost:4000/setcameraparam'
Dear iconnor ,
I have FI8918W.pm.
Can I modify my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."/$cmd"."&".$self->{Monitor}->{ControlDevice});
to
curl 'http://localhost:4000/stopcamera' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data "camera_id=0" -i
I have tried my $req = "http://localhost:4000/stopcamera' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data "camera_id=0" -i"
and add moveConRight to easy debug. I click right button and see log Sending http://... but not stop camera as expected
I have FI8918W.pm.
Can I modify my $req = HTTP::Request->new( GET=>"http://".$self->{Monitor}->{ControlAddress}."/$cmd"."&".$self->{Monitor}->{ControlDevice});
to
curl 'http://localhost:4000/stopcamera' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data "camera_id=0" -i
I have tried my $req = "http://localhost:4000/stopcamera' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: application/json, text/javascript, */*; q=0.01' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data "camera_id=0" -i"
and add moveConRight to easy debug. I click right button and see log Sending http://... but not stop camera as expected