{ "info": { "author": "Alex Peters", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Typing :: Typed" ], "description": "################################################################\n``metlinkpid``: Metlink LED passenger information display driver\n################################################################\n\n.. image:: https://img.shields.io/pypi/v/metlinkpid.svg\n :target: https://pypi.org/project/metlinkpid\n :alt: latest release on PyPI\n.. image:: https://travis-ci.org/Lx/python-metlinkpid.svg\n :target: https://travis-ci.org/Lx/python-metlinkpid\n :alt: build & test status\n.. image:: https://coveralls.io/repos/github/Lx/python-metlinkpid/badge.svg\n :target: https://coveralls.io/github/Lx/python-metlinkpid\n :alt: test coverage status\n.. image:: https://readthedocs.org/projects/python-metlinkpid/badge\n :target: https://python-metlinkpid.readthedocs.io\n :alt: documentation build status on Read the Docs\n\nThe ``metlinkpid`` module provides a class to operate Metlink LED passenger information displays:\n\n>>> from metlinkpid import PID\n>>> with PID.for_device('/dev/ttyUSB0') as pid:\n... pid.send('12:34 FUNKYTOWN~5_Limited Express|_Stops all stations except East Richard')\n\nIt also provides a function to inspect raw display data,\nboth with and without checksumming & packet-framing:\n\n>>> from metlinkpid import inspect\n>>> inspect(b'\\x10\\x02\\x01\\x44\\x00\\x1D\\x00\\x00\\x00\\x4F\\x50\\x45\\x4E\\x0A\\x46\\x4F\\x52\\x20\\x42\\x55\\x53\\x49\\x4E\\x45\\x53\\x53\\x0D\\x8F\\xDF\\x10\\x03')\nDisplayMessage.from_str('V0^OPEN_FOR BUSINESS')\n>>> inspect(b'\\x01\\x44\\x00\\x1D\\x00\\x00\\x00\\x53\\x54\\x49\\x4C\\x4C\\x20\\x4F\\x50\\x45\\x4E\\x0A\\x46\\x4F\\x52\\x20\\x42\\x55\\x53\\x49\\x4E\\x45\\x53\\x53\\x0D')\nDisplayMessage.from_str('V0^STILL OPEN_FOR BUSINESS')\n>>> inspect(b'\\x01\\x50\\x6F')\nPingMessage(unspecified_byte=111)\n\n\nInstallation\n============\n\nInstall from PyPI_ using pip_::\n\n pip install -U metlinkpid\n\n.. _PyPI: https://pypi.org/project/metlinkpid\n.. _pip: https://pip.pypa.io/\n\n\nBasic usage\n===========\n\nFind the device\n---------------\n\nDetermine the device to which the display is connected.\nOn Linux, this can be achieved by disconnecting the display from the computer & reconnecting,\nthen inspecting the contents of ``dmesg`` output for USB attachment messages::\n\n [ 3.010816] usb 1-1.4: FTDI USB Serial Device converter now attached to ttyUSB0\n\nThe above output indicates that the display is reachable through ``/dev/ttyUSB0``.\n\nDisplay a message\n-----------------\n\nNext, write & run a Python script\nthat connects to that device location\nand calls ``PID.send()``::\n\n from metlinkpid import PID\n with PID.for_device('/dev/ttyUSB0') as pid:\n pid.send('12:34 FUNKYTOWN~5_Limited Express|_Stops all stations except East Richard')\n\nThe PID should display the specified message instantly,\nbut after approximately one minute the display will self-clear.\n\nKeep the message up\n-------------------\n\nTo prevent the message from clearing,\nthe display can be *pinged* at a regular interval::\n\n from time import sleep\n\n from metlinkpid import PID\n with PID.for_device('/dev/ttyUSB0') as pid:\n pid.send('12:34 FUNKYTOWN~5_Limited Express|_Stops all stations except East Richard')\n\n while True:\n sleep(10)\n pid.ping()\n\n\nMessage format\n--------------\n\nUse the ``|`` character to separate *pages* of a message::\n\n pid.send('V10^FIRST_PAGE|V10^SECOND_PAGE|V10^THIRD_PAGE')\n\nThe message in the above ``send()`` call has three pages:\n``V10^FIRST_PAGE``, ``V10^SECOND_PAGE``, and ``V10^THIRD_PAGE``.\n\nPage format\n-----------\n\nEverything in a page up to and including the ``^`` affects the display of the page,\nand is not included in the output.\nThe letter specifies the *animation* and can be ``V`` for a vertical upwards scroll,\n``H`` for a horizontal scroll,\nor ``N`` for no animation.\nThe number specifies the *delay* (in roughly quarter-seconds)\nafter the animation finishes and before the next page (or first page again) is shown.\n\nText after ``~`` will be right-aligned on the current line,\nand text after ``_`` will appear on the next line.\nEach page in the above example therefore spans two lines.\n\nSome ASCII characters *are not* available for display,\nand some \"extended\" Unicode characters *are* available.\nFull details are in the `documentation`_ for the ``Page`` class.\n\n.. _documentation:\n https://python-metlinkpid.readthedocs.io/en/latest/sending/page.html\n\n\nKnown issues\n============\n\nAnimation types\n Not all known page animation types are implemented yet.\n\n``PID`` class unit testing\n Unit tests have not yet been written for the ``PID`` class.\n A suitable serial port mocking interface is yet to be found.\n\n\nSupport\n=======\n\nThe ``metlinkpid`` module is fully documented.\nAll further usage & development details can be found in the documentation.\nBug reports, feature requests, and questions are welcome via the issue tracker.\n\n:Documentation: https://python-metlinkpid.readthedocs.io\n:Issue tracker: https://github.com/Lx/python-metlinkpid/issues\n\n\nChanges\n-------\n\n1.0.1\n Add support for Python 3.6.\n\n1.0.0\n Initial release.\n\n\nContribute\n==========\n\nPull requests for both code and documentation improvements\nare gratefully received and considered.\n\n:GitHub repository: https://github.com/Lx/python-metlinkpid\n\n\nLicense\n=======\n\nThis project is licensed under the `MIT License`_.\n\n.. _MIT License: https://opensource.org/licenses/MIT\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Lx/python-metlinkpid", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "metlinkpid", "package_url": "https://pypi.org/project/metlinkpid/", "platform": "", "project_url": "https://pypi.org/project/metlinkpid/", "project_urls": { "Homepage": "https://github.com/Lx/python-metlinkpid" }, "release_url": "https://pypi.org/project/metlinkpid/1.0.1/", "requires_dist": [ "attrs", "dlestxetx", "crccheck", "pyserial" ], "requires_python": "~=3.6", "summary": "Metlink LED passenger information display driver", "version": "1.0.1" }, "last_serial": 5395473, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "23e6dc5afc5cef15c198cc09abc9ee2b", "sha256": "5e09b997c466f57a37ab99772db09e53ded7076a0d278303bc6d81af215fb456" }, "downloads": -1, "filename": "metlinkpid-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "23e6dc5afc5cef15c198cc09abc9ee2b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.7", "size": 12100, "upload_time": "2019-06-13T08:02:55", "url": "https://files.pythonhosted.org/packages/a1/a1/cd0b791e46242e2373aae42f1994c3a4e31c4bc0a9d52f991e2acd8ee792/metlinkpid-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5b86fa0306f9b7496b4fcebc20543ec2", "sha256": "5a42df509023fb61fcce541fe9e16426f08dc3e54331f016c4fb9436436bd46b" }, "downloads": -1, "filename": "metlinkpid-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5b86fa0306f9b7496b4fcebc20543ec2", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.7", "size": 12641, "upload_time": "2019-06-13T08:02:57", "url": "https://files.pythonhosted.org/packages/f0/9d/0524cbf9c57888662b17e4ea3dafd3df38cc1a63fd40b54c691898a6fdf3/metlinkpid-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "6e78a8887670daafc8df437cc6a71533", "sha256": "b88aa440e1bebe980eab0c2be87219855d43ea1980eac47cee5bb0bd396dc8a0" }, "downloads": -1, "filename": "metlinkpid-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6e78a8887670daafc8df437cc6a71533", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 12298, "upload_time": "2019-06-13T11:06:34", "url": "https://files.pythonhosted.org/packages/7d/70/5beb18ea45618a4f9e5732c37f1ca50290358ab83a3a383c53098299f9ab/metlinkpid-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de76b0da2769ffc0021d33dff47eedf7", "sha256": "78af7520385665a1fed9a2e8b67fe6a3373e5266f975473e5412ae44712e773c" }, "downloads": -1, "filename": "metlinkpid-1.0.1.tar.gz", "has_sig": false, "md5_digest": "de76b0da2769ffc0021d33dff47eedf7", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 12918, "upload_time": "2019-06-13T11:06:36", "url": "https://files.pythonhosted.org/packages/d7/07/4ad627fb2eea2b910bf0ce2eea1952e8d939b354b067af7bde179a5aa388/metlinkpid-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6e78a8887670daafc8df437cc6a71533", "sha256": "b88aa440e1bebe980eab0c2be87219855d43ea1980eac47cee5bb0bd396dc8a0" }, "downloads": -1, "filename": "metlinkpid-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "6e78a8887670daafc8df437cc6a71533", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": "~=3.6", "size": 12298, "upload_time": "2019-06-13T11:06:34", "url": "https://files.pythonhosted.org/packages/7d/70/5beb18ea45618a4f9e5732c37f1ca50290358ab83a3a383c53098299f9ab/metlinkpid-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "de76b0da2769ffc0021d33dff47eedf7", "sha256": "78af7520385665a1fed9a2e8b67fe6a3373e5266f975473e5412ae44712e773c" }, "downloads": -1, "filename": "metlinkpid-1.0.1.tar.gz", "has_sig": false, "md5_digest": "de76b0da2769ffc0021d33dff47eedf7", "packagetype": "sdist", "python_version": "source", "requires_python": "~=3.6", "size": 12918, "upload_time": "2019-06-13T11:06:36", "url": "https://files.pythonhosted.org/packages/d7/07/4ad627fb2eea2b910bf0ce2eea1952e8d939b354b067af7bde179a5aa388/metlinkpid-1.0.1.tar.gz" } ] }