{ "info": { "author": "Colin S.", "author_email": "3526918+cbs228@users.noreply.github.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Framework :: Twisted", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Hardware :: Hardware Drivers" ], "description": "# TC2100 Thermometer Interface\n\n> Receive measurements from your TC2100 or other compatible digital thermometer\n> over USB.\n\n## Motivation\n\nThe TC2100 is a digital thermometer which supports\n\n* two simultaneous measurement channels; and\n* seven standard types of thermocouples.\n\nAlthough it is usable as a standalone meter, it also includes a USB interface\nfor real-time computer output.\n\nThe manufacturer provides software for the USB interface. *This is not it.*\nThis is unsupported, third-party software which was developed by reverse\nengineering.\n\nThe `tc2100` module is a python\u00a03.6 software development kit for receiving\nreal-time temperature measurements. It includes a console script, `tc2100dump`,\nfor logging measurements to [csv](https://docs.python.org/3.6/library/csv.html)\nfiles.\n\n## Supported Devices\n\nAt present, only one device is supported by this module.\n\n| Name | Vendor ID (hex) | Product ID (hex) |\n|------------------------|------------------|-------------------|\n| TC2100 | `10c4` | `ea60` |\n\nOther devices have not been tested and are unlikely to work. If you have another\ndevice which works, open a bug report and ask that it be added to this table.\n\n## The Fine Print\n\nIn case you missed it above, this project is not affiliated with the original\nmanufacturer(s). To our knowledge, the telemetry format is not specified in any\n[other] public documents. It has been reverse-engineered without assistance or\nsupport from the manufacturer. Read the\n[license](https://github.com/cbs228/tc2100/blob/master/LICENSE) carefully, as\nit may affect your rights. There is no warranty.\n\n*Use of these programs in safety-critical applications is strongly discouraged.*\n\n## Installation\n\n```bash\npip3 install tc2100\n```\n\nThis module requires [twisted](http://twistedmatrix.com/) and\n[pyserial](https://pyserial.readthedocs.io/en/latest/pyserial.html). The pip\npackage will automatically install these dependencies.\n\n## Quick Start\n\nUsing the supplied USB cable, connect a TC2100 thermometer to your computer.\nHold down the \"PC Link\" button until the meter beeps and the \"USB\" indicator\nilluminates. Then run:\n\n```bash\ntc2100dump --out temperatures.csv\n```\n\nIf you receive \"`permission denied`\" errors on Linux, you need to grant your\nuser account permission to use serial devices. On most distributions, including\nUbuntu and CentOS, this can be accomplished by adding yourself to the `dialout`\ngroup:\n\n```bash\nsudo usermod -a -G dialout \"$USER\"\n```\n\nOnce you perform the above modification, you will need to log out and log back\nin again. Never run this program as root!\n\nWhen running `tc2100dump`, you may omit the `--out` argument to write\nmeasurements to standard output. You may also call this module as an executable\nwith\n\n```bash\npython3 -m tc2100 --out temperatures.csv\n```\n\nThe script will attempt to auto-detect the correct port for your thermometer.\nIf auto-detection fails, you may specify the port manually:\n\n```bash\ntc2100dump --port /dev/ttyUSB0 --out temperatures.csv\n```\n\n## Development Status\n\nThis module is likely *feature-complete*. It does what I need it to do, and\nadditional features are not planned. Bug reports which are broadly categorized\nas feature requests will probably be rejected. I am also unable to support the\ninclusion of additional devices\u2014even similar ones.\n\nIf you observe inconsistencies or other issues with the telemetry output, and\ncan identify them, please submit a bug report. If able, please include a capture\nof the serial data stream and the expected behavior with your report.\n\nPull requests within the scope of this project are welcome, especially if they\nfix bugs. Please ensure that your PRs include tests and pass the included `tox`\nchecks.\n\n## Technical Details\n\nThe TC2100 incorporates a UART-to-USB chipset, which emulates a serial port over\nUSB. When plugged in, most computers will automatically detect it as a serial\nport, like `/dev/ttyUSB0` or `COM1`. No additional drivers are required.\n\nThe thermometer has a USB vendor\u00a0ID of `0x10c4` and a product\u00a0ID of `0xea60`.\nThe meter's serial adapter uses `9600`\u00a0baud with the common `8N1`\u00a0format: eight\ndata bits, no parity, and one stop bit.\n\nOnce the \"PC Link\" button is pressed, updates begin to stream immediately, at\nregular intervals. Each update is an 18\u00a0byte packet which begins with the hex\nbytes `b\"\\x65\\x14\"` and ends with a CRLF (`b\"\\x0d\\x0a\"`). Multi-byte quantities\nare sent `big endian`.\n\nThis is an example update, in hex:\n\n```\n65 14 00 00 00 00 8D 09 0C 01 81 88 40 00 02 05 0D 0A\n```\n\nBytes are decoded as follows:\n\n| Offset (dec) | C Type | Description |\n|---------------|---------------|---------------------------------|\n| 0 | `uint8[2]` | Header |\n| 2 | `uint8[3]` | Unknown\u2014always zeros |\n| 5 | `int16` | Channel 1 measurement |\n| 7 | `int16` | Channel 2 measurement |\n| 9 | `uint8` | Thermocouple type, other data |\n| 10 | `uint8` | Display unit, other data |\n| 11 | `uint8` | Channel 1 flags |\n| 12 | `uint8` | Channel 2 flags |\n| 13 | `uint8` | Hours |\n| 14 | `uint8` | Minutes |\n| 15 | `uint8` | Seconds |\n| 16 | `uint8[2]` | CRLF |\n\n* The update message cannot be expressed as a C\u00a0struct, as it lacks the proper\n alignment.\n* Measurement **values** are\n - expressed in tenths of degrees\n - in sign-magnitude format. The sign bit is part of the flag bytes (11 and 12)\n - expressed in the same units as the thermometer is set to display. Byte 10\n indicates the unit of measure.\n* Channel **flags** are OR'd together:\n - Valid measurement: `0x08`\n - Invalid measurement: `0x40`. Channels which do not have a thermocouple\n connected will have this flag.\n - Negative measurement: `0x80`\n* The thermocouple **type** and temperature **units** are stored in the least\n significant nibble of those bytes. The upper nibble contains other data.\n\nThe above measurement is in degrees Celsius. The channel\u00a01 measurement is\n`-14.1 \u00b0C`, and the channel\u00a02 measurement is invalid.\n\nFurther details are included in the python class `tc2100.Observation`. Unit\ntests include more sample data.\n\n----\n\nLicense - [MIT](https://github.com/cbs228/tc2100/blob/master/LICENSE)\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cbs228/tc2100", "keywords": "thermometer tc2100 thermocouple 10c4:ea60 serial driver", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tc2100", "package_url": "https://pypi.org/project/tc2100/", "platform": "any", "project_url": "https://pypi.org/project/tc2100/", "project_urls": { "Homepage": "https://github.com/cbs228/tc2100" }, "release_url": "https://pypi.org/project/tc2100/0.1.0/", "requires_dist": [ "pyserial (~=3.4)", "twisted (~=18.9.0)" ], "requires_python": ">=3.6", "summary": "Receive data from a compatible USB digital thermometer", "version": "0.1.0" }, "last_serial": 4510473, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "ce15a06841415fe88190f2e07fd549e4", "sha256": "7026a0e1887bd2fb1308571b297a342199c3693b8632795f8008c7420db5a16d" }, "downloads": -1, "filename": "tc2100-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ce15a06841415fe88190f2e07fd549e4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14765, "upload_time": "2018-11-21T02:37:56", "url": "https://files.pythonhosted.org/packages/3d/b7/7892ef763a7f87bd32f6905b6dc84c282a35b81f4cf81489fcfaf1951248/tc2100-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8664dde6b6ac85819225facfe0f58596", "sha256": "ea199d0cef53073895dd4d1eaad5df885b53020f8767484db31b20dfcecaf83e" }, "downloads": -1, "filename": "tc2100-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8664dde6b6ac85819225facfe0f58596", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 15205, "upload_time": "2018-11-21T02:37:58", "url": "https://files.pythonhosted.org/packages/cb/2f/cce51bfb0fed04313b0978eb2195eb76333fecd53a03b3175d2a4c4ba5a5/tc2100-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ce15a06841415fe88190f2e07fd549e4", "sha256": "7026a0e1887bd2fb1308571b297a342199c3693b8632795f8008c7420db5a16d" }, "downloads": -1, "filename": "tc2100-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ce15a06841415fe88190f2e07fd549e4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 14765, "upload_time": "2018-11-21T02:37:56", "url": "https://files.pythonhosted.org/packages/3d/b7/7892ef763a7f87bd32f6905b6dc84c282a35b81f4cf81489fcfaf1951248/tc2100-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8664dde6b6ac85819225facfe0f58596", "sha256": "ea199d0cef53073895dd4d1eaad5df885b53020f8767484db31b20dfcecaf83e" }, "downloads": -1, "filename": "tc2100-0.1.0.tar.gz", "has_sig": false, "md5_digest": "8664dde6b6ac85819225facfe0f58596", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 15205, "upload_time": "2018-11-21T02:37:58", "url": "https://files.pythonhosted.org/packages/cb/2f/cce51bfb0fed04313b0978eb2195eb76333fecd53a03b3175d2a4c4ba5a5/tc2100-0.1.0.tar.gz" } ] }