python-allnet
Async Python client for ALLNET MSR (Messen Steuern Regeln) devices and JSON-capable ALLNET managed switches.
This library is the external dependency for the Home Assistant allnet integration. It has no Home Assistant imports and can be used standalone.
Supported devices
- ALLNET MSR JSON API devices (ALL3500 and compatible) — sensors, binary sensors, digital actors (relays)
- JSON-capable ALLNET managed switches (planned)
Installation
pip install allnet
Usage
import asyncio
from aiohttp import ClientSession
from allnet import AllnetClient
async def main():
async with ClientSession() as session:
client = AllnetClient(
host="192.168.1.100",
username="xmlrpc", # optional
password="secret", # optional
use_ssl=False,
session=session,
)
# Device information (model, MAC, firmware version)
device_info = await client.async_get_device_info()
print(device_info.model, device_info.sw_version)
# All channels (sensors + actors)
channels = await client.async_get_channels()
for ch in channels:
print(ch.id, ch.name, ch.kind, ch.value, ch.unit)
# Switch a digital actor on/off
await client.async_set_channel_state("6", True)
asyncio.run(main())
Channel kinds
ChannelKind |
Description |
|---|---|
SENSOR |
Continuous measurement (temperature, current, CO₂, …) |
BINARY_SENSOR |
Binary digital input (motion, contact, …) |
SWITCH |
Digital output / relay |
NUMBER |
Analog output (deferred) |
Error handling
from allnet.exceptions import (
AllnetAuthenticationError, # 401/403 — wrong credentials
AllnetConnectionError, # Network unreachable / timeout
AllnetUnsupportedFirmwareError, # 404 — JSON API not available
AllnetCommandError, # Actor command rejected
)
Out of scope
- ALLNET IoT Cloud / MQTT
- SSH / Telnet / SNMP
- Web UI scraping
License
MIT
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
allnet-0.1.0.tar.gz
(8.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 allnet-0.1.0.tar.gz.
File metadata
- Download URL: allnet-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49933843fd7906eb7cfe8ed81388d0d9b320f96b674824c346d49bbf1433ff2c
|
|
| MD5 |
852a7185abc2698ada37ac4a56d562f2
|
|
| BLAKE2b-256 |
b2ff5f12019cb6ae2cae4be8117d0fb39896e6081fb60b632380c653ab6161b7
|
File details
Details for the file allnet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: allnet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
78e88c3fb876033a9febd5a10eaab0dcfe1546f1102dd0034a505375ec2230ae
|
|
| MD5 |
567867a346636ff5cfa2ea3d58916229
|
|
| BLAKE2b-256 |
78478ac9110ca2db53573ed8617fd0bbfe420fddfe6fc4d8e3529a4a5f33dc41
|