Announcement

Collapse
No announcement yet.

help - changing an image from a string in HS

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

    help - changing an image from a string in HS

    i have an image i want to display on the hs touch screens, it comes from a url like this: http://www.test.com/IMAGE.jpg

    that is simple enough BUT the name for this image changes. I have a script that loads the new name into a status item in HS say A1 contains ste updated string http://www.test.com/NEWIMAGE.jpg

    how can i get it automatically updated on the hs touch client?

    thanks
    detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

    #2
    What does the device string look like in A1? You should be able to see a device in HSTouch to status tracking and it should change if the status of A1 is changing.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      I have a script that loads the new name into a status item in HS
      Why not download the image using GetURLImageEx and always call it a static file name? That way in HSTouch you could always point it to one address.

      Comment


        #4
        you might need to set isvideo = yes. Dynamic images are tricky, depending on the exact way you set them up in HST.

        --Dan
        Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

        Comment


          #5
          Rupp, i want the image to update BUT i want the NAME of the image to be pulled form a string held in a1

          so string A1 ome moment could be " http://www.test.com/images/image1.jpg"

          the next time a1's string could have changed to " http://www.test.com/images/image1534.jpg"
          ( note homeseer is given the image information from an extrernal server and holds it in the string A1 )

          Why not download the image using GetURLImageEx and always call it a static file name? That way in HSTouch you could always point it to one address.
          i cant cause the image keeps changing on the external server
          detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

          Comment


            #6
            Here I am doing this sort of with weatherxml. I download the image with HS, save it on the HS drive then the HSTouch clients pick it up (its a gif) and I am having wierd problems where the HSTouch clients en mass get it and errors. Personally I do not want the clients to to to the internet for the same image. (preference here would be that none of the clients ever talk to the internet - that is me though).
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

            HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
            HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

            Comment


              #7
              I just set that string to a device, then have HST use that device as the image. I don't have things changing in real time (weather inputs), but I also do not leave HST open long enough to see the image change. Each time I load HST it pulls the image fresh and it always seems to change for me.

              --Dan
              Tasker, to a person who does Homeautomation...is like walking up to a Crack Treatment facility with a truck full of 3lb bags of crack. Then for each person that walks in and out smack them in the face with an open bag.

              Comment


                #8
                Yeah; here I didn't see this issue crop up until I took the number of clients up from 2-3 to 8-10. Its not really an issue other seeing the time out entries in the HS logs.
                - Pete

                Auto mator
                Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                Comment


                  #9
                  aah i think i understand our confusion here. i dont HAVE the image in the value on the device A! , rather under status i mearly have the url displayed "http://test.com/images/zs.jpg"

                  how can i grab an image from a website and import it into the value of a device? i tried

                  hs.DeviceValuesGraphicsAdd "A1", "http://test.com/image/jj.jpg"

                  but that didnt work,
                  detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

                  Comment


                    #10
                    I don't know about "automatic" updating, but if you can save the image to a file on your HS PC, then you can use a simple script to update an image element on a HSTouch screen. This is a snippet of a script I use to update cover art:

                    Dim newfilepath As String
                    Dim hstplug as object
                    hstplug = hs.plugin("HSTouch Server")
                    filepath= "however/wherever you save the picture to your machine"
                    hstplug.ClientAction(43,"","Music:CoverArt",filepath)

                    Obviously, you would need some additional scripting to come up with your filepath.
                    Mark

                    Comment

                    Working...
                    X