{"id":15797274,"url":"https://github.com/kshetline/rpi-acu-rite-temperature","last_synced_at":"2025-04-21T08:31:33.389Z","repository":{"id":98668819,"uuid":"237840745","full_name":"kshetline/rpi-acu-rite-temperature","owner":"kshetline","description":"Library for reading Acu-Rite temperature/humidity sensor with Raspberry Pi via 433Mhz receiver","archived":false,"fork":false,"pushed_at":"2020-04-06T11:20:52.000Z","size":140,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-12T00:26:55.944Z","etag":null,"topics":["433mhz","c-plus-plus","humidity-sensor","javascript","nodejs","raspberry-pi","temperature-sensor","typescript","weather"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kshetline.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2020-02-02T21:38:45.000Z","updated_at":"2024-04-16T21:59:19.000Z","dependencies_parsed_at":"2023-06-09T21:00:09.784Z","dependency_job_id":null,"html_url":"https://github.com/kshetline/rpi-acu-rite-temperature","commit_stats":{"total_commits":38,"total_committers":1,"mean_commits":38.0,"dds":0.0,"last_synced_commit":"05cbb6e762306841d1f9a668c9e1413687d63b8c"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshetline%2Frpi-acu-rite-temperature","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshetline%2Frpi-acu-rite-temperature/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshetline%2Frpi-acu-rite-temperature/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kshetline%2Frpi-acu-rite-temperature/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kshetline","download_url":"https://codeload.github.com/kshetline/rpi-acu-rite-temperature/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223856777,"owners_count":17214938,"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":["433mhz","c-plus-plus","humidity-sensor","javascript","nodejs","raspberry-pi","temperature-sensor","typescript","weather"],"created_at":"2024-10-05T00:06:02.717Z","updated_at":"2025-04-21T08:31:33.364Z","avatar_url":"https://github.com/kshetline.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rpi-acu-rite-temperature\n\n## Library for reading the Acu-Rite 06002M Wireless Temperature and Humidity Sensor using a Raspberry Pi with a 433Mhz receiver\n\n_Note: This software is neither produced by nor endorsed by [Acu-Rite](https://acu-rite.com/site/). The author of this library is not associated with Acu-Rite or its products in any way, apart from finding their [433 MHz remote humidity/temperature sensors](https://www.amazon.com/gp/product/B00T0K8NXC/) useful for this kind of project._\n\n_This library was inspired by work originally done by [Ray Wang](http://rayshobby.net/?p=8998)._\n\n`rpi-acu-rite-temperature` can be used for JavaScript/TypeScript programming in a Node.js environment, or the included C++ code can be used directly. It is the JavaScript/TypeScript interface that is documented here.\n\nFull functionality requires a Raspberry Pi, but this code can be installed and compiled under macOS or Windows in such a way that it returns simulated data for testing and development use.\n\n---\n\u003e **Major change:**\n\u003e\n\u003e As of version 3.0.0, `rpi-acu-rite-temperature` uses the `gpiod` library instead of `pigpio` (or, even earlier in the history of this library, `wiringPi`) for GPIO functionality, as is necessary for Raspberry Pi 5 compatibility. Elevated privileges are no longer required to use this library.\n---\n\n### Installation\n\n`npm install rpi-acu-rite-temperature`\n\n### Usage\n\n`const { addSensorDataListener, removeSensorDataListener } = require('rpi-acu-rite-temperature');`\n\n_...or..._\n\n`import { addSensorDataListener, PinSystem, removeSensorDataListener } from 'rpi-acu-rite-temperature';`\n\n### HtSensorData\n\nThe format of the data returned by this library:\n\n```typescript\nexport interface HtSensorData {\n  batteryLow: boolean;\n  channel: string;       // A, B, C, or - (dash) when dead air detected\n  humidity: number;      // Integer 0-100\n  miscData1: number;     // Bits  2-15 of the transmission.\n  miscData2: number;     // Bits 17-23 of the transmission.\n  miscData3: number;     // Bits 33-35 of the transmission.\n  rawTemp: number;       // Integer tenths of a degree Celsius plus 1000 (original transmission data format)\n  signalQuality: number; // Integer 0-100\n  tempCelsius: number;\n  tempFahrenheit: number;\n  validChecksum: boolean; // Is the data fully trustworthy?\n}\n```\n`channel` is either the single-letter channel identifier A, B, or C, or it's a `-` (dash), indicating that no signal at all (not even radio noise) has been detected for 60 seconds or more. Since an RF receiver module typically outputs a lot of random noise even when it isn't receiving a valid transmission, “dead air” generally means that you've selected the wrong pin number, or the RF module is disconnected,  or it is otherwise not functioning.\n\nEven after a dead air indication has been received, and before signal has been regained, you might receive a few more updates for channels A, B, or C. These are delivered while the signal quality rating of each channel degrades toward zero during the absence of reception.\n\n`humidity` will be `undefined` if the signal was decoded as having a value greater than 100.\n\n`rawTemp` will be `undefined`, and `tempCelsius` and `tempFahrenheit` as well, if the signal was decoded with a value outside of the range ±60°C.\n\n`signalQuality` is measured over a five-minute window, and may register low even for a strong signal until a full five minutes have passed.\n\nIt's best for `validChecksum` to be `true`, but the data provided has at least been validated by three parity bits even if the checksum doesn't come out right. When a weak signal makes updates infrequent, it may be possible, with care, to use somewhat questionable data.\n\n### addSensorDataListener\n\n```\naddSensorDataListener(pin: number | string, callback: HtSensorDataCallback): number;\naddSensorDataListener(pin: number, pinSystem: PinSystem, callback: HtSensorDataCallback): number;\n```\n\nThis function is used to register a callback that receives the above temperature/humidity data. You must specify the input `pin` to which your [433 MHz RF receiver](https://www.amazon.com/gp/product/B00HEDRHG6/) is connected, and optionally specify a pin numbering system. The default is `PinSystem.GPIO`, for Broadcom GPIO numbers. Optionally you may use:\n\n* `PinSystem.PHYS`: physical pin numbers on the P1 connector (1-40) or the Rev. 2 P5 connector (53-56 for P5 3-6) (string suffix `p`)\n* `PinSystem.WIRING_PI`: WiringPi pin numbers (string suffix `w`)\n* `PinSystem.VIRTUAL`: _Same as WiringPi_ (string suffix `v`)\n\n_For more information see: http://wiringpi.com/reference/setup/_\n\nYou can also specify the pin and pin system together as a string value, such as `'13p'`, which is physical pin 13 on the P1 connector.\n\nThe function returns a numeric ID which can be used by the function below to unregister your callback.\n\n### removeSensorDataListener\n\n```\nremoveSensorDataListener(callbackId: number): void;\n```\n\n### convertPin\n\nThis is a utility function for converting between Raspberry Pi pin numbering systems. You can:\n\n1. pass a numeric pin number, the pin system of that pin number, and the pin system you wish to convert to.\n1. pass a numeric GPIO number and the pin system you wish to convert to.\n1. pass a pin number and pin system as one combined string, followed by the pin system you wish to convert to. The pin system for the original pin number is specified by an appended letter (`g`, `p`, `w`, or `v`, as described above), defaulting to GPIO if no letter is provided.\n\nThe function returns the converted pin value. If there is no valid conversion, the function returns `-1`.\n\n```\nexport function convertPin(pin: number, pinSystemFrom: PinSystem, pinSystemTo: PinSystem): number;\nexport function convertPin(gpioPin: number, pinSystemTo: PinSystem): number;\nexport function convertPin(pin: string, pinSystemTo: PinSystem): number;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshetline%2Frpi-acu-rite-temperature","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkshetline%2Frpi-acu-rite-temperature","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkshetline%2Frpi-acu-rite-temperature/lists"}