instruction manual
ViewStat
Programming Protocol Reference Guide
HVAC Controls
AMX Limited Warranty and Disclaimer
AMX Corporation warrants its products to be free of defects in material and workmanship under normal use for
three (3) years from the date of purchase from AMX Corporation, with the following exceptions:
• Electroluminescent and LCD Control Panels are warranted for three (3) years, except for the display and touch
overlay components that are warranted for a period of one (1) year.
• Disk drive mechanisms, pan/tilt heads, power supplies, MX Series products, and KC Series products are
warranted for a period of one (1) year.
• Unless otherwise specified, OEM and custom products are warranted for a period of one (1) year.
• Software is warranted for a period of ninety (90) days.
• Batteries and incandescent lamps are not covered under the warranty.
This warranty extends only to products purchased directly from AMX Corporation or an Authorized AMX Dealer.
AMX Corporation is not liable for any damages caused by its products or for the failure of its products to perform.
This includes any lost profits, lost savings, incidental damages, or consequential damages. AMX Corporation is not
liable for any claim made by a third party or by an AMX Dealer for a third party.
This limitation of liability applies whether damages are sought, or a claim is made, under this warranty or as a tort
claim (including negligence and strict product liability), a contract claim, or any other claim. This limitation of
liability cannot be waived or amended by any person. This limitation of liability will be effective even if AMX
Corporation or an authorized representative of AMX Corporation has been advised of the possibility of any such
damages. This limitation of liability, however, will not apply to claims for personal injury.
Some states do not allow a limitation of how long an implied warranty last. Some states do not allow the limitation or
exclusion of incidental or consequential damages for consumer products. In such states, the limitation or exclusion of
the Limited Warranty may not apply. This Limited Warranty gives the owner specific legal rights. The owner may
also have other rights that vary from state to state. The owner is advised to consult applicable state laws for full
determination of rights.
EXCEPT AS EXPRESSLY SET FORTH IN THIS WARRANTY, AMX CORPORATION MAKES NO
OTHER WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. AMX CORPORATION
EXPRESSLY DISCLAIMS ALL WARRANTIES NOT STATED IN THIS LIMITED WARRANTY. ANY
IMPLIED WARRANTIES THAT MAY BE IMPOSED BY LAW ARE LIMITED TO THE TERMS OF THIS
LIMITED WARRANTY.
Table of Contents
Table of Contents
ViewStat Programming Protocol .............................................................................1
Network Communication ................................................................................................... 1
Explicit Address Commands .................................................................................................... 1
Global Address Commands ..................................................................................................... 2
Unsolicited Responses............................................................................................................. 2
Multiple Commands ................................................................................................................. 3
Network Override or Hold.................................................................................................. 4
How to Detect When a Thermostat Has Gone Off-line ............................................................ 4
Command Set Syntax ....................................................................................................... 5
Command Response Syntax............................................................................................. 5
Programming Quick Reference ......................................................................................... 6
Communication Control Commands ............................................................................... 10
Thermostat Sensing Commands.................................................................................... 15
Thermostat HVAC Operational Commands .................................................................... 18
Text Messaging Commands............................................................................................ 25
Text Messaging Support Characters...................................................................................... 25
Keypad Lockout Commands ........................................................................................... 30
Auxiliary Information Commands .................................................................................... 33
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
i
Table of Contents
ii
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
ViewStat Programming Protocol
You can program the Viewstat to perform a wide variety of operations using SEND_STRING
commands. The Viewstat is designed to automatically echo each command you send to the
thermostat. For example, if you send a
system automatically echoes
SN9=SCALE?. Then, the system will generate a reply when the
operation is complete that shows the current temperature scale. This section contains timing and
command descriptions, and lists communication control and thermostat commands.
To communicate with the control system, set the baud to 9,600, data bits to 8, parity
to none, and stop bits to 1.
For most applications, the NetLinx module for the ViewStat can be used, eliminating the need to
manually generate any code at all for the ViewStat. For detailed information on using the module,
refer to the ViewStat Communicating Thermostat Instruction Manual ("Using the NetLinx Module"
section), available on the AMX.COM web site.
SEND_STRING HVAC "'SN9 SCALE?',13" command, the
ViewStat Programming Protocol
Network Communication
Network communication is non-isolated, full duplex RS-422 using 4 + 1 wires. The 'A' terminals
are the transmit pair while the 'B' terminals are the receive pair. This nomenclature uses the host
computer as the reference, so transmit refers the lines on which the host transmits data to the
thermostat while receive refers to the lines on which the host receives data from the thermostat.
ASCII-based firmware, which is fully compatible with the StatNet command set, is defined below.
Up to 64 uniquely addressed devices are allowed on the network.
There are three response mechanisms depending on the nature of the command request:
! Explicit Address Commands
! Global Address Commands
! Unsolicited Responses
Explicit Address Commands
Explicit Address Commands are those commands that specify a single, particular address in the
command header (i.e.
each device connected will receive it into their buffer. The command will begin to be interpreted by
each device. Once the address is scanned, the entire command will be discarded if it is not that
unit's address. The unit that was explicitly addressed will complete the interpretation of the
command, act on it, and respond back to the host. Responses from an explicitly addressed
command can begin as quickly as 20 milliseconds after the command was sent, and not later than
330 milliseconds.
SN13 MODE=OFF). As this command is transmitted down the RS-422 bus,
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
1
ViewStat Programming Protocol
Global Address Commands
Global Address commands are those commands that do not specify any address in the command
header (i.e.
command is transmitted, each device connected will receive it into their buffer. Since there is no
address, the units will recognize this as a global command. Each unit will complete the
interpretation of the command, act on it, and respond back to the host. However, unlike the Explicit
commands where only one unit will be responding, global commands imply that each unit will be
responding. Therefore the responses from global commands must be scheduled to prevent
collisions over the communications channel. Each device waits for its turn to issue its response.
The order of the response coincides with the unit address. Therefore the thermostat with address #1
will respond first, then #2, #3, on up to #64.
Responses from a global command can begin as quickly as 20 milliseconds after the command was
sent. The actual time lapse for the first response is dependent on the lowest addressed device on the
thermostat network. If there was no address #1 on the channel, then the first response opportunity
will be idle; simply passing time until the next response opportunity. Of course, if there is no
address #2 either, then there will be a delay as this opportunity passes. If no response begins within
265 * (Lowest Address) milliseconds, then one or more of the units did not understand the
command, the unit is in
unit with the highest address on the channel. Since the highest allowed address is 64, the longest
delay time for the start of the last response is approximately 17 seconds.
SN T?). As with the Explicitly Addressed Commands described above, as this
QUIET or SILENT mode, or is off-line. The last unit to respond will be the
Do not skip addresses unless absolutely necessary to avoid unwanted delays in
responses.
Unsolicited Responses
Change-Of-State (
the
COS commands, when the COS has been turned "ON". There are twelve COS commands
described in detail in the Communication Control Commands section on page 10.
COS) responses are sent whenever a COS is detected for a condition specified in
COS responses
are sent so that a host computer connected to the thermostat network need not poll in order to see if
any thermostat variable change has taken place.
In unsolicited responses, no actual command has been sent down to solicit the response (once the
COS commands are sent, the unit will automatically respond on a change of state). Unsolicited
responses are scheduled according to address, in a similar manner to global responses. Each device
waits for its opportunity to come up, and issues its response at that time.
Unsolicited responses can begin as quickly as 20 milliseconds after the
global responses, unsolicited responses are issued only during the unit’s assigned opportunity.
COS was detected. As with
COS
responses will be received from a specific device no faster than X*265 milliseconds (X is defined
as the number of thermostats on the network , which is configurable in Thermostat Setup), since the
unit will only respond in its unique opportunity.
Since the signal used to synchronize every device is the <CR> terminator of a
command, the host must issue a <CR> every 12 hours. Note that any command
send down the communications link from the host qualifies as a synchronizing
transmission.
2
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
ViewStat Programming Protocol
Multiple Commands
Explicit commands, to one particular thermostat, can be issued and acted upon with no more than
20 milliseconds between each command. Responses must be received before moving to the next
thermostat to issue commands. Global commands can also be issued with no more than 20
milliseconds between commands if the Command Response (
or Silent (
SN CR=S). Responses, stationed in a buffer awaiting the opportunity to be sent, can
CR) has been set to Quiet ( SN CR=Q )
create a backlog and cause incoming commands to be disregarded. If global commands are to be
sent with the Command Response set to Normal (
SN CR=N), then the amount of time between any
set of two commands (the two commands must be separated by 20 milliseconds) must be 265
milliseconds times the "Number of Thermostats on the Network".
TIP: If responses are desired to a large number of commands, set the Command Response to Quiet,
send the commands (either globally or explicitly), then query individual thermostats (explicitly).
Return the command response to Normal when done. As an example consider a 64 thermostat
system. Now suppose the mode, fan, heat setting, cool setting and hold status were to be changed
on each thermostat. Further suppose that verification that all of these changes had been made were
required, and in addition the current temperature and remote temperature values were to be queried.
Using global commands, with the Command Response set to Normal, 17 seconds would be
required between each command. Five commands and two queries would be required (7 total
commands) requiring a total time of approximately two minutes.
Global Command Sequence: Explicit Command Sequence
SN M=A SN CR=Q
SN F=A SN M=A
SN SH=70 SN F=A
SN SC=75 SN SH=70
SN HOLD=OFF SN SC=75
SN T? SN HOLD=OFF
SN OT? SN1 M?
SN1 F?
SN1 SH?
SN1 SC?
SN1 HOLD?
SN1 T?
SN1 OT?
SN2 M?
:
SN64 OT?
SN CR=N
Sending five commands and seven queries to each thermostat explicitly would require
approximately 37 seconds.
To maximize communication speed consider the following:
1. Communicate at 19200 baud
2. Do not skip addresses on the thermostat network unless absolutely necessary.
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
3
ViewStat Programming Protocol
3. Set the "Number of Thermostats on the Network" to the highest addressed thermostat. If you
have only six thermostats address them 1 through 6 and set the highest address to six.
4. Only turn on the necessary change of state variables (COS - refer to the command
descriptions).
5. Send commands explicitly when possible.
6. When sending a large number of commands, set the Command Response to Quiet. If
responses are needed, explicitly query each thermostat on the network.
Network Override or Hold
Invoking Network Override causes the thermostat to disregard all received commands except
requests for data. This means that no response will be forthcoming. Network Override can be
invoked at the thermostat (by using the Enter button) or through the command set (
Unsolicited data transmission is unaffected. Should the thermostat be receiving communication
when Network Override is invoked, the reaction will be carried out following the reaction caused
by the communication signal.
If receiving no response to a command will cause disruption to your program, then there are two
options: disable this feature or begin every command transmission by "
the feature, ensure that Hold is "
Alternatively it could be disabled through the Thermostat Set Up menu.
SN HOLD=ON).
SN HOLD=OFF". To disable
OFF " at each thermostat and send the command " SN NETLK=1".
How to Detect When a Thermostat Has Gone Off-line
When a thermostat goes off-line (re-initializes) the Change of State (
default values -
OFF. The consequence of this occurring is that unsolicited responses will not be
COS) variables return to
sent by the thermostat (i.e. the automation system will not know when something has been changed
at the thermostat). There are two reasons that a thermostat will have gone off-line: the power had
been removed and reinstated or the Thermostat Set Up menu has been entered. When this occurs
the
COS variables must be reset. It is good practice to periodically check (once every 15 minutes is
a good start) that all thermostats are still responding. Simply query one of the
have turned on to verify it is still on. For example periodically send the command "
should receive the response "
SNx C2=ON "; where x is the address of each thermostat on the
COS variables you
SN C2?". You
network.
4
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
ViewStat Programming Protocol
Command Set Syntax
SN#[COMMAND][? OR =][VALUE] <CR>
Upper or lower case letters may be used for all commands. Invalid characters will immediately
invalidate a command, so the use of delete is not allowed (applies mainly when interacting with the
thermostat using HyperTerminal).
All Viewstat commands will begin with the characters
any intervening spaces (blanks), will be the address (
SN. Immediately following the SN, without
#) from 1 to 64 of the Viewstat with which you
are communicating. Single digit addresses may be sent as a two digit address with a leading zero.
Omitting the address, or using a 0 (zero) in place of a space makes the command global, and all
connected thermostats will respond. Following this initial command sequence, spaces may be
inserted at this point only, for clarity between commands. The next portion is the command or
variable
[? Or =] is the action to be performed: ? corresponds to "state your value", = corresponds to "set
[Command]. The table below describes the available commands. The next portion
your value". Spaces are allowed between the command and the action. The final portion,
[Value], is used only if a command or variable is to be set.
The value must follow the action with no intervening spaces. A carriage-return
used as the terminator for the command string. Line feeds (
LF) should not be sent with commands
<CR> (Enter) is
as this is a recognized ASCII character and invalidates any command received between the line
feed and the next carriage return.
EXCEPTIONS: The command SN? or SN0? will respond with all connected thermostats returning
their address. The command
BLTON performs its intended action without the need for a value.
Command Response Syntax
The ViewStat responds by supplying the information requested or by confirming the completion of
an action command. The response syntax is generally the same as that used for commands, but no
spaces separate command, action or value. Responses are sent in upper case ASCII format. Details
of the response can be found in the detailed description section for each command. Should a
command not be recognized, no response will be forthcoming - there is no
ERROR message.
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
5
ViewStat Programming Protocol
Programming Quick Reference
All of the commands are summarized in the following list. A detailed description of each
command follows the table. Unless otherwise noted as "Read Only" or "Write Only", all
commands are "Read and Write".
Programming Quick Reference
Command Description Value
CR Command Response Control Silent / Quiet / Normal
C1 Change of State (COS) - HVAC relays ON/OFF
C2 COS - Temperature ON/OFF
C3 COS - Remote Temperature ON/OFF
C4 COS - Contact Closures ON/OFF
C5 COS - Set Points ON/OFF
C6 COS - Network Override ON/OFF
C7 COS - Mode ON/OFF
C8 COS - Fan ON/OFF
C9 COS - Scroll Up activation ON/OFF
C10 COS - Scroll Down activation ON/OFF
C11 COS - Enter Button activation ON/OFF
C12 COS - Backlight Ready ON/OFF
CP Command Configuration Pattern 1 / 2
HOLD User Hold Status ON / OFF
NAME Location Name <String>
ID Report Model No. and software rev. Read Only
BAUD Specifies thermostat communication baud
SCALE Command Temperature Scale F / C (Fahrenheit/Celsius)
CT Controller Type; Temperature or Humidity. Set
TEMP, T Report Thermostat Room Temperature Read Only
HUM Report Thermostat Room Humidity Read Only
RSM Identify all remote sensors connected to a ther-
RxSy
(x = 1-4;
y = 1,2)
OT Report Thermostat Remote (outdoor) Temper-
R Report Thermostat Remote (outdoor) Temper-
OH Report Thermostat Remote Humidity Read Only
Communication Control Commands
rate.
Thermostat Sensing Commands
to Humidity only when auxiliary humidity control sensor is detected.
• 0 = Temperature controller
• 1 = Humidity controller
mostat's local communication network
Report value of any sensor on thermostat's
local communication network
ature
ature
9600, 19200
Read Only
Read Only
Read Only
Read Only
(Cont.)
6
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
ViewStat Programming Protocol
Programming Quick Reference (Cont.)
Command Description Value
Thermostat HVAC Operational Commands
SH Heat Mode Set Point Two digit integer: 40 - 88 for °F;
4 - 31 for °C
SH++ Increment heat set point Integer value which when added to the cur-
rent heat set point does not fall outside the
SH limits
SH-- Decrement heat set point Integer value which when deducted from
SC Cool Mode Set Point Two or three digit integer: 42 - 90 for °F;
SC++ Increment cool set point Integer value which when added to the cur-
SC-- Decrement cool set point Integer value which when deducted from
S Current Mode Set Point Two or three digit integer (see next two
SP++ Increment current mode set point Integer value which when added to the cur-
SP-- Decrement active set point Integer value which when deducted from
DIF1 Temperature control differential for 1st stage
heat/cool.
DIF2 Temperature control differential for 2nd stage
heat/cool.
OFFSET Amount to offset the display temperature from
the sensed temperature.
SHUM Humidify Mode set point Two digit integer: 10-90
SHUM++ Increment humidify set point Integer value which when added to the cur-
SHUM-- Decrement humidify set point Integer value which when deducted from
SDEH Dehumidify Mode set point Two digit integer: 10-90
SDEH++ Increment dehumidify set point Integer value which when added to the cur-
SDEH-- Decrement dehumidify set point Integer value which when deducted from
MODE,M Thermostat Mode of Operation A / C / H / E / OFF
FAN, F Fan Switch Setting A / ON (Auto/On)
HVAC, H Report HVAC Relay States Read Only
the current heat set point does not fall outside the SH limits
6 - 33 for °C
rent cool set point does not fall outside the
SC limits
the current cool set point does not fall outside the SC limits
commands )
rent mode set point does not fall outside
the SH and SC limits
the current mode set point does not fall outside the SH and SC limits
0.5° - 2° in 0.5° increments
0.5° - 2° in 0.5° increments
±3°, 1° increments
rent humidify set point does not fall outside
the SHUM limits
the current humidify set point does not fall
outside the SHUM limits
rent dehumidify set point does not fall outside the SDEH limits
the current dehumidify set point does not
fall outside the SDEH limits
(Auto/Cool/Heat/EMHT/Off)
Humid/Dehum when operating as a humidity controller.
(Cont.)
ViewStat Communicating Thermostat - Programming Protocol Reference Guide
7
ViewStat Programming Protocol
Programming Quick Reference (Cont.)
Command Description Value
HIBP Temperature value above which W1 terminal
LOBP Temperature value below which compressor
DATE Thermostat date value MMDDYY
TIME Thermostat time value HHMM
PMES1 1st message in the permanent message
PMES2 2nd message in the permanent message
PMES3 3rd message in the permanent message
PMES4 4th message in the permanent message
TMPMES Temporary message 32 character text string
MENU Operates the text messaging display in a User-
MSG User-Interactive message 32 character text string
FANLK Determines the degree to which the user is
MODELK Determines the degree to which the user is
NETLK Determines the degree to which the user is
UPDNLK Determines the degree to which the user is
LKTIME Time value (minutes) that an input change is
LKLIMIT Number limit that the increment/decrement is
CC Digital Input States All of these commands will simply return a
CO Digital Output States
Ln
(n = 1 to 4)
Thermostat HVAC Operational Commands (Cont.)
is locked out ( heat pump equipment configuration only).
terminals are locked out ( heat pump equipment configuration only).
Text Messaging Commands
sequence
sequence
sequence
sequence
Interactive mode. MSG is used to display messages when MENU is on.
Keypad Lockout Commands
locked out of fan control.
locked out of mode control.
locked out of network override control.
locked out of increment/decrement control.
allowed until it reverts back to the pre-change
value.
allowed to change when locked.
Monitoring Module Commands
Comm. Card LED Light 1,2,3 or 4
40° - 80°, 5° increments
0° - 40°, 5° increments
32 character text string
32 character text string
32 character text string
32 character text string
ON/OFF
0=no lockout,
1=time limited change,
2=total lockout
0=no lockout,
1=time limited change,
2=total lockout
0=no lockout,
1=total lockout
0=no lockout,
1=time limited change,
2=time and value limited change,
3=total lockout
Integer value between 0 and 255
Integer value between 0 and 20
response - no action at the thermostat
occurs. If inquired all will respond as
though all inputs/outputs/led's are OFF.
(Cont.)
8
ViewStat Communicating Thermostat - Programming Protocol Reference Guide