Announcement

Collapse
No announcement yet.

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)

    RCS-PDT BasicStat
    Thermostat script for HomeSeer 2.2
    Will control all RCS & PDT X-10 communicating thermostats, bi-directional and uni-directional.




    <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



    Attached Files
Working...
X