{ "info": { "author": "Michael Elsd\u00f6rfer", "author_email": "michael@elsdoerfer.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Games/Entertainment", "Topic :: Multimedia", "Topic :: System :: Networking" ], "description": "Onkyo eISCP Control\n===================\n\nThis is a Python library to control and interact with Onkyo receivers\nover the network. It is also a ready-made command line script you\ncan use without knowing how to program.\n\nFinally, this repository contains a YAML file containing all the\ncommands defined by the Onkyo protocol, automatically generated by\nparsing the official documentation. Even if you are not using\nPython, you may find this file useful when implementing your own\ninterface. See further down below for more information.\n\n\nInstallation\n------------\n\nMost recent released version::\n\n $ easy_install onkyo-eiscp\n\n\nUsage\n-----\n\nThe package installs a script called ``onkyo``, that can be used from the\ncommand line::\n\n $ onkyo system-power=off\n\nThis will turn your receiver off. You may notice that you haven't given any\ninformation as to where in the network your receiver is. The script should\nin fact be able to find your Onkyo device by itself.\n\nTo see which receivers the script is able to find, you can use::\n\n $ onkyo --discover\n\nIf you have multiple receivers on your network, then by default, it will\nsimply connect to the first device found (which may be a different one\nevery time).\n\nYou can select a specific one by filtering by name::\n\n $ onkyo --discover\n TX-NR709 192.168.178.200:60128 0009B0D34163\n TX-NR609 192.168.178.169:60128 0009B0D24B75\n \n $ onkyo -n 709 system-power=on\n\nThis will only turn on the TX-NR709 device.\n\nOr using the unique identifier::\n\n $ onkyo -i 0009B0D24B75 system-power=on\n\nThis will turn on the TX-NR609 device.\n\nThere is also an ``--all`` flag, to send you commands to all devices at once.\n\nFinally, you are of course able to manually specify the device to connect to::\n\n $ onkyo --host 172.20.0.144 volume=55\n $ onkyo --host 172.20.0.144 --port 42424 volume=55\n\nTo find out which commands are available, use the ``--help-commands`` option.\n\n\nCommands\n--------\n\nA command consists of three parts: The zone, the command, and the arguments.\nHere are some examples::\n\n system-power=on\n zone2.power=on\n main.balance=3\n\nAs you can see, the basic format is::\n\n zone.command=argument\n\nIf you do not specify a zone, then ``main`` is assumed.\n\nThere are some variations on this syntax that are possible, for example the\nfollowing are all equivalent::\n\n power on\n power:on\n main.power on\n main power on\n\nIn other words, instead of the ``.`` and ``=`` separators, whitespace may\nbe used, and the colon ``:`` is an alternative to ``=``. However, it's best\nto use the suggested syntax above.\n\nThe names of these commands are defined by this project, and are rewritten\nto actual low-level eISCP commands Onkyo uses. If you know them, you can\nalso send such low-level commands directly::\n\n $ onkyo SLI26 # Selects the \"Tuner\" source.\n\n\nNotes on Power On\n~~~~~~~~~~~~~~~~~\n\nFor the ``power on`` command to work while the device is in standby, make\nsure you turn on the obtusely named\n``Setup -> Hardware -> Network -> Network Control`` option.\n\nWithout it, you can only connect to your receiver while it is already\nturned on.\n\n\nPython module\n-------------\n\nIn a simple case, this might look like this:\n\n.. code:: python\n\n import eiscp\n\n # Create a receiver object, connecting to the host\n receiver = eiscp.eISCP('192.168.1.125')\n\n # Turn the receiver on, select PC input\n receiver.command('power on')\n receiver.command('source pc')\n\n receiver.disconnect()\n\nDon't forget to call ``disconnect()`` to close the socket. You can also use\na ``with`` statement:\n\n.. code:: python\n\n with eiscp.eISCP('192.168.1.125') as receiver:\n receiver.command('source all-ch-stereo')\n\n\nThe command language is explained above. You can also be more explict with\nthe structure::\n\n receiver.command('power', 'on', zone='main')\n\nIf you prefer to send low-level ISCP commands directly, you can use the\n`raw` method::\n\n receiver.raw('MVLUP')\n\nThe function `command_to_iscp` will allow you to convert a high-level\ncommand to a low-level ISCP message for use with `eISCP.raw`.\n\n\nReceiving messages\n~~~~~~~~~~~~~~~~~~\n\nThe Onkyo receiver will send messages to you as well. Specifically, it\nreturns a response to every command you send, either by repeating the\ncommand you have sent back to you, or, in case you sent a query\nmessage, reporting the answer to you query. It will also send unsolicited\nstatus updates to you whenver the state of the receiver changes.\n\nAPI-wise, the `eISCP.raw` and `eISCP.command` return the\nresponse received from the Onkyo device. They are blocking.\n\nTo receive other messages, there is `eISCP.get`, which will\neither return a message or ``None``. You may specify a custom timeout\nvalue.\n\n.. warning::\n At least for now, there is no queue. If you call\n `eISCP.raw` or `eISCP.command`, any messages not picked\n up via `eISCP.get` are lost.\n\nA problem with the Onkyo protocol is that there is no fool-proof way to\ndifferentiate a response from unsolicited status updates. Generally, this\nwon't be an issue, though in theory the response that is given to you\nafter sending ``SLI05`` may be a ``SLI06`` update from another controller.\n\nIt is thus preferable to approach the protocol in a different way. Instead\nof using `eISCP.raw` or `eISCP.command`, which try to serialize\nthe exchange into a request-response scheme, you may also use\n`eISCP.send`, which dispatches a message without waiting for a response.\nYou would then use `get` to process all incoming messages in the same\nway, regardless of why they were sent. This works well, since a response to\neither a command or a query is no different than a status update.\n\n\nAsync API\n~~~~~~~~~\n\nThere is also an experimental `eiscp.Receiver`, which has the\nsame api as `eiscp.eISCP`, but uses a background thread for\nnetwork communication. This allows you to handle incoming messages\nvia a callback::\n\n def message_received(message):\n print message\n\n receiver = Receiver('...')\n receiver.on_message = message_received\n\nNote that the ``on_message`` handler is executed on the background\nthread, so you may want to use a queue.\n\nFor consistancy, `eISCP.raw` and `eISCP.command` are still\ndesigned to artificially block, while `eISCP.send` is non-blocking.\n\n\nDevice discovery\n~~~~~~~~~~~~~~~~\n\nYou can have it find the receivers on your local network:\n\n.. code:: python\n\n for receiver in eiscp.eISCP.discover(timeout=5):\n receiver.command('power off')\n\nThis will turn off all the Onkyo receivers on your network.\n\nA discovered device has an ``info`` attribute that gives you some data:\n\n.. code:: python\n\n {'iscp_port': '60128', 'identifier': '0009B04448E0',\n 'area_code': 'XX', 'model_name': 'TX-NR709', 'device_category': '1'}\n\n\nLimitations\n-----------\n\n- Some commands require a more complex argument structure, like\n variable-length strings, and those are not yet supported (you can\n send them in raw mode of course).\n\n\nThe YAML file\n-------------\n\nThis repository contains a YAML file containing all the commands\ndefined by the Onkyo protocol, automatically generated by\nparsing the official Excel documentation, and then further adjusted\nmanually.\n\nThe idea is to have a computer-readable definition of the Onkyo\nprotocol, where Onkyo's internal low-level commands are mapped to\nidentifiers that can be understood by humans, and which include\ndescriptions.\n\nParsing the Onkyo Excel document gets you astonishingly far, but\nthere's a limit. The YAML file requires manual edits and fixes where\nthe parser fails, including a lot of cosmetic corrections. Some of\nthose have been made, but there's significant room for improving\nthe YAML description of the protocol.\n\nThe process and the specific YAML formatting have been chosen to\nallow future changes to the Onkyo master document to be merged with\nthe manual adjustments made as painlessly as possible.\n\nTo summarize, if you are implementing your own interface to Onkyo,\neven if it's in a language other than Python, I encourage you to\nconsider using this YAML file as a basis for the command interface\nyou provide to users. You'll have a complete list of available\ncommands, values, and even supported devices.\n\n\nRelated Links\n-------------\n\nDocuments from Onkyo describing the protocol, including lists of supported commands:\n - http://michael.elsdoerfer.name/onkyo/ISCP_AVR_134.xlsx\n - http://michael.elsdoerfer.name/onkyo/ISCP_AVR_2014.Models.xlsx\n - http://michael.elsdoerfer.name/onkyo/ISCP-V1.26_2013.xlsx\n - http://michael.elsdoerfer.name/onkyo/ISCP-V1.21_2011.xls\n\nThe repository on which this was originally based on:\n https://github.com/compbrain/Onkyo-TX-NR708-Control\n\nAn implementation in Perl:\n https://github.com/beanz/device-onkyo-perl\n\nAn implementation in C#:\n http://code.google.com/p/onkyo-eiscp-remote-windows/\n\nAn implementation in Object-C:\n https://github.com/janten/onkyo-eiscp-remote-mac\n\nMQTT connectivity for onkyo-eiscp, adhering to the mqtt-smarthome specification:\n https://github.com/owagner/onkyo2mqtt\n\nSome Java code that deserves credit for providing the original Onkyo protocol documentation linked above:\n https://sites.google.com/a/webarts.ca/toms-blog/Blog/new-blog-items/javaeiscp-integraserialcontrolprotocol", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/miracle2k/onkyo-eiscp", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "onkyo-eiscp", "package_url": "https://pypi.org/project/onkyo-eiscp/", "platform": "any", "project_url": "https://pypi.org/project/onkyo-eiscp/", "project_urls": { "Homepage": "https://github.com/miracle2k/onkyo-eiscp" }, "release_url": "https://pypi.org/project/onkyo-eiscp/1.2.7/", "requires_dist": null, "requires_python": "", "summary": "Control Onkyo receivers over ethernet.", "version": "1.2.7" }, "last_serial": 5930322, "releases": { "0.9": [ { "comment_text": "", "digests": { "md5": "26a91b456f3cd4dfc5c6b84e6742eeb0", "sha256": "ced41518fc01eb68af9fce849897981e2c1e4346b1ddd99416e155088ccb17ef" }, "downloads": -1, "filename": "onkyo-eiscp-0.9.tar.gz", "has_sig": false, "md5_digest": "26a91b456f3cd4dfc5c6b84e6742eeb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26949, "upload_time": "2013-03-16T19:29:05", "url": "https://files.pythonhosted.org/packages/6f/48/b5b1c3a4b428a7a8219b11a8cde5c669333b0323bd861123f7d028a28391/onkyo-eiscp-0.9.tar.gz" } ], "0.9.1": [ { "comment_text": "", "digests": { "md5": "485d4a0e2a875fb11785b4646718ddac", "sha256": "f0d1032f02217ef047d14f8c751767b205f17066d8bdb5c49bd1f58604a580f8" }, "downloads": -1, "filename": "onkyo-eiscp-0.9.1.tar.gz", "has_sig": false, "md5_digest": "485d4a0e2a875fb11785b4646718ddac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27494, "upload_time": "2013-08-04T13:07:32", "url": "https://files.pythonhosted.org/packages/44/a0/ddda1b3ac8a2885e0b7c586b0e939ee567528cb4a8a8083fbdab5c991de7/onkyo-eiscp-0.9.1.tar.gz" } ], "1.0": [ { "comment_text": "", "digests": { "md5": "71e20dad69f41a751391f73f5047be4d", "sha256": "6286b359d243e336a6cfbb3f54744032b8514469e05a14d89d4ddb2eb0eb7f9c" }, "downloads": -1, "filename": "onkyo-eiscp-1.0.tar.gz", "has_sig": false, "md5_digest": "71e20dad69f41a751391f73f5047be4d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32144, "upload_time": "2016-08-09T19:26:46", "url": "https://files.pythonhosted.org/packages/1e/19/868713408faca7782c59dffbf3a2673d0f753fab050b79787c675269ebd5/onkyo-eiscp-1.0.tar.gz" } ], "1.1": [ { "comment_text": "", "digests": { "md5": "bb42a81e4be831504e6d6e33b078b60a", "sha256": "74895b450329533e8d95f48be0a60ab9c73e099379dce88a30ede5f44b293edd" }, "downloads": -1, "filename": "onkyo-eiscp-1.1.tar.gz", "has_sig": false, "md5_digest": "bb42a81e4be831504e6d6e33b078b60a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40762, "upload_time": "2017-05-07T18:20:01", "url": "https://files.pythonhosted.org/packages/6e/9e/4e46ebcae41cf9195488c2bd4964c808be5abba41e51c88399814a177050/onkyo-eiscp-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "614454ac874d19c677df3b5d5e9048fb", "sha256": "5f6d49aa79caf69b6830a63e170945231996da5986abcee90fcf2d47906245dd" }, "downloads": -1, "filename": "onkyo-eiscp-1.2.tar.gz", "has_sig": false, "md5_digest": "614454ac874d19c677df3b5d5e9048fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41264, "upload_time": "2017-05-14T09:34:33", "url": "https://files.pythonhosted.org/packages/71/f7/f15c24e54ed1a503bb53e51771f3b26bdbb074071f8be6f80a011fa6b220/onkyo-eiscp-1.2.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "2f2fd9a2af289878a2dd11c22a7a7c1b", "sha256": "1df83a3ee09fb97fcda1b9db6c8a79653b4782227340b3f503096dbb920ef35b" }, "downloads": -1, "filename": "onkyo-eiscp-1.2.1.tar.gz", "has_sig": false, "md5_digest": "2f2fd9a2af289878a2dd11c22a7a7c1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41376, "upload_time": "2017-05-24T10:13:26", "url": "https://files.pythonhosted.org/packages/b8/dc/004400a94b2881ef4ead48474842e15e5f4fbfcbd22d77acf12272984737/onkyo-eiscp-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "7a33cdd2249c61c2f371e2ff1f6383b9", "sha256": "c79a76e4fb9e4d61cf4260f0ad8d07176d103249543adffa24e7a5aad6f059e7" }, "downloads": -1, "filename": "onkyo-eiscp-1.2.2.tar.gz", "has_sig": false, "md5_digest": "7a33cdd2249c61c2f371e2ff1f6383b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41401, "upload_time": "2017-07-14T23:54:52", "url": "https://files.pythonhosted.org/packages/a5/64/2171db26836e1688437cd894c646bf6223af36d3aeefc543fb3e9b0a161c/onkyo-eiscp-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "7bab1fe4ac87cb71d0be20c19b69576b", "sha256": "bc907bb36b362cc5cd140e185eccdc0460d811a5c5de4ce8126d33b8b0af40a1" }, "downloads": -1, "filename": "onkyo-eiscp-1.2.3.tar.gz", "has_sig": false, "md5_digest": "7bab1fe4ac87cb71d0be20c19b69576b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41399, "upload_time": "2017-08-03T10:58:08", "url": "https://files.pythonhosted.org/packages/fe/ee/efdc301a3c8dd1c4aa933f56370c35a424f0037a7e746a214af5729d1e68/onkyo-eiscp-1.2.3.tar.gz" } ], "1.2.4": [ { "comment_text": "", "digests": { "md5": "eb406104c174f60fac7440074775b6c8", "sha256": "b2c3038b869a1f229ae5d0f11dfa19c41cf7060f4f24a8efc19359269ee06561" }, "downloads": -1, "filename": "onkyo-eiscp-1.2.4.tar.gz", "has_sig": false, "md5_digest": "eb406104c174f60fac7440074775b6c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41394, "upload_time": "2017-08-17T22:20:20", "url": "https://files.pythonhosted.org/packages/77/a8/11208ebd0b499d002907ad98b640323338c22f39952abb32e50c940b9473/onkyo-eiscp-1.2.4.tar.gz" } ], "1.2.5": [ { "comment_text": "", "digests": { "md5": "68ca849207c8eb3c413e580234e13a94", "sha256": "cfcca6bc6c36992095f5aa4a15870a3ef89b9a26d991da2333891c2675d4ef1b" }, "downloads": -1, "filename": "onkyo-eiscp-1.2.5.tar.gz", "has_sig": false, "md5_digest": "68ca849207c8eb3c413e580234e13a94", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 44551, "upload_time": "2018-04-20T17:57:17", "url": "https://files.pythonhosted.org/packages/19/a1/453e6c6da4a932aa0755d858d726f91fa1f13ccc1cfced99c148281d3046/onkyo-eiscp-1.2.5.tar.gz" } ], "1.2.7": [ { "comment_text": "", "digests": { "md5": "5b14b3cc7f88bb665652da98ea84b5ca", "sha256": "761abb16c654a1136763b927d094174d41f282809e44ea32cd47e199dd79d9c9" }, "downloads": -1, "filename": "onkyo-eiscp-1.2.7.tar.gz", "has_sig": false, "md5_digest": "5b14b3cc7f88bb665652da98ea84b5ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48290, "upload_time": "2019-10-04T21:59:59", "url": "https://files.pythonhosted.org/packages/05/7b/a25440e34d015237d1f68b8e353f06eaa3a90c1fa77a6621e5e15e4388de/onkyo-eiscp-1.2.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5b14b3cc7f88bb665652da98ea84b5ca", "sha256": "761abb16c654a1136763b927d094174d41f282809e44ea32cd47e199dd79d9c9" }, "downloads": -1, "filename": "onkyo-eiscp-1.2.7.tar.gz", "has_sig": false, "md5_digest": "5b14b3cc7f88bb665652da98ea84b5ca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 48290, "upload_time": "2019-10-04T21:59:59", "url": "https://files.pythonhosted.org/packages/05/7b/a25440e34d015237d1f68b8e353f06eaa3a90c1fa77a6621e5e15e4388de/onkyo-eiscp-1.2.7.tar.gz" } ] }