Announcement

Collapse
No announcement yet.

Setting up a reminders event?

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

  • ScottRennie
    replied
    Originally posted by Person View Post
    2) Build one recurring event. My triggers at Tue 12:02AM.
    It executes below script that does toggle in one shot.
    When you name the script in event GUI make sure to use .vb extension.


    Sub Main(parm as object)

    if hs.DeviceValue("A7")=0 then hs.SetDeviceValue("A7",1) else hs.SetDeviceValue("A7",0)

    End Sub
    A quicker alternative is
    A7 = math.abs(A7-1)

    This toggles A7 between 0 and 1 because abs(-1) = 1

    Scott

    Leave a comment:


  • Person
    replied
    I wanted to do the same for recycling which is every other week on Mon. There doesn't seem to be even/odd week function in HomeSeer :-( and even/odd day doesn't work since its mapping will change once month changes.


    There are some scripts in the forum on how to do this but I figured out how to use virtual device + two simple events. Hope you find this useful.


    Once virtual device is set (you set initial value based on the day you enabled it, events toggle it back-and-forth) you can build reminders based on time/day etc... To avoid race I put in delay into device toggle. So first both events are evaluated w/ conditions, only one toggle gets scheduled and executed in 3 mins. Since there is no if-then-else capability (or toggle command) in actions this achieves it in a roundabout way.



    1) Create virtual device "RECYCLE STATUS" with two states
    (YES/NO ... or your choice)

    2) Build two conditional events. My trigger at Tue 12:02AM.
    One triggers if virtual device is ON, another if OFF.
    Each events executes device command to reverse status
    (i.e. change state to OFF, ON) respectively *with* 3 minute delay.



    Now you have virtual device that will toggle its state every other week.
    Set its initial value by running appropriate event and you are done.
    Build events that trigger on virtual device state changes if you wish or just read out state when you need to know what week it is.

    SECOND SOLUTION using one virtual device and one event w/ script
    ==================================================
    I got into scripting since I needed alarm clock that shows up in default/stock HS-Touch so I learned recycle reminder can be done in fewer events.



    1) Create virtual device "RECYCLE STATUS" with two states
    (value 1/0 = status YES/NO ... or your choice). This was device A7 for my example below.

    2) Build one recurring event. My triggers at Tue 12:02AM.
    It executes below script that does toggle in one shot.
    When you name the script in event GUI make sure to use .vb extension.


    Sub Main(parm as object)

    if hs.DeviceValue("A7")=0 then hs.SetDeviceValue("A7",1) else hs.SetDeviceValue("A7",0)

    End Sub
    Last edited by Person; December 26, 2012, 10:54 PM. Reason: More info added

    Leave a comment:


  • Wadenut
    replied
    I don't want to hijack someone elses thread so I've started a new one here regarding my script.

    http://board.homeseer.com/showthread...=1#post1034128

    Leave a comment:


  • travisdh
    replied
    Hi,

    I went about it a slightly different way, I have an event that is called when i get home (house virtual status device becomes Occupied) and it is a Wednesday, since almost all the time i work Wednesday's so would not be at home until i got back from work.

    When i get home, and it is a Wednesday the below is triggered, it then works out if it is an even or odd day, and says whether it is a rubbish night, or rubbish and recycling night since the recycling alternates every 2nd week.

    The code below was found within this forum, and is essentially a copy and paste, i can't recall who did it (otherwise would credit them) but it works perfectly for me!

    Code:
    Sub Main(parm as object) 
    Dim r As Integer 
    
            r = DatePart("ww", Now) 
                if r Mod 2 = 0  then        'even week
                If WeekdayName(Weekday(Date.Now)) = "Wednesday" Then 
                   hs.Speak("Tonight is just Rubbish Night",true)
                End If 
            End If 
    
           If r Mod 2 <> 0 Then      'odd week
                   hs.Speak("Tonight is Rubbish and Recycling Night",true)
            End If 
    End Sub
    Attached Files

    Leave a comment:


  • Wadenut
    replied
    Originally posted by nsisman View Post
    Wadenut,

    I think I could use that script .

    Thanks
    Neil, if you'll send me your email address again, I'll send a preliminary copy for you to test. I'm happy with it as is; I just want to gauge it's usability for someone else.

    Leave a comment:


  • nsisman
    replied
    Wadenut,

    I think I could use that script .

    Thanks

    Leave a comment:


  • Wadenut
    replied
    I was bored yesterday and scribbled out a small script I call "Daily Reminders" in about a half hour. I run it once a day during the morning announcements.
    What it does so far is check a list of reminders currently stored in an ini file (may move this to some other form of data file later) and announces those items that match today's date. When an announcement matches, the date on that item is updated to the next scheduled date if it's recurring, or if it's a one time reminder, ie. an appointment, it gets deleted from the file.

    For instance: Garbage is collected here every other Thursday.
    The schedule for this would look something like 10/4/2012,14,text to speak.

    It's still a work in progress, but I was just wondering if there might be any interest in such a thing. If so, I can post it once I've finished adding bells and whistles (I have a few in mind).

    Leave a comment:


  • Uncle Michael
    replied
    Originally posted by drozwood90 View Post
    What sets the 30 min. repeat?
    I have the Do Not Retrigger box checked with a time of 1800 sec.

    Leave a comment:


  • drozwood90
    replied
    UM,

    What sets the 30 min. repeat?

    That is a good idea for my garage door reminder. At night, if the garage door is open, I get reminder texts to close it, after 9:30. However, I have it sending my the messages every 5 minutes. I am not sure how I went about this.

    I think for some other things, like the garbage can, that is a great idea. Then I could even tie in a RFID tag to this, so if the garbage can's RFID tag is out of range for 20 minutes, reset the virtual device.

    --Dan

    Leave a comment:


  • Uncle Michael
    replied
    I do this with two events. One turns on a virtual device early in the morning on garbage day. Monday, in my case. The second event is conditional with a retrigger time of 1800 seconds (30 min). When my conditions are met (after 3:30 and virtual device is on) I get a reminder every 30 min until I turn the virtual device off.
    Attached Files

    Leave a comment:


  • Rupp
    replied
    Originally posted by rmasonjr View Post
    Why recurring?
    Doesn't have to be. There are many ways to skin that cat.

    Leave a comment:


  • TeleFragger
    replied
    or you could use the maintenance script...

    I used to use it... man i got to get my system back in running order..

    http://forums.homeseer.com/showthrea...958#post711958

    Leave a comment:


  • rmasonjr
    replied
    Originally posted by Rupp View Post
    Recurring with conditions. Then select the days as the conditions.
    Why recurring?

    Leave a comment:


  • Rupp
    replied
    Select the days using the check marks. Then add a condition of time of day or sunrise sunset. Enter the time. You can also set it up like the example posted.

    Leave a comment:


  • Rotech
    replied
    Originally posted by Rupp View Post
    Recurring with conditions. Then select the days as the conditions.
    How would you setup the retrigger time in the recurring event?

    Leave a comment:

Working...
X