Announcement

Collapse
No announcement yet.

help creating an event

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

    help creating an event

    ok, I have 4 variables (s50, s51, s52, s53 ) in each holds one digit of the time, so say the time i want my script to run is 12:53 s50 is holding the 1, s51 is holding the 2, s52 is holding the 5 and s53 is holding the 3.
    so now i want homeseer to run a script that will take those values and create a new event that will run at the time in s50,s51,s52,s53 ??
    my problem is also that it this is set at 10 pm at night well 12:53 is actually the next day so i need to figure out soem way to make the script aware of that.

    any pointers or help?

    zac

    detail of setup in profile
    detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

    #2
    Get your digits into a single string variable that can be converted to a date variable to compare to the current time:

    strTime="12:53"
    If cDate(strTime) < Time Then
    'assume time is tomorrow
    Else
    'time is later today
    End If


    Paul

    Comment


      #3
      ok that helps me out with that part but how do i make the command to make the new event baised on the time and of course date ?

      detail of setup in profile
      detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

      Comment


        #4
        You'd use the form:

        hs.NewTimeEvent strEvntName,dEvntStartTime,dEvntStartDate,1,1,1,1,1,1,1,strE nvtDevices,1,strEvntScript,strEvntGroup

        The first set of '1s' are boolean flags for day of the week to allow event to trigger. The first is for Monday, the last is for Sunday. The '1' after strEvntDevices is the boolean flag to delete the event after it triggers. strEvntDevices is a string of device-commands you want the script to execute. See HomeSeer Help for commands that can go there. Make it empty ("") for no device commands.

        As far as the date goes, you'd use dEvntStartDate=Date for today's date and dEvntStartDate=DateAdd("d",1,Date) for tomorrow.

        Take a look at the Voice Activated Alarm Clock and Snooze Functions that JohnWPB posted. You might be able to integrate his scripts into your idea.


        Paul

        Comment


          #5
          that worked, just 1 last question, to enable mutple "aram times" i need to introduce a random name in the name event how would i generate a random number or letters?

          detail of setup in profile
          detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

          Comment


            #6
            here is a working copy , it works fine just need the random setting.

            copy the .txt files into your scripts folder and all the rest of files into the html folder ( it should make a sub directory called alarm )

            then just call main.asp from your homeseer page

            you will be able to select a room that you want the wake up call to happen in. then you can type in the time ( in 24 hour format ) then press enter when asked to confirm and it will create a wake up event for that time.

            Please feel free to modify it in any way but this makes use of a cool graphical number keypad to enter time information into homeseer or even as an alarm panel.

            zac

            detail of setup in profile
            Attached Files
            detail of setup in profile. Link to videos of my projects there as well. Over 300 scripts running every min and counting

            Comment


              #7
              Collegeboyslive,
              I looked at your scripts and other files for the alarm application and was a bit overwhelmed. It looked to me like you were using Frontpage 5 to create the web page stuff. Did you type in all the code by hand for this application or did you let Frontpage generate all but the scripting parts? Also, is there a good source of information and possibly third party books, that could get me going on creating the type of application that you have created here? I'm not real familiar with developing web pages, so any help you can give me to point me in the right direction would be much appreciated. Thanks in advance !!!!!

              Comment

              Working...
              X