Announcement

Collapse
No announcement yet.

How to display a non-navigable image on an HSTouch Client

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to display a non-navigable image on an HSTouch Client

    How would you display an image saved on the HomeSeer server that is not available to the outside world?

    Example: I store snapshots from video cameras as jpgs on my HomeSeer server. These images are not available to be directly navigated to from the public Internet. Is there a way to display them on the hstouch client? I would also like to do this with regular photos, like a photo album, but the same concept applies.

    I want HomeSeer/HSTouch to get a new image every time the client page is refreshed. The image stored on the HomeSeer server is always in the same location and has the same name. That image gets refreshed from the geovision server.

    Thanks

    #2
    Originally posted by ccat View Post
    How would you display an image saved on the HomeSeer server that is not available to the outside world?

    Example: I store snapshots from video cameras as jpgs on my HomeSeer server. These images are not available to be directly navigated to from the public Internet. Is there a way to display them on the hstouch client? I would also like to do this with regular photos, like a photo album, but the same concept applies.

    I want HomeSeer/HSTouch to get a new image every time the client page is refreshed. The image stored on the HomeSeer server is always in the same location and has the same name. That image gets refreshed from the geovision server.

    Thanks
    The way I understand it is whatever you do in HSTouch when you set URL's it relates to the HSTouch server, so if you put the URL http://127.0.0.1:81/cctv.jpg in an element name then whether you connect a client remotely or not, the image will display as its the HSTouch server thats browsing the URL, not the client.

    You might find that the image gets automatically refreshed, i'm not sure - but if not look at the isVideo command, then you can set a refresh time for the image as if it was a video, you can set a time period for when the server gets a new image.

    Comment


      #3
      Does not seem to work. I tried doing the http://IPaddress:HSport/path/x.jpg and http://IPaddress/path/x.jpg and I tried file://c:/path/x.jpg.

      the options with http... result in a white box with a red X across the whole space

      the file:// option results in a transparent box, the background is displayed

      When I go to an image like this: http://www.foxnews.com/static/all/im...go-foxnews.png there is no problem, works fine.

      I am using an Image element and placing the URL in the ImageURLNormal field in the Appearance category.

      Any other suggestions would be appreciated. By the way mrhappy, thanks for all of your help on all topics!

      Comment


        #4
        Originally posted by ccat View Post
        Does not seem to work. I tried doing the http://IPaddress:HSport/path/x.jpg and http://IPaddress/path/x.jpg and I tried file://c:/path/x.jpg.

        the options with http... result in a white box with a red X across the whole space

        the file:// option results in a transparent box, the background is displayed

        When I go to an image like this: http://www.foxnews.com/static/all/im...go-foxnews.png there is no problem, works fine.

        I am using an Image element and placing the URL in the ImageURLNormal field in the Appearance category.

        Any other suggestions would be appreciated. By the way mrhappy, thanks for all of your help on all topics!
        Just to confirm these images are all stored in the HomeSeer html directory aren't they?

        I've just put http://192.168.0.102:84/colourbars.jpg (and colourbars.jpg is in my HomeSeer HTML directory, 84 is my HS port) in an image element (ImageURLNormal field) and then connected remotely and it displays the image OK. I'm not sure what to say as i've never seen the red x either, it just displays an empty box when I put a garbage url in deliberately.

        Are the graphics any kind of different format or have a different file extension (special formatting?), clutching at straws here though...

        If not try enabling debug mode (open hspi_hstouch.ini and change Debug=False to true and restart the plugin), it will show you how its resolving the URL's, pick it out of the debug info out of the HS log and see if there is anything obvious (and post it here if you are still struggling). There is/was a bug with the isVideo command on the windows client that it was trying to resolve the URL's as a filename but turning isVideo off shows the image OK.

        Comment


          #5
          That did it. I did not realize they had to be in that directory. Thank you very much.

          Comment


            #6
            Originally posted by ccat View Post
            That did it. I did not realize they had to be in that directory. Thank you very much.
            OK no problems, i've just done a bit of testing and there is an alternative to putting the images in the directory if you ever need to (some apps have the directories hard coded and you can't move them, sometimes its just better) and the solution is to run a second (or how ever many you need) webserver.

            I tried it with TinyWeb (http://www.ritlabs.com/en/products/tinyweb/install.php) which is a very small webserver that is configured by the command line (in this example all of the files are in C:\Pictures\ directory), pick another port that you want to use and put tiny.exe in your pictures directory. You'd then launch it (perhaps from HS in the startup.vb) by;

            C:\Pictures\Tiny.Exe C:\Pictures 83

            (83 being the new port, C:\Pictures being the root web directory make sure this is not forwarded in your router so theres no external access). Then inside HSTouch you can use port 83 so;

            http://192.168.0.102:83/colourbar.jpg now refers to colourbar.jpg being at C:\pictures\colourbar.jpb rather than in the HS directory. It could be used if either you did not want to move your CCTV images to the HS directory or the application did'nt let you

            Just thought i'd post it, may be of use to someone some day!

            Comment

            Working...
            X