-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[HowTo] Install Fan SHIM on Manjaro ARM #78
Comments
it should be |
Both ways produce the same result.
I used the listed installation steps from |
Trying to get this to work on minimal. Haven't been able to iron it out yet. https://ybin.me/p/7ec74707b57e7ddd#fYmSQw/ItSkvCdyQJXUAWMdKH2RExx/UxkxfcHxSZws= |
What do you think was going on? |
It seems that you are still using Python 2 and missing You can check what Python package is available, e.g. Notes:
|
Same as you, i also noticed that the scrip also call for RPi.GPIO that is not present in manjaro repo, but python-raspberry-gpio |
Run |
Can't you use the AUR w/ Manjaro? I made a fanshim AUR package. |
I'm planning on getting a fanshim for myself and I have my Raspberry Pi 4 running Manjaro ARM so I'll check that out myself aswell, although after checking the AUR I have a small question, in your systemd unit file you have |
It would not improve performance, it just runs the python script like normal. There is |
I installed from your AUR package, it seems like there's a missing module, output from
Calling it directly from a terminal gives the same error.
However this might be an issue with the AUR package My system:
|
I installed an Arch Linux aarch64 and had some issues, it didn't think it was a Pi. I didn't get much further than that though. :( |
I think I've going something, when I run
I thought to myself, if the module isn't found, then maybe it's in the wrong place, otherwise it would return an error.
Apparently, they're all being installed as a Python 3.7 package, instead of a Python 3.8 package.
Running Python from the terminal outputs the same:
Which means I believe it's because of the naming scheme rather than compatibility with Python 3.8, as there's almost no differences between Python 3.7 and Python 3.8. Now the problem is I'm not sure which packages puts this here, and where to put this bug report, my guess it's python-raspberry-gpio from the AUR, but any further help is greatly appreciated. |
You should be able to get them in the right place by re-installing the dependencies. |
Okay I've figured it out, apparently if you're running Manjaro ARM there's a package in the official repositories that's named However now I'm running into compiling issues. I'll also post this in the Manjaro ARM forums because they have an outdated package anyways. If you want to help with the debugging of the compiling errors here's the error:
And the full log here over at pastebin |
After a discussion over at the Manjaro ARM forums here I've found a fix for the issue, simply changing the
And then change the file:
To:
The Manjaro ARM team said he will rebuild the package and update the repos today, and the maintainer of the AUR package python-raspberry-gpio already made this change in the However the maintainer said the original developer as lost interest on the package and it's using All and all, I've managed to finally install and have I'll run |
Alright running I only have a small question to @fryfrog, I wanted to make a small customization to the script to have the Pi shutdown if it reaches a high enough temperature (if the fan were to fail or something) what's the recommended way of doing so to avoid an update from the AUR ruining my modifications? |
Is For the script customization, why don't you write it as a |
No from what I understood As for the suggestion, yeah I think that's a good idea, I know some Python this would be a good oportunity for me to actually contribute something other than just reporting and trying to fix bugs. Thanks! |
I think you can close this issue and add the install instructions for Manjaro/Arch ARM, no? |
Would this be similar to how I'd go about getting fanshim to work on Ubuntu 20.10 64-bit? |
@likenedthus I had problems to make it work on Ubuntu 20.10 64 bit
|
Okay here's an update quite a bit latter. I left my RPI turned on for a few months and only shut it down a couple of times in the last weeks, and then this week I noticed that the fan was always on, and I'm not sure when it decided to turn on by itself. I updated my RPI which I haven't in a while and then fanshim gave an error, so considering the conflict of the package So here's what I did: $ yay -Rns fanshim
(...)
$ yay --aur -S python-raspberry-gpio
(...)
$ yay -S fanshim Now when running $ fanshim
Traceback (most recent call last):
File "/usr/bin/fanshim", line 92, in <module>
fanshim = FanShim(disable_button=args.nobutton, disable_led=args.noled)
File "/usr/lib/python3.9/site-packages/fanshim/__init__.py", line 32, in __init__
GPIO.setup(self._pin_fancontrol, GPIO.OUT)
RuntimeError: Not running on a RPi! The fan is stopped and the LED is solid green but I don't think I can control anything, any ideas on how to proceed? |
$ fanshim
Traceback (most recent call last):
File "/usr/bin/fanshim", line 92, in <module>
fanshim = FanShim(disable_button=args.nobutton, disable_led=args.noled)
File "/usr/lib/python3.9/site-packages/fanshim/__init__.py", line 32, in __init__
GPIO.setup(self._pin_fancontrol, GPIO.OUT)
RuntimeError: Not running on a RPi! Apparently this is a permission related issue, using root privileges I can run this as expected, which means that the previous installation worked. |
I would like to point out that the fanshim package in the AUR got removed. If somebody wants to ports this package to the AUR, making this installation process easy on Arch based distros, they would have to package this program as an AUR package and the apa102 Python library. |
[HowTo] Install Fan SHIM on Manjaro ARM
Instructions how to install Fan SHIM, with no code changes (tested on KDE):
python-configparser
(5.0.0-1)git clone https://github.com/pimoroni/fanshim-python
cd fanshim-python
sudo ./install.sh
psutil
will be installed by./install-service.sh
scriptcd examples
sudo ./install-service.sh --on-threshold 65 --off-threshold 55 --delay 2
The text was updated successfully, but these errors were encountered: