Today's Head Scratcher - Pan/Tilt IP Camera Control

Discussion in 'C-Bus Wired Hardware' started by Roosta, Oct 10, 2012.

  1. Roosta

    jboer

    Joined:
    Apr 27, 2012
    Messages:
    458
    Likes Received:
    35
    Location:
    Sydney
    Hey,

    What Mr Mark said is pretty much right, if you have a look at the zone minder site I linked to before it will show those commands.

    Also just note the note on that same site about using snapshot.cgi rather than videostream. Like it says I have had much better success with snapshot rather than videostream. The difference is that the snapshot is .jpg while the videostream is mjpg and most cam viewers (inc PICED) are expecting a jpg and refresh automatically.

    If you are just viewing through a browser though you can use videostream :)

    PS. of course all these commands are for cams with foscam firmware in them, but pretty much any camera that allows http strings allows resolution changes...

    J
     
    Last edited by a moderator: Oct 15, 2012
    jboer, Oct 15, 2012
    #21
  2. Roosta

    NickD Moderator

    Joined:
    Nov 1, 2004
    Messages:
    1,420
    Likes Received:
    62
    Location:
    Adelaide
    Sounds like you may have the solution you want already, however..

    It sounds like you may be using the HTML component (you say you get scroll bars). If you use the WebCam component instead, then if you define the component size as (for example) 320 x 240, then it will resize the image from the camera to fit this.

    I do this on mine at home. Just bear in mind that the image has to be resized on the fly, so it can chew up a fair bit of processor time. Making the component size exactly half the image size makes this a little quicker.

    Nick
     
    NickD, Oct 15, 2012
    #22
  3. Roosta

    Roosta

    Joined:
    Nov 22, 2011
    Messages:
    560
    Likes Received:
    1
    Location:
    Australia
    Thanks guys..

    Indeed i was using a html component as i could never get the webcam component to work with the IP cameras in this project.. After a bit of playing and searching around www.zoneminder.com i got it sorted and its a much nice solution..

    Plus PTZ Control on the Touchscreen now.. Its all worked out fantastically..

    Cheers..
     
    Roosta, Oct 16, 2012
    #23
  4. Roosta

    Roosta

    Joined:
    Nov 22, 2011
    Messages:
    560
    Likes Received:
    1
    Location:
    Australia
    New firmware release for wiser should allow me PTZ Control from the wiser .. Oh yer!!

    Wiser Firmware History
    Version 1.30.0
    Improve string handling memory utilization for ReadClientSocket
    Implement support for PostHTTPData, ReadHTTPPostData, GetHTTPData, and ReadHTTPData in Logic
    Improve robustness of port forwarding when handling CTCs behind Wiser
    24738 - tag database error if Schedule with Scene is edited on Wiser using Adobe Flash UI and then project is retrieved from unit
    Fix bug that was limiting number of client sockets to 3 rather than 4
    Fix bug that was limiting WriteClientSocket and WriteServerSocket to 30 byte strings

    Cheers..
     
    Roosta, May 30, 2013
    #24
  5. Roosta

    Roosta

    Joined:
    Nov 22, 2011
    Messages:
    560
    Likes Received:
    1
    Location:
    Australia
    OK... Gurus its time for you too shine again..

    I have tried to get my wiser to shoot out some postHTTPdata string to gain ptz control of my ip camera but no joy.. Atleast now the logic engine and project lets me use it but it doesnt seem to work.

    If i use exactly (copy and paste) the same logic in a CTC project from piced it works a treat..

    Anyone got any ideas???

    Cheers..
     
    Roosta, Jun 16, 2013
    #25
  6. Roosta

    poldim

    Joined:
    Dec 7, 2010
    Messages:
    166
    Likes Received:
    2
    Location:
    San Francisco, CA
    I'm having an issue where Wiser is dropping the port when I'm on WAN.

    I want to set it up such that I can see the webcam feed whether I'm on LAN or WAN. To do this I used the externally accessible address and set it in the Webcam Widget. Everything works fine when I'm connected the LAN. Disabling wifi switch to 3G and tends to break things. The app opens and everything works except there is no image is displayed for the webcam other than the stock webcam icon. When I click on the image it states at the bottom:
    CCTV: image from 'http://DYNDNS_IP:0/snapshot.cgi?user=USER&pwd=PASS&137310238947' not available!...

    It should say:
    'http://DYNDNS_IP:15000/snapshot.cgi?user=USER&pwd=PASS'

    So it drops the 15000 port number and adds the random character set at the end. I have tried the URL that it is supposed to be from 3G and it works as it should.

    Any thoughts? Is the app supposed to behave differently on WIFI vs 3G?
     
    Last edited by a moderator: Jul 7, 2013
    poldim, Jul 7, 2013
    #26
  7. Roosta

    kjayakumar

    Joined:
    Oct 27, 2008
    Messages:
    448
    Likes Received:
    0
    The Adobe Flash UI tries to determine whether it is connecting to the Wiser from remote WAN or local. If it detects that it is local, then it will try to get the camera image directly, ie: use the URL you provided in PICED directly. If it is running remotely, I believe what it does is to replace the hostname part of the url with the IP it (the Adobe Flash) was sourced from (ie: the IP of the Wiser) and then puts in the port number you provided in PICED (the surveillance widget dialog). The number at the end is a counter added to ensure that the web browser does not just use a cached image.
     
    kjayakumar, Jul 7, 2013
    #27
  8. Roosta

    kjayakumar

    Joined:
    Oct 27, 2008
    Messages:
    448
    Likes Received:
    0
    I assume this got worked out by that readposthttpdata fix right? http://www.cbusforums.com/forums/showthread.php?t=8676&page=2&highlight=wiser
     
    kjayakumar, Jul 7, 2013
    #28
  9. Roosta

    Roosta

    Joined:
    Nov 22, 2011
    Messages:
    560
    Likes Received:
    1
    Location:
    Australia
    Roosta, Jul 7, 2013
    #29
  10. Roosta

    poldim

    Joined:
    Dec 7, 2010
    Messages:
    166
    Likes Received:
    2
    Location:
    San Francisco, CA
    Thanks, understanding how it thinks makes sense why it wasn't working. The port on the webcam widget was set at 0, so on LAN it acted as it should but on WAN it substituted the 0. Changing this to 15000 solved the problem.
     
    poldim, Jul 7, 2013
    #30
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.