Skip to main content

Python driver for Watlow EZ-Zone temperature controllers.

Project description


Python driver and command-line tool for Watlow EZ-Zone temperature controllers.


pip install watlow


Command Line

$ watlow /dev/ttyUSB0

This returns a simple data structure.

  "actual": 21.66,
  "setpoint": 20.0,
  "output": 52.1

You can additionally use the --set-setpoint option to set a temperature setpoint.

If interacting with a Watlow RUI Gateway, the zone to get or set should be passed as a flag

$ watlow -z 1

See watlow --help for more.


Single Controller

For a single temperature controller, the python interface is basic synchronous serial communication.

import watlow

tc = watlow.TemperatureController('/dev/ttyUSB0')


The driver is designed to be fault tolerant over long polling, and should appropriately reconnect if its IOErrors are managed. Here's an implementation with standard long-poll exception handling. This should run until interrupted and then exit cleanly.

from time import sleep
import watlow

tc = watlow.TemperatureController('/dev/ttyUSB0')
    while True:
        except IOError:
except KeyboardInterrupt:


The Gateway driver uses Python ≥3.5's async/await syntax to asynchronously communicate with the gateway over ModBus-TCP.

import asyncio
import watlow

async def run():
    async with watlow.Gateway('') as gateway:
        print(await gateway.get(1))

Additionally, there is a mock for the Gateway driver available at watlow.mock.Gateway for testing.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for watlow, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size watlow-0.3.0-py2.py3-none-any.whl (15.6 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size watlow-0.3.0.tar.gz (7.6 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page