Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including homebridge-dht-sensor with all npm packages installed. Try it out:

var homebridgeDhtSensor = require("homebridge-dht-sensor")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

homebridge-dht-sensor v2.1.2

Homebridge plugin for DHT temperature and humidity sensors

homebridge-dht-sensor

Homebridge plugin for DHT temperature and humidity sensors

installation

$ npm install homebridge-dht-sensor

usage

This module depends on the BCM2835 library that must be installed on your board before you can actually use this module.

You have to specify the sensorType (11 for DHT11; 22 for DHT22 or AM2302) and the gpioPin to which the data pin of the sensor is connected.

{
  "bridge": {
    "name": "Homebridge",
    "username": "CC:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-154"
  },

  "accessories": [{
    "accessory": "DhtSensor",
    "name": "Sensor",
    "sensorType": 22,
    "gpioPin": 17
  }],

  "platforms": []
}

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free