Pimoroni FanShim Issues Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
omnomnomnomnommm
Posts: 2
Joined: Mon Jun 29, 2020 4:07 pm

Pimoroni FanShim Issues

Post by omnomnomnomnommm »

Hi Dietpi troubleshooters, hoping you can help a newbie,

I have bought a FanShim for my RP 3 B+ from https://shop.pimoroni.com/products/fan-shim

I sent the below to Pimoroni
I am following the install instructions for the controller at

https://learn.pimoroni.com/tutorial/san ... h-fan-shim

But I am getting the following error

dietpi@DietPi:~/fanshim-python/examples$ sudo ./install-service.sh --on-threshold 65 --off-threshold 55 --delay 2
Fan SHIM controller requires Python 3 pip
You should run: 'sudo apt install python3-pip'

However when I try to run the above...

dietpi@DietPi:~/fanshim-python/examples$ sudo apt install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version (18.1-5+rpt1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I have done a full 'sudo apt install' and am fully updated. Do you have any ideas?
But their response....
It'll be something dietpi related, our software is written for Raspbian which has a lot of packages that dietpi doesn't. If using dietpi is essential then you could try installing everything Python related to see if that helps, but you should find it'll work fine if you use full Raspbian or even Raspbian Lite if you need something lighter on resources.

Kind regards,
Thanks for your help or ideas!
User avatar
Joulinar
Posts: 2052
Joined: Sat Nov 16, 2019 12:49 am

Re: Pimoroni FanShim Issues

Post by Joulinar »

Hi,

many thanks for your report. Basically DietPi is a Raspbian (for Raspberry Pi devices), just with reduced amount of packages. ;)
  1. Did you install Python using dietpi-software?
  2. Did you tried using user root to perform installation?
  3. what is the output of which pip3?
I tried to install on my demo RPi3B+ and all was working fine

Code: Select all

root@DietPi3:~/fanshim-python/examples# ./install-service.sh --on-threshold 65 --off-threshold 55 --delay 2
Setting up with:
Off Threshold:  55 C
On Threshold:   65 C
Delay:          2 seconds
Preempt:        no
Disable LED:    no
Disable Button: no
Brightness:     255

To change these options, run:
sudo ./install-service.sh --off-threshold <n> --on-threshold <n> --delay <n> --brightness <n> --venv <python_virtual_environment> (--preempt) (--noled) (--nobutton)

Or edit: /etc/systemd/system/pimoroni-fanshim.service


Checking for rpi.gpio >= 0.7.0 (for Pi 4 support)
rpi.gpio >= 0.7.0 already installed
Checking for Fan SHIM
Fan SHIM already installed
Checking for psutil >= 5.6.7
Installing psutil
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting psutil
  Downloading https://www.piwheels.org/simple/psutil/psutil-5.7.0-cp37-cp37m-linux_armv7l.whl (281kB)
    100% |████████████████████████████████| 286kB 806kB/s
Installing collected packages: psutil
Successfully installed psutil-5.7.0

Installing service to: /etc/systemd/system/pimoroni-fanshim.service
Created symlink /etc/systemd/system/multi-user.target.wants/pimoroni-fanshim.service → /etc/systemd/system/pimoroni-fanshim.service.
● pimoroni-fanshim.service - Fan Shim Service
   Loaded: loaded (/etc/systemd/system/pimoroni-fanshim.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2020-06-29 17:15:07 CEST; 29ms ago
 Main PID: 1269 (python3)
    Tasks: 1 (limit: 2319)
   Memory: 1.2M
   CGroup: /system.slice/pimoroni-fanshim.service
           └─1269 /usr/bin/python3 /root/fanshim-python/examples/automatic.py --on-threshold 65 --off-threshold 55 --delay 2 --brightness 255

Jun 29 17:15:07 DietPi3 systemd[1]: Started Fan Shim Service.
root@DietPi3:~/fanshim-python/examples#
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
omnomnomnomnommm
Posts: 2
Joined: Mon Jun 29, 2020 4:07 pm

Re: Pimoroni FanShim Issues

Post by omnomnomnomnommm »

Hi Joulinar,

Logged in as root. Uninstalled python via dietpi-software and reinstalled

Re-ran the setup. All working now

Thanks for your help!
Post Reply