- Check the wiki page for wiring or the blog post in hungarian
- Munin plugin for monitoring Raspberry Pi internal temperature: rpi-internal-temp
- Munin plugin for monitoring a DS18B20 OneWire based temperature sensor connected to the Raspberry Pi: rpi-w1-temp
Munin plugin for monitoring temperature and humidity with an Aosong 2302, DHT11, DHT22 connected to the Raspberry Pi. This plugin uses the Adafruit binary from https://github.com/adafruit/Adafruit_Python_DHT
- Please give a star, because it feels good that I helped someone. :)
- If you need help, open an issue.
- Check wiki page
Chose only one method (3.1., 3.2, ...)
- In Interface Options enable 1-Wire.
- Save & Reboot
- Read the sensors manually:
cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
My output looks like this:
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
28-000005c7df9c
28-000005c7c812
28-000005c7cf75
28-000005c7220d
28-0000048d5987
28-000005c7a30f
- Add
dtparam=spi=on
anddtoverlay=w1-gpio,gpiopin=4
if they are not present. - Save & Reboot
- In System > Hardware enable spi-spidev, w1-gpio.
- Save & Reboot
Mine has the following lines:
overlays=analog-codec spi-spidev usbhost2 usbhost3 w1-gpio
param_w1_pin=PA6
param_w1_pin_int_pullup=1
Read the sensor IDs manually:
cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
My output looks like this:
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/w1_bus_master1/w1_master_slaves
28-000005c7df9c
28-000005c7c812
28-000005c7cf75
28-000005c7220d
28-0000048d5987
28-000005c7a30f
sudo apt install munin-node git
git clone https://github.com/gajdipajti/munin-rpi-temp.git
- Copy the munin plugins from the local git repository to /etc/munin/plugins
sudo cp munin-rpi-temp/rpi-w1-temp /etc/munin/plugins/rpi-w1-temp
sudo cp munin-rpi-temp/rpi-internal-temp /etc/munin/plugins/rpi-internal-temp
sudo cp munin-rpi-temp/rpi-internal-freq /etc/munin/plugins/rpi-internal-freq
- Set the plugins executable:
sudo chmod a+x /etc/munin/plugins/rpi-w1-temp
sudo chmod a+x /etc/munin/plugins/rpi-internal-temp
sudo chmod a+x /etc/munin/plugins/rpi-internal-freq
- Edit the /etc/munin/munin-node.conf file:
- Add or modify the following line:
cidr_allow 192.168.0.0/16
- Add or modify the following line:
- Edit the /etc/munin/plugin-conf.d/munin-node file:
- Note: This step might be skipped if your device is on kernel version >=5.8.
- Add the following lines:
[rpi-*]
user root
group root
- Reload munin-node:
sudo service munin-node restart
- Test sensor readout:
sudo munin-run rpi-w1-temp
pi@raspberrypi:~ $ sudo munin-run rpi-w1-temp
temp1.value 22.750
temp2.value 28.500
temp3.value 24.812
temp4.value 22.125
temp5.value 27.687
temp6.value 24.000
- Copy the plugin files to /usr/share/munin/plugins and link them
sudo ln -sf /usr/share/munin/plugins/rpi-internal-temp /etc/munin/plugins/rpi-internal-temp
sudo ln -sf /usr/share/munin/plugins/rpi-internal-freq /etc/munin/plugins/rpi-internal-freq
sudo ln -sf /usr/share/munin/plugins/rpi-w1-temp /etc/munin/plugins/rpi-w1-temp
In kernel 5.8 a new sysfs entry was added to output only the temperature commit. The rpi-w1-temp plugin was updated to use this method when present. Please update your local plugin.
To read the temperature:
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/28-0000048d5987/temperature
22750
And the root user access can be removed from the plugin-conf.d/munin-node file.
Use the rpi-hotspot-wlan0 script, tested on the OrangePi Zero with Armbian.
I hate the DHT sensors. It will be redesigned from the ground up. But now do the Adafruit setup and copy the AdafruitDHT.py to /usr/local/bin Give exec permission: sudo chmod +x /usr/local/bin/Adafruit.py
Previously we just loaded the w1-gpio and w1-therm kernel modules.
The new Raspberry Pi kernel has switched to device trees, this will break the w1 module. link link link
Add the following lines to the end of /boot/config.txt to enable device trees:
dtoverlay=w1-gpio,gpiopin=4
The current code is not compatible with the DHT11 overlay. I experimented with it, but 3 out of 5 reads have failed. link Just keep using the adafruit code.
- It is fixed now. raspberrypi/linux#4124