raspberry pi tools addon : 5V fans installation

  • as title, 5V fans are expected to be installed recently.

    pi-tools addons is downloaded from the add-ons download, but

    " This is a console-only addon" is prompted out when i try to run the program.

    Could another one tell me how to control the GPIO pin4 on/off 5V ? thanks

    system details
    rpi 4B (RPi2.arm)

    Versions: 9.2.6 LibreELEC, Kodi 18.9(18.9.0)

  • The prompt is correct.

    You can't switch pin #4 on / off. Use the programmable pin #33 (GPIO 13) and it's opposite Ground pin #34 instead.

    Create /storage/.config/autostart.sh :

    Bash
    #!/bin/sh
    
    (
        python /storage/.kodi/userdata/scripts/fan.py
    ) &

    Create a /storage/.kodi/userdata/scripts folder.

    Create /storage/.kodi/userdata/scripts/fan.py :

    This will turn the fan on at system start. Adapt the script for your needs.

  • Thanks at first.

    I have created the fan.py file and autostart.sh file, but the fan didn't switch on.

    I have tried the command:
    python fan.py

    and it prompt out that:

    fan.py:10: Runtime Warning: This channel is already in use, continuing anyway. Use GPIO.setwarnings(False) to disable warnings.

    • Official Post

    I'm using the same scripts with an LED instead of a fan. The warning is normal. The RPi Tools add-on seems to have a bug on it's current version, because my LED switches off after a while without obvious reason. I think we have to wait for a fix.