A DHT sensor plugin for Cayenne
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Cayenne DHT Plugin

A plugin allowing the Cayenne Pi Agent to read data from DHT11, DHT22 and AM2302 sensors and display it in the Cayenne Dashboard.




  • Cayenne Pi Agent. This can be installed from the Cayenne Dashboard.
  • Git.
  • pip3 - Python 3 package manager. This should already be available in Python 3.4+ and above. If not it can be installed using the system package manager. Via apt-get this would be:
    sudo apt-get install python3-pip

Getting Started

1. Installation

From the command line run the following commands to install this plugin.

cd /etc/myDevices/plugins
sudo git clone https://github.com/myDevicesIoT/cayenne-plugin-dht.git
cd cayenne-plugin-dht
sudo pip3 install .

2. Setting the sensor type and pin

Specify the sensor type and pin you are using by modifying init_args under DHT Temperature in the cayenne-dht.plugin file. For a DHT11 use 11 for the sensor argument, for a DHT22 use 22 and for a AM2302 use 2302. Set the pin argument to the GPIO pin number your sensor is connected to. For example, a DHT11 on pin 17 would use the following:

init_args={"sensor": 11, "pin": 17}

3. Restarting the agent

Restart the agent so it can load the plugin.

sudo service myDevices restart

Temporary widgets for the plugin should now show up in the Cayenne Dashboard. You can make them permanent by clicking the plus sign.

NOTE: If the temporary widgets do not show up try refreshing the Cayenne Dashboard or restarting the agent again using sudo service myDevices restart.