Jump to content

Axis command


aLf

Recommended Posts

Posted

I got t his figured out years ago on the Panasonic cameras (thanks to major help from Burakk).  I now have exclusively Axis cameras.  The Vapix commands as they call it are a bit more troublesome.  What I really was looking for was the command sent by Axis Camera Companion that turns the "event/action rule" on/off that controls motion on/off.  After many emails with Axis, they don't seem to know???  They suggested making an "additional condition" that in essence is true/false and thus makes the action rule false.  The command I made which does work is:

 

http://<URL>:<PORT>/axis-cgi/virtualinput/'>http://<URL>:<PORT>/axis-cgi/virtualinput/activate.cgi?schemaversion=1&port=1 

 

http://<URL>:<PORT>/axis-cgi/virtualinput/deactivate.cgi?schemaversion=1&port=1 

 

These work fine in my web browser to activate and deactivate.  I've  highlighted the differences for you to see I need two Network Resources.

 

Here is the "response" I get in the web browser.

 

activate:

 

<?xml version="1.0" encoding="UTF-8"?>
<VirtualInputResponse xsi:schemaLocation="http://www.axis.com/vapix/http_cgi/virtualinput1 http://www.axis.com/vapix/http_cgi/virtualinput1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.axis.com/vapix/http_cgi/virtualinput1" SchemaVersion="1.0">
<Success>
<ActivateSuccess>
<StateChanged> true </StateChanged>
</ActivateSuccess>
</Success>
</VirtualInputResponse>

 

deactivate:

 

<?xml version="1.0" encoding="UTF-8"?>
<VirtualInputResponse xsi:schemaLocation="http://www.axis.com/vapix/http_cgi/virtualinput1 http://www.axis.com/vapix/http_cgi/virtualinput1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.axis.com/vapix/http_cgi/virtualinput1" SchemaVersion="1.0">
<Success>
<DeactivateSuccess>
<StateChanged> true </StateChanged>
</DeactivateSuccess>
</Success>
</VirtualInputResponse>

 

I can't get a Network resource to work properly and have no returns other than N.A.  Here is a screen shot of the resource I made:

 

POST axis-cgi/virtualinput/activate.cgi?schemaversion=1&port=1 HTTP/1.1
Host: <URL>:<PORT>
User-Agent: Mozilla/4.0
Connection: Close
Content-Type: application/x-www-form-urlencoded
Content-Length: 0
Authorization: Basic <password info>
 

 

Could someone walk me through the creation and proper responses needed to modify the camera?

 

Thanks,

 

aLf

 

  • 2 weeks later...
Posted

Well thanks to Michel and the good techs at Axis, I have this working.  If anyone needs help with it, feel free to PM me for insight.  Simply said, set up additional requirements in the "EVENTS" section of the camera for your motion.  Wheter you set it up with Companion, or manually, set the same additional requirement for both Wide or Low bandwidth.  Then trigger that step through ISY (and in my case a KPL).  I have mine piggy-backed on a program with a Schlage door lock, so when the door is unlocked, the motion goes off, and on when locked.  In the end, I found it a better solution than I ever had with Panasonic.  The Axis cameras are much more money, but their robust functions, I feel, make them a bargain.

  • 7 months later...
Posted (edited)

Hi ALF.

 

Please can you help me with virtual trigger set/reset.

I can switch VI with your http commands as above, but no function from a rule script in Openhab2.

My Skypenick is jozefszabo, I have also Teamvievwer installed.

Thanks

 

Jozef

 

http://axisip/axis-cgi/io/virtualinput.cgi?action=6:/

should set VI for manual trigger in a event

 

and

 

http://axisip/axis-cgi/io/virtualinput.cgi?action=6:\

reset

I need to insert user/pw but \ is not acceptable, User/PW popup appears repeatly :0(

Edited by Jusufs
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...