Home AMX User Forum MODPEDIA - The Public Repository of Modules for Everyone

AXIS IP Camera Module

Hi everyone,

I have an AXIS 241Q encoder which is hosting my CCTV camera at a local IP address. I need to be able to control this PTZ Camera from my touchpanel, ie: move up, down, left, right, zoom, go to preset.

The camera only supports control over a http interface. For example in my web browser I can type:

http://*myCameraIP*/axis-cgi/com/ptz.cgi?move=left

...and the camera will move left. I'm fairly new to this game and never seen this before. Wondered if anyone out there has programmed anything like this before, or maybe even someone has already programmed an AXIS IP camera (I think they all use the same API).

This is something I got from AXIS:

***
An example of the command for the telnet:

shttpclient -u (username for the camera) -w (password) "http://127.0.0.1/axis-cgi/com/ptz.cgi?move=up"
***

Although sending this string over IP after connecting on port 80(http) nothing happens.

Any help or ideas would be appreciated!

Thanks in advance guys,


Luke

Comments

  • viningvining Posts: 4,368
    I believe there's a module posted in the modpedia forum.
  • jimmywjimmyw Posts: 112
    Luke wrote: »
    shttpclient -u (username for the camera) -w (password) "http://127.0.0.1/axis-cgi/com/ptz.cgi?move=up"
    ***

    you need a few things, base 64 encoding, and http protocol docs,
    you will have a header that will contain the security info, and the http command will be
    GET /axis-cgi/com/ptz.cgi?move=up HTTP1.1<cr><lf><cr><lf>
    ill see if I can dig somethin up
  • you mentioned using port 80 for telnet. Is that the true port for this device? Isn't telnet typically port 23?
  • viningvining Posts: 4,368
    To the best of my reccollection Axis cams don't do telnet and you have to connect via HTTP on port 80. I'm pretty sure that's how the module connects that's in modpedia.
    shttpclient -u (username for the camera) -w (password) "http://127.0.0.1/axis-cgi/com/ptz.cgi?move=up"
    
    I don't know why they would give an example using an IP of 127.0.0.1 since that implies you're trying to control the camera from the camera.

    edit:
    added link to module http://www.amxforums.com/showthread.php?6457-Axis-Camera-213PTZ
  • ericmedleyericmedley Posts: 4,177
    you mentioned using port 80 for telnet. Is that the true port for this device? Isn't telnet typically port 23?

    Yes, the standard port is 23 but technically you can run a telnet session from any TCP port. I've seen pretty much nuts to soup.
  • LukeLuke Posts: 2
    Thanks guys, I found the module on the forums, which I used to help me get mine working. I can provide code if anyone else is struggling. I could do with some help if anyone has programmed axis cams before. I am using the commands move=up, move=left ect to control the camera, but moves the camera about 90 degrees everytime I send the command. Here's an extract from the axis api:

    move=<string>

    home,
    up,
    down,
    left,
    right,
    upleft,
    upright,
    downleft,
    downright

    Absolute: Moves the device 5 degrees in the specified direction
    Relative: Moves the device approx. 50-90 degrees in the specified direction.

    Clearly by default it using the relative option above, whereas I would want absolute (smaller, usable movements). Axis won't talk to me as I'm not a part of their ADP program so I was hoping someone out there would know how to use this.

    Thanks - Luke.
  • Camera needs firmware update

    Hi Luke

    Guess i had the same problem.

    The commands, "absolut", "relative" and "digital" depending on the firmware installed on your axis cam, you cant choose between them.

    In october axis will release the Firmware 5.4 and with this firmware the 25% move command works.
    (moves always 25% of the picture you see)

    You could also try the "rpan" and "rtilt" command with those you can choose how many degrees the cam should move, but then you must process the zoom value first, to get something similar like the 25% command.


    tried to attach the beta firmware 5.4 for an Axis Q6034 cam but the file is to big to upload... (18Mb)


    Hope that helps

    Manuel
Sign In or Register to comment.