HomeUX Driver Collection
Using StatNetDriver

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:

Hardware & Driver Overview

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:

Configuring StatNetDriver

StatNetDriver is configured in the HomeUX configuration file. Here's the general structure (simplified):

XML
<configuration>
</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.

<Device Driver="StatNetDriver.dll">

(Required, used within <HomeUXSettings>.) Specifies an instance of StatNetDriver, which is used to control a StatNet thermostat network.

Syntax
XML
<Device
Name="..."
Scale="..."
Driver="StatNetDriver.dll"
SerialPort="...">
</Device>

"*" means "zero or more allowed".

Attributes

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.

<Thermostat>

(Zero or more, used within <Device Driver="StatNetDriver.dll">.) Specifies one thermostat on the StatNet thermostat network.

Syntax
XML
<Thermostat
Id="..."
Name="..."
/>
Attributes

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.

Using StatNetDriver

StatNetDriver implements the following SyncPath schema:

StatNetSimulator

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:

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.)

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.