{"id":33251348,"url":"https://github.com/ryck/MMM-DHT-Sensor","last_synced_at":"2025-11-21T17:02:03.910Z","repository":{"id":22108484,"uuid":"95327435","full_name":"ryck/MMM-DHT-Sensor","owner":"ryck","description":"Magic Mirror 2 module to get data form DHT11, DHT22 and AM2302 sensors","archived":false,"fork":false,"pushed_at":"2024-04-02T21:50:20.000Z","size":3940,"stargazers_count":17,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-29T10:33:26.266Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/ryck.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}},"created_at":"2017-06-24T23:10:36.000Z","updated_at":"2024-01-13T14:05:10.000Z","dependencies_parsed_at":"2022-07-12T06:00:24.998Z","dependency_job_id":null,"html_url":"https://github.com/ryck/MMM-DHT-Sensor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryck/MMM-DHT-Sensor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryck%2FMMM-DHT-Sensor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryck%2FMMM-DHT-Sensor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryck%2FMMM-DHT-Sensor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryck%2FMMM-DHT-Sensor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryck","download_url":"https://codeload.github.com/ryck/MMM-DHT-Sensor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryck%2FMMM-DHT-Sensor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":285655011,"owners_count":27209077,"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","status":"online","status_checked_at":"2025-11-21T02:00:06.175Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-11-17T00:00:30.828Z","updated_at":"2025-11-21T17:02:03.902Z","avatar_url":"https://github.com/ryck.png","language":"JavaScript","funding_links":[],"categories":["Hardware"],"sub_categories":[],"readme":"# MMM-DHT-Sensor\n\nThis a module for the [MagicMirror](https://github.com/MichMich/MagicMirror).\n\nThis module gets data form DHT11, DHT22 and AM2302 sensors.\n\n![](MMM-DHT-Sensor.png)\n\n## bcm2835\n\nThis module uses [node-dht-sensor](https://github.com/momenso/node-dht-sensor) to get the sensor data, and this module depends on [bcm2835](http://www.airspayce.com/mikem/bcm2835/) to do so, therefore you need to install it in your Pi in order to use this module.\n\n```bash\ncd ~\nwget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.77.tar.gz\ntar zxvf bcm2835-1.52.tar.gz\ncd bcm2835-1.52\n./configure\nmake\nsudo make check\nsudo make install\n```\n\n## Installation\n\n```bash\ngit clone https://github.com/ryck/MMM-DHT-Sensor.git\ncd MMM-DHT-Sensor\nnpm install\n```\n\n## Config\n\nThe entry in `config.js` can include the following options:\n\n| Option             | Description                                                                                                                                                                                                                                           |\n| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `sensorPin`        | **Required** This is the GPIO pin the sensor is connected to. **Note:** This is not the hardware pin number.\u003cbr\u003e\u003cbr\u003e**Type:** `integer`\u003cbr\u003e                                                                                                           |\n| `sensorType`       | **Required** This is the the sensor type. It should work for DHT11, DHT22 and AM2302 sensors\u003cbr\u003e\u003cbr\u003e**Type:** `integer`\u003cbr\u003e **Possible values:** `11` for DHT11 or `22` for DHT22 / AM2302                                                            |\n| `units`            | What units to use. Specified by config.js \u003cbr\u003e\u003cbr\u003e**Type:** `string`\u003cbr\u003e**Possible values:** config.units = Specified by config.js, `metric` = Celsius, `imperial` =Fahrenheit \u003cbr\u003e **Default value:** `config.units`                                 |\n| `updateInterval`   | How often the sendor data is updated.\u003cbr\u003e\u003cbr\u003e**Type:** `integer`\u003cbr\u003e**Default value:** `1 hour`                                                                                                                                                       |\n| `relativeScale`    | Relative scale to choose the temparature icon.\u003cbr\u003e\u003cbr\u003e**Type:** `integer`\u003cbr\u003e**Default value:** `30`                                                                                                                                                  |\n| `initialLoadDelay` | The initial delay before loading. If you have multiple modules that use the same API key, you might want to delay one of the requests. (Milliseconds) \u003cbr\u003e\u003cbr\u003e**Type:** `integer`\u003cbr\u003e**Possible values:** `1000` - `5000` \u003cbr\u003e **Default value:** `0` |\n| `animationSpeed`   | Speed of the update animation. (Milliseconds) \u003cbr\u003e\u003cbr\u003e**Type:** `integer`\u003cbr\u003e**Possible values:**`0` - `5000` \u003cbr\u003e **Default value:** `1000` (1 second)                                                                                               |\n| `debug`            | Show debug information. \u003cbr\u003e\u003cbr\u003e **Possible values:** `true` or `false` \u003cbr\u003e **Default value:** `false`                                                                                                                                               |\n\nHere is an example of an entry in `config.js`\n\n```\n{\n\tmodule: \"MMM-DHT-Sensor\",\n\tposition: \"top_right\",\n\theader: \"Upstairs\",\n\tconfig: {\n\t\tsensorPin: 2,\n\t\tsensorType: 22,\n\t\tupdateInterval: 60 * 60 * 1000,\n\t\tinitialLoadDelay: 0,\n\t\tanimationSpeed: 1000,\n\t\tunits: \"metric\",\n\t\trelativeScale: 35,\n\t\tdebug: false\n\t}\n},\n```\n\n## Notes\n\n- A good resource to know the GPIO/Hardware pin number is (https://pinout.xyz/)\n\n## Notifications\n\nThis module implements the following notifications:\n\n- **INDOOR_TEMPERATURE** (int) Temperature in Celsius\n- **INDOOR_HUMIDITY** (int) Humidity in relative humidity (%)\n\n## Dependencies\n\n- [bcm2835](http://www.airspayce.com/mikem/bcm2835/)\n- [node-dht-sensor](https://github.com/momenso/node-dht-sensor) (installed via `npm install`)\n\n## Issues\n\n```\nWARNING! Could not load config file. Starting with default configuration. Error found: Error: The module '/home/pi/MagicMirror/modules/MMM-DHT-Sensor/node_modules/node-dht-sensor/build/Release/node_dht_sensor.node'\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION 48. This version of Node.js requires\nNODE_MODULE_VERSION 53. Please try re-compiling or re-installing\nthe module (for instance, using `npm rebuild` or`npm install`).\n```\n\nIf you get this error after installing the module (or your MagicMirror is just a black screen) try this:\n\n```bash\ncd MMM-DHT-Sensor\nnpm run rebuild\n```\n\n## Thanks To...\n\n- [Cato Antonsen](https://github.com/prasanthsasikumar) for the [MMM-Temperature-Humidity](https://github.com/prasanthsasikumar/MMM-Temperature-Humidity) module, which I used as reference.\n- [Nick Wootton](https://github.com/MichMich) for the [MMM-UKLiveBusStopInfo](https://github.com/nwootton/MMM-UKLiveBusStopInfo) module, which I used as reference.\n- [Nigel Daniels](https://github.com/nigel-daniels/) for the [MMM-Tube-Status](https://github.com/nigel-daniels/MMM-Tube-Status) module, which I used as reference.\n- [Michael Teeuw](https://github.com/MichMich) for the [MagicMirror2](https://github.com/MichMich/MagicMirror/) framework that made this module possible.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryck%2FMMM-DHT-Sensor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryck%2FMMM-DHT-Sensor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryck%2FMMM-DHT-Sensor/lists"}