HA-agnostic async Sony CIS-IP2 client for AVRs and soundbars
Project description
sony-cisip2
HA-agnostic async Python client for Sony CIS-IP2 over Ethernet/IP (TCP port 33336). Control power, volume, inputs, and other features on compatible Sony AVRs and soundbars on your local network.
The GitHub repository is named sony-cispy. The PyPI package and
import are sony-cisip2 / sony_cisip2.
CIS stands for Custom Installation Services (or Solutions) — the Sony-specific local control protocol used by custom-install systems.
This is a protocol library, not a Home Assistant integration. Integrations that speak CIS-IP2 can depend on this package.
Status
Alpha (0.1.0a1 on PyPI). APIs may change before 1.0. See
CHANGELOG.md.
Features
- Universal
get_feature()/set_feature()API for any CIS-IP2 feature - Command ID tracking with futures for reliable request/response matching
- Real-time notification callbacks
- JSON stream decoding with remainder across TCP read fragments
- Auto-reconnect with exponential backoff after unexpected drops
- Full command catalog via
commands_dict - Stdlib only (no runtime dependencies)
- Async/await (Python 3.12+)
Device compatibility
Enable IP/network control on the device (menu names vary: "External Control", "Simple IP Control", "IP Control", etc.). Quick check with netcat:
netcat <IP_ADDRESS> 33336
{"id":3, "type":"get","feature":"main.power"}
A JSON result for main.power means the port is reachable and control is on.
Install
Requires Python 3.12+.
pip install sony-cisip2
From a checkout:
pip install -e ".[dev]"
Quickstart
import asyncio
from sony_cisip2 import SonyCISIP2
async def main():
async with SonyCISIP2(host="192.168.1.100") as client:
power = await client.get_feature("main.power")
if power is None:
print("get main.power timed out or failed")
return
print(f"Power: {power}")
result = await client.set_feature("main.volumestep", 50)
print(f"set volume: {result}")
asyncio.run(main())
See example.py and src/sony_cisip2/README.md for notifications, command discovery, and more features.
Requirements
- Python: 3.12 or higher
- Dependencies: none (standard library only)
Project layout
sony-cispy/ # GitHub repo root
├── src/sony_cisip2/ # Installable package
│ ├── client.py # SonyCISIP2
│ ├── commandset.py
│ ├── constants.py
│ └── variables.py
├── tests/
├── tools/live_smoke.py # Manual device smoke (CISIP2_HOST; not in CI)
├── reference/ # Historical sources (not shipped in the wheel)
├── example.py
└── pyproject.toml
Development
pip install -e ".[dev]"
ruff check . && ruff format --check .
mypy
pytest -q
python -m build && twine check dist/*
Optional live smoke against a device on your LAN (not run in CI):
CISIP2_HOST=<device-ip> CISIP2_SKIP_EXEC=1 python tools/live_smoke.py
CISIP2_HOST=<device-ip> python tools/live_smoke.py
Release process: docs/releasing.md.
License
MIT — see LICENSE.
Disclaimer
This library is not affiliated with or endorsed by Sony. Use on hardware you own. Protocol support varies by model and firmware.
Project details
Release history Release notifications | RSS feed
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 sony_cisip2-0.1.0a1.tar.gz.
File metadata
- Download URL: sony_cisip2-0.1.0a1.tar.gz
- Upload date:
- Size: 32.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40c3a220dfa3eb6da5568800b0f09be278b8519d33ca548a63b2c6247c81189f
|
|
| MD5 |
a5fc6ceefa69cfa29c96dc4802ef3bab
|
|
| BLAKE2b-256 |
b946921c84570690ec1a69d981184da75c827415783646dbd6dc1af3b00e97ab
|
Provenance
The following attestation bundles were made for sony_cisip2-0.1.0a1.tar.gz:
Publisher:
publish.yml on steamEngineer/sony-cispy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sony_cisip2-0.1.0a1.tar.gz -
Subject digest:
40c3a220dfa3eb6da5568800b0f09be278b8519d33ca548a63b2c6247c81189f - Sigstore transparency entry: 2256484826
- Sigstore integration time:
-
Permalink:
steamEngineer/sony-cispy@d29f3a0d7f536deab912655ccb45a67ce9545367 -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/steamEngineer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d29f3a0d7f536deab912655ccb45a67ce9545367 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sony_cisip2-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: sony_cisip2-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ada68f13a0eada05e69f7bda5eb4cd85171fba67aa5675bbba440b517920c502
|
|
| MD5 |
1dff5ba78bf5a59e4ea2c98fa87365dc
|
|
| BLAKE2b-256 |
51be232ad9e740199331317d16f40a47a025d9a6f22a4353cf7497c5a66f0569
|
Provenance
The following attestation bundles were made for sony_cisip2-0.1.0a1-py3-none-any.whl:
Publisher:
publish.yml on steamEngineer/sony-cispy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sony_cisip2-0.1.0a1-py3-none-any.whl -
Subject digest:
ada68f13a0eada05e69f7bda5eb4cd85171fba67aa5675bbba440b517920c502 - Sigstore transparency entry: 2256484834
- Sigstore integration time:
-
Permalink:
steamEngineer/sony-cispy@d29f3a0d7f536deab912655ccb45a67ce9545367 -
Branch / Tag:
refs/tags/v0.1.0a1 - Owner: https://github.com/steamEngineer
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d29f3a0d7f536deab912655ccb45a67ce9545367 -
Trigger Event:
push
-
Statement type: