Installing on Umbrel
For others reference, to get this running on Umbrel we need to make a few modifications, namely as the directory is /home/umbrel/ rather than /home/pi. I would suggest we make new "install-umbrel.sh" and "uninstall-umbrel.sh" (or using ~/ like paths).
First, ensure you are supplying power via the X735 board (e.g. USB-C power).
Open a command prompt, and type the following:
ssh [email protected]
sudo apt-get install python-smbus
sudo apt-get install pigpio python-pigpio python3-pigpio
sudo apt-get -y install rpi.gpio
git clone https://github.com/geekworm-com/x735-v2.5
cd x735-v2.5
Before we run the install file, we need to edit it as it references a /home/pi folder that doesn't exist (see: https://github.com/geekworm-com/x735-v2.5/blob/main/install.sh line 74). Otherwise, we will get:
install.sh: line 76: /home/pi/.bashrc: No such file or directory
We therefore need to first edit this install script using:
nano install.sh
Now edit the line from:
USER_RUN_FILE=/home/pi/.bashrc
to
USER_RUN_FILE=/home/umbrel/.bashrc
[CTRL+X]
[Y]
Now, we should be able to run the script (once we have changed the permissions of the *.sh files):
sudo chmod +x *.sh
sudo bash install.sh
NB If you see the following error:
initiInitialise: Can't lock /var/run/pigpio.pid
Can't initialise pigpio library
NB Run sudo killall pigpiod (followed by [CTRL+X], although you may see some errors but still seems to unlock it) and re-run the command above.
To confirm it installed correctly, run:
nano ~/.bashrc
It should have the following added to the end of it:
alias x735off='sudo x735softsd.sh'
python /home/umbrel/x735-v2.5/pwm_fan_control.py&
The default install puts this command in so after a user logs in, the script runs and powers up the fan. However, we just want to be able to reboot the device and the script to run without having to login. So, we can schedule the script to run when the device powers on using cron (ref: https://wiki.geekworm.com/How_to_add_crontab_job):
sudo crontab -e
[1]
@reboot python /home/umbrel/x735-v2.5/pwm_fan_control.py
[CTRL + X]
[Y]
You can also test with the following commands:
python x735-v2.5/pwm_fan_control.py
[CTRL+X]
python x735-v2.5/read_fan_speed.py
[CTRL+X]
Now reboot, and afterwards you should be able to reconnect and run:
x735off
After rebooting again (you can use sudo reboot), the fan should auto start up and temps should reduce (in our experience), from around 70+ to 56 degrees.
References:
X735 V2.5 Software How to add a crontab job Set up a bitcoin node with Umbrel, the hard way New-How to Install Raspberry Pi 4+X829 dual 2.5" SATA Storage board+X708/U100 UPS+X829-C1? How to build a Bitcoin node | Raspberry Pi | Umbrel (my sons video!)
Hi BenG. Your script helped me a lot. Thanks you and kind regards, JW
Glad it helped @janvandort
we update the install.sh, https://wiki.geekworm.com/X735_V2.5_Software
or run the following command: echo "alias x735off='sudo x735softsd.sh'" >> ~/.bashrc