GithubHelp home page GithubHelp logo

boonya / raspi-fan-control Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 7 KB

RaspberryPI Temperature Control Service

License: MIT License

Python 74.16% Shell 25.84%
raspberry-pi gpio-interface systemd-service cooling-control cooling-device cooling-fans pwm-fan

raspi-fan-control's Introduction

RaspberryPI Cooling Fan Control Service

Installation

wget https://github.com/boonya/raspi-fan-control/releases/download/v1.0.1/raspi-fan-control_1.0.1_arm64.deb
sudo dpkg -i raspi-fan-control_1.0.1_arm64.deb

OR

cd /usr/local/
sudo git clone https://github.com/boonya/raspi-fan-control
cd raspi-fan-control
sudo pip3 install -r requirements.txt
sudo ln -s /usr/local/raspi-fan-control/main.py /usr/bin/raspi-fan-control
sudo ln -s /usr/local/raspi-fan-control/raspi-fan-control.service /etc/systemd/system/raspi-fan-control.service
sudo systemctl daemon-reload
sudo systemctl start raspi-fan-control
sudo systemctl status raspi-fan-control
sudo systemctl enable raspi-fan-control

Deinstallation

sudo apt purge raspi-fan-control

OR

sudo systemctl disable raspi-fan-control
sudo systemctl stop raspi-fan-control
sudo rm /usr/bin/raspi-fan-control
cd /usr/local/raspi-fan-control
sudo pip3 uninstall -r requirements.txt
cd ~
sudo rm -rf /usr/local/raspi-fan-control

Additional

If you working on Ubuntu Server rather then the Raspbian you may want to give your user rights to interact with GPIO interface.

For doing that you need:

Create a GPIO group

Just type in a command line interface and press enter

sudo addgroup gpio

Give the gpio group full rights to the GPIO interface

Add a line below to the file /etc/udev/rules.d/10-raspi.rules you have to create as well.

SUBSYSTEM=="input", GROUP="input", MODE="0660"
SUBSYSTEM=="i2c-dev", GROUP="i2c", MODE="0660"
SUBSYSTEM=="spidev", GROUP="spi", MODE="0660"
SUBSYSTEM=="bcm2835-gpiomem", GROUP="gpio", MODE="0660"

SUBSYSTEM=="gpio", GROUP="gpio", MODE="0660"
SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c '\
        chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio;\
        chown -R root:gpio /sys/devices/virtual/gpio && chmod -R 770 /sys/devices/virtual/gpio;\
        chown -R root:gpio /sys$devpath && chmod -R 770 /sys$devpath\
'"

This changes an owner group to gpio on some system objects related to gpio device. Also it gives full rights to the gpio group members.

Add your user to the gpio group

sudo usermod -aG gpio username

Origin

raspi-fan-control's People

Contributors

boonya avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.