Announcement

Collapse
No announcement yet.

Pollen Forecast Script

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

    #91
    Sorry about that, I should have been a bit more specific.

    I used a Status tracking of a graphic object to track the status image. That of course didn't work, like you found out. I left that as i had it and went into collections, just above the status tracking and had it track device value and give it a different image for each value from 1 to 10. For example a value of 1 gets the low graphic, a value of 4 gets medium and on like that. You will have to copy those images over to your HST graphics directory so they can be used. It seems to be working so far. It could need adjustment in the summers when the readings move around a lot more but I think it'll be fine.
    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


      #92
      Marty

      Thanks for the help. Your solution works except the values for the pollen count range from
      0 to 100.

      Does that mean I need to put in 100 choices in the collections?
      jjsmd@yahoo.com

      Comment


        #93
        Oh my, I didn't realize that the values went that far up the scale. I think 100 entries in there will be silly and probably put more load on the system than I would want. This may require a script of some sort to have the HomeSeer server do the work instead of the HSTouch client.
        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


          #94
          I'm not sure how the pollen device values get done. In my area here it hasn't changed from 0.1 in a month. We could use something like this script to put the graphic in a virtual device string for use in HST. Something like this could end up working.

          PHP Code:
          'sets the image for the pollen graphic to be shown in HST using a virtual device

          Sub Main(ByVal Mode As String)

          Dim v as Integer

          v=hs.Devicevalue("V50")

          if v < 40 then
          hs.SetDeviceString ("v65","<img src='
          /images/pollen/low.gif'>",TRUE)

          elseif v > 40 and v < 80 Then
          hs.SetDeviceString ("v65","<img src='
          /images/pollen/medium.gif'>",TRUE)

          elseif v > 80 Then
          hs.SetDeviceString ("v65","<img src='
          /images/pollen/high.gif'>",TRUE)

          end if

          end sub 
          I have to figure a few things yet but it's a start. Right now it kind of works. Right now the device value is showing a 1. If I manually change it to 8 I expeted it to show the HIGH graphic but it didn't. If I manually change the device value to 80 then it does work.

          I figure I have till spring to figure it out, at least in this area.

          Edit:

          I think I got it, was a math thing on my end, good thing i'm a hardware guy and not software. After reading and re-reading Jon's instructions about a dozen times it finally sunk in that he was multiplying by 10, so that would give a 1-100 scale. It was a small adjustment to make it work.

          Also if you don't use the combined device string like Jon does you don't need a virtual device. Just change to script so all the device codes are the same one. Since I use the device value in HST directly I was able to change the device string to just the graphic without it effecting anything else, when it's just the graphic it shows up in HST the normal way just fine.

          Wow, I so suck at scripts.
          Last edited by nightwalker; December 13, 2010, 02:31 PM.
          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


            #95
            I looked through some of the replies and really didnt see where the problem was fixed, where is say 0.1 pollen level all the time. Does anyone have a working copy of the script that they could publish?
            Thanks and Happy Holidays to all,
            danielbo
            danielbo

            Comment


              #96
              I think you will find it is working just fine. Much of the USA is reporting 0.1 as it is winter (no plants/grasses flowing). If you lived in Texas, Florida etc, the levels would be higher. Wait until spring when levels will increase.
              Jon

              Comment


                #97
                Exactly, right now all the pollen here has frozen and fallen to the ground. I guess you could test quick enough by changing your zip code and location in the ini file to somewhere warmer that still has pollen.

                EDIT

                For fun I changed my zip/loacation to San Antonio Tx. I can see from the result that while i'd be a lot warmer than I am now, I'd also be sneezing my fool head off.
                Last edited by nightwalker; December 21, 2010, 12:49 PM.
                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

                Working...
                X