Relay and control for tessie
Project description
tessie relay
A relay and control server for tessie MQTT messages.
Installation
This project uses uv for management and currently uses Python 3.11.
Running
pip install tessie_relay
Example script:
from tessie_relay.psi_coldbox import Coldbox
from time import sleep
def handle_error_message(error_payload):
"""
Custom callback to handle "Error" messages.
:param error_payload: The parsed "Error" payload
"""
print("WARNING: Error detected!")
print(error_payload)
if __name__ == "__main__":
# initialize the Coldbox controller and provide a callback for alarms
coldbox = Coldbox(host='coldbox02.psi.ch', error_callback=handle_error_message)
with coldbox:
coldbox.flush()
print("air temperature ", coldbox.get_air_temperature())
print("water temperature ", coldbox.get_water_temperature())
print("interlock status ", coldbox.get_interlock_status(timeout=10))
print("traffic light ", coldbox.get_traffic_light())
print("flow switch ", coldbox.get_flow_switch())
print("lid ", coldbox.get_lid_status())
channel = 8
print(f"voltage probes for channel {channel} = ", coldbox.get_voltage_probe(channel))
try:
while True:
print("relative humidity ", coldbox.get_relative_humidity())
sleep(10)
except KeyboardInterrupt:
print('interrupted!')
print("shutting down")
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tessie_relay-0.1.2.tar.gz
(10.0 kB
view details)
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 tessie_relay-0.1.2.tar.gz.
File metadata
- Download URL: tessie_relay-0.1.2.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fbec56975fdb508b7d809006f50d3851589a2e83f6c3586171cac1438eb6c082
|
|
| MD5 |
9a3d62ccaabd506ffe93992d9dfbe5c3
|
|
| BLAKE2b-256 |
4d51c17dce65d3d8af53e5426393797fd39e8651b9d80560061235390625cf65
|
File details
Details for the file tessie_relay-0.1.2-py3-none-any.whl.
File metadata
- Download URL: tessie_relay-0.1.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
735dfa874b6f6a957d84f0908684320d6c95feeee02742f5068bd3daf3a99be2
|
|
| MD5 |
3f9a3930be11aad4f62f775a8c298c1e
|
|
| BLAKE2b-256 |
ca60c35793baf4c1af9e699de550c6ee5ad1fe09478f61229b4f10b87c840088
|