This page documents how to use StatNetDriver (in StatNetDriver.dll), the HomeUX-compatible driver that controls an Enerzone StatNet thermostat network. StatNetSimulator (in StatNetSimulator.dll) is also documented here.
Page contents:
An Enerzone StatNet thermostat network is a collection of thermostats connected to a central control unit, which in turn can be controlled via serial port.
StatNetDriver allows a HomeUX installation to control a subset of the functionality of a StatNet thermostat network:
StatNetDriver is configured in the HomeUX configuration file. Here's the general structure (simplified):
XML |
<configuration>
<HomeUXSettings>
</Device>
</HomeUXSettings>
</configuration>
|
"*" means "zero or more allowed". Children of <Device Driver="StatNetDriver.dll"> can appear in any order.
Example:
XML |
<configuration> ... <HomeUXSettings> ... <Device Name="StatNet" Driver="StatNetDriver.dll" Scale="Fahrenheit" sim:SerialPort="StatNetSimulator.dll;;Units=4;OutTemp=45;Test=0" real:SerialPort="COM16,9600,8,n,1"> <Thermostat Id="1" Name="Living Room" /> <Thermostat Id="2" Name="Master Bedroom" /> <Thermostat Id="3" Name="Game Room" /> <Thermostat Id="4" Name="Guest Area" /> </Device> ... </HomeUXSettings> </configuration> |
The following subsections describe the StatNetDriver configuration file XML elements.
(Required, used within <HomeUXSettings>.) Specifies an instance of StatNetDriver, which is used to control a StatNet thermostat network.
XML |
<Device
Name="..."
Scale="..."
Driver="StatNetDriver.dll"
SerialPort="...">
</Device>
|
"*" means "zero or more allowed".
Name
(String, required.) The name you assign to the device.
Driver
(String, required.) Must be "StatNetDriver.dll".
Scale
(String, required.) Specifies the measurement units that the thermostat uses; must be either "Fahrenheit" or "Celcius".
SerialPort
(String, required.) A standard HomeUX serial port specification. Identifies the serial port (real or virtual) that the hardware is connected to. When connected to a real serial port, the parameters should be "port-name,9600,8,n,1" in order to correctly operate a StatNet thermostat network.
(Zero or more, used within <Device Driver="StatNetDriver.dll">.) Specifies one thermostat on the StatNet thermostat network.
XML |
<Thermostat
Id="..."
Name="..."
/>
|
Id
(Integer, required.) The thermostat number (1 or above).
Name
(String, required.) The name you assign to the thermostat. This name appears within alert messages, and is used within the SyncPath schema.
StatNetDriver implements the following SyncPath schema:
StatNetSimulator is a HomeUX-compatible virtual serial port implementation that simulates a subset of the serial communication behavior of StatNet hardware. StatNetSimulator performs no real-world actions—the simulation is purely for the purposes of testing a HomeUX installation without having to connect to real hardware.
To use StatNetSimulator in HomeUX, set the SerialPort attribute of the <Device Driver="StatNetDriver.dll"> configuration element to a string with the following format:
StatNetSimulator.dll;;Units=unit-count;OutTemp=outdoor-temperature;Test=test-number
Parameters:
unit-count is the number of simulated thermostats on the StatNet network. The default is 1.
outdoor-temperature is the simulated outdoor temperature in Fahrenheit degrees. This affects how the room temperature will change when the HVAC system is not running. The default is 50.
test-number specifies test behavior. This is for development use only; use 0 to specify normal behavior. The default is 0.
You can test StatNetSimulator independently of HomeUX, using the VSerial console application:
VSerial.exe -cr -dll StatNetSimulator.dll;;Units=unit-count;OutTemp=outdoor-temperature;Test=test-number
StatNetSimulator implements a limited simulation—only the following hardware commands are currently supported. (See StatNet hardware documentation for information about hardware commands and notifications.)
"SN?": Lists all thermostats. Syntax:
The output looks like this (example):
SN1
SN2
SN3
"SN SCALE=": Sets the units (Fahrenheit or Celcius) to use for all thermostats. Syntax:
units is "F" for Fahrenheit or "C" for Celcius.
The output looks like this (example):
SN1 SCALE=F
SN2 SCALE=F
SN3 SCALE=F
"SN C=": Enables reporting of "change of state" notifications for all thermostats. Syntax:
notification-number is one of the following:
The output looks like this (example):
SN1 C1=ON
SN2 C1=ON
SN3 C1=ON
"SN T?": Lists the current actual temperature at each thermostat. Syntax:
The output looks like this (example):
SN1 T=73F
SN2 T=72F
SN3 T=65F
"SN M?": Lists the mode of each thermostat. Syntax:
The output looks like this (example):
SN1 M=AUTO
SN2 M=COOL
SN3 M=OFF
"SN SH?": Lists the heating set point of each thermostat. Syntax:
The output looks like this (example):
SN1 SH=72F
SN2 SH=74F
SN3 SH=66F
"SN SC?": Lists the cooling set point of each thermostat. Syntax:
The output looks like this (example):
SN1 SC=76F
SN2 SC=78F
SN3 SC=69F
"SN HVAC?": Reports the HVAC relay states of all thermostats. Syntax:
The output looks like this (example):
SN1 HVAC=G-Y1-W1-Y2-W2-B-O-
SN2 HVAC=G+Y1-W1-Y2-W2-B+O-
SN3 HVAC=G+Y1-W1-Y2-W2-B+O-
The format of the HVAC codes are the same as those of HVAC notifications, described below.
"SN M=": Sets the mode of a given thermostat. Syntax:
thermostat-number is the thermostat number (e.g. 1); mode is one of the following:
The output has the same format as for the "SN M?" command, except only output for the specified thermostat is listed.
"SN SH=": Sets the heating set point of a given thermostat. Syntax:
thermostat-number is the thermostat number (e.g. 1); temp the integer temperature value (in the units specified by the "SN SCALE=" command), e.g. "72".
The output has the same format as for the "SN SH?" command, except only output for the specified thermostat is listed.
"SN SC=": Sets the cooling set point of a given thermostat. Syntax:
thermostat-number is the thermostat number (e.g. 1); temp the integer temperature value (in the units specified by the "SN SCALE=" command), e.g. "78".
The output has the same format as for the "SN SC?" command, except only output for the specified thermostat is listed.
If notifications are enabled (see the "SN C=" command), notifications may be sent which mirror the replies from the "SN T?" and "SN HVAC?" commands. Examples of notifications that could be sent by the simulated hardware:
HVAC notifications reflect which relays are energized:
(The letters indicate the relay terminal color coding.)
So, for example, if W1 or W2 are "+", the thermostat is requesting that the HVAC system generate warm air. If Y1 or Y2 are "+", the thermostat is requesting that the HVAC system generate cool air.
Sometimes a notification may arrive in the middle of a reply to a command (though, in the current simulator implementation, this only happens if "Test=1" is specified). For example, the following may be received in response to an "SN T?" command:
SN1 T=74F
SN2 T=73F
SN3 T=65F
SN4 HVAC=G+Y1-W1-Y2-W2-B+O-
SN4 T=70F
Note the "HVAC" notification between the "SN3" and "SN4" lines of the reply.