Skip to content

Commit 745ed58

Browse files
committed
endpoints described, credits, badges
1 parent 90151de commit 745ed58

File tree

1 file changed

+15
-18
lines changed

1 file changed

+15
-18
lines changed

README.md

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
11
# RPId
2+
[![Go Report Card](https://goreportcard.com/badge/github.com/parMaster/rpid)](https://goreportcard.com/report/github.com/parMaster/rpid)
23
[![Go](https://github.com/parMaster/rpid/actions/workflows/go.yml/badge.svg)](https://github.com/parMaster/rpid/actions/workflows/go.yml)
4+
[![License](https://img.shields.io/github/license/parMaster/rpid)](https://github.com/parMaster/rpid/blob/main/LICENSE)
5+
![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/parMaster/rpid?filename=go.mod)
36

47
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.
58

69
# Setup
10+
- for step-by-step installation instructions, see [dist/README.md](https://github.com/parMaster/rpid/blob/main/dist/README.md)
711
- 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)).
812
- 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.
913
- systemd service is supposed to be easily deployable by `make deploy`
1014
- 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-
![IMG_3351](https://user-images.githubusercontent.com/1956191/222020060-eb204c20-2573-484a-a245-0be3da81abb7.jpeg)
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.
2215

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-
![newplot](https://user-images.githubusercontent.com/1956191/222021495-85ca3665-fb5d-47d2-8218-2eb4e2c78d2b.png)
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
2521

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._
2723

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

Comments
 (0)