Name | kessler-av JSON |
Version |
0.9.0
JSON |
| download |
home_page | |
Summary | API for controlling a Kramer media switch using Protocol 2000 |
upload_time | 2024-02-19 22:04:31 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.11 |
license | |
keywords |
hdmi
home assistant
home automation
kramer
video
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# kessler-av
Python library for controlling a [Kramer][kramer] media switch that uses
[Protocol 2000][p2000] over a TCP connection.
It's primarily intended for use as a device driver for a [Home Assistant][ha]
integration.
## USAGE
```py
from kesslerav import get_media_switch
device_url = '10.0.0.1'
media_switch = get_media_switch(device_url)
media_switch.select_source(3) # Change to input 3
media_switch.lock() # Lock front panel
media_switch.unlock() # Unlock front panel
media_switch.update() # Refreshes device state
```
See `src/kesslerav/media_switch.py` for full `MediaSwitch` capabilities.
### Device URL format
The URL takes the form of `<scheme>://<host>:<port>#<protocol>` with all
but `host` being optional.
Default scheme is `tcp`, with a default port of `5000`.
Default protocol is Protocol 2000 (identifier: `protocol2k`.)
Examples:
+ `10.0.0.1` ->
Scheme: `tcp`, Host: `10.0.0.1`, Port: `5000`, Protocol: `protocol2k`
+ `localhost:1337` ->
Scheme: `tcp`, Host: `localhost`, Port: `1337`, Protocol: `protocol2k`
+ `localhost:1337#protocol2000` ->
Scheme: `tcp`, Host: `localhost`, Port: `1337`, Protocol: `protocol2k`
+ `tcp://10.0.0.1` ->
Scheme: `tcp`, Host: `10.0.0.1`, Port: `5000`, Protocol: `protocol2k`
+ `tcp://switch.local:8080` ->
Scheme: `tcp`, Host: `switch.local`, Port: `8080`, Protocol: `protocol2k`
+ `tcp://localhost:8080#protocol2k`
Scheme: `tcp`, Host: `localhost`, Port: `8080`, Protocol: `protocol2k`
## Limitations
The library was tested and developed using a Kramer [VS-161HDMI switch][vs161h],
but _should_ work for any Kramer switch using Protocol 2000.
It does _not_ currently support:
+ _Matrix_ switch operations, since I don't have a device to test with
+ UDP communication, since I don't have a device to test with
+ Serial communication, since TCP is the more likely control mechanism for home
automation purposes
The library has extension points for adding the support above should an
opportunity or need to do so arise.
## Development workflow
### Python environment
Workflow scripts assume a working Python environment, including `pip`.
Remember to be kind to yourself and use a virtual environment.
```sh
python3 -m venv env
env/bin/activate
```
### Setup
Install development and runtime dependencies. This also installs the library as an
editable path, so that it can be loaded in the REPL and `pytest`.
```sh
script/setup
```
### Tests
Run unit tests:
```sh
script/test
```
Tests can also be continuously run while developing with:
```sh
ptw .
```
### Build
To build distributables:
```sh
script/build
```
Build artifacts will be placed in the `dist` directory.
### Publishing
Build the distribution.
```sh
script/build
```
Publish the library to TestPyPI.
```sh
script/publish_test
```
Publish the library to PyPI.
```sh
script/publish
```
### Why `kessler-av`?
In [Seinfeld][sf], the character [Cosmo Kramer][ck] was based on comedian [Kenny
Kramer][kr2]. In the shows pilot episode, the producers hadn't gotten permission
to use Kramer's name, so the character was called Kessler instead.
This library controls [Kramer A/V's][kramer] media switches, but doesn't have
permission to use _their_ trademarked name. As a result, it seemed fitting to
name it `kessler-av`.
[ck]: https://en.wikipedia.org/wiki/Cosmo_Kramer
[ha]: https://www.home-assistant.io/
[kr2]: https://en.wikipedia.org/wiki/Kenny_Kramer
[kramer]: https://www.kramerav.com/
[p2000]: https://cdn.kramerav.com/web/downloads/tech-papers/protocol_2000_rev0_51.pdf
[sf]: https://en.wikipedia.org/wiki/Seinfeld
[vs161h]: https://www1.kramerav.com/au/product/VS-161H
Raw data
{
"_id": null,
"home_page": "",
"name": "kessler-av",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "",
"keywords": "hdmi,home assistant,home automation,kramer,video",
"author": "",
"author_email": "Kevin Rohrbaugh <code@rhrbgh.com>",
"download_url": "https://files.pythonhosted.org/packages/2c/63/97c7798cc0e25b56e554dd7df63b9e12703016aae007a66ced607f160c9d/kessler_av-0.9.0.tar.gz",
"platform": null,
"description": "# kessler-av\n\nPython library for controlling a [Kramer][kramer] media switch that uses\n[Protocol 2000][p2000] over a TCP connection.\n\nIt's primarily intended for use as a device driver for a [Home Assistant][ha]\nintegration.\n\n## USAGE\n\n```py\nfrom kesslerav import get_media_switch\n\ndevice_url = '10.0.0.1'\nmedia_switch = get_media_switch(device_url)\n\nmedia_switch.select_source(3) # Change to input 3\nmedia_switch.lock() # Lock front panel\nmedia_switch.unlock() # Unlock front panel\nmedia_switch.update() # Refreshes device state\n```\n\nSee `src/kesslerav/media_switch.py` for full `MediaSwitch` capabilities.\n\n### Device URL format\n\nThe URL takes the form of `<scheme>://<host>:<port>#<protocol>` with all\nbut `host` being optional.\n\nDefault scheme is `tcp`, with a default port of `5000`.\n\nDefault protocol is Protocol 2000 (identifier: `protocol2k`.)\n\nExamples:\n\n+ `10.0.0.1` ->\n Scheme: `tcp`, Host: `10.0.0.1`, Port: `5000`, Protocol: `protocol2k`\n+ `localhost:1337` ->\n Scheme: `tcp`, Host: `localhost`, Port: `1337`, Protocol: `protocol2k`\n+ `localhost:1337#protocol2000` ->\n Scheme: `tcp`, Host: `localhost`, Port: `1337`, Protocol: `protocol2k`\n+ `tcp://10.0.0.1` ->\n Scheme: `tcp`, Host: `10.0.0.1`, Port: `5000`, Protocol: `protocol2k`\n+ `tcp://switch.local:8080` ->\n Scheme: `tcp`, Host: `switch.local`, Port: `8080`, Protocol: `protocol2k`\n+ `tcp://localhost:8080#protocol2k`\n Scheme: `tcp`, Host: `localhost`, Port: `8080`, Protocol: `protocol2k`\n\n## Limitations\n\nThe library was tested and developed using a Kramer [VS-161HDMI switch][vs161h],\nbut _should_ work for any Kramer switch using Protocol 2000.\n\nIt does _not_ currently support:\n\n+ _Matrix_ switch operations, since I don't have a device to test with\n+ UDP communication, since I don't have a device to test with\n+ Serial communication, since TCP is the more likely control mechanism for home\nautomation purposes\n\nThe library has extension points for adding the support above should an\nopportunity or need to do so arise.\n\n## Development workflow\n\n### Python environment\n\nWorkflow scripts assume a working Python environment, including `pip`.\n\nRemember to be kind to yourself and use a virtual environment.\n\n```sh\npython3 -m venv env\nenv/bin/activate\n```\n\n### Setup\n\nInstall development and runtime dependencies. This also installs the library as an\neditable path, so that it can be loaded in the REPL and `pytest`.\n\n```sh\nscript/setup\n```\n\n### Tests\n\nRun unit tests:\n\n```sh\nscript/test\n```\n\nTests can also be continuously run while developing with:\n\n```sh\nptw .\n```\n\n### Build\n\nTo build distributables:\n\n```sh\nscript/build\n```\n\nBuild artifacts will be placed in the `dist` directory.\n\n### Publishing\n\nBuild the distribution.\n\n```sh\nscript/build\n```\n\nPublish the library to TestPyPI.\n\n```sh\nscript/publish_test\n```\n\nPublish the library to PyPI.\n\n```sh\nscript/publish\n```\n\n### Why `kessler-av`?\n\nIn [Seinfeld][sf], the character [Cosmo Kramer][ck] was based on comedian [Kenny\nKramer][kr2]. In the shows pilot episode, the producers hadn't gotten permission\nto use Kramer's name, so the character was called Kessler instead.\n\nThis library controls [Kramer A/V's][kramer] media switches, but doesn't have\npermission to use _their_ trademarked name. As a result, it seemed fitting to\nname it `kessler-av`.\n\n[ck]: https://en.wikipedia.org/wiki/Cosmo_Kramer\n[ha]: https://www.home-assistant.io/\n[kr2]: https://en.wikipedia.org/wiki/Kenny_Kramer\n[kramer]: https://www.kramerav.com/\n[p2000]: https://cdn.kramerav.com/web/downloads/tech-papers/protocol_2000_rev0_51.pdf\n[sf]: https://en.wikipedia.org/wiki/Seinfeld\n[vs161h]: https://www1.kramerav.com/au/product/VS-161H\n",
"bugtrack_url": null,
"license": "",
"summary": "API for controlling a Kramer media switch using Protocol 2000",
"version": "0.9.0",
"project_urls": {
"Bug Tracker": "https://github.com/krohrbaugh/kessler-av/issues",
"Homepage": "https://github.com/krohrbaugh/kessler-av"
},
"split_keywords": [
"hdmi",
"home assistant",
"home automation",
"kramer",
"video"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e2cdbcc7fb2dfdb910a015c6ec1cc196bf61bb7b1e92a68713c1af6b90ef38b9",
"md5": "3bfd2cff106444bbc8f78d65f4102121",
"sha256": "358b0fb8fa33d2142261c8b26b908b2f6f95bee3765d8033cee9c4e724a4f063"
},
"downloads": -1,
"filename": "kessler_av-0.9.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3bfd2cff106444bbc8f78d65f4102121",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 10651,
"upload_time": "2024-02-19T22:04:29",
"upload_time_iso_8601": "2024-02-19T22:04:29.747507Z",
"url": "https://files.pythonhosted.org/packages/e2/cd/bcc7fb2dfdb910a015c6ec1cc196bf61bb7b1e92a68713c1af6b90ef38b9/kessler_av-0.9.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2c6397c7798cc0e25b56e554dd7df63b9e12703016aae007a66ced607f160c9d",
"md5": "aaf5b33591875aa741e7db9a2be72505",
"sha256": "e84bd1e78297153a2ed3a6f21b989e1f32d87f44e4d337dc1633b143c91e7245"
},
"downloads": -1,
"filename": "kessler_av-0.9.0.tar.gz",
"has_sig": false,
"md5_digest": "aaf5b33591875aa741e7db9a2be72505",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 13693,
"upload_time": "2024-02-19T22:04:31",
"upload_time_iso_8601": "2024-02-19T22:04:31.249474Z",
"url": "https://files.pythonhosted.org/packages/2c/63/97c7798cc0e25b56e554dd7df63b9e12703016aae007a66ced607f160c9d/kessler_av-0.9.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-19 22:04:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "krohrbaugh",
"github_project": "kessler-av",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "kessler-av"
}