{ "info": { "author": "Lauri Niskanen", "author_email": "ape@ape3000.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Home Automation" ], "description": "==========\nsamsungctl\n==========\n\nsamsungctl is a library and a command line tool for remote controlling Samsung\ntelevisions via a TCP/IP connection. It currently supports both pre-2016 TVs as\nwell most of the modern Tizen-OS TVs with Ethernet or Wi-Fi connectivity.\n\nDependencies\n============\n\n- Python 3\n- ``websocket-client`` (optional, for 2016+ TVs)\n- ``curses`` (optional, for the interactive mode)\n\nInstallation\n============\n\nsamsungctl can be installed using `pip <(https://pip.pypa.io/>`_:\n\n::\n\n # pip install samsungctl\n\nAlternatively you can clone the Git repository and run:\n\n::\n\n # python setup.py install\n\nIt's possible to use the command line tool without installation:\n\n::\n\n $ python -m samsungctl\n\nCommand line usage\n==================\n\nYou can use ``samsungctl`` command to send keys to a TV:\n\n::\n\n $ samsungctl --host [options] [key ...]\n\n``host`` is the hostname or IP address of the TV. ``key`` is a key code, e.g.\n``KEY_VOLDOWN``. See `Key codes`_.\n\nThere is also an interactive mode (ncurses) for sending the key presses:\n\n::\n\n $ samsungctl --host [options] --interactive\n\nUse ``samsungctl --help`` for more information about the command line\narguments:\n\n::\n\n usage: samsungctl [-h] [--version] [-v] [-q] [-i] [--host HOST] [--port PORT]\n [--method METHOD] [--name NAME] [--description DESC]\n [--id ID] [--timeout TIMEOUT]\n [key [key ...]]\n\n Remote control Samsung televisions via TCP/IP connection\n\n positional arguments:\n key keys to be sent (e.g. KEY_VOLDOWN)\n\n optional arguments:\n -h, --help show this help message and exit\n --version show program's version number and exit\n -v, --verbose increase output verbosity\n -q, --quiet suppress non-fatal output\n -i, --interactive interactive control\n --host HOST TV hostname or IP address\n --port PORT TV port number (TCP)\n --method METHOD Connection method (legacy or websocket)\n --name NAME remote control name\n --description DESC remote control description\n --id ID remote control id\n --timeout TIMEOUT socket timeout in seconds (0 = no timeout)\n\n E.g. samsungctl --host 192.168.0.10 --name myremote KEY_VOLDOWN\n\nThe settings can be loaded from a configuration file. The file is searched from\n``$XDG_CONFIG_HOME/samsungctl.conf``, ``~/.config/samsungctl.conf``, and\n``/etc/samsungctl.conf`` in this order. A simple default configuration is\nbundled with the source as `samsungctl.conf `_.\n\nLibrary usage\n=============\n\nsamsungctl can be imported as a Python 3 library:\n\n.. code-block:: python\n\n import samsungctl\n\nA context managed remote controller object of class ``Remote`` can be\nconstructed using the ``with`` statement:\n\n.. code-block:: python\n\n with samsungctl.Remote(config) as remote:\n # Use the remote object\n\nThe constructor takes a configuration dictionary as a parameter. All\nconfiguration items must be specified.\n\n=========== ====== ===========================================\nKey Type Description\n=========== ====== ===========================================\nhost string Hostname or IP address of the TV.\nport int TCP port number. (Default: ``55000``)\nmethod string Connection method (``legacy`` or ``websocket``)\nname string Name of the remote controller.\ndescription string Remote controller description.\nid string Additional remote controller ID.\ntimeout int Timeout in seconds. ``0`` means no timeout.\n=========== ====== ===========================================\n\nThe ``Remote`` object is very simple and you only need the ``control(key)``\nmethod. The only parameter is a string naming the key to be sent (e.g.\n``KEY_VOLDOWN``). See `Key codes`_. You can call ``control`` multiple times\nusing the same ``Remote`` object. The connection is automatically closed when\nexiting the ``with`` statement.\n\nWhen something goes wrong you will receive an exception:\n\n================= =======================================\nException Description\n================= =======================================\nAccessDenied The TV does not allow you to send keys.\nConnectionClosed The connection was closed.\nUnhandledResponse An unexpected response was received.\nsocket.timeout The connection timed out.\n================= =======================================\n\nExample program\n---------------\n\nThis simple program opens and closes the menu a few times.\n\n.. code-block:: python\n\n #!/usr/bin/env python3\n\n import samsungctl\n import time\n\n config = {\n \"name\": \"samsungctl\",\n \"description\": \"PC\",\n \"id\": \"\",\n \"host\": \"192.168.0.10\",\n \"port\": 55000,\n \"method\": \"legacy\",\n \"timeout\": 0,\n }\n\n with samsungctl.Remote(config) as remote:\n for i in range(10):\n remote.control(\"KEY_MENU\")\n time.sleep(0.5)\n\nKey codes\n=========\n\nThe list of accepted keys may vary depending on the TV model, but the following\nlist has some common key codes and their descriptions.\n\n================= ============\nKey code Description\n================= ============\nKEY_POWEROFF Power off\nKEY_UP Up\nKEY_DOWN Down\nKEY_LEFT Left\nKEY_RIGHT Right\nKEY_CHUP P Up\nKEY_CHDOWN P Down\nKEY_ENTER Enter\nKEY_RETURN Return\nKEY_CH_LIST Channel List\nKEY_MENU Menu\nKEY_SOURCE Source\nKEY_GUIDE Guide\nKEY_TOOLS Tools\nKEY_INFO Info\nKEY_RED A / Red\nKEY_GREEN B / Green\nKEY_YELLOW C / Yellow\nKEY_BLUE D / Blue\nKEY_PANNEL_CHDOWN 3D\nKEY_VOLUP Volume Up\nKEY_VOLDOWN Volume Down\nKEY_MUTE Mute\nKEY_0 0\nKEY_1 1\nKEY_2 2\nKEY_3 3\nKEY_4 4\nKEY_5 5\nKEY_6 6\nKEY_7 7\nKEY_8 8\nKEY_9 9\nKEY_DTV TV Source\nKEY_HDMI HDMI Source\nKEY_CONTENTS SmartHub\n================= ============\n\nPlease note that some codes are different on the 2016+ TVs. For example,\n``KEY_POWEROFF`` is ``KEY_POWER`` on the newer TVs.\n\nReferences\n==========\n\nI did not reverse engineer the control protocol myself and samsungctl is not\nthe only implementation. Here is the list of things that inspired samsungctl.\n\n- http://sc0ty.pl/2012/02/samsung-tv-network-remote-control-protocol/\n- https://gist.github.com/danielfaust/998441\n- https://github.com/Bntdumas/SamsungIPRemote\n- https://github.com/kyleaa/homebridge-samsungtv2016\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Ape/samsungctl", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "samsungctl", "package_url": "https://pypi.org/project/samsungctl/", "platform": "", "project_url": "https://pypi.org/project/samsungctl/", "project_urls": { "Homepage": "https://github.com/Ape/samsungctl" }, "release_url": "https://pypi.org/project/samsungctl/0.7.1/", "requires_dist": null, "requires_python": "", "summary": "Remote control Samsung televisions via TCP/IP connection", "version": "0.7.1" }, "last_serial": 3491957, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "acbffbfe73407428c985a62aecf2587c", "sha256": "59c78d9ace6ac9495d02f10121177cafd2b4ea76036616e1820f6f331ad5f3d1" }, "downloads": -1, "filename": "samsungctl-0.1.0.tar.gz", "has_sig": false, "md5_digest": "acbffbfe73407428c985a62aecf2587c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2947, "upload_time": "2014-03-14T09:56:58", "url": "https://files.pythonhosted.org/packages/50/78/3cd11b7f7b748b9b2827e30c79ffdc81f928ea734a802d497cef80eb5050/samsungctl-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "cf6ceddff8a990883529455ad84eef26", "sha256": "8bf6c1918c874eda401c57aee25bef1a3d4f440bbafc894992495479a1162eda" }, "downloads": -1, "filename": "samsungctl-0.1.1.tar.gz", "has_sig": false, "md5_digest": "cf6ceddff8a990883529455ad84eef26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2975, "upload_time": "2014-03-14T21:52:00", "url": "https://files.pythonhosted.org/packages/34/39/ad94af0f1be381be4c18659b85286699e52645faa3be932cfd915092b762/samsungctl-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "a46b8fb1be648f5867898af65be53e46", "sha256": "a6c253d4f228f2efe5e2bb7dae76e02aad2644cdc020ac4688d2e59d4e42d7eb" }, "downloads": -1, "filename": "samsungctl-0.2.0.tar.gz", "has_sig": false, "md5_digest": "a46b8fb1be648f5867898af65be53e46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3414, "upload_time": "2014-03-19T18:37:11", "url": "https://files.pythonhosted.org/packages/c0/90/a019b6bdf03adb84c312158466a5b60de71a76281ab31885283155d1ef63/samsungctl-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "19311d9c3f0dcd12308fff35197e8965", "sha256": "6fe7de40c029afa215ceddf5cd13d74e3de0a9902101bf9958629bc752ca4af8" }, "downloads": -1, "filename": "samsungctl-0.3.0.tar.gz", "has_sig": false, "md5_digest": "19311d9c3f0dcd12308fff35197e8965", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4055, "upload_time": "2014-03-21T17:12:13", "url": "https://files.pythonhosted.org/packages/60/95/30a4b5e1edea7654ba6b083be78cab64aff190914eb2a355b7e5bcef0c75/samsungctl-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "bfb2817d138d223d125b1f13c622a046", "sha256": "76606e24468cbcd10a364344c1ad79c753196c551552f96e654bde6d817866bb" }, "downloads": -1, "filename": "samsungctl-0.4.0.tar.gz", "has_sig": false, "md5_digest": "bfb2817d138d223d125b1f13c622a046", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4570, "upload_time": "2016-01-06T10:35:43", "url": "https://files.pythonhosted.org/packages/1a/f2/25fe71bc0ca096bd3362d939e3b771470df320305733d0c674e5e8c3e4ef/samsungctl-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "addd6426712c32baf2f3beb6f03a984c", "sha256": "b560384434d8990dae97227884bf97b44b43e4238e66c8ae9f7e24c8740772d2" }, "downloads": -1, "filename": "samsungctl-0.5.0.tar.gz", "has_sig": false, "md5_digest": "addd6426712c32baf2f3beb6f03a984c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4933, "upload_time": "2016-01-07T12:05:57", "url": "https://files.pythonhosted.org/packages/2d/f2/31348c017a322322ddaef11b8079451db86f60941c7936e0e4566670f4c7/samsungctl-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "8e644739ff9c9968bfd4124eb2602df0", "sha256": "1448cb203ed037e624b5bc31942d9b449670d9f88c849c08d866f76d52f4117f" }, "downloads": -1, "filename": "samsungctl-0.5.1.tar.gz", "has_sig": false, "md5_digest": "8e644739ff9c9968bfd4124eb2602df0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5870, "upload_time": "2016-01-20T13:43:30", "url": "https://files.pythonhosted.org/packages/88/ad/7e0e701cc46b0caef4d361a4d9524d2268b4bccc0ea71967a2473c2ade89/samsungctl-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "fea2e755b3c307d7a8edecc1b2822d22", "sha256": "59d4666baab4446879710779604b6c01620a3c107f719f6bcaa5c46455456fd7" }, "downloads": -1, "filename": "samsungctl-0.6.0.tar.gz", "has_sig": false, "md5_digest": "fea2e755b3c307d7a8edecc1b2822d22", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8628, "upload_time": "2016-12-31T08:29:29", "url": "https://files.pythonhosted.org/packages/09/13/9d6bcf85cd142dd35ca11de6fa32b773e825b2a1b7ab056e9259af40d426/samsungctl-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "c722997d44b50d00a1261d054122b09e", "sha256": "023b19c0f9cbd1ad0f359bbe005f6d1d730b94ebeebdbb90830c4f2984dedb37" }, "downloads": -1, "filename": "samsungctl-0.7.0.tar.gz", "has_sig": false, "md5_digest": "c722997d44b50d00a1261d054122b09e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8806, "upload_time": "2017-11-01T10:06:24", "url": "https://files.pythonhosted.org/packages/a2/18/d299268c9094df031887c4a50de416878a2b89b01f6b44f500a895f424b7/samsungctl-0.7.0.tar.gz" } ], "0.7.1": [ { "comment_text": "", "digests": { "md5": "ee02d16491f65be09ae21787885dfeb0", "sha256": "2fc175fb730b39ebaed5d95db178a6daeec1b802146b0116ed13e7629a1bff46" }, "downloads": -1, "filename": "samsungctl-0.7.1.tar.gz", "has_sig": false, "md5_digest": "ee02d16491f65be09ae21787885dfeb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8933, "upload_time": "2018-01-15T20:01:01", "url": "https://files.pythonhosted.org/packages/33/13/d97749371984ebacc53e66106cd3d224650aa2e33b21f3a4fcb4375435b3/samsungctl-0.7.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee02d16491f65be09ae21787885dfeb0", "sha256": "2fc175fb730b39ebaed5d95db178a6daeec1b802146b0116ed13e7629a1bff46" }, "downloads": -1, "filename": "samsungctl-0.7.1.tar.gz", "has_sig": false, "md5_digest": "ee02d16491f65be09ae21787885dfeb0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8933, "upload_time": "2018-01-15T20:01:01", "url": "https://files.pythonhosted.org/packages/33/13/d97749371984ebacc53e66106cd3d224650aa2e33b21f3a4fcb4375435b3/samsungctl-0.7.1.tar.gz" } ] }