pimoroni / fanshim-python

Python library for the Fan SHIM for Raspberry Pi
https://shop.pimoroni.com/products/fan-shim
MIT License
295 stars 86 forks source link

install-service.sh installs on Arch, but doesn't start the fan when threshold reached #76

Closed Morrolan closed 4 years ago

Morrolan commented 4 years ago

After installing fanshim on a Pi 4 running Manjaro ARM with i3wm, I have ran:

 sudo ./install-service.sh --on-threshold 65 --off-threshold 40 --delay 2

When the temperature reaches above 40 degrees (set low for testing) the LED does indeed change to yellow, but the fan doesn't start up. CPU temperature is now at 50 degrees and the fan doesn't start.

As soon as I stop the pimoroni-fanshim.service, the fan starts spinning (i.e. default behaviour) perfectly fine.

I have confirmed that I can read the CPU temp from psutil.sensors_temperatures().

If I try to run automatic.py I receive the following error:

(venv) [morrolan@europa examples]$ python automatic.py --on-threshold 65 --off-threshold 40 --delay 2 Traceback (most recent call last): File "automatic.py", line 87, in fanshim = FanShim() File "/home/morrolan/Development/fanshim-python/venv/lib/python3.8/site-packages/fanshim/init.py", line 34, in init GPIO.setup(self._pin_fancontrol, GPIO.OUT) RuntimeError: Not running on a RPi!

However, I can assure you that I am running an an RPi :)

Morrolan commented 4 years ago

Closed as it turns out it is an RPi.GPIO issue, not fanshim :)