Python driver for Watlow EZ-Zone temperature controllers.
Project description
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())
sleep(1)
except IOError:
print('disconnected')
except KeyboardInterrupt:
pass
finally:
tc.close()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file watlow-0.1.0.tar.gz.
File metadata
- Download URL: watlow-0.1.0.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0f281eddccd75f3dd47f13cbd35bd022bc731e4d68ee0cc0832da263e3f21c6
|
|
| MD5 |
1fadecae96824db66afcfe6402c175c6
|
|
| BLAKE2b-256 |
e5eb72f306e61d8d64be427dec2423533de677c67b4083df139a2dd9095249df
|
File details
Details for the file watlow-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: watlow-0.1.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2e0d1027b7445ebdb3487238547ce21a6c219804e08dff51ba55e10b3d1b0ac
|
|
| MD5 |
d89749533069861225d64c65a5041910
|
|
| BLAKE2b-256 |
3ba46d1f03cadb0180e75a5ea8d15238284c22dd7e569e3f1efd38292754d687
|