Announcement

Collapse
No announcement yet.

Multiple Thermostat Scheduler

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

  • Multiple Thermostat Scheduler

    Having completed work on the Daily Reminders script, I see plenty of room for improvement to this script.

    - Automatic scheduling of the event to reduce Homeseer overhead. This also ensures that settings are adjusted immediately on schedule rather than via a recurring event.
    - Intent to support multiple Thermostat plugins simultaneously.
    - Provision for irregular schedules. This will be of benefit to shift workers.

    This will require a lot of work and ambition, so I would like to know if there is really any interest in this.

    Meantime, the Daily Reminders script does include provision to run events or scripts on a schedule. This could be easily applied to changing thermostat setpoints.


    The Script package is located here:
    http://board.homeseer.com/showthread...ght=thermostat
    Last edited by Wadenut; January 1st, 2013, 10:26 AM.
    Real courage is not securing your Wi-Fi network.

  • #2
    Looking at bringing this up to date. Here are my thoughts.

    - I'll be adding a Web page interface for editing and viewing schedules.


    - One problem with thermostat setpoint scheduling I've seen talked about frequently is a rotating or irregular work schedule. I can deal with this quite easily using some of the principals I've already applied to the Daily Reminders script. At the same time, I can maintain the current "regular" scheduling already present in this thermostat script.


    - This script already is capable of supporting different Thermostat plugins which use the existing HS API.
    However, I have a question here! Does Homeseer allow for multiple Thermostat plugins to be installed and used simultaneously? IE could one have both an X-10 Thermostat and a Z-Wave thermostat plugin operate simultaneously. If this is the case, I can add such support to the script.
    I'd need to know however how HS would deal with several of each type of thermostat being present. For instance, I know HS identifies thermostats by Unit Number within a given plugin... If you have three Z-Wave Thermostats, they would be Units 1, 2, and 3. Now; if you also have two X10 Thermostats installed, are they Units 1 and 2 under that plugin, or will HS somehow identify the whole set as units 1, 2, 3, 4 and 5?


    Thanks anyone.
    Real courage is not securing your Wi-Fi network.

    Comment


    • #3
      Wadenut,

      I'm very interested in seeing your script updated. I tryed BLStat, but couldn't get it to work on my system. My home has 2 A/C units. I'm using a 2GIG CT100 on each one. Unfortunately this TStat doesn't have it's own internal scheduler, so I'm totaling dependent on HS. (I originally used Honeywell TH8320ZW1007/U, but had problems with them. They somehow managed to run my A/C compressors without running the units fan.) I've thought about trying to write a T-Stat Scheduler script myself, but I've only had my HS about a year and I'm still relying on events, because I've haven't found the time to learn VB.net.

      Some functionality ideas that I think would be useful for T-Stat scheduler are:
      1) Automatic "Season" change over based on outside temp setpoint (I'm currently using a RFXrec433 with the HS RFXCom Plugin and Oregon Scientific THGN132ES Temp Sensor) The script should select a winter vs summer schedule automatically depending on the "Season"
      2) Three types of schedules a "14-Day", "Away (Vacation)" and "Override (Stay Home)". I think two versions of each schedule would be required to accommodate the "Season" mode. Other option would be an temp offset. For example, in the summer we tend to set the T-Stat at 70 degree's F, but in the winter it's usually at 73 degree's F.
      ___a) "14 day schedule" normal work schedule. I have every other Friday off which requires a 14 day schedule.
      ___b) "Away" (Vacation) Schedule used when we are away from the house for extended periods.
      ___c) "Override" (Stay Home) Schedule used when we stay home rather than going to work
      3) When shifting the scheduler into the "Away" or "Override" mode, it should have a two choices for automatically returning to the "14-day schedule.
      ___a) a check box to return to normal schedule after midnight on the day it's placed in over-ride mode or
      ___b) a date box that allows you to enter the date the system should return to the normal 14 day schedule.
      4) It would also be nice to be able to use alternate temp sensors based on the time of day as a poor man's HAVC zone control (or a simpler option may be to average them). For example, One of my AC units serves our Great Room, Master Bedroom and Office. I have a Temp Sensor in the Great Room and the Master Bedroom. It would be nice to control the A/C unit using the Great Room Temp Sensor during the day and using the Master Bedroom Temp Sensor after we go to bed.
      5) Option to prevent multiple A/C units from running at the same time.

      I may be over-complicating the requirements, but when I purchased my HS I was hoping it would be easy to leverage the system to do things a TStat doesn't do on it's own. So far it appears that scripting is necessary for anything other than rudimentary functions. So 'm going to have to learn VB.net.

      Forrest

      Comment


      • #4
        Originally posted by kesterf View Post
        Some functionality ideas that I think would be useful for T-Stat scheduler are:
        1) Automatic "Season" change over based on outside temp setpoint (I'm currently using a RFXrec433 with the HS RFXCom Plugin and Oregon Scientific THGN132ES Temp Sensor) The script should select a winter vs summer schedule automatically depending on the "Season"
        I'd be interested in how I'd make that decision. Here at least, in the Spring, we might have several days of warm weather followed by another deep freeze. Vice Versa in the Fall. On my system, switching the tstat back and forth from heat to cool, winter to summer, repeatedly would throw everything into chaos... especially my fuel usage statistics.

        2) Three types of schedules a "14-Day", "Away (Vacation)" and "Override (Stay Home)". I think two versions of each schedule would be required to accommodate the "Season" mode. Other option would be an temp offset. For example, in the summer we tend to set the T-Stat at 70 degree's F, but in the winter it's usually at 73 degree's F.
        ___a) "14 day schedule" normal work schedule. I have every other Friday off which requires a 14 day schedule.
        ___b) "Away" (Vacation) Schedule used when we are away from the house for extended periods.
        ___c) "Override" (Stay Home) Schedule used when we stay home rather than going to work
        You can do this now by entering items for Home and Away modes separately. I'll likely maintain this feature in v2. An item can be scheduled for any: Day of the week, Month, Time of day, or any combination (Monday+January+12:20+Home or Tuesday+11:30+Away, etc). I may add a second field to track the status or value of a second device as well. This could be your Season.
        I'm currently working to add "days to repeat" items, intended for those on irregular work schedules. This is proving to be difficult to do while maintaining the existing formats which mimic a thermostats built in schedule.
        The plan is to make this as flexible as possible.

        3) When shifting the scheduler into the "Away" or "Override" mode, it should have a two choices for automatically returning to the "14-day schedule.
        ___a) a check box to return to normal schedule after midnight on the day it's placed in over-ride mode or
        ___b) a date box that allows you to enter the date the system should return to the normal 14 day schedule.
        This could get complicated.

        4) It would also be nice to be able to use alternate temp sensors based on the time of day as a poor man's HAVC zone control (or a simpler option may be to average them). For example, One of my AC units serves our Great Room, Master Bedroom and Office. I have a Temp Sensor in the Great Room and the Master Bedroom. It would be nice to control the A/C unit using the Great Room Temp Sensor during the day and using the Master Bedroom Temp Sensor after we go to bed.
        5) Option to prevent multiple A/C units from running at the same time.
        This is only intended to schedule setpoint changes on individual thermostats. The original idea was to mimic an actuall scheduling thermostat while under HS control.
        I may look at adding additional conditions to items in the list later on in the project.

        I may be over-complicating the requirements, but when I purchased my HS I was hoping it would be easy to leverage the system to do things a TStat doesn't do on it's own. So far it appears that scripting is necessary for anything other than rudimentary functions. So 'm going to have to learn VB.net.
        Learning some VB and/or VB.Net won't hurt anyone. I think HS is intended to be a little more than a 'consumer' product which is why these tools are made available to us.

        Enough of a teaser. I think V2 will turn out to be a universal thermostat scheduler. The approach I'm taking will make any setpoint changes by running a single automatically scheduled event. Thus, this doesn't have the overhead of a plugin.
        Real courage is not securing your Wi-Fi network.

        Comment


        • #5
          I'm nearing the point I could use one or two testers for Version 2.

          - It is working well with my Z-Wave thermostat.
          Setpoint schedules can currently be defined by 6 separate 'rules', covering most any requirement including irregular schedules (shift work). At least two more rules are possible but my head is already about to explode dealing with Date/Time calculations.

          - The event actively reschedules itself to the next valid schedule definition so a recurring event is not necessary.

          Right now, I'd like someone using a Z-Wave stat to verify my results, as well as someone with some other type of thermostat installed to be certain this is going to be compatible with plugins other than Z-Wave. So long as those plugins adhere to the HS SDK definitions, there should be no problem. Eventually, if there seems to be a need, I'll add support for multiple plugins simultaneously.

          - Ive been working with the date format MM-DD-YYYY. At this point, I'm not sure other formats are going to work. This too needs a tester.

          I'll hold off writing up some documentation until I know I have a victim, errr, I mean a volunteer or two.
          Real courage is not securing your Wi-Fi network.

          Comment


          • #6
            I'll take a stab at it. The web interface is of interest. I have two x10 stats and we have irregular schedules.

            Count me in for the "other" (non Zwave) category
            Paul

            Comment


            • #7
              Originally posted by pbibm View Post
              I'll take a stab at it. The web interface is of interest. I have two x10 stats and we have irregular schedules.

              Count me in for the "other" (non Zwave) category
              OK Paul.
              Send me an email. I'll start writing up some doc and send you a copy in a day or so. I don't want to post it just yet, as I've been adding functionality constantly this past week.

              What Plugin do you use with the X10 Stats? I'll do what I can to check for compatibility first.
              Real courage is not securing your Wi-Fi network.

              Comment


              • #8
                I believe this is ready now for public consumption. If all goes well, the new package will be posted within a day or two.
                As it stands, the script supports multiple thermostat plugins simultaneously as well as being capable of setting schedules for "virtual" thermostats. Schedules can be one time on a particular date/time, or recurring on various schedules, and repeating every x days. The latter is designed to be of particular interest to those on irregular work schedules. No programmable thermostat could do this on its own.
                I've tested with both "ZWave Thermostats" and "DooStat" (X10) and have no reason to believe it will not be compatible with other plugins as well.
                Real courage is not securing your Wi-Fi network.

                Comment


                • #9
                  Posted v2.01.02
                  Real courage is not securing your Wi-Fi network.

                  Comment


                  • #10
                    Oops

                    Originally posted by Wadenut View Post
                    Posted v2.01.02
                    Greg - I just downloaded and installed this and when I submit changes on the web page I get this error:

                    <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%"><TBODY><TR><TD class=LOGDateTime0 noWrap align=left>1/7/2013 11:32:41 AM </TD><TD class=LOGType0 colSpan=3 align=left>Error </TD><TD class=LOGEntry0 colSpan=8 align=left>Initializing script run: File 'C:\Program Files\HomeSeer HSPRO\scripts\Thermostat Scheduler.vb' not found.</TD></TR></TBODY></TABLE>
                    Of course, the file in the Scripts folder has a .vben extension, not .vb.

                    Also, I ran the scheduler through the Control Panel for an initial run, but I don't see the "Home Device".
                    <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%"><TBODY><TR><TD class=LOGDateTime1 noWrap align=left>1/7/2013 11:30:39 AM </TD><TD class=LOGType1 colSpan=3 align=left>Warning </TD><TD class=LOGEntry1 colSpan=8 align=left>A thermostat event was scheduled for 1/6/2013 7:55:00 AM but was delayed more than 15 minutes. The event was skipped.</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>1/7/2013 11:30:39 AM </TD><TD class=LOGType0 colSpan=3 align=left>Warning </TD><TD class=LOGEntry0 colSpan=8 align=left>A thermostat event was scheduled for 1/6/2013 6:00:00 AM but was delayed more than 15 minutes. The event was skipped.</TD></TR><TR><TD class=LOGDateTime1 noWrap align=left>1/7/2013 11:30:39 AM </TD><TD class=LOGType1 colSpan=3 align=left>Warning </TD><TD class=LOGEntry1 colSpan=8 align=left>A thermostat event was scheduled for 1/5/2013 8:00:00 PM but was delayed more than 15 minutes. The event was skipped.</TD></TR><TR><TD class=LOGDateTime0 noWrap align=left>1/7/2013 11:30:39 AM </TD><TD class=LOGType0 colSpan=3 align=left>System </TD><TD class=LOGEntry0 colSpan=8 align=left>Control Panel Immediate Script: &hs.Run "Thermostat Scheduler.vben"</TD></TR></TBODY></TABLE>
                    Is the script supposed to create this automatically or do I have to manually create it? (I know the skipped events are from the samples in your default data file.)

                    Thanks
                    Steve

                    (System configuration is in my profile)

                    Comment


                    • #11
                      Crap. I thought I'd changed that before I packaged it. I'll fix it now.
                      Real courage is not securing your Wi-Fi network.

                      Comment


                      • #12
                        I still have both versions in my scripts folder, so the problem didn't show up here. Fixed now. Thanks for alerting me.
                        Real courage is not securing your Wi-Fi network.

                        Comment


                        • #13
                          Originally posted by spknapp View Post
                          Greg - I just downloaded and installed this and when I submit changes on the web page I get this error:

                          Of course, the file in the Scripts folder has a .vben extension, not .vb.

                          Also, I ran the scheduler through the Control Panel for an initial run, but I don't see the "Home Device".Is the script supposed to create this automatically or do I have to manually create it? (I know the skipped events are from the samples in your default data file.)

                          Thanks
                          2nd part of your report...
                          The Home device is user supplied. It's intended to be the (optional) device you may use to determine Home or Away status in Homeseer. If you don't use such a device, you'd leave the field blank in your schedules.
                          The design here is Home = ON, Away = OFF. A schedule would need to match that status to be executed.
                          Real courage is not securing your Wi-Fi network.

                          Comment


                          • #14
                            ????

                            Originally posted by Wadenut View Post
                            ... Fixed now...
                            Now I get a different error:
                            <TABLE border=0 cellSpacing=2 cellPadding=0 width="100%"><TBODY><TR><TD class=LOGDateTime0 noWrap align=left>1/7/2013 12:25:50 PM </TD><TD class=LOGType0 colSpan=3 align=left>Error </TD><TD class=LOGEntry0 colSpan=8 align=left>Running script: File not found: C:\Program Files\HomeSeer HSPRO\html\ThermostatScheduler.asp</TD></TR></TBODY></TABLE>
                            I just copied the new ash file to the html directory.

                            ????
                            Steve

                            (System configuration is in my profile)

                            Comment


                            • #15
                              Originally posted by spknapp View Post
                              Now I get a different error:I just copied the new ash file to the html directory.

                              ????
                              OK. We'll get you going Steve.
                              Try 2.01.04. (just the .ash file again)
                              Last edited by Wadenut; January 7th, 2013, 01:57 PM.
                              Real courage is not securing your Wi-Fi network.

                              Comment

                              Working...
                              X