Announcement

Collapse
No announcement yet.

Set a schedule using a script

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

    Set a schedule using a script

    Hi

    I just love this plugin, and use it a lot.

    One of the reasons I'm using this plugin is to control my heating schedule. What I'd love to be able to do, however, is to dynamically alter the schedule via HSTouch, with the user being able to adjust the schedule times.

    Is it possible (or could it be?) to set or alter an existing schedule using scripts? That would just take this plugin to the next and ultimate level for me!

    Ian

    #2
    I could easily add a SetSchedule(string scheduleName, string timeRanges) scripting function which would update an existing schedule, but you would need to pass the time ranges as a string as the second parameter, something like

    Code:
    SetSchedule("MySchedule", "[Tue 12:30;Tue 22:50],[Wed 12:30;Wed 22:50]");
    would that be ok?

    Comment


      #3
      That would be fantastic, yes please!

      Oh, and whilst I'm on my knee begging for features, could we use "Sunset" or "Sunrise" as part of the schedule string too - or would this be too *dynamic* each day?

      So, for example:

      Code:
      SetSchedule("MySchedule", "[Tue 12:30;Tue 22:50],[Wed Sunrise;Wed 10:30]");
      Don't worry if not - just a thought I was having!

      Thanks

      Ian

      Comment


        #4
        you can already use sunrise and sunset with schedules, see this post for the syntax: http://board.homeseer.com/showthread...58#post1246158

        Comment


          #5
          Oh yes - so there is! A nice surprise! I did check the instructions for this script and didn't notice it listed, so assumed sunrise/sunset offsets weren't possible, but it's great that they are. Nice one.

          Comment


            #6
            Originally posted by spud View Post
            I could easily add a SetSchedule(string scheduleName, string timeRanges) scripting function which would update an existing schedule, but you would need to pass the time ranges as a string as the second parameter, something like

            Code:
            SetSchedule("MySchedule", "[Tue 12:30;Tue 22:50],[Wed 12:30;Wed 22:50]");
            Sorry, one last question. Could there also possibly be a function to be able to *read* an existing schedule as a companion to this proposed SetSchedule function? One could pass it the ScheduleName and it return a string contaning the time ranges?

            That way I can query a schedule, parse and process it, before updating it with the SetSchedule function.

            And finally, if this is something you can integrate, how long do you think until it would be available? I'm busy writing my heating timers script, and using EasyTrigger would make life so much easier!

            Regards

            Ian

            Comment


              #7
              I will add SetSchedule and GetSchedule scripting functions this weekend

              Comment


                #8
                Oh thank you - fantasic.

                Ian

                Comment


                  #9
                  in version 3.0.0.30 available here I have added the following scripting functions:

                  Code:
                  void   SetSchedule(string scheduleName, string timeSlots) 
                  string GetSchedule(string scheduleName)

                  Comment


                    #10
                    Thank you!

                    Comment

                    Working...
                    X