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.
Metadata
Release files for pysomfymylink 1.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pysomfymylink-1.1.0.tar.gz | 11.6 kB | With provenance | Details for pysomfymylink-1.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pysomfymylink-1.1.0-py3-none-any.whl | Python 3 | none | any | Details for pysomfymylink-1.1.0-py3-none-any.whl |
Total release size: 22.7 kB
Release files / pysomfymylink-1.1.0.tar.gz
| Download URL | pysomfymylink-1.1.0.tar.gz |
|---|---|
| Size | 11.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
74965ddc41ae6e1abf5576a3252376244e7e6e65ba5c746448d1857c8941c314
|
|
BLAKE2b-256 checksum How to use checksums |
ad8de3e588a5d1e7ae54645e4363f6de649f82276f9323c8a1da156e77a56e3b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logRelease files / pysomfymylink-1.1.0-py3-none-any.whl
| Download URL | pysomfymylink-1.1.0-py3-none-any.whl |
|---|---|
| Size | 11.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6171ffa8a6b8e484315486213af4f44a1d1acbff2dd6892df7ef543b718041a8
|
|
BLAKE2b-256 checksum How to use checksums |
df9e1be78edd23aba3ff4a66f4e8c3091c7e26150e5668f6ddcd926314b92ed6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logSecurity for pysomfymylink 1.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for pysomfymylink-1.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 19, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.