watlow
Python driver and command-line tool for Watlow EZ-Zone temperature controllers.
Installation
uv pip install watlow
Usage
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 192.168.1.101
See watlow --help for more.
Python
Single Controller
For a single temperature controller, 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()
Gateway
The Gateway driver uses Python async/await syntax to asynchronously communicate with the gateway over ModBus-TCP.
import asyncio
import watlow
async def run():
async with watlow.Gateway('192.168.1.101') as gateway:
print(await gateway.get(1))
asyncio.run(run())
Additionally, there is a mock for the Gateway driver available at watlow.mock.Gateway for testing.
Metadata
Release files for watlow 0.10.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| watlow-0.10.0.tar.gz | 17.7 kB | Without provenance | Details for watlow-0.10.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| watlow-0.10.0-py3-none-any.whl | Python 3 | none | any | Details for watlow-0.10.0-py3-none-any.whl |
Total release size: 34.5 kB
Release files / watlow-0.10.0.tar.gz
| Download URL | watlow-0.10.0.tar.gz |
|---|---|
| Size | 17.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
aceffe06e76bf6c37e82333716d32f87c98c4ad930becf1a282a7653ddd02841
|
|
BLAKE2b-256 checksum How to use checksums |
09c9a574f1a979f0488fe2935e0d04fa2df95d1b8ae9f31818e9215f4cab39b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / watlow-0.10.0-py3-none-any.whl
| Download URL | watlow-0.10.0-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
035bb259bd62a1e9ec2fa5cfe35c7469aaa6964d3ea9ab81d5c3411275e52a07
|
|
BLAKE2b-256 checksum How to use checksums |
ba1697a17f0ab6b816b6a88bd7068502bb320a16e09213c18eeda9f074cad25f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for watlow 0.10.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.