This script provides an interface for monitoring and controlling a Carrier ComfortZone II HVAC system from Linux.
You'll need an RS-485 connection to your ComfortZone II panel. You can use a serial-to-USB adapter connected locally (usually via /dev/ttyUSB0), or a serial-to-network adapter for remote management. Personally, I use a USR-W610 in Transparent Mode, connected via WiFi. The proper serial parameters are 9600,8,N,1.
You'll need the following non-core perl modules:
- Data::ParseBinary
- Digest::CRC
- IO::Termios (only if using a local serial connection)
- JSON
- Params::Validate
The cz2
script has two parameters which must be configured for your
installation, and one optional parameter. The preferred method of
configuration is to create a file called $HOME/.cz2
with the
following syntax:
# Configuration file for cz2
# Connection string. This should be hostname:port if you're using
# a TCP connection, or /dev/ttyXXX for a serial connection.
#
connect = CHANGEME
# Zone count OR list of zone names. This can be an integer number
# of zones, or a comma-separated list of zone names. The zone
# names, if supplied, are only used for status display.
#
zones = First Floor, Second Floor, Basement
# Device ID number to use on the serial bus. This must be unique.
# OPTIONAL (defaults to 99) and you shouldn't need to change this
# unless you're running multiple instances of this script.
#
# id = 99
The following environment variables are also available:
CZ2_CONFIG
: Alternate path to configuration fileCZ2_CONNECT
: Overrides theconnect
parameterCZ2_ZONES
: Overrides thezones
parameterCZ2_ID
: Overrides theid
parameter
If both the CZ2_CONNECT
and CZ2_ZONES
environment variables are
supplied, then the script won't attempt to read the configuration
file.
Run cz2
for usage information. The set of features supported should
be enough for most needs.
Carrier doesn't provide documentation on the protocol used by this system, but several people have helped with reverse-engineering. The most complete reference is currently on a wiki page of the CZII_to_MQTT project. I've discovered many additional fields and have contributed the details to the owner of that project for inclusion in the wiki.
Most of the fields I've figured out have been using the czdiff
script. I'll do my best to add more features upon request, especially
if you can provide field-level details.
You can also help by testing this script with different configurations. I only have remote access, so the direct serial connection support is untested. Also, my system has only basic remote sensors in each zone, not Smart Sensors, so I haven't tested with those.