Announcement

Collapse
No announcement yet.

GetURLImageEx

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    GetURLImageEx

    What is wrong with this statement. I am trying to execute a one liner in an event to save a single photo to a file.

    &hs.GetURLImageEX "http://192.168.1.127","/image.jpg","c:/Program Files/Homeseer 2/cam1/latest.jpg"

    What I really want is to save to a network drive. ex:

    &hs.GetURLImageEX "http://192.168.1.127","/image.jpg","\\Maindata\Public\latest.jpg"

    No error messages are seen in the log, however no jpg file exists in either case.

    Thanks

    #2
    See if this works:

    &s=hs.GetURLImage "http://192.168.1.127","/image.jpg",false,80,"\\Maindata\Public\latest.jpg"
    Jon

    Comment


      #3
      No,When I used it I got an unexpected end of statment error. Then I included Pars () around the statement and did not work. I am using version .66 with Win 2K Pro. Do I need to update to a newer version of HS2?

      Comment


        #4
        Try the same but in to the Homeseer HTML directory i.e.

        &s=hs.GetURLImage ("http://192.168.1.127","/image.jpg",false,80,"html/latest.jpg")
        Jon

        Comment


          #5
          Jon,
          That worked. I wanted it to go to a networked drive. Must be a problem in HS2. I'll try a sub of html, if this works, I have a go around. Thanks for your help.

          Dave

          Comment


            #6
            The sub dir worked also. I think HS2 is only geared to its home dir. I think I can work with this. YOU have been a GREAT help. Thanks Jon


            Dave

            Comment


              #7
              If you want to expand it to a script, it's fairly easy to copy any file to another location on your network (provided permissions are in place).
              Jon

              Comment


                #8
                Can I do this within HS2?

                Comment


                  #9
                  Sure you can. Just copy the VB.Net script below and call it Imagegrab.vb or similar.

                  PHP Code:
                  sub Main(ByVal Parm As Object)

                  Dim S As Object hs.GetURLImage ("http://192.168.1.127","/image.jpg",false,80,"html/latest.jpg")
                  Dim SourcePath As String hs.GetAppPath "\html\latest.jpg"
                  Dim DestPath As String "\\Maindata\Public\latest.jpg"
                  System.IO.File.Copy(SourcePathDestPath,true)

                  end sub 
                  Jon

                  Comment

                  Working...
                  X