Git Product home page Git Product logo

raspberrypi-fan-control's People

Contributors

ar51an avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

raspberrypi-fan-control's Issues

Feature request: Configuration file

Hard coded values prevent easy customization, reuse. A configuration file could make the rpfc more flexible, and it is clearly a very popular project in the raspberry pi community. E.g. I need to control 3x Noctua A6 5v fans I am using to cool a small blade case (a slightly modified Cloudlet by C4Labs.com), and the temperature to be checked will need to be the highest reported by a monitoring script - probably a custom file location rather than /sys/class/thermal/thermal_zone0/temp.

Feature request: Read custom values for a setup from file:

  • PWM_PIN
  • TACHO_PIN
  • RPM_MAX
  • RPM_MIN
  • RPM_OFF // I assume someone, somewhere, would love to have the fan idle at some defined speed…
  • TEMP_MAX
  • TEMP_LOW
  • WAIT
  • PULSE
  • thermalFileName // custom /path/file for thermal data
  • TACHO_ENABLE // if tachometer should be monitored
  • TACHO_LOG // if tachometer monitoring should be logged

Likely there are other values which could usefully be drawn from a configuration file, but these would be a great (for me!) start.

Issues with release build

As per below, when I try run the binary from the 3.0 release, I get -bash: ./fan-control: cannot execute: required file not found

Meanwhile if I compile it myself, things work.

pi@raspberrypi:/opt/gpio/fan $ sudo wget -c https://github.com/ar51an/raspberrypi-fan-control/releases/download/v3.0/fan-control-release-3.0.tar.gz -O - | sudo tar -xz

Redirecting output to ‘wget-log’.
pi@raspberrypi:/opt/gpio/fan $ ll
total 40
-rwxr-xr-x 1 root root 14616 Feb  7 21:39 fan-control.backup
-rwxr-xr-x 1 pi   pi    9938 Feb  7 21:39 fan-control.c
drwxr-xr-x 4 pi   pi    4096 Nov 15  2022 fan-control-release-3.0
-rwxr-xr-x 1 root root   192 Feb  7 20:59 params.conf
-rw-r--r-- 1 root root  2262 Feb  8 17:05 wget-log
pi@raspberrypi:/opt/gpio/fan $ cd fan-control-release-3.0/
pi@raspberrypi:/opt/gpio/fan/fan-control-release-3.0 $ cd build/
pi@raspberrypi:/opt/gpio/fan/fan-control-release-3.0/build $ ll
total 72
-rwxr-xr-x 1 root root 67816 Dec 20 06:53 fan-control
-rw-r--r-- 1 root root   161 Dec 20 06:48 params.conf
pi@raspberrypi:/opt/gpio/fan/fan-control-release-3.0/build $ sudo ./fan-control
sudo: unable to execute ./fan-control: No such file or directory
pi@raspberrypi:/opt/gpio/fan/fan-control-release-3.0/build $ ./fan-control
-bash: ./fan-control: cannot execute: required file not found

Meanwhile compiling:

pi@raspberrypi:~/repos/raspberrypi-fan-control/src $ sudo ./fan-control

pi@raspberrypi:~/repos/raspberrypi-fan-control/src $ ll
total 8
-rw-r--r-- 1 pi pi 6744 Feb  8 16:45 fan-control.c
pi@raspberrypi:~/repos/raspberrypi-fan-control/src $ sudo gcc -Wall -O2 fan-control.c -o fan-control -lpigpio -lsystemd

pi@raspberrypi:~ $ journalctl -f
Feb 08 17:13:26 raspberrypi fan-control[6354]: Config values loaded: PWM_PIN=19 | TACHO_PIN=24 | RPM_MAX=5000 | RPM_MIN=1500 | RPM_OFF=0 | TEMP_MAX=55 | TEMP_LOW=40 | WAIT=5000 | TACHO_ENABLED=0 | THERMAL_FILE=/sys/class/thermal/thermal_zone0/temp
Feb 08 17:13:26 raspberrypi fan-control[6354]: Initialized and running ...
Feb 08 17:13:26 raspberrypi fan-control[6354]: [PWM] Temp: 51 | TempDiff: 73.3% | RPM: 3666

Feb 08 17:13:31 raspberrypi fan-control[6354]: [PWM] Temp: 51 | TempDiff: 73.3% | RPM: 3666
Feb 08 17:13:36 raspberrypi fan-control[6354]: [PWM] Temp: 48 | TempDiff: 53.3% | RPM: 2666
Feb 08 17:13:41 raspberrypi fan-control[6354]: [PWM] Temp: 49 | TempDiff: 60.0% | RPM: 2999

RPI 4 info:


pi@raspberrypi:~ $ uname -a
Linux raspberrypi 6.1.0-rpi7-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

pi@raspberrypi:~ $ hostnamectl
 Static hostname: raspberrypi
       Icon name: computer
Operating System: Raspbian GNU/Linux 12 (bookworm)
          Kernel: Linux 6.1.0-rpi7-rpi-v8
    Architecture: arm64

Just curious if anyone else has had issues with the binary in the releases.

There seems to be a bug when a restart occurs

I have observed if you restart the raspberry pi the service works, however the TACHO reading shows 0 throughout and although the PWM pin shows RPM reading
image
the fan doesn't seem to come on at all.

This is despite waiting for several minutes to an hour

If you manually stop and start the service it works, But I do not think this is designed in that manner.
I tried this using v1.4

Screenshot with TACHO
image

FYI: The taco seems to give just 1 reading at the start up and the fan shuts off and doesn't come on again until you manually restart the service

I have tried setting this up from scratch 3-4 times and see the same behavior

So in order to mitigate it, I have added this crontab
@reboot sleep 60 && sudo systemctl restart fan-control

exec format error

I'm not good at coding.
How can I fix the error in the screenshot?
I have rpi3modelB.
I followed all instructions.
I managed to run it on rpi3modelB and dietpi operating system in version 3.0. I currently have retropie and I can't run it. please help me.

2024-03-30_14-44

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.