{ "info": { "author": "David LAURENT", "author_email": "dragouf@hotmail.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Home Automation" ], "description": "# sfrtvctl\n\npython library which can also be use in command line.\n\nSummary\n==========\n\ncommands are sent by websocket on port 7682 with sub-protocol lws-bidirectional-protocol.\n\nthere is multiple kind of data structure depending on kind of commands we went to send.\n\nsend commands :\nBUTTONEVENT structure for classical remote keys (volume, power, ok, return, pause, play, forward, rewind, directionnal keys, num pad)\nZAP structure to send a channel number in 1 request.\nAPP structure to launch special function of the decoder (mosaic, tv guide, vod, replay, recording, media center, settings)\nSETVOLUME structure to set the volume\nKEYBOARD structure to type when inside input field\n\nInfo commands (not yet implemented):\nGETINFO and GETVERSION\n\nInstallation\n============\n\nsfrtvctl can be installed using `pip <(https://pip.pypa.io/>`_:\n\n::\n\n # pip install websocket-client\n # pip install sfrtvctl\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 sfrtvctl\n\nBUTTONEVENT\n============\n\nBUTTONEVENT take a second argument to specify the key pressed and a third in case you specify NUM.\n\nthe table here resume each possible actions for BUTTONEVENT :\n\n| Key Pressed (second argument) | Description |\n| ------------------------------ | ------------------------- |\n| VUP | Volume up |\n| VDOWN | Volume Down |\n| RIGHT | multidirectionnal right |\n| LEFT | multidirectionnal left |\n| UP | multidirectionnal up |\n| DOWN | multidirectionnal down |\n| PUP | Program up |\n| PDOWN | Program down |\n| INFO | Current program info |\n| RETURN | return key |\n| OK | OK key |\n| NUMBER | a digit key. take a third argument for the digit |\n| PLAYPAUSE | play or pause key |\n| FORWARD | fast forward key |\n| REWIND | fast rewind key |\n| MUTE | mute sound key |\n| POWER | power on/off key |\n\nin command line mode here is an example of command : \n```sfrtvctl --host 192.168.1.100 BUTTONEVENT VUP``` # increase volume \n```sfrtvctl --host 192.168.1.100 BUTTONEVENT NUMBER 1``` # type 1 on num pad (will change channel if watching tv) \n\nZAP\n====\n\nZAP command is simple, it just take a number as second argument.\n\nin command line mode here is an example of command : \n```sfrtvctl --host 192.168.1.100 ZAP 180``` # will go to channel 180 \n\nAPP\n===\n\n| Command | Description |\n| ------------- | --------------------------------- |\n| MOSAIC | Mosaique |\n| TVGUIDE | Guide TV |\n| VOD | SFR Play |\n| REPLAY | TV replay |\n| RECORDING | List recorded shows |\n| MEDIACENTER | media center (usb, network media) |\n| SETTINGS | Decoder settings |\n\nin command line mode here is an example of command :\n```sfrtvctl --host 192.168.1.100 MOSAIC``` # will display mosaique\n\nSETVOLUME\n==========\n\nSETVOLUME command is simple, it just take a number between 1 and 100 as second argument to set volume.\n\nin command line mode here is an example of command : \n```sfrtvctl --host 192.168.1.100 SETVOLUME 40``` # will set volume to 40 \n\nKEYBOARD\n=========\n\nwill send keyboard data. This command has a special character to start search which you can send by passing SEARCH as a second argument. To start typing you must send first VALUE and then a third argument.\n\n| Command | Description |\n| ------------- | ---------------------------------------- |\n| SEARCH | Start search |\n| VALUE | send keyboard key pass in third argument |\n\n\nin command line mode here is an example of command : \n```sfrtvctl --host 192.168.1.100 SEARCH``` # will start search \n```sfrtvctl --host 192.168.1.100 VALUE a``` # will type a in an input field \n\n\nLibrary usage\n=============\n\nsfrtvctl can be imported as a Python 3 library:\n\n.. code-block:: python\n\n import sfrtvctl\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 sfrtvctl.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| Key | Type | Description |\n|---------|--------|---------------------------------------------|\n| host | string | Hostname or IP address of the decoder. |\n| port | int | TCP port number. (Default: ``7682``) |\n| timeout | int | Timeout in seconds. ``0`` means no timeout. |\n\nThe ``Remote`` object is very simple and you only need the ``control(key, arg1, arg2)``\nmethod. See tables above for more details about commands you can pass. You can call ``control`` multiple times\nusing the same ``Remote`` object. The connection is automatically closed when\nexiting the ``with`` statement.\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/dragouf/sfrtvctl", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sfrtvctl", "package_url": "https://pypi.org/project/sfrtvctl/", "platform": "", "project_url": "https://pypi.org/project/sfrtvctl/", "project_urls": { "Homepage": "https://github.com/dragouf/sfrtvctl" }, "release_url": "https://pypi.org/project/sfrtvctl/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Remote control SFR TV Power via TCP/IP connection", "version": "0.1.2" }, "last_serial": 3508589, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "73e173ef9c753f224072581c301a9b07", "sha256": "3fb8f00516cdde4e165aab371084aaf1c476d9917942f5c061d3a902f6e23584" }, "downloads": -1, "filename": "sfrtvctl-0.1.0.tar.gz", "has_sig": false, "md5_digest": "73e173ef9c753f224072581c301a9b07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7992, "upload_time": "2018-01-20T21:53:52", "url": "https://files.pythonhosted.org/packages/3b/f9/2823de6c4439be9b3badf117a2c0453b2f1d8b10be7e0ad76f08394712e1/sfrtvctl-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "baa2375754fea549570313d35d324a92", "sha256": "79940f520c057cfde248976b70204511f2877498637ca9c7e2513beede21e4cd" }, "downloads": -1, "filename": "sfrtvctl-0.1.1.tar.gz", "has_sig": false, "md5_digest": "baa2375754fea549570313d35d324a92", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7996, "upload_time": "2018-01-21T10:53:28", "url": "https://files.pythonhosted.org/packages/ad/a5/f7e414e307cf97d0fc8b4c71bf319d1c473d880431cdef5a44dc3709bd69/sfrtvctl-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "6e8d933e1560af50403321e86e769eae", "sha256": "f8c4c27576c0aa40528401fe9b633d391b79f753497510ed6edec660a3d6fd2a" }, "downloads": -1, "filename": "sfrtvctl-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6e8d933e1560af50403321e86e769eae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8044, "upload_time": "2018-01-21T11:34:01", "url": "https://files.pythonhosted.org/packages/73/78/ee4dc6444118edac4a63a4e329adf8da0e9dbada63b62d7017f2583efe50/sfrtvctl-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6e8d933e1560af50403321e86e769eae", "sha256": "f8c4c27576c0aa40528401fe9b633d391b79f753497510ed6edec660a3d6fd2a" }, "downloads": -1, "filename": "sfrtvctl-0.1.2.tar.gz", "has_sig": false, "md5_digest": "6e8d933e1560af50403321e86e769eae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8044, "upload_time": "2018-01-21T11:34:01", "url": "https://files.pythonhosted.org/packages/73/78/ee4dc6444118edac4a63a4e329adf8da0e9dbada63b62d7017f2583efe50/sfrtvctl-0.1.2.tar.gz" } ] }