Announcement

Collapse

Contacting HomeSeer This Week

HomeSeer is open and operational this week. All orders are being processed and shipped as usual. However, some staff are working from home. If you need to contact HomeSeer for support or customer service, please use our Email or Chat options. https://homeseer.com/contact-us/
See more
See less

RCS-PDT BasicStat (all RCS/PDT X-10 thermostats control)

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

  • RCS-PDT BasicStat (all RCS/PDT X-10 thermostats control)

    I posted a new thermostat script BasicStat.zip in the Library forum. It is designed to provide basic and reliable control for all RCS and PDT bi-directional and uni-directional X-10 thermostats. I have been using it successfully with my multitude of different models and versions, and it works well.

    The README is appended below.

    -Kurt




    <HR>Table of Contents


    1. Overview
    2. Requirements
    3. Installation
    4. Basic Operation
    5. Advanced Operation
    6. Technical Details
    7. Change History
    8. Support


    Overview

    RCS-PDT BasicStat is designed to provide Basic and Reliable control of all RCS and PDT X-10 communicating thermostats from HomeSeer.
    Basic

    What Is Supported
    All RCS and PDT X-10 controlled thermostats: bi-directional (TXB16, TX15-B, PDT20) and uni-directional (TX15, TX10, PDT15, PDT10)
    System Modes Heat, Cool, Automatic and Off
    Fan Modes Automatic and On

    Fahrenheit and Celsius temperature scales

    What Is Not Supported
    Dual setpoints (separate Heat and Cool setpoints)
    Setback Mode
    Reliable

    With a bi-directional thermostat, advanced capabilities are used to enhance reliability.
    Advanced thermostat modes are fixed to provide the most capable and reliable operation.
    Status display in HomeSeer is only updated upon positive acknowledgement from the thermostat that the desired change was accomplished.
    Thermostat control from other controllers is allowed, and HomeSeer Status will be updated.

    Go To Top


    Requirements

    This script was developed and tested on HomeSeer version 2.2. It should work on prior versions, and later versions until HomeSeer removes Thermostat Script support.

    Go To Top


    Installation

    One-Time BasicStat Script Installation


    • <LI class=MsoNormal>Unzip <CODE>BasicStat.zip</CODE> into your HomeSeer Scripts directory (C:\Program Files\HomeSeer 2\Scripts by default). <LI class=MsoNormal>Start HomeSeer. <LI class=MsoNormal>Click the <INPUT class=bluebutton type=button alt=Setup value=Setup> button. <LI class=MsoNormal>Click the <INPUT class=bluetab type=button alt="Device Types" value="Device Types"> tab. <LI class=MsoNormal>Under Device Type, select (New Device Type). <LI class=MsoNormal>Under New Name:, type RCS-PDT BasicStat (the exact spelling is important). <LI class=MsoNormal>Click the Thermostat Device checkbox. <LI class=MsoNormal>Click the <INPUT class=brightgreenbutton type=button alt="Check Changes" value="Check Changes"> button. <LI class=MsoNormal>Under Thermostat Script, select RCS-PDT_BasicStat.thm.
    • Click the <INPUT class=brightgreenbutton type=button alt=Save value=Save> button.

    For Each Thermostat


    • <LI class=MsoNormal>Click the <INPUT class=bluebutton type=button alt=Status value=Status> button. <LI class=MsoNormal>Click the <INPUT class=greenbutton type=button alt="Add Device" value="Add Device"> button. <LI class=MsoNormal>Next to Device Name:, enter a descriptive name such as Thermostat or Furnace. <LI class=MsoNormal>Select a Location: and Location 2: (both optional). <LI class=MsoNormal>Next to Device Type:, select RCS-PDT BasicStat. <LI class=MsoNormal>Select the HousecodeUnitcode 1. <LI class=MsoNormal>Click <INPUT class=brightgreenbutton type=button alt=Save value=Save>. <LI class=MsoNormal>Click <INPUT class=yellowbutton type=button value=Heat>. The Status column updates to show the thermostat has not been initialized.<LI class=MsoNormal>Click <INPUT class=greenbutton type=button value=Refresh>. You will now see three <INPUT class=orangebutton type=button value="Test Table ..."> buttons to test the communication capabilities of your thermostat. <LI class=MsoNormal>Click <INPUT class=orangebutton type=button value="Test Table PD">. The Preset Dim table test will take approximately three minutes to complete. You can click <INPUT class=greenbutton type=button value=Refresh> to monitor the status of the testing. The Status column will show when the test is completed and the result.<LI class=MsoNormal>If the Preset Dim test shows Not Supported in the Status column, then click <INPUT class=orangebutton type=button value="Test Table P"> while observing the thermostat. The test will take approximately 30 seconds. You will see the thermostat display change during the test. Select the appropriate choice for how the thermostat display changed.<LI class=MsoNormal>Repeat step 11 for <INPUT class=orangebutton type=button value="Test Table B">.
    • When finished testing the command table(s), click <INPUT class=orangebutton type=button value="Finished Testing Tables"> on the thermostat device. This may take up to five minutes to complete. You can click <INPUT class=greenbutton type=button value=Refresh>. When the thermostat device shows the current system mode, fan mode and setpoint, and the three Test Table devices are gone, BasicStat has completed initializing the thermostat and it is now ready to operate.

    Go To Top


    Basic Operation



    For a uni-directional thermostat, the Status column will be immediately updated to show the last commands sent to the thermostat.

    For a bi-directional thermostat, the Status column will only be updated when the thermostat acknowledges the change. This can take between two seconds, and three minutes. Click the <INPUT class=greenbutton type=button value=Refresh> button. If the thermostat does not acknowledge after five attempts (about three minutes), the Status will remain unchanged, a warning will be logged in the event <INPUT class=bluebutton type=button alt=Log value=Log>, and BasicStat will launch the <device> Change Not Verified event that was created during initialization. You can add actions to this event to speak, send an email, or other HomeSeer actions.

    You can also use <INPUT class=bluebutton type=button alt=Events value=Events> to control the thermostat. Click <INPUT class=greenbutton type=button value="Add Event">. Set options on the <INPUT class=bluetab type=button value=Name> and <INPUT class=bluetab type=button value=Trigger> tabs. On the <INPUT class=bluetab type=button value=Action> tab, under Add Action:, choose Thermostat Action.

    Go To Top


    Advanced Operation

    Logging

    You can change the amount of information that is written to HomeSeer's log. Device %99 is the RCS-PDT BasicStat Logging Mode. To see this device, next to Location: choose RCS-PDT BasicStat. This device is hidden by default, so click Show All to view it. The default value is Log Commands which logs the commands to and from the thermostat. You can choose Log Temperatures to also log the current temperature reported by the thermostat. Log Debug Simple and Log Debug Advanced will also log detailed information about the processing of the thermostat script.
    Script Events


    Several events are created during initialization:
    • RCS-PDT BasicStat Maintenance is triggered daily to delete extra devices and events after a thermostat device has been deleted.
    • <DEVICE>Thermostat Re-Initialize is triggered daily to reset the communication modes with the thermostat.
    • <HOUSECODE>X10 Received and <HOUSECODE>X10 Received Processing are triggered whenever an X-10 command is received from the thermostat's house code. The script can then decode the command and update the thermostat's status.
    • <DEVICE>Verify Change is triggered 45 seconds after the script sends a command to the thermostat. If the thermostat has not acknowledged the command, this event will try four more times to make the change and verify the thermostat accepted the change.
    • <DEVICE>Change Not Verified is triggered if the thermostat has not acknowledged a change after five attempts. This event is created without any actions. You can add HomeSeer actions such as to speak "The thermostat is not responding" or send an email.
    • <DEVICE>Thermostat Poll is triggered by the Verify Change event if necessary.
    • <DEVICE>Table Change is only created for uni-directional thermostats that support both Decode Table P and Decode Table B. It is triggered if you change the value of the Command Table device.

    Script Limitations


    • Single Setpoint: This script supports only one (the current) setpoint. If the thermostat is currently in Heat mode, the thermostat will interpret the received setpoint from this script as the Heat setpoint. If in Cool mode, it will interpret the received setpoint as the Cool setpoint. For this reason, you should always set/change the system operating mode before changing the setpoint.
    • No Setback Mode: This script does not directly support Setback Mode (lowering the setpoint a fixed number of degrees in heat mode, or raising the setpoint a fixed number of degrees in cool mode). However, if the thermostat is placed in Setback Mode by another X-10 controller, or reports a change in Setback Mode, this script will recognize that. It will poll the thermostat for it's current setpoint and update HomeSeer's status display.
    • Setpoint Range:

    Go To Top


    Technical Details

    Associated Devices


    For each thermostat device created with a <HOUSECODE>1 HouseCode:UnitCode, there are five additional devices created with HouseCode=% and UnitCode=<1 to 80>. The UnitCode number is based on the HouseCode: HouseCode=A will have associated devices %1 through %5. HouseCode=B will have associated devices %6 through %10, etc. These associated devices are hidden by default and are made visible with the Show All button. These device values are hidden because they show status only, and do not allow control. Their status is reflected in the Status of the primary <HOUSECODE>1 thermostat device. The associated devices are:
    1. Temperature: For bi-directional thermostats only, this device shows the last received temperature and time from the thermostat. For uni-directional thermostats, this device's status will always be Unknown.
    2. Setpoint: For bi-directional thermostats, this device's status and time reflect the most recent setpoint reported by the thermostat; either by this script, some other X-10 controller on the system, or human control at the thermostat. For uni-directional thermostats, the status and time are the last time a command was sent to the thermostat by this script, or another X-10 controller on the system.
    3. Mode: The same logic as Setpoint.
    4. Fan: The same logic as Setpoint.
    5. Command Table: The possible values of this device are set during the initialization testing process. The current value of this device determines how the script will communicate with the thermostat.

    Initialization


    • Test Table PD (device _21): For bi-directional Preset Dim capable thermostats, Set Test Mode Off commands are sent to the thermostat to determine if it supports Version 1, 3 or 4 of the Preset Dim command table. The script will decide, based on the responses from the thermostat, which, if any, of the Preset Dim tables it supports. At the end of the testing initiated with this button, the status of the test device will show Not Supported, Preset Dim V1 Supported, Preset Dim V3 Supported or Preset Dim V4 Supported. If the result is not as you expected, you may repeat the Test Table PD test as many times as you like prior to Finished Testing Tables.
    • Test Table P (device _22) and Test Table B (device _23): These test results are only used for uni-directional thermostats when the Test Table PD result is Not Supported or Not Tested. These test buttons first select the appropriate table with the All Lights On or All Units Off command, then send a setpoint command to the thermostat. The user has to manually select how the thermostat reacted to the setpoint command (setpoint changed to a known value, or some other change).
    • Finished Testing Tables: Once the command table capabilities of the thermostat are recorded in the three Test Table devices, the user has to click Finished Testing Tables. This will complete the initialization of the thermostat by creating the associated devices and events listed above, setting the possible values of the Command Table device, and initializing the command table and communication modes for the thermostat.

    Bi-Directional Communication Modes


    After extensive testing, in a marginally reliable X-10 environment, with different RCS Preset Dim table version models, the following communication modes have yielded the most reliable operation and communications between HomeSeer and the thermostat. Thus, these modes are hard-coded into this script and are re-set every morning at 4:XX AM by the Re-Initialize Thermostat event.
    • Ack = Off
    • Echo = On
    • AutoSend = On
    • Safe = Off
    • Dual SP Reporting = Off

    Debug Logging

    For the technically curious (and knowledgeable of RCS X-10 thermostats), Log Debug Simple will give you enough information to follow the logic, decision points, and processing of this script. About ten extra log lines are generated for each interaction with the thermostat. Command decodings (translations), received queue processing, and major internal decision points are logged.


    For the technically adventurous, Log Debug Advanced will generate about 50 extra log lines for each thermostat interaction. Nearly every subroutine entry and exit, internal variable change and other technical minutiae is logged.
    Go To Top


    Change History


    • Ver 1.00, 18 April 2008: Initial release

    Go To Top


    Support

    I am making this script freely available to the HomeSeer community for non-revenue-generating purposes. My primary motivation in writing this script was to control uni-directional thermostats that I bought cheaply from eBay. After purchase I discovered, much to my surprise and chagrin, that nothing already existed to control them. The bi-directional functions were added to provide the same reliable operation to the more capable bi-directional thermostats.

    If you find actual bugs in this script (things don't work correctly as listed in this README), I would definitely like to know about those and fix them. If you have suggestions to make this script more useable, while keeping with its Basic and Reliable goals, then I would also like to hear those. Other advanced features that don't support my Basic and Reliable goals (Setback Mode, changeable Communications Modes, Decode Table commands for a bi-directional thermostat, etc.), will probably never be implemented.

    To contact me regarding this script, you can email kurtlutterman at comcast dot net.

    Go To Top




  • #2
    I am trying out your script. It seems to be working fine except for one error I get in the log:

    7/13/2008 9:30:34 PM - Error - Web Server Error 404, cannot serve file: C:\Program Files\HomeSeer 2\html/stif

    Am I missing this? I don't think it was in the zip file.

    Thanks,
    Steve

    Comment


    • #3
      In a year of developing, testing and using this script, I had never seen that error... until this morning. I just added my 7th through 9th RCS thermostats to my system last week. So I suspect this error may be related to multi-tasking/sharing/resource issues when HomeSeer gets busy.

      The literal meaning of the error is that the HomeSeer web server couldn't execute the "/stif" POST method of the status page form. Hover over any control buttons on the status page, and you'll see this in the status bar of your browser.

      The thermostat script itself makes a determined effort to minimize any kind of looping or waiting. So I don't think it's a thermostat script problem per se. But if this error happens a lot to me in the future, I may rewrite it as a plug-in.

      -Kurt

      Comment


      • #4
        FWIW, I don't know what the error message is, but everything seems to be working good so far. I am using this with 2 thermostats one set to House code J and one to K. The only problem I had was some of my Insteon switches use the _21, _22, and _23 codes. They were erased when programming the thermostat. I just had to reprogram them after I finished loading your scripts.

        One other question, what Tables have you been using for TX15B and TX16 thermostats?

        Thanks,
        Steve

        Comment


        • #5
          Thanks for letting me know about the Insteon devices using those other codes. I'll revise the script in a future version.

          When you first installed the RCS-PDT BasicStat device and pushed the "Test Table PD" button, if the script established two-way communication with your thermostat, then it will use the Preset Dim table. Although your thermostat will respond to Table P, Table B and/or Table L commands, the BasicStat script doesn't use those. If you click the Show All button on the Status screen, the Thermostat Command Table device will show you which Command Table your thermostat is using.

          -Kurt

          Comment


          • #6
            so will this work with a RCS TX16B thermostat? Just got mine in the mail from a friendly user here and now I am starting to look into the plugins...
            I do not have it hooked up yet physically.. but just lookin around...

            ~Jeff
            HW - i5 4570T @2.9ghz runs @11w | 8gb ram | 128gb ssd OS - Win10 x64

            HS - HS3 Pro Edition 3.0.0.435

            Plugins - BLRF 2.0.94.0 | Concord 4 3.1.13.10 | HSBuddy 3.9.605.5 | HSTouch Server 3.0.0.68 | RFXCOM 30.0.0.36 | X10 3.0.0.36 | Z-Wave 3.0.1.190

            Hardware - EdgePort/4 DB9 Serial | RFXCOM 433MHz USB Transceiver | Superbus 2000 for Concord 4 | TI103 X-10 Interface | WGL Designs W800 RF | Z-Net Z-Wave Interface

            Comment


            • #7
              I am using both a TX-15B and and TX-16 both having no problems with. I am using the TX15B with housecode J and TX16 with housecode K. Both working great.

              Hope that helps.

              Thanks,
              Steve

              Comment


              • #8
                Originally posted by TeleFragger View Post
                so will this work with a RCS TX16B thermostat?
                Yes, it works with all the RCS & PDT X-10 thermostats.

                - Kurt

                Comment

                Working...
                X