https://github.com/fdocr/misfans
Tool for contolling my rPi fans (mis fans)
https://github.com/fdocr/misfans
Last synced: 9 months ago
JSON representation
Tool for contolling my rPi fans (mis fans)
- Host: GitHub
- URL: https://github.com/fdocr/misfans
- Owner: fdocr
- License: mit
- Created: 2020-07-26T08:26:41.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-03T22:52:56.000Z (almost 4 years ago)
- Last Synced: 2025-03-02T01:13:25.225Z (about 1 year ago)
- Language: Ruby
- Size: 7.81 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## misfans
rPi experiment to automate a fan accesory to switch between ON/OFF based on temperature measurements.
### Requirements
A ruby runtime installed. If new to ruby my personal recommendation is [RVM](https://rvm.io/):
```
curl -sSL https://get.rvm.io | bash -s stable --ruby
```
Also install Bundler: `gem install bundler`
### Installing
Clone the repo `git clone https://github.com/fdoxyz/misfans.git` and move into the directory (`cd misfans`).
Logging is done directly to the file `/var/log/misfans.log`. Make sure the user running the deamon has write access to the file, if you need access or you're not sure first do `sudo touch /var/log/misfans.log` and then `chown /var/log/misfans.log`.
Install dependencies `bundle install` and start the daemon with `ruby daemon start`. misfans is using the [Daemons](https://github.com/thuehlinger/daemons) gem, so __from within this directory__ you can use `ruby daemon.rb status`, `ruby daemon.rb restart`, `ruby daemon.rb stop` to interact with the daemon.
Once the daemon is running you should expect the fan to be triggered/enabled by a GPIO pin if the temperature rises above 72 'C and the fans will stop when the temperature falls below 55 'C.
__To-Do (a lot):__
- [ ] Use Daemons' argument feature for data
- [ ] Organize in a proper class & make less of a script
- [ ] Consider embedding in Docker container (ruby runtime dependency)
- [ ] Test
If interested reach out with an issue or drop a PR :)