Announcement

Collapse
No announcement yet.

Days Till Reminder Script Discussion

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

  • #61
    Originally posted by Gogs View Post
    Yes you were correct to replace my "X" with your housecode, but to do it without understanding what you were doing can be a bit risky, however, it is not a bad way to learn how things work or don't as the case might be. Hope you also changed the Unit Code to suite your setup.

    As to where to specify the actual trigger, an event in HomeSeer, might be a good place to start.

    And before you ask, how you trigger the event is completely up to you. It can be a time event, motion detected, or whatever suites you. Just have the event run the script.

    There are other ways of doing it, but, lets keep it simple just now until you have the grasp of it.

    Hope your plan is coming together.

    Gogs

    Last nigth I ran a test, to see what would happen. I replaced the "x" with my code "Y", units codes with "89 thru 95".placed your scritp in a event and manualy, triggered it, but nothing happened. There where no error codes in the log. 89 thru 93 are birth dates, 94 and 95 are daylight savings. code 89 is 1 day of completing (actual birthday) and 90 is only 3 days aways. What should the script do when all is ok?

    sub main()

    for i = 89 to 95
    if (left(hs.devicestring ("y" & Cstr(i)),3))="Tod" then
    hs.speak hs.devicestring("y" & Cstr(i))
    i=i+1
    end if
    if (left(hs.devicestring ("y" & Cstr(i)),3))="Tom" then
    hs.speak hs.devicestring("y" & Cstr(i))
    i=i+1
    end if

    if i>44 then
    exit sub
    end if
    if (left(hs.devicestring ("y" & Cstr(i+1)),3))>100 then
    exit sub
    end if

    if i=43 then
    hs.speak "and, There are " & hs.devicestring("y" & Cstr(i))
    exit sub
    end if


    if (left(hs.devicestring ("y" & Cstr(i)),2))<89 then
    hs.speak "There are " & hs.devicestring("y" & Cstr(i))
    end if
    next

    end sub
    Hector
    ____________________________________
    Win.2003 OS, HS3
    BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
    BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
    MyTrigger,ACRF2,W800,Zwave
    AP800,Honeywell Stat

    Comment


    • #62
      Originally posted by Rotech View Post
      Gogs

      Last nigth I ran a test, to see what would happen. I replaced the "x" with my code "Y", units codes with "89 thru 95".placed your scritp in a event and manualy, triggered it, but nothing happened. There where no error codes in the log. 89 thru 93 are birth dates, 94 and 95 are daylight savings. code 89 is 1 day of completing (actual birthday) and 90 is only 3 days aways. What should the script do when all is ok?
      Bump, Gogs


      ~Bill

      Comment


      • #63
        Originally posted by Rotech View Post
        Gogs

        Last nigth I ran a test, to see what would happen. I replaced the "x" with my code "Y", units codes with "89 thru 95".placed your scritp in a event and manualy, triggered it, but nothing happened. There where no error codes in the log. 89 thru 93 are birth dates, 94 and 95 are daylight savings. code 89 is 1 day of completing (actual birthday) and 90 is only 3 days aways. What should the script do when all is ok?
        The script should cause HS to speak the device strings. I cannot see any reason in the script why it should not work.

        Check the devices and make sure there is data in the status box, it should read something like "10 days until whoevers birthday", or whatever you have setup the ini file to put there.
        sigpic
        A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
        HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
        BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
        BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

        Comment


        • #64
          Gogs, devices have data, and working fine. could it be this part of the script? where its says >44 and =43

          if i>44 then
          exit sub
          end if
          if (left(hs.devicestring ("y" & Cstr(i+1)),3))>100 then
          exit sub
          end if

          if i=43 then
          hs.speak "and, There are " & hs.devicestring("y" & Cstr(i))
          exit sub
          end if
          Hector
          ____________________________________
          Win.2003 OS, HS3
          BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
          BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
          MyTrigger,ACRF2,W800,Zwave
          AP800,Honeywell Stat

          Comment


          • #65
            Hector,

            you have for i=89 to 95

            and then if i>44 then exit sub!

            So yes of course it is doing nothing.

            Change the >44 to somthing like >92

            lower down change the i=43 to =91

            this will then read the first 4 reminders provided they are going to occur within 100 days
            Running HS PRO V2.5.0.49 & HS Pro V2.5.0.51

            Comment


            • #66
              Thanks neil, I should of just tried putting some kind of value there, aim just afraid of breaking something, any how thank you and Gogs...
              Hector
              ____________________________________
              Win.2003 OS, HS3
              BLDSC,BLstat,BLRadar,BLRamdom,BLOccupied
              BLups,BLrain8,HSTouch,Ultrajones Weatherbug,
              MyTrigger,ACRF2,W800,Zwave
              AP800,Honeywell Stat

              Comment


              • #67
                Well spotted.
                sigpic
                A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
                HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
                BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
                BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

                Comment


                • #68
                  Is there a version of this brilliant script that will work with HS3?
                  sigpic
                  A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
                  HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
                  BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
                  BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

                  Comment


                  • #69
                    I'm wondering that too now that I have switched to HS3.
                    I love this script.

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

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

                    No, Im from Iowa. I only work in outer space. Captain Kirk

                    Comment


                    • #70
                      No One ?

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

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

                      No, Im from Iowa. I only work in outer space. Captain Kirk

                      Comment


                      • #71
                        Originally posted by fungun View Post
                        No One ?

                        Thanks,
                        Tim
                        Looks that way
                        sigpic
                        A founder member of "The HA Pioneer Group" otherwise known as the "Old farts club!"
                        HomeSeer 3 V 3.0.0.318 with ALEXA (AKA Amazon Echo)
                        BL Radar V2.0.217; BLRF V2.0.85.0; HS Touch V3.0.0.1034 X10 V3.0.0.42; PHLocation V3.0.0.38; Zwave V3.0.1.110; X10 V3.0.0.42
                        BLBackup V2.0.39;ImperiHome3.0.0.20 All on Windows XP Pro

                        Comment

                        Working...
                        X