Announcement

Collapse
No announcement yet.

[VB.NET] dwr_pollen.vb discussion thread

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

    [VB.NET] dwr_pollen.vb discussion thread

    This is the discussion thread for the dwr_pollen.vb script.

    The script can be found here:
    http://forums.homeseer.com/showthread.php?p=1132247

    Script updated to V1.1, to catch a hardcoded image issue I left in on accident.
    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.

    #2
    Request for adding up to the 3 day capturing as a feature. (x10joe)

    My idea of adding a variable zipcode for use when traveling.
    Probably should move all "features" into an INI for enable/disable.
    Should set it up as device "Groups"
    Setup Zipcode for group 1-3 (zipcode, device codes, etc.)

    Then, instead of passing a zipcode into the param, you submit which group you want to operate on.

    i.e. dwr_pollen.vb("main","1")
    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


      #3
      Match Jon00's original format for the string:
      7.60 - Grass, Nettle and Chenopods
      instead of
      Grass, Nettle and Chenopods - 7.60
      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


        #4
        The next time you're bored

        In the comments section at the front it still says:
        '* Purpose: This script is used to control multiple Zones of Winamp, each "zone" consists *
        '* of a sound card and a copy of winamp setup for that specific winamp. *


        Thanks for all the hard work, Dan!
        Steve

        (System configuration is in my profile)

        Comment


          #5
          DOH!

          Thanks, I'll fix that up as well. Nice to have complex headers...when they are accurate!

          --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


            #6
            I think I see why my parsing was not working well.
            Randomly they add strange things to the column and row tags:
            "{td class="vaB taC"} "
            instead of just "{td}"

            except { are really <

            Forgot that the forum here will read those as HTML.

            Sneaky. I guess my kludge is probably the best way to work it, but I'm sure I can be more efficient on the memory use. This script is going to essentially hold a copy of the webpage twice. Not a big deal, but it bugs me when code is sloppy.

            --Dan
            Last edited by drozwood90; August 6, 2014, 08:19 AM. Reason: change < to {
            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


              #7
              Tried your script and got this error -
              Code:
              8/6/2014 4:08:23 PM ~!~DWR_POLLEN~!~System.InvalidCastException: Conversion from string "*
              		<div class="center" sty" to type 'Double' is not valid. ---> System.FormatException: One of the identified items was in an invalid format.   at Microsoft.VisualBasic.CompilerServices.Utils.IsHexOrOctValue(String Value, Int64& i64Value)   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)   --- End of inner exception stack trace ---   at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble(String Value, NumberFormatInfo NumberFormat)   at Microsoft.VisualBasic.CompilerServices.Operators.CompareObject2(Object Left, Object Right, Boolean TextCompare)   at Microsoft.VisualBasic.CompilerServices.Operators.ConditionalCompareObjectGreater(Object Left, Object Right, Boolean TextCompare)   at scriptcode45.scriptcode45.GetPollenInfo(String zipcode)   at scriptcode45.scriptcode45.Main(String parms)
              I was supposed to make this a .vb extension from the .txt one right?

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

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

              Comment


                #8
                Dan,

                I found this in the log today:
                System.InvalidCastException: Conversion from string " System.FormatException: Input string was not in a correct format. at Microsoft.VisualBasic.CompilerServices.Conversions.ParseDoub le(String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble( String Value, NumberFormatInfo NumberFormat) --- End of inner exception stack trace --- at Microsoft.VisualBasic.CompilerServices.Conversions.ToDouble( String Value, NumberFormatInfo NumberFormat) at Microsoft.VisualBasic.CompilerServices.Operators.CompareObje ct2(Object Left, Object Right, Boolean TextCompare) at Microsoft.VisualBasic.CompilerServices.Operators.Conditional CompareObjectGreater(Object Left, Object Right, Boolean TextCompare) at scriptcode23.scriptcode23.GetPollenInfo(String zipcode) at scriptcode23.scriptcode23.Main(String parms)

                Comment


                  #9
                  Has anyone had any success? Worked for one day.

                  Dan,

                  Any ideas?

                  Joe

                  Comment


                    #10
                    HMm...I'll see about all those errors, but it is still running perfectly fine here.

                    No errors, etc. I just did a set device string on my device to "0". Checked, it said 0. Then I manually ran the script. It re-populated everything properly.

                    What version of Homeseer are you both on?
                    What is your zip code (if you don't want to post, e-mail it to me, so I can test)?
                    Can you screenshot your event that you made?

                    And yes, renaming, you should get a filename:
                    dwr_pollen.vb

                    When you create the event make sure it is a CAPITAL "Main"
                    that there is NO space between the two parameters (at the comma).
                    That is:
                    dwr_pollen.vb("Main","zipcode")

                    --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


                      #11
                      Dan,

                      HomeSeer Version 2.5.0.80 and 62704.

                      Joe

                      Comment


                        #12
                        Screenshot
                        Attached Files

                        Comment


                          #13
                          Dan,

                          I just tried 90210 Cali zip and it worked. I'm in Illinois.

                          Comment


                            #14
                            Tried a few other zips and they work. Doesn't like Springfield, IL zips

                            Comment


                              #15
                              HS 2.5.0.80
                              I have tried the 3 towns around me.
                              I checked at Wunderground's site and the info was there. It was 0.90 yesturday.
                              51331, 51351, 51360

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

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

                              Comment

                              Working...
                              X