Announcement

Collapse
No announcement yet.

Photo Frame2 - WAF above 0 needed - can somebody help?

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

    Photo Frame2 - WAF above 0 needed - can somebody help?

    I NEED my HST installation to act as a photo frame in order to get WAF above 0.

    But I also need to be able to launch HST screens with certain information at other times and then "fall back" into photo frame move when there is no activity.

    Due to the lack of any photo frame functionallity in HST I have tried to initiate the Windows screensaver(with pictureview) on my HST client after a minute and then simulate mouse movement etc. to get windows out if the screensaver mode - but I cannot do with more than 60% sucess and it seems slow.

    What I really would like was to be able to run a scritp called "change picture" and then have a virtual device to be updated with a randomly selected URL/FILE in my picture folders on my server. I would then run this script at inactivity periods every 5 second and show a "photo" screen on top of my HST screen.

    Has anybody done something like this or can anybody help?

    #2
    Jakob,

    I have cooked my own version for a picture frame, maybe it will help you. I have made a script that reads an ini file to see what sizes of pictures to make. I have attached the script and the ini file. I attached the script as txt, rename it to .vb if you want to use it.

    Size depends on the frame you reserve on the touchscreen. It will create several sizes of the picture if you want to show it on different devices (I use a HTC and a EE Top.

    It reads a random picture from a picture directory. This directory can be local on the HS server, but it should also work over the local network. You will have to set this directory in the ini file (PictureDirectory under settings).
    The resized picture is placed in a subdirectory "JOWI_PictureRandom" (or the name of the WebDirectory under Settings in the ini file) under the html directory of HS. For my EEE top this is EETopMain.jpg

    To be able to run the script successfully you will have to adjust the line "ScriptingReferences" under [settings] in settings.ini.
    Add "System.Drawing;System.Drawing.dll,System.Drawing.Image; Syst em.Drawing.dll" preceded by a comma to this line. Restart HS after this change.

    To activate the frame follow the next steps:
    1. On the touchscreen you create a image with an URL to the picture (e.g. <url to HS/Jowi_PictureRandom\EETopMain.jpg>).
    2. Name this element. Can be any name, for this example an obvious one: "Picture"
    3. Set the properties of the element Picture: IgnorePresses=True; ColorNormal=Transparent; ColorPressed=Transparent and ImageFormat=Normal
    4. The size of element Picture should be set in the ini file called Jowi_PictureRandom.ini (example attached). Under [Displays] add a line "EETopMain=880,550" or whatever Height/Width the image is to be. The name used (EETopMain) will be the name of the file to access from hstouch.
    5. Set the proper directory names for the input (PictureDirectory) and HTML directory (WebDirectory) in Jowi_PictureRandom.ini (example attached). The webdirectory will be created if it does not exist
    6. Next create an event "PictureShow". Make it recurring to the frequency where you want the pictures to change. In my case I use 2 minutes. The actions for the events are to run "JOWI_PictureRandom.vb("Main","")" (+ wait for script to finish) and next a HST action "Simulate a Press of an Element" for screenname.picture.
    7. Set the options of your project defaults: set "return to main screen after" 3 minutes (or whatever period)
    8. And you should be off to go!
    For me WAF went to "I want it in the middle of the room, next to the TV". Almost useless, because I do not want to walk throught the room to serve lights
    For your interest I also attached a sample of my main screen which I use to give an impression.

    Hope it helps,

    Wim

    edit: Moved the hardcoded directorynames to the ini file, so it is easier to correct the input picture and output directoryfolder to your needs. Also the html output folder can be changed. It will create the html folder if it does not exist.
    Attached Files
    Last edited by w.vuyk; July 23, 2009, 01:38 PM. Reason: Submitted script; directory info can now be set in ini file.
    -- Wim

    Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
    650 devices ---- 336 events ----- 40 scripts

    Comment


      #3
      Forgot one step:
      To be able to run the script successfully you will have to adjust the line "ScriptingReferences" in settings.ini.
      Add
      Code:
      System.Drawing;System.Drawing.dll,System.Drawing.Image;System.Drawing.dll
      preceded by a comma to this line.
      And restart HS, otherwise you will get errors running the script
      Wim
      Last edited by Rupp; May 15, 2012, 07:46 AM. Reason: To remove space in dll reference
      -- Wim

      Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
      650 devices ---- 336 events ----- 40 scripts

      Comment


        #4
        I also get this error-5/21/2009 10:26:39 AM ~!~Picture Error~!~I would like to select a new picture....(3 pictures in list) Try nr. 1
        5/21/2009 10:26:39 AM ~!~PictureShow Warning~!~List has been reset

        Thanks,
        Tim
        FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

        HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

        Comment


          #5
          Tim,

          The script randomizes pictures, but keeps track of wich pictures has been shown already. If if selects a picture that has been shown already, it puts a line to the log and selects en new picture. It is not an error really, it is for tracing to see how often the picture has been shown. You could remove that line if you like.
          If the script has to retry 30% of the number of pictures it will reset the list and start over again. And as you only have 3 pictures... ;-)
          Did you check if the script already puts the picture in the html subfolder?

          Does the save error still occur?

          You have changed the name of the outputfolder, but did you also edited the scipt line
          "Dim _pathOutputImage As String = "C:\program Files\Homeseer 2\html\JOWI_PictureRandom\" & Type & ".jpg"" for it?

          Maybe I should put this and the input also in the ini file?

          Wim
          -- Wim

          Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
          650 devices ---- 336 events ----- 40 scripts

          Comment


            #6
            Ok, got it to work reliably. I reset the element in HST on ignore presses-releases to false. In the event actions I now have, simulate a press on an element and simulate a release on an element, so in order.
            1-run script
            2-wait 3 seconds
            3-simulate a press
            4-simulate a release

            Works great.

            Thanks,
            Tim
            FB Page - https://www.facebook.com/pages/Capt-Tim/209398425902188

            HSTouch Layouts - https://www.facebook.com/media/set/?...5902188&type=3

            Comment


              #7
              Tim,

              Glad to share it and see it works for others

              Wim
              -- Wim

              Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
              650 devices ---- 336 events ----- 40 scripts

              Comment


                #8
                The way I use it is I made a page with nothing but that and a frame around it picture frame like and I set that as my main menu. I setup a recurring event in HS to call that every couple of minutes as long as there is a client running and it's not being used. Pressing on the frame takes you to what is the real main menu.

                It's been working really well. The only exception is if you have a HST screen that you want to see for longer periods, like a music screen, etc it doesn't take that in to account and will still trigger the photoframe. I think that could be stopped with an additional condition on the event though. The script would only trigger every couple of minutes the way I have it set and only if the screen is idle.
                Attached Files
                Marty
                ------
                XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
                Playing with HS3 a bit but it's just play at this point.

                Comment


                  #9
                  nightwalker
                  How did you detect this condition? " HS to call that every couple of minutes as long as there is a client running and it's not being used" I looked but can not find a way to see if a client and a particular screen is active. Did you do somthing in the HST screen to set a device in HS when screen is active?

                  Gerard


                  Originally posted by nightwalker View Post
                  The way I use it is I made a page with nothing but that and a frame around it picture frame like and I set that as my main menu. I setup a recurring event in HS to call that every couple of minutes as long as there is a client running and it's not being used. Pressing on the frame takes you to what is the real main menu.

                  It's been working really well. The only exception is if you have a HST screen that you want to see for longer periods, like a music screen, etc it doesn't take that in to account and will still trigger the photoframe. I think that could be stopped with an additional condition on the event though. The script would only trigger every couple of minutes the way I have it set and only if the screen is idle.

                  Comment


                    #10
                    Originally posted by Gerard View Post
                    nightwalker
                    How did you detect this condition? " HS to call that every couple of minutes as long as there is a client running and it's not being used" I looked but can not find a way to see if a client and a particular screen is active. Did you do somthing in the HST screen to set a device in HS when screen is active?

                    Gerard
                    I was already using BLLogMonitor to keep an eye on somethings, using that was a pretty easy addition to have it monitor clients coming on-line/off-line and setting a device to track status. I had also set the deployed project to return to the main screen after 5 minutes of inactivity, between the two setting it's been working quite well.
                    Marty
                    ------
                    XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
                    Playing with HS3 a bit but it's just play at this point.

                    Comment


                      #11
                      Originally posted by Gerard
                      Wim
                      I assume this grafics conversion runs all the time whether the screen in displayed in HST or not. Is this correct? Is here a way to know if the screen is on top to be displayed?
                      Gerard,

                      I do not know if a HST client is displaying another screen. As far I know there is no condition to know wich screen is active in HST.

                      The graphics conversion is not really consuming much time or power on my machine (AMD Athlon 4800+). But to prevent the script running for no reason at all I have a condition on presence in the living room.
                      If the living room is empty, the touch screen display is switched off. The picture script has a condition to not run if the monitor is off.

                      In my situation the photoframe screen is the one most displayed, because the other screens are only active if a user wants to do or check somthing. After 5 minutes the screen returns to the phpotoframe, so the script might have run for 2 or 3 times changing a picture without display.

                      Wim
                      -- Wim

                      Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
                      650 devices ---- 336 events ----- 40 scripts

                      Comment


                        #12
                        Judd,

                        At this point the script wants to save the picture on disk, so the picture has been resized. We are further then before.
                        Did you create the directory Jowi_PictureRandom in the html directory of HS? And to be 100% sure, there are JPG files in c:\foto?

                        Wim
                        -- Wim

                        Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
                        650 devices ---- 336 events ----- 40 scripts

                        Comment


                          #13
                          You could easily setup HSTouch to update a Homeseer device every time you open a screen, that way you would know which screen is active on a client.

                          It's a workaround, but it should be easy to implement.

                          Comment


                            #14
                            There are a couple of places in the script that you need to either make sure folders exist or make a change to the script to reflect your particular system, also make sure the ini file is correct and in the config folder.

                            This line
                            Dim Picture As String = GetRandomInputFile
                            and this one
                            Dim _pathOutputImage As String

                            in the script, the paths need to either exist as written or you have to make a small change to reflect your systems paths.
                            Marty
                            ------
                            XPpro SP3 /w HS Standard 2.5.0.80, HSTouch Server - 1.0.0.70, HSTouch Client 1.0.0.73 HSTouch Android - 1.0.0.2, HSTouch iPhone - 1.0.0.2
                            Playing with HS3 a bit but it's just play at this point.

                            Comment


                              #15
                              Marty,

                              You are right about that. And it might be a hard one for thos that don't like playing around inside a script. Maybe i should make that part easier by moving those hardcoded directories to the ini file, so one could decide inside the ini file instead of the script?
                              If that is a wish I can work on that this weekend. it should not be hard to do.

                              Wim
                              -- Wim

                              Plugins:RFXCOM, HSTouch Server, Squeezebox, BLGData, Restart, Jon00's Perfmon and Network monitor, WeatherXML, BLBackup, TenScripting, BC4, Pushover, PHLocation, JowiHue, Zwave, Sonos
                              650 devices ---- 336 events ----- 40 scripts

                              Comment

                              Working...
                              X