# README
RPId
Raspberry Pi temperature (fan) control systemd service. Frontend with nice charts and endpoints for monitoring services, logging CPU temps, fan RPM, system info (load averages, cpu time in frequencies). Additional modules available to collect environmental data (Ambient temperature, Relative humidity, Atmospheric pressure) from external sensors connected to Raspberry Pi GPIO.
Setup
- pi user must be added to the same group as /dev/gpiomem in (source).
- i2c interface should be enabled using
Interface Options
menu inraspi-config
. Installingi2c-tools
could be beneficial as well, to runi2cdetect -y
for example. - systemd service is supposed to be easily deployable by
make deploy
- config/config.yml obviously must be changed, accordingly to the specific GPIO configuration - modules can be disabled or even sections deleted.
- for step-by-step installation instructions, see dist/README.md
Real life usage example. Just Why?
Dashboard with the most recent revision is publicly available HERE. It could be down if there is a blackout caused by another russian missile strike on ukrainian power grid.
Notes about old revision e07bbed working on a Pi4 4Gb with in a radiator-case with a 50mm 12v fan installed on top, connected to 5v power through a npn-transistor, like this:
It would be much better if I could PWM this fan, but cheap fans like this can't be easily pwm-ed, so there are several ways people usually connect these:
- connect permanently to 5v - is a pretty good option. It's completely silent this way, but the downside is that it always works, obviously.
- connect to 3.3v permanently - the same as previous, but under high loads it's not enough, it always spins and not every fan starts from 3.3v
- connect to 5v through a transistor and use stock gpio_fan device tree overlay. I guess it's ok, but not much configurable.
So, this package, apart of being a great exercice, is configurable, it provides an endpoint (/status) accessible by monitoring software and it provides nice charts (/charts endpoint), like this one:
The chart shows, that under normal-high load, like youtube 1080p videoplay, it cycles from 40 to 45˚C, turning the fan on roughly 50% of time. In the extreme scenario of 4-core stress-test, the temperature can spike to as high as 50˚C, which still is considered "great" for the Raspberry Pi 4. The deepest cooldown to around 36˚C I could achieve by cutting stress-test right after it peaked, so the fan works for the next 3 minutes under no load.