{"id":15685485,"url":"https://github.com/aldaviva/webscale","last_synced_at":"2025-05-07T18:05:18.620Z","repository":{"id":21185508,"uuid":"24491670","full_name":"Aldaviva/webscale","owner":"Aldaviva","description":"⚖ Measure weight using a Stamps.com digital USB postage scale.","archived":false,"fork":false,"pushed_at":"2025-03-29T05:00:19.000Z","size":23,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-07T18:01:54.081Z","etag":null,"topics":["postage","scale","stamps-com","usb-hid","weight"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/webscale","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Aldaviva.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"custom":["https://paypal.me/aldaviva"]}},"created_at":"2014-09-26T08:12:29.000Z","updated_at":"2025-03-29T04:54:55.000Z","dependencies_parsed_at":"2024-10-23T19:26:02.939Z","dependency_job_id":"941f2be3-c90a-41d0-af1a-a1251f2d2084","html_url":"https://github.com/Aldaviva/webscale","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Fwebscale","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Fwebscale/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Fwebscale/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Aldaviva%2Fwebscale/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Aldaviva","download_url":"https://codeload.github.com/Aldaviva/webscale/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252931533,"owners_count":21827111,"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":["postage","scale","stamps-com","usb-hid","weight"],"created_at":"2024-10-03T17:25:30.353Z","updated_at":"2025-05-07T18:05:18.573Z","avatar_url":"https://github.com/Aldaviva.png","language":"JavaScript","funding_links":["https://paypal.me/aldaviva"],"categories":[],"sub_categories":[],"readme":"WebScale\n========\n\nMeasure weight using a Stamps.com digital USB postage scale.\n\n![Stamps.com 5-pound digital postage scale](.github/images/SC05500000_small.jpg)\n\n## Hardware\n*I successfully performed these steps in [September 2014](https://twitter.com/Aldaviva/status/516771809962651648). Today, it may work differently, or not at all.*\n\n1. Sign up for free trial at [Stamps.com](https://registration.stamps.com/registration/).\n2. During signup, request a complimentary [5-pound digital postage scale](https://store.stamps.com/collections/hardware/products/5lb-scale). Pay $9.99 USD shipping and handling.\n3. Before the four-week trial is up, [cancel your account](https://www.stamps.com/postage-online/faqs/) and avoid the monthly fee.\n\n## Installation\n[This package is available on npm.](https://www.npmjs.com/package/webscale)\n```sh\n$ npm install webscale\n```\nIn the event of installation trouble, refer to the [node-hid documentation](https://github.com/node-hid/node-hid/blob/master/README.md).\n\n## Usage\n```javascript\nconst WebScale = require('webscale');\nconst webScale = new WebScale();\n\nwebScale.on('change:weight', ounces =\u003e {\n    console.log(`${ounces} oz.`);\n});\n```\nSee also [`test-client.js`](https://github.com/Aldaviva/webscale/blob/master/test-client.js).\n\n## Events\n\n### change:weight\nCalled whenever the scale's weight reading changes.\n#### Arguments\n- **ounces** how much weight is on the scale, in ounces. Floating-point number with precision of one digit after the decimal place (tenths of ounces). Can be negative if the scale was tared with weight on it.\n\n### connected\nCalled when the program first starts and connects successfully to the device, or when it reconnects after losing the connection.\n\n### disconnected\nCalled when the device is unplugged or powered off, and once per reconnect attempt.\n\n### error\nAn error with the USB device occurred (except disconnections, see above).\n#### Arguments\n- **error** The error from node-hid.\n\n## Methods\n\n### tare()\nReset the scale so the current weight will be read as zero. The scale will also automatically tare itself each time it powers on.\n\n### disconnect()\nDisconnect from the USB device.\n\n## See Also\n- **[Aldaviva/WebScale.net](https://github.com/Aldaviva/WebScale.net)** - this library ported from Node.js to .NET","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldaviva%2Fwebscale","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faldaviva%2Fwebscale","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faldaviva%2Fwebscale/lists"}