Announcement

Collapse
No announcement yet.

Check if date is a holiday

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

    Hi all,

    This is taking a bit longer than I had anticipated to convert properly. The INI file functions in HS3 don't work the same way as they did in HS2 which required me to create custom functions rather than the ones built in to HS3. I did a rough conversion last year for myself, but as I was packaging things up, I noticed a few major bugs. I'll likely post it in a few days. I'm also looking at using a database to store the data, rather than an INI file, but that will take a bit longer to implement.

    Cheers
    Al
    HS 4.2.8.0: 2134 Devices 1252 Events
    Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

    Comment


      Originally posted by kideon View Post
      I've been wanting to use this too in HS3 don't forfet about our Jewish holidays
      Can you provide a list of the important ones or point me to a site that has them listed along with how to calculate them. I did some quick googling and it doesn't look simple

      Cheers
      Al
      HS 4.2.8.0: 2134 Devices 1252 Events
      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

      Comment


        Al-

        Did you ever finish a HS3 version of IsHoliday?

        Mark
        Mark

        Comment


          There are a few threads about this using events. There may be more but here are two, but folks keep improving on this so do a search to be sure.

          http://board.homeseer.com/showthread...light=Holidays


          http://board.homeseer.com/showthread.php?t=178920


          Sent from my iPhone
          Tom
          baby steps...starting again with HS3
          HS3Pro: Z-NET & 80 Z wave Devices,
          HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
          Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
          In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
          System: XP on Fanless Mini-ITX w/ SSD

          Comment


            Originally posted by Mark S. View Post
            Al-

            Did you ever finish a HS3 version of IsHoliday?

            Mark
            Hi Mark, I did, but very recently . The functions took a bit longer to re-write than I had anticipated (mainly due to my spaghetti code) and I ended up converting everything to vb.net as well as the original was in vbscript. I'be been running the vb.net version for about a month now, but due to other commitments, had not made the time to package it up and post it here. I'll do that by the end of the weekend.

            Cheers
            Al
            HS 4.2.8.0: 2134 Devices 1252 Events
            Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

            Comment


              Al,
              Nice! My other house spent a ton of time making events and it does the rudimentary holiday set up fine. I haven't upgraded my events to the methods Randy and others improved on. For my second setup it would be great if I didn't have to do all those events again .
              Does the scripting provide other advantages vs the events methods?

              thanks
              Tom
              baby steps...starting again with HS3
              HS3Pro: Z-NET & 80 Z wave Devices,
              HSTouch: 4 Joggler (Android Kitkat), 2 iPhone, 3 iPads
              Whole House Audio: 5 SqueezePlay Jogglers w Bose Speakers
              In The Works: 10 Cameras Geovision, new Adecmo/Envisalink Alarm, Arduinos
              System: XP on Fanless Mini-ITX w/ SSD

              Comment


                Originally posted by TomTom View Post
                Al,
                Nice! My other house spent a ton of time making events and it does the rudimentary holiday set up fine. I haven't upgraded my events to the methods Randy and others improved on. For my second setup it would be great if I didn't have to do all those events again .
                Does the scripting provide other advantages vs the events methods?

                thanks
                Hi Tom, the main advantage is that you can see them in a calendar view, but the disadvantage is that it does require other scripting calls to do something further with the items that have been added to the calendar.

                Cheers
                Al
                HS 4.2.8.0: 2134 Devices 1252 Events
                Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                Comment


                  Hi all,

                  The HS3 version is finally posted: http://board.homeseer.com/showpost.p...03&postcount=2.

                  The instructions may seem overwhelming for those who have never used it before, but to get going, simply extract the files in the zip file to the appropriate files in the HomeSeer folder. You can access the main calendar screen by going to http://www.xxx.yyy.zzz/cal.asp on your HS3 server, substituting the ip address (and adding a port if necessary). This allows you to view and edit the calendar, by simply double-clicking in the day that you want to modify.

                  You do need to use scripts to make use of the information in the calendar. I've included a few scripts as examples. The primary way I use it is to enable/disable alarms on our alarm clocks (Squeezebox Radios). I run events that trigger scripts daily that check if tomorrow is a holiday and if it is, the alarm clocks get disabled. I also check for entries in the calendar called "No School" and will disable the alarm clocks for the kids (not mine )for the days it is found. Feel free to try it out and ask questions as needed.

                  Cheers
                  Al
                  HS 4.2.8.0: 2134 Devices 1252 Events
                  Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                  Comment


                    Awesome script, one question is there a way to remove all the homeseer menu bar stuff, I would just like the calendar to be displayed on that page (makes it easier to intergrate into HSTouch.
                    Thanks

                    Comment


                      Originally posted by matt246 View Post
                      Awesome script, one question is there a way to remove all the homeseer menu bar stuff, I would just like the calendar to be displayed on that page (makes it easier to intergrate into HSTouch.
                      Thanks
                      Thanks and absolutely. All you need to do is edit cal.asp and change this:

                      Code:
                      	x = hs.GetPageHeader("Calendar" ,"", "", False, False, False, False, False, False)
                      	response.send x
                      to:
                      Code:
                      	'x = hs.GetPageHeader("Calendar" ,"", "", False, False, False, False, False, False)
                      	'response.send x
                      Cheers
                      Al
                      HS 4.2.8.0: 2134 Devices 1252 Events
                      Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                      Comment


                        Thanks for the fix, worked great!

                        Comment


                          Linux?

                          Hi Al,

                          Does this work on the Linux version of HS3, specifically on a RPi3?

                          Thanks,

                          Jim

                          Comment


                            Hi Jim, I'm not sure as I've never tested it on linux or heard from others whether it works. I'll check the code tonight to see if there's anything that would prevent it from running on linux. I'm not sure if the asp web pages are supported under linux. Maybe give it a try and let me know what, if any, errors you get.

                            Cheers
                            Al


                            Sent from my Phone using Tapatalk
                            HS 4.2.8.0: 2134 Devices 1252 Events
                            Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                            Comment


                              I'm trying to get the next 7 days into device strings for HSTouch. Wheather there is a reminder or not.
                              I fixed the "Today" section of your AnnounceEvents script, but the second section is for "Today and beyond".
                              I thought it would be an easy fix like the Today section.
                              I made the device, ran the script and the device string changes as it announces the next event, instead of putting them all into one string.
                              I would like to get 7 devices either telling the event or saying "No Reminders" in the device strings.
                              Pic to show what I tried.

                              Thank you,
                              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


                                Originally posted by fungun View Post
                                I'm trying to get the next 7 days into device strings for HSTouch. Wheather there is a reminder or not.
                                I fixed the "Today" section of your AnnounceEvents script, but the second section is for "Today and beyond".
                                I thought it would be an easy fix like the Today section.
                                I made the device, ran the script and the device string changes as it announces the next event, instead of putting them all into one string.
                                I would like to get 7 devices either telling the event or saying "No Reminders" in the device strings.
                                Pic to show what I tried.

                                Thank you,
                                Tim
                                Hi Tim,

                                When you set the device string, it overwrites the previous entry. If you want to append, then use something like
                                Code:
                                hs.SetDeviceString(5678, hs.DeviceString(5678) & " New Text", True)
                                Hope that helps.
                                Cheers
                                Al

                                PS If you post your actual code, rather than a screen shot, it would be much easier for me to edit it and show the exact changes.
                                HS 4.2.8.0: 2134 Devices 1252 Events
                                Z-Wave 3.0.10.0: 133 Nodes on one Z-Net

                                Comment

                                Working...
                                X