mordomus
Python client for the Mordomus / iThink home-automation HTTP API.
pip install mordomus
from mordomus import Mordomus
with Mordomus("http://192.168.8.46:8888", user="user", password="1234") as home:
for light in home.devices.lights():
print(light.cod, light.name, light.value)
home.devices.on("MDO17")
home.devices.set_value("MDO17", 100)
home.climate.set_temperature(room=2, celsius=22)
Async:
import asyncio
from mordomus import AsyncMordomus
async def main():
async with AsyncMordomus("http://192.168.8.46:8888", user="user", password="1234") as home:
states = await home.devices.states()
print(states)
asyncio.run(main())
Auth
Login is session-cookie based (IDHTTPSESSIONID). Credentials are hashed as:
value = md5(timestamp_ms + username.lower()) + md5(timestamp_ms + password)
value1 = str(3 * timestamp_ms)
GET /logas?value=...&value1=...
The client handles this automatically and re-authenticates on 401.
API surface
| Resource | Methods |
|---|---|
home.system |
version(), session_ok(), logout() |
home.devices |
list(), states(), get(), on(), off(), toggle(), set_value(), set_rgb(), by_room(), lights(), blinds(), … |
home.climate |
list(), set_temperature(), set_mode(), set_duration() |
home.alarms |
list(), states() |
home.quickmenu |
list(), run() |
home.multimedia |
devices(), state(room), control() |
home.settings |
get(), set() |
Home Assistant
Separate package: mordomus-homeassistant
pip install mordomus-homeassistant
mordomus-ha install /config # or: mordomus-ha install ~/.homeassistant
# restart Home Assistant → Add integration → Mordomus
Development
uv sync
uv run pytest
Publish to PyPI
Two packages, two versions (keep them in sync for paired releases):
| Package | Path | PyPI name |
|---|---|---|
| Library | repo root | mordomus |
| HA integration | home-assistant/ |
mordomus-homeassistant |
# 1. Bump version in pyproject.toml (+ home-assistant/pyproject.toml + manifest.json)
# 2. Build + upload (API token required)
export UV_PUBLISH_TOKEN=pypi-...
./scripts/publish.sh both # production PyPI
./scripts/publish.sh both --test # TestPyPI first
./scripts/publish.sh lib --dry-run # build only
Or publish from GitHub Actions on release (trusted publishing) — see .github/workflows/publish.yml.
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 mordomus-0.1.1.tar.gz.
File metadata
- Download URL: mordomus-0.1.1.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8582c87a93a2f97275980ed7fa77261151dfdd28651418b8514ab222620da6d8
|
|
| MD5 |
086435310d05cc337b9ee08df7a3af72
|
|
| BLAKE2b-256 |
ecca71712bc417eed5a4ea6bf390cee8fea6ed2de7a3368d2331ad06d79732cd
|
File details
Details for the file mordomus-0.1.1-py3-none-any.whl.
File metadata
- Download URL: mordomus-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75953d197c0a1649a13b0a08b72858520c838e0391c17903222fa4f4f4d5b0c3
|
|
| MD5 |
64ff209869fe6745ca14da0336c2f2bf
|
|
| BLAKE2b-256 |
adacde50cfac96d37ce3e2638d9ae72a6d692ea31b336bff31b4c833b7ed2399
|