[![releasebadge]][release]
[![License][license-shield]](LICENSE.md)
[![GitHub Sponsors][sponsorsbadge]][sponsors]
# PyBinRPC
A lightweight Python 3 library that enable python libraries to interact with BinRPC backends.
[license-shield]: https://img.shields.io/github/license/SukramJ/pybinrpc.svg?style=for-the-badge
[release]: https://github.com/SukramJ/pybinrpc/releases
[releasebadge]: https://img.shields.io/github/v/release/SukramJ/pybinrpc?style=for-the-badge
[sponsorsbadge]: https://img.shields.io/github/sponsors/SukramJ?style=for-the-badge&label=GitHub%20Sponsors&color=green
[sponsors]: https://github.com/sponsors/SukramJ
## Interoperability notes
Some BIN-RPC peers in the wild (e.g., CCU/CUxD stacks and clients based on hobbyquaker/binrpc) occasionally emit frames where the final double/float value appears truncated. In practice this happens when the 32-bit total length in the BIN header is smaller than the actual payload written, so the transport cuts the frame at the declared size. When this occurs in an `event` or `system.multicall` payload, the double’s 8-byte body may be shortened so only the 4-byte exponent is present and the 4-byte mantissa is missing.
To remain compatible with these devices, pybinrpc’s decoder is intentionally lenient:
- Doubles: if the exponent or mantissa is missing, the decoder returns `0.0` and advances to the end of the buffer instead of raising.
- Strings, binaries, integers, and booleans are decoded best-effort if the payload is shorter than declared.
- Arrays in some `system.multicall` payloads may declare length 0 yet still contain one struct element; pybinrpc treats this as a single-element array.
See tests `tests/test_truncated_double.py` and `tests/test_incoming_event_payload.py` for concrete real-world frames and the expected behavior.
Raw data
{
"_id": null,
"home_page": "https://github.com/sukramj/pybinrpc",
"name": "pybinrpc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.13.0",
"maintainer_email": null,
"keywords": "home, automation, homematic, cuxd",
"author": null,
"author_email": "SukramJ <sukramj@icloud.com>",
"download_url": "https://files.pythonhosted.org/packages/67/93/616ff7b6e62863f89c8b8aef8fcfa8e23f57b01c5ec5e63767c3db1a461c/pybinrpc-2025.10.1.tar.gz",
"platform": null,
"description": "[![releasebadge]][release]\n[![License][license-shield]](LICENSE.md)\n[![GitHub Sponsors][sponsorsbadge]][sponsors]\n\n# PyBinRPC\n\nA lightweight Python 3 library that enable python libraries to interact with BinRPC backends.\n\n[license-shield]: https://img.shields.io/github/license/SukramJ/pybinrpc.svg?style=for-the-badge\n[release]: https://github.com/SukramJ/pybinrpc/releases\n[releasebadge]: https://img.shields.io/github/v/release/SukramJ/pybinrpc?style=for-the-badge\n[sponsorsbadge]: https://img.shields.io/github/sponsors/SukramJ?style=for-the-badge&label=GitHub%20Sponsors&color=green\n[sponsors]: https://github.com/sponsors/SukramJ\n\n## Interoperability notes\n\nSome BIN-RPC peers in the wild (e.g., CCU/CUxD stacks and clients based on hobbyquaker/binrpc) occasionally emit frames where the final double/float value appears truncated. In practice this happens when the 32-bit total length in the BIN header is smaller than the actual payload written, so the transport cuts the frame at the declared size. When this occurs in an `event` or `system.multicall` payload, the double\u2019s 8-byte body may be shortened so only the 4-byte exponent is present and the 4-byte mantissa is missing.\n\nTo remain compatible with these devices, pybinrpc\u2019s decoder is intentionally lenient:\n\n- Doubles: if the exponent or mantissa is missing, the decoder returns `0.0` and advances to the end of the buffer instead of raising.\n- Strings, binaries, integers, and booleans are decoded best-effort if the payload is shorter than declared.\n- Arrays in some `system.multicall` payloads may declare length 0 yet still contain one struct element; pybinrpc treats this as a single-element array.\n\nSee tests `tests/test_truncated_double.py` and `tests/test_incoming_event_payload.py` for concrete real-world frames and the expected behavior.\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Python implementation of the Bin-RPC protocol.",
"version": "2025.10.1",
"project_urls": {
"Bug Reports": "https://github.com/sukramj/pybinrpc/issues",
"Docs: Dev": "https://github.com/sukramj/pybinrpc",
"Forum": "https://github.com/sukramj/pybinrpc/discussions",
"Homepage": "https://github.com/sukramj/pybinrpc",
"Source Code": "https://github.com/sukramj/pybinrpc"
},
"split_keywords": [
"home",
" automation",
" homematic",
" cuxd"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "b54284dfa89573a1190f002798793f13547876fa08292391459cab29158160bc",
"md5": "785438373ed32eccf6b799e8da8d4ade",
"sha256": "bbbf61f94ad4003887609907bc8e9953980e4612841138e20305266e52407fb9"
},
"downloads": -1,
"filename": "pybinrpc-2025.10.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "785438373ed32eccf6b799e8da8d4ade",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.13.0",
"size": 17972,
"upload_time": "2025-10-14T14:34:39",
"upload_time_iso_8601": "2025-10-14T14:34:39.895029Z",
"url": "https://files.pythonhosted.org/packages/b5/42/84dfa89573a1190f002798793f13547876fa08292391459cab29158160bc/pybinrpc-2025.10.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6793616ff7b6e62863f89c8b8aef8fcfa8e23f57b01c5ec5e63767c3db1a461c",
"md5": "242b1c0b100a6ed72975dd816e01afc5",
"sha256": "7c905263eb0f1531a53b0429416045ee5e66bb49aaf6aa5ab224e7f2ecde508b"
},
"downloads": -1,
"filename": "pybinrpc-2025.10.1.tar.gz",
"has_sig": false,
"md5_digest": "242b1c0b100a6ed72975dd816e01afc5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.13.0",
"size": 26539,
"upload_time": "2025-10-14T14:34:41",
"upload_time_iso_8601": "2025-10-14T14:34:41.328076Z",
"url": "https://files.pythonhosted.org/packages/67/93/616ff7b6e62863f89c8b8aef8fcfa8e23f57b01c5ec5e63767c3db1a461c/pybinrpc-2025.10.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-14 14:34:41",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sukramj",
"github_project": "pybinrpc",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "pybinrpc"
}