Skip to main content

watlow

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

Installation

pip install watlow

Usage

Command Line

$ watlow /dev/ttyUSB0

This returns a simple data structure.

{
  "actual": 21.66,
  "setpoint": 20.0
}

You can additionally use the --set-setpoint option to set a temperature setpoint. See watlow --help for more.

Python

The python interface is basic synchronous serial communication.

import watlow

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

tc.set(30)
print(tc.get())

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')
try:
    while True:
        try:
            print(tc.get())
        except IOError:
            print('disconnected')
        sleep(1)
except KeyboardInterrupt:
    pass
finally:
    tc.close()

Download files

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

Source Distribution

watlow-0.1.1.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watlow-0.1.1-py2.py3-none-any.whl (12.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file watlow-0.1.1.tar.gz.

File metadata

  • Download URL: watlow-0.1.1.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for watlow-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c191409aacaa22ec3bb586bfdedbd505f5bbc8a180ebd28f061f1136cafa0ef1
MD5 4634c41f09007ba01c77794b369a592b
BLAKE2b-256 7238508260517d49f57bb8a8eb035527ddd34de4103a9e310fc0d817cc1d7da8

See more details on using hashes here.

File details

Details for the file watlow-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: watlow-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for watlow-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 1f3078a389d4f624646f015e617fa8ff6dea7364835390a9eb0a7385e543dcc4
MD5 e97a5abb8e28dc84084152d3b0ef85a2
BLAKE2b-256 bf723864576b9d675bde08685afe7399e46aa2bd9e44448664a625504040aabd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page