Python library for controlling specific Saleryd HRV system models - Erik, Tage, Emil and Carl
Project description
pysaleryd-tage
Python asyncio library for controlling Saleryd HRV units (Erik, Tage, Emil, Carl) over their local WebSocket API.
Installation
pip install pysaleryd-tage
Usage
Connect and read state
import asyncio
from pysaleryd_tage.client import connected_device
async def main():
async with connected_device("192.168.1.100") as (device, disconnected):
print(device.info) # DeviceInfo: model, MAC, firmware versions
print(device.state) # DeviceState: mode, temps, pressure, alarms, ...
# subscribe to state changes
device.subscribe(lambda state: print(state.mode, state.temp_in, state.pressure))
# wait until disconnected or timeout
await asyncio.wait_for(disconnected.wait(), timeout=60)
asyncio.run(main())
connected_device(host, port=3001) is an async context manager. It waits (up to 5 s) for the device to send its initial state before yielding. disconnected is an asyncio.Event set when the WebSocket closes.
Send commands
from pysaleryd_tage.device.command import (
ActiveModeCommand,
ComposedCommand,
PacModeSettingsCommand,
PercentModeSettingsCommand,
PowerCommand,
PressureModeSettingsCommand,
)
async with connected_device("192.168.1.100") as (device, _):
# power on/off
await device.send_command(PowerCommand.on())
# ComposedCommand bundles multiple commands into one send.
# Use += to build it incrementally:
cmd = ComposedCommand()
cmd += ActiveModeCommand.percent() # change the current mode
cmd += PercentModeSettingsCommand(normal=60, away=30, airing=80) # setup
await device.send_command(cmd)
# or construct inline
await device.send_command(
ComposedCommand([
ActiveModeCommand.pressure(),
PressureModeSettingsCommand(pressure=50),
])
)
# PAC (temperature-driven pressure) mode
await device.send_command(
ComposedCommand([
ActiveModeCommand.pac(),
PacModeSettingsCommand(cold_temp=0.0, cold_pressure=20,
hot_temp=20.0, hot_pressure=60),
])
)
Disclaimer
This project is not affiliated with, endorsed by, or associated with the manufacturer in any way. Use at your own risk.
License
MIT
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 pysaleryd_tage-0.0.2.tar.gz.
File metadata
- Download URL: pysaleryd_tage-0.0.2.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d406f459e640ad3853745fbf140aab23915919adcbb7d70a77fb1eade0bd8d63
|
|
| MD5 |
318e9e4a592f633de01d7fa778a48496
|
|
| BLAKE2b-256 |
4446df0134d26321ba27217788795a31fb6948b004335247bf2ac379333a942c
|
Provenance
The following attestation bundles were made for pysaleryd_tage-0.0.2.tar.gz:
Publisher:
publish.yml on NecroKote/pysaleryd-tage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysaleryd_tage-0.0.2.tar.gz -
Subject digest:
d406f459e640ad3853745fbf140aab23915919adcbb7d70a77fb1eade0bd8d63 - Sigstore transparency entry: 1704805244
- Sigstore integration time:
-
Permalink:
NecroKote/pysaleryd-tage@a26ac723682c78c066d8b7da4b16a6d75030a8d8 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NecroKote
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a26ac723682c78c066d8b7da4b16a6d75030a8d8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pysaleryd_tage-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pysaleryd_tage-0.0.2-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19ad443ed6b6d0e93852f16fca720e63c7de619485a313cdc0d87e2b4c908948
|
|
| MD5 |
94218a09931ab6efe98db768baab55f0
|
|
| BLAKE2b-256 |
93e5de449dad7e8b03635f9c15835e1c63e930de69f1335b01d08e39085b0768
|
Provenance
The following attestation bundles were made for pysaleryd_tage-0.0.2-py3-none-any.whl:
Publisher:
publish.yml on NecroKote/pysaleryd-tage
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysaleryd_tage-0.0.2-py3-none-any.whl -
Subject digest:
19ad443ed6b6d0e93852f16fca720e63c7de619485a313cdc0d87e2b4c908948 - Sigstore transparency entry: 1704805264
- Sigstore integration time:
-
Permalink:
NecroKote/pysaleryd-tage@a26ac723682c78c066d8b7da4b16a6d75030a8d8 -
Branch / Tag:
refs/tags/v0.0.2 - Owner: https://github.com/NecroKote
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@a26ac723682c78c066d8b7da4b16a6d75030a8d8 -
Trigger Event:
push
-
Statement type: