A plugin allowing the Cayenne Pi Agent to read data from DHT11, DHT22 and AM2302 sensors and display it in the Cayenne Dashboard.
- Rasberry Pi.
- DHT11, DHT22 or AM2302
- 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
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 .
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 22
. 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}
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
.