{"id":15598186,"url":"https://github.com/boneskull/es51922","last_synced_at":"2025-03-26T03:32:00.224Z","repository":{"id":48001065,"uuid":"193309580","full_name":"boneskull/es51922","owner":"boneskull","description":"Streaming Cyrustek ES51922 DMM data protocol implementation over serial","archived":true,"fork":false,"pushed_at":"2023-01-04T03:53:50.000Z","size":1291,"stargazers_count":4,"open_issues_count":16,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T02:03:20.075Z","etag":null,"topics":["data-logging","es51922","ftdi","kaitai","multimeter","protocol","rs232","rxjs","serial","serialport","stream","ut61e"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boneskull.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-23T05:21:27.000Z","updated_at":"2024-11-19T20:01:42.000Z","dependencies_parsed_at":"2023-02-01T19:31:47.106Z","dependency_job_id":null,"html_url":"https://github.com/boneskull/es51922","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":"boneskull/boneskull-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fes51922","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fes51922/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fes51922/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boneskull%2Fes51922/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boneskull","download_url":"https://codeload.github.com/boneskull/es51922/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245585215,"owners_count":20639667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-logging","es51922","ftdi","kaitai","multimeter","protocol","rs232","rxjs","serial","serialport","stream","ut61e"],"created_at":"2024-10-03T01:29:50.659Z","updated_at":"2025-03-26T03:31:59.806Z","avatar_url":"https://github.com/boneskull.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# es51922\n\n\u003e Streaming Cyrustek ES51922 DMM data protocol implementation over serial\n\nThe Cyrustek ES51922 is an IC found in several multimeters with \"data-out\" capability, including the UNI-T UT61E and Wintex TD2200 (source: [sigrok.org](https://sigrok.org/wiki/Multimeter_ICs)).\n\nThe `es51922` module provides both Observable ([RxJS](https://rxjs.dev)) and object-mode [Readable Stream](https://nodejs.org/api/stream.html#stream_readable_streams) APIs.\n\n## Install\n\n```shell\n$ npm install es51922\n```\n\n## Usage\n\n### Observable API\n\n```js\nimport {fromES51922} from 'es51922';\n\nfromES51922('/dev/ttyUSB0').subscribe(data =\u003e {\n  console.log(`${data.value} ${data.range.unit}`);\n});\n```\n\nExample output:\n\n```plain\n3.269 V\n3.209 V\n3.268 V\n3.268 V\n3.267 V\n```\n\n### Node.js Stream API\n\nThis is _equivalent_ to the above:\n\n```js\nimport {readES51922Stream} from 'es51922';\n\nreadES51922Stream('/dev/ttyUSB0').on('data', data =\u003e {\n  console.log(`${data.value} ${data.range.unit}`);\n});\n```\n\n### Data Format\n\nTODO (describe shape of object)\n\n### Environment\n\nDefine the `ES51922_PORT` environment variable to avoid needing to pass it directly to the API. This module also accepts an `.env` file (for [dotenv](https://npm.im/dotenv)).\n\n## Development\n\n`src/es51922.ksy.yml` contains a [Kaitai Struct](https://kaitai.io/) format description of the data protocol. The Kaitai Struct compiler generates the parser, which lives in `vendor/es51922.js`.\n\nThe _reference_ Kaitai Struct compiler is implemented in Scala, so it would be a hassle to compile as part of a build step. The Kaitai Struct team publishes a [pure-JS implementation](https://npm.im/kaitai-struct-compiler) to npm, but it has not kept pace with the Scala implementation; it fails to parse our format description file.\n\nUntil the JS implementation ready for use, you can [install the Kaitai Struct compiler from kaitai.io](http://kaitai.io/#download), and execute `npm run compile-posix` (Windows users may need to tweak the run script). This (should) update `vendor/es51922.js`.\n\n## Notes\n\n- Temperature and ADP modes are unimplemented (and will likely remain so).\n- The Python [ut61e](https://github.com/pklaus/ut61e_python) package helped immensely w/ understanding the protocol.\n- This module won't work with Hoitek HE2325U or WCH CH9325 USB/HID adapter cables.\n- I'm using a FTDI FT232R-based RS232-to-USB converter. YMMV.\n- AFAIK there's no graphical viewer which supports this format available on macOS.\n- My ultimate goal is to use this module in a nice graphical interface with real-time interactive charts and shit.\n\n## See Also\n\n- [ES51922 Datasheet](http://www.cyrustek.com.tw/spec/ES51922.pdf)\n- [ut61e](https://npm.im/ut61e) - A Node.js package which wraps the ut61e Python package\n\n## Contributing\n\nPR's welcome! Please use the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0-beta.4/) specification.\n\n## License\n\nCopyright © 2019 Christopher Hiller. Licensed Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Fes51922","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboneskull%2Fes51922","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboneskull%2Fes51922/lists"}