|
1 | 1 | # RPId
|
| 2 | +[](https://goreportcard.com/report/github.com/parMaster/rpid) |
2 | 3 | [](https://github.com/parMaster/rpid/actions/workflows/go.yml)
|
| 4 | +[](https://github.com/parMaster/rpid/blob/main/LICENSE) |
| 5 | + |
3 | 6 |
|
4 | 7 | Raspberry Pi temperature (fan) control systemd service. [Frontend with nice charts](https://pi4.cdns.com.ua/charts) and [endpoint](https://pi4.cdns.com.ua/status)s 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.
|
5 | 8 |
|
6 | 9 | # Setup
|
| 10 | +- for step-by-step installation instructions, see [dist/README.md](https://github.com/parMaster/rpid/blob/main/dist/README.md) |
7 | 11 | - pi user must be added to the same group as /dev/gpiomem in ([source](https://raspberrypi.stackexchange.com/questions/40105/access-gpio-pins-without-root-no-access-to-dev-mem-try-running-as-root)).
|
8 | 12 | - i2c interface should be enabled using `Interface Options` menu in `raspi-config`. Installing `i2c-tools` could be beneficial as well, to run `i2cdetect -y` for example.
|
9 | 13 | - systemd service is supposed to be easily deployable by `make deploy`
|
10 | 14 | - config/config.yml obviously must be changed, accordingly to the specific GPIO configuration - modules can be disabled or even sections deleted.
|
11 |
| -- for step-by-step installation instructions, see [dist/README.md](https://github.com/parMaster/rpid/blob/main/dist/README.md) |
12 |
| - |
13 |
| -# Real life usage example. Just Why? |
14 |
| -Dashboard with the most recent revision is publicly available [HERE](https://pi4.cdns.com.ua/charts). It could be down if there is a blackout caused by another russian missile strike on ukrainian power grid. |
15 |
| - |
16 |
| -Notes about old revision [e07bbed](https://github.com/parMaster/rpid/commit/e07bbed66f5384c41d595c599d575dca676a7c38) 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: |
17 |
| - |
18 |
| -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: |
19 |
| -- connect permanently to 5v - is a pretty good option. It's completely silent this way, but the downside is that it always works, obviously. |
20 |
| -- 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 |
21 |
| -- connect to 5v through a transistor and use stock gpio_fan device tree overlay. I guess it's ok, but not much configurable. |
22 | 15 |
|
23 |
| -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: |
24 |
| - |
| 16 | +# Real life usage example |
| 17 | +Latest revision is running on a Raspberry Pi 4 4Gb with a 50mm 12v fan installed on top, connected to 5v power through a npn-transistor. |
| 18 | +- [/charts](https://pi4.cdns.com.ua/charts) endpoint displaying data since system startup |
| 19 | +- [/view](https://pi4.cdns.com.ua/view) endpoint displaying some of the data that was collected to the database since the feature was developed in version v0.2.0 |
| 20 | +- [/status](https://pi4.cdns.com.ua/status) endpoint for monitoring software |
25 | 21 |
|
26 |
| -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. |
| 22 | +_It could be down if there is a blackout caused by another russian missile strike on Ukraine power grid._ |
27 | 23 |
|
28 |
| -# ToDo's |
29 |
| -- throttling detection : |
30 |
| - - https://chewett.co.uk/blog/258/vchi-initialization-failed-raspberry-pi-fixed/ |
31 |
| - - https://jamesachambers.com/measure-raspberry-pi-undervoltage-true-clock-speeds/ |
| 24 | +## Credits |
| 25 | +- [perif.io](https://perif.io) - a great package for GPIO access |
| 26 | +- [lgr](github.com/go-pkgz/lgr) for logging |
| 27 | +- [plotly-js](https://github.com/plotly/plotly.js) for charts |
| 28 | +- [go-sqlite3](github.com/mattn/go-sqlite3) as a database driver |
0 commit comments