pysomfymylink
An async Python client for the Somfy MyLink "Synergy" JSON-RPC socket API
(the local TCP interface on port 44100 exposed by the Somfy MyLink /
SomfyRtsBridge hub).
This is a maintained, clean-room rewrite of the excellent but now unmaintained
somfy-mylink-synergy by
Ben Dews (last released 2019). Full credit to Ben for the original API
design and protocol reverse-engineering. This rewrite keeps a familiar method
surface but reimplements the transport layer to fix two real defects:
- No more deadlock on a flaky hub. The original used an
asyncio.Eventas a mutex that was not released on the connect-timeout path, so after a single connection timeout every subsequent command blocked forever until Home Assistant was restarted. This version guards the socket with a realasyncio.Lockheld viaasync with, so it is always released — even on errors. - Typed errors. Transport failures raise
SomfyMyLinkConnectionError/SomfyMyLinkTimeoutError; JSON-RPC error replies raiseSomfyMyLinkApiError.
Install
pip install pysomfymylink
No runtime dependencies — the client uses only the stdlib asyncio socket API.
Usage
import asyncio
from pysomfymylink import SomfyMyLink
async def main():
hub = SomfyMyLink("192.168.1.10", "your-system-id")
for shade in await hub.status_info():
print(shade.target_id, shade.name, shade.cover_type)
await hub.move_up("<TARGET_ID>")
await hub.move_down("<TARGET_ID>")
await hub.move_stop("<TARGET_ID>") # stop / "my" favorite
asyncio.run(main())
The System ID is found in the MyLink mobile app under Integration → select any non-Cloud service.
CLI
export SOMFY_MYLINK_HOST=192.168.1.10
export SOMFY_MYLINK_SYSTEM_ID=your-system-id
python -m pysomfymylink list # read-only
python -m pysomfymylink up <TARGET_ID>
python -m pysomfymylink stop <TARGET_ID>
API
| Method | Description |
|---|---|
status_info(target_id="*.*") |
List configured covers as Shade objects |
status_ping(target_id="*.*") |
Ping targets |
move_up / move_down / move_stop(target_id) |
Drive a cover |
scene_list() / scene_run(scene_id) |
List / run scenes |
Notes / limitations
Somfy RTS is a one-way radio protocol: the hub cannot report a cover's real
position, so consumers must treat state as assumed. A move_stop on a
stationary cover can send it to its configured "my" favorite position.
License
MIT. See LICENSE, which preserves credit to the original author.
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 pysomfymylink-0.0.1.tar.gz.
File metadata
- Download URL: pysomfymylink-0.0.1.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
732d70b97db0287e4ca9e2a4fd1161fb909f6fbf1f564048674ee03083cb7021
|
|
| MD5 |
bb8261301514a9d2decc4ed73660b6b3
|
|
| BLAKE2b-256 |
677536fd526d5de1d797bb64a18d0981e49d9d78599ce5f8c04c414129f41a1d
|
Provenance
The following attestation bundles were made for pysomfymylink-0.0.1.tar.gz:
Publisher:
release.yml on sslivins/pysomfymylink
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysomfymylink-0.0.1.tar.gz -
Subject digest:
732d70b97db0287e4ca9e2a4fd1161fb909f6fbf1f564048674ee03083cb7021 - Sigstore transparency entry: 2195522225
- Sigstore integration time:
-
Permalink:
sslivins/pysomfymylink@e439389562ba34158c3fa4bb296afdab77a914d9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sslivins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e439389562ba34158c3fa4bb296afdab77a914d9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pysomfymylink-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pysomfymylink-0.0.1-py3-none-any.whl
- Upload date:
- Size: 10.3 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 |
ca02490fdc869b3ac7b645c424637f2fd7569cf50b5b7222a1440dcdc0d339fc
|
|
| MD5 |
2d8939722c7bc47fafc5283b7bbee070
|
|
| BLAKE2b-256 |
b3599f4379aafc24462636c8edaf295e720651b333b82a2f4f6ba514c74f3813
|
Provenance
The following attestation bundles were made for pysomfymylink-0.0.1-py3-none-any.whl:
Publisher:
release.yml on sslivins/pysomfymylink
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysomfymylink-0.0.1-py3-none-any.whl -
Subject digest:
ca02490fdc869b3ac7b645c424637f2fd7569cf50b5b7222a1440dcdc0d339fc - Sigstore transparency entry: 2195522229
- Sigstore integration time:
-
Permalink:
sslivins/pysomfymylink@e439389562ba34158c3fa4bb296afdab77a914d9 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/sslivins
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e439389562ba34158c3fa4bb296afdab77a914d9 -
Trigger Event:
push
-
Statement type: