Open main menu

This tutorial is deprecated, see X735-script


Contents

Overview

This guide also applies to X735 V3.0 / V2.5 shield;

For Raspbian / Raspbian Lite / RetroPie / Twister OS v2.0.2

Test '2022-04-04-raspios-bullseye-armhf-lite.img' on May 6th 2022;

install

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y git
sudo apt-get install -y pigpio python3-pigpio
sudo apt-get install -y python3-smbus python3-rpi.gpio
git clone https://github.com/geekworm-com/x735-v2.5
cd x735-v2.5
sudo chmod +x *.sh
sudo bash install.sh
echo "alias x735off='sudo /usr/local/bin/x735softsd.sh'" >> ~/.bashrc
sudo reboot

If reboot fails, please force shutdown or power off and restart

Test safe shutdown

x735off
  • x735off is safe shutdown command, you can run this command to safe shutdown.
  • press button 1-2 seconds to reboot
  • press button 3 seconds to safe shutdown,
  • press 7-8 seconds to force shutdown.

uninstall

sudo ./uninstall.sh

read-fan-speed.py

sudo  python3 read_fan_speed.py

or

sudo  python read_fan_speed.py

After a reboot, we can run ```sudo python read_fan_speed.py``` to get an update on the fan's current speed.

How to make the fan script run automatically after booting?

There are two ways to achieve it:

1. Put the command line in the /etc/rc.local file: (Default)

vi /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

/etc/x735pwr.sh &
python /home/pi/x735-v2.5/pwm_fan_control.py&
exit 0

NOTE:

  • The install.sh script will make sure this command line is put into the rc.local file, you don't need to do anything.
  • Please change 'python' to 'python3' if you are using python3.
  • Please make sure the file path of pwm_fan_control.py is correct.


2. Use crontab to add a timed task. For details, please refer to How to add crontab job.

For DietPi

install

sudo apt-get install -y python-smbus python python3-rpi.gpio
sudo apt-get install -y pigpio python-pigpio python3-pigpio git
git clone https://github.com/geekworm-com/x735-v2.5
cd x735-v2.5
sudo chmod +x *.sh
sudo bash install-dietpi.sh

echo "alias x735off='sudo /usr/local/bin/x735softsd'" >> ~/.bashrc
sudo reboot

PS: according to the customer feedback, the above shell script is also work with Citadel, please test yourself, thanks!

For Volumio 3

Test the following script base on the 'Volumio-3.175-2021-12-13-pi.img'

The default username and passpword are both 'volumio'

install

# Enable SSH

Visit 'http://volumio.local/dev/' to click 'Enable' button to enable SSH
# install software and tools via SSH window
sudo apt-get update
sudo apt-get install python-smbus
sudo apt-get -y install python-rpi.gpio python3-rpi.gpio

# download the install script
sudo git clone https://github.com/geekworm-com/x735-v2.5
cd x735-v2.5
sudo chmod +x *.sh
sudo bash install-volumio3.sh
# add x735off alias 
echo "alias x735off='sudo /usr/local/bin/x735softsd'" >> ~/.bashrc
sudo reboot

Test safe shutdown

x735off
  • x735off is safe shutdown command, you can run this command to safe shutdown.
  • press button 1-2 seconds to reboot
  • press button 3 seconds to safe shutdown,
  • press 7-8 seconds to force shutdown.

uninstall

sudo ./uninstall.sh

read-fan-speed.py

sudo python3 read_fan_speed.py

For Ubuntu Server

Test the following script base on Ubuntu Server 21.10 on March 24th, 2022


install

# install software and tools
cd ~
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y unzip make gcc git 
sudo apt-get install -y wiringpi python python3-pigpio python-setuptools python3-distutils python3-rpi.gpio
# install pigpio library, also refer to http://abyz.me.uk/rpi/pigpio/download.html
wget https://github.com/joan2937/pigpio/archive/master.zip
unzip master.zip
cd pigpio-master
sudo make
sudo make install
# download X735 installation scripts
cd ~
git clone https://github.com/geekworm-com/x735-v2.5
cd x735-v2.5
sudo chmod +x *.sh
# create pigpiod service
sudo bash create-pigpiod.service.sh

# create /etc/rc.local file
sudo bash create-rc.local.sh

# install script
sudo bash install.sh

# add x735off alias
echo "alias x735off='sudo /usr/local/bin/x735softsd.sh'" >> ~/.bashrc
sudo reboot

Test safe shutdown

x735off
  • x735off is safe shutdown command, you can run this command to safe shutdown.
  • press button 1-2 seconds to reboot
  • press button 3 seconds to safe shutdown,
  • press 7-8 seconds to force shutdown.

uninstall

sudo ./uninstall.sh

read-fan-speed.py

sudo python3 read_fan_speed.py

For myNode OS and Umbrel

About myNode, please refer to http://www.mynodebtc.com/

About Umbrel, please refetrto https://getumbrel.com/, we test it base on 'umbrel-os-v0.4.4.img'

We tested umbrel v0.4.16 on Apr. 18th, 2022 base on 'umbrel-os-v0.4.16.img'

Install

login to mynode teminal via Putty or Xsheel tool, the default user name is `admin`, password is `bolt`, then run the following command:

Login to mynode teminal via Putty or Xsheel tool, the default user name is `umbrel`, default password is `moneyprintergobrrr`, then run the following command:

FAQ

Q: What are the credentials to SSH into my Umbrel?

A: ssh host is umbrel.local (or ssh <local IP address of your Umbrel>). The default user name is umbrel, and the default password moneyprintergobrrr


 sudo apt-get update
 sudo apt-get install -y python-smbus python pigpio python-pigpio python3-pigpio git wiringpi
 sudo apt-get install -y python-rpi.gpio python3-rpi.gpio rpi.gpio
 git clone https://github.com/geekworm-com/x735-v2.5
 cd x735-v2.5
 chmod +x *.sh
 sudo bash install-mynode.sh
 echo "alias x735off='sudo /usr/local/bin/x735softsd.sh'" >> ~/.bashrc
 sudo reboot
 If you fail to reboot, please unplug the power directly and restart;

PWM fan control

The script is installed successfully and the fan starts to run

Test safe shutdown

x735off
  • Please run 'x735off' to shut down or press the on-board button switch to shut down. DON'T run the 'shutdown' linux command to shut down, otherwise the power of x735 will not be shut down.
  • press button switch 1-2 seconds to reboot
  • press button switch 3 seconds to safe shutdown,
  • press 7-8 seconds to force shutdown.

uninstall

./uninstall-mynode.sh

For Version 2.1 or more low version

Please refer to Hardware and Software and read them and follow the instructions before ask any questions, thank you!

The safe shutdown script is same with X730.

We test this shell script base official Raspbian '2018-11-13-raspbian-stretch.img' version;other operating systems not be tested!

#Download run script

git clone https://github.com/geekworm-com/x730-script

cd x730-script

#Setting file attributes
sudo chmod +x x730.sh

#Install the script
sudo bash x730.sh

#Setting up the command to turn off X730 from software 
printf "%s\\n" "alias x730off='sudo x730shutdown.sh'" >> ~/.bashrc

#Reboot the Raspberry Pi
sudo reboot

#Powering off the Raspberry Pi from software
x730off

Return to X735

Add your comment
Geekworm Wiki welcomes all comments. If you do not want to be anonymous, register or log in. It is free.


 

Anonymous user #70

one month ago
Score 0  

I get the following error message raspi 4

Okt 18 00:43:11 touscre rc.local[329951]: cat: /sys/class/gpio/gpio5/value: Datei oder Verzeichnis nicht gefunden Okt 18 00:43:11 touscre rc.local[2818]: /etc/x735pwr.sh: Zeile 17: [: =: Einstelliger (unärer) Operator erwartet. Okt 18 00:43:11 touscre rc.local[2818]: /etc/x735pwr.sh: Zeile 21: [: =: Einstelliger (unärer) Operator erwartet.

Can you Help ?

Greetings Uwe
 

Lisa

one month ago
Score 0  
Please refer to X735-script
 

Anonymous user #69

7 months ago
Score 0  

I cant get it working on umbrelOS 1.0 for Raspberry Pi4

Please help
 

Harry

7 months ago
Score 0  
This tutorial is deprecated, see X735-script
 

Anonymous user #68

12 months ago
Score 0  
And for the future better run the scripts and any software for your hardware after a delay maybe 1 or 2 minutes, because then you have a chance to uninstall the script when the system is not running after installation of your software
 

Harry

12 months ago
Score 0  
Hello, this script is updated to X735-script
 

Anonymous user #68

12 months ago
Score 0  

After Installation of the Script on Raspbian, the linux system will not start correctly. When the script want to start the cooler, the RaspberryPi shut down. I checked the power and I dont find a problem.

You cant login to the system top uninstall the script, so I have to start from the scratch. I don't use the script now, the cooler ist not running now. Please check your scripts ans provide a running system
 

Harry

12 months ago
Score 0  
Hello, this script is updated to X735-script
 

Anonymous user #67

15 months ago
Score 0  

hello, I had the x735 v2 worked on my raspbarry whit twister and it worked fine. i could rean the fan, safe shutdown worked to. Now i have a new sd in it whit ubuntu 23.04 and i have some problems. i program everthing as was standing above for ubuntu server. what i'm doing wrond. when ubuntu start only thing what is does is spinning but no controll or reading. it looks like he missing some files or directory. here some of my issues.

pi@pi-desktop:~$ sudo apt-get install -y wiringpi python python3-pigpio python-setuptools python3-distutils python3-rpi.gpio Pakketlijsten worden ingelezen... Klaar Boom van vereisten wordt opgebouwd... Klaar De statusinformatie wordt gelezen... Klaar Pakket python is niet beschikbaar, hoewel er naar verwezen wordt door een ander pakket. Mogelijk betekent dit dat het pakket ontbreekt, verouderd is, of enkel beschikbaar is van een andere bron Echter, de volgende pakketten vervangen dit: 2to3 python-is-python3

Pakket python-setuptools is niet beschikbaar, hoewel er naar verwezen wordt door een ander pakket. Mogelijk betekent dit dat het pakket ontbreekt, verouderd is, of enkel beschikbaar is van een andere bron

E: Pakket 'python' heeft geen kandidaat voor installatie E: Pakket 'python-setuptools' heeft geen kandidaat voor installatie pi@pi-desktop:~$

I have changed python to pyton3 and that seens toe work. pi@pi-desktop:~$ sudo apt-get install -y wiringpi python3 python3-pigpio python3-setuptools python3-distutils python3-rpi.gpio Pakketlijsten worden ingelezen... Klaar Boom van vereisten wordt opgebouwd... Klaar De statusinformatie wordt gelezen... Klaar wiringpi is reeds de nieuwste versie (2.50-0ubuntu2). python3 is reeds de nieuwste versie (3.11.2-1). python3-pigpio is reeds de nieuwste versie (1.78-1). python3-setuptools is reeds de nieuwste versie (66.1.1-1). python3-distutils is reeds de nieuwste versie (3.11.2-2). python3-rpi.gpio is reeds de nieuwste versie (0.7.1~a4-1build3). De volgende pakketten zijn automatisch geïnstalleerd en zijn niet langer nodig: dctrl-tools dmeventd dmraid dpkg-repack efibootmgr gir1.2-nma-1.0 gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common grub-efi-arm64 grub-efi-arm64-bin grub-efi-arm64-signed grub2-common kpartx kpartx-boot libdebian-installer4 libdevmapper-event1.02.1 libdmraid1.0.0.rc16 liblvm2cmd2.03 libtimezonemap-data libtimezonemap1 lvm2 os-prober python3-gi-cairo python3-icu python3-pam rdate thin-provisioning-tools tzdata-legacy Gebruik 'sudo apt autoremove' om ze te verwijderen. 0 opgewaardeerd, 0 nieuw geïnstalleerd, 0 te verwijderen en 0 niet opgewaardeerd.



pi@pi-desktop:~$ x735off /usr/local/bin/x735softsd.sh: line 5: /sys/class/gpio/export: No such file or directory /usr/local/bin/x735softsd.sh: line 6: /sys/class/gpio/gpio20/direction: No such file or directory /usr/local/bin/x735softsd.sh: line 7: /sys/class/gpio/gpio20/value: No such file or directory X735 Shutting down... /usr/local/bin/x735softsd.sh: line 19: /sys/class/gpio/gpio20/value: No such file or directory

pi@pi-desktop:~$ sudo python3 read_fan_speed.py python3: can't open file '/home/pi/read_fan_speed.py': [Errno 2] No such file or directory

I installed severall times.

thank you
 

Walker

15 months ago
Score 0  
Hello, you can contact us via our email: support@geekworm.com we will do our best to solve your problem
 

Anonymous user #66

21 months ago
Score 0  

Hi, there is an issue with pwm_fan_control.py.

top tells me, that there is a phython3 is running with 20% cpu load all the time.

top - 19:19:58 up 5 min, 1 user, load average: 1.28, 1.27, 0.61 Tasks: 198 total, 1 running, 197 sleeping, 0 stopped, 0 zombie %Cpu(s): 3.0 us, 6.6 sy, 0.0 ni, 90.3 id, 0.0 wa, 0.0 hi, 0.1 si, 0.0 st MiB Mem : 7812.2 total, 6296.2 free, 826.7 used, 689.3 buff/cache MiB Swap: 0.0 total, 0.0 free, 0.0 used. 6861.8 avail Mem

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 791 root 20 0 26076 10380 5476 S 19.5 0.1 0:45.89 python3 85 root 20 0 0 0 0 I 7.3 0.0 0:01.40 kworker/u8:2-phy1 1299 kali 20 0 453892 97296 80608 S 5.6 1.2 0:02.51 qterminal


now i checked, which script is running on process 791 with python3:

└─$ pgrep -af python 791 python3 /home/kali/x735-v2.5/pwm_fan_control.py 1393 /usr/bin/python3 /usr/bin/blueman-applet 1551 /usr/bin/python3 /usr/bin/blueman-tray

that sounds not efficient if the power control consumes 20% cpu load :(

What can i do ?
 

Lisa

21 months ago
Score 0  
Hello,After our test, there is no problem with the x735 script. You can try to completely delete PYTHON and reinstall.
 

Anonymous user #65

21 months ago
Score 0  
Is the 2.5 software compatible with 64bit Raspbian / PiOs ??
 

Lisa

21 months ago
Score 0  
Yes,It is compatible with 64bit Raspbian
 

Anonymous user #63

25 months ago
Score 0  

Hi, I installed the fan v3.0 on my raspberry pi4, but the button work only for turning on the pi and for a forced shutdown.

How can I enable the reset and safe shutdown?

Do you have an installation script for the v3.0?
 

Lisa

25 months ago
Score 0  

Hello,

The installation scripts of V3.0 and V2.5 are the same. Refer to the sample script above.Thanks~
 

Anonymous user #62

25 months ago
Score 0  

Hello,

I bought a cooling fan X735 ver. 3.0 for my raspberry pi 4B and tried to install it. Reading the manual, it seems that X735 has the following GPIOs dedicated.

GPIO 5,12,13,16,20

However, my plan is to use the following GPIOs for another purpose. Unfortunately, for various reasons, this cannot be changed.

GPIO 16,20,21

Therefore, I would like to change the duplicated GPIOs used for X735 as follows.

from 16 to 19 from 20 to 26

How should I rewrite the programs and execute them?

I would appreciate it if anyone could lend me your wisdom.
 

Anonymous user #61

26 months ago
Score 0  

Hmm . . . $ testpulse1=$(date +%s%N | cut -b1-13) && echo $testpulse1 $ testpulse2=$(date +%s%N | cut -b1-13) && echo $testpulse2 $ pulsegap=$(($testpulse2-$testpulse1)) && echo $pulsegap

Yields results more like 2000 and 6000, rather than 200 and 600 in the script.

Cordially advise changing script to -b1-12 from -b1-13.

With kindest regards. Yours sincerely.
 

Anonymous user #61

26 months ago
Score 0  

More legible:

testpulse1=$(date +%s%N | cut -b1-13) && echo $testpulse1

testpulse2=$(date +%s%N | cut -b1-13) && echo $testpulse2

pulsegap=$(($testpulse2-$testpulse1)) && echo $pulsegap

Warmly yours.
 

Anonymous user #60

29 months ago
Score 0  

Hi After installing script in Ubuntu server (20.04) fan still works at full speed (more than 5000RPM). Already try several installs and server reinstalls and still always full spin. pwm_fan_control.py runs of startup but doesnt seems to control the spin

Do you think im missing something? Thanks
 

Anonymous user #60

29 months ago
Score 0  
I forgot to mention, I using x735 v3
 

Lisa

28 months ago
Score 0  

Hi,

①Please check if the Fan FS jumper cap is shorted.

②The installation script restarts running sudo python3 read_fan_speed.py, is it possible to read the fan speed?
 

Anonymous user #60

28 months ago
Score 0  

It worked! I didn't shorted the FAN FS. I couldn't find any documentation for what to short and not to short in the wiki.

Thank you!
 

Lisa

28 months ago
Score 0  
Jumper No. function please refer X735 Hardware
 

Anonymous user #59

29 months ago
Score 0  

HOME ASSISTANT. How can I integrate the fan & button scripts within an HASS.io implementation? "apt-get" is NOT supported on HA, 'cos the solution vendor should release a specific integration within the platform. Does anything exist? How could I do?

Many thanks!
 

Lisa

29 months ago
Score 0  

Hi,

Sorry, it is not supported yet. you can remove the FAN FS jumper, the PWM fan will run at full speed.
 

Anonymous user #58

29 months ago
Score 0  

hi, how can I set the fan speed over the script manually?

Script is installed on a umbrel node. And where I can see the fanspeed?
 

Lisa

29 months ago
Score 0  

Hi,

You can try running the command【sudo python3 read_fan_speed.py】to read the fan speed.
 

Anonymous user #57

29 months ago
Score 0  
Hello, I'm using the x735 v3 on a Raspberry PI4b. It works fine. How can I read the fan speed in Domoticz?
 

Lisa

29 months ago
Score 0  

Hi,

Sorry,we haven't tested this system yet.
 

Anonymous user #56

29 months ago
Score 0  
Hi, trying to get the fan working with my node. is the only way to set the fan through terminal?
 

Harry

29 months ago
Score 0  

Hi, Do you mean myNode OS? http://www.mynodebtc.com/

x735 can work with myNode.

If you know some linux shell scripts, you can refer to here to solve this problem: X-C1_Software#For myNode OS and Umbrel, otherwise please email us. support@geekworm.com

Regard,
 

Anonymous user #55

29 months ago
Score 0  

Hi,

My system: Rpi4B 8Gb, rev 1.5, running Rapbian 11 (Bullseye) I have installed the script, and the fan seems to be running fine. However, at the top of every terminal window, there is a notification: bash: '/usr/local/bin/x735off': invalid alias name. In the folder /usr/local/bin/ there is one file only: x735softsd.sh

How do I work around this issue?

Thanks!
 

Harry

29 months ago
Score 0  

Hi.

nano ~./bashrc

change

alias /usr/local/bin/x735off='sudo x735softsd.sh'

to

alias x735off='sudo /usr/local/bin/x735softsd.sh'

Thanks.
 

Anonymous user #54

30 months ago
Score 0  
I've installed everything on Ubuntu 22.04 LTS. The fan seems to be spinning, but I can't read the fan speed. It keeps saying 0 RPM.
 

Lisa

30 months ago
Score 0  

Hi,

Which version is your x735? If it is V3.0, please check if the FAN FS jumper cap is shorted
 

Anonymous user #53

30 months ago
Score 0  
hello, can you make the x735 working for twister os. 2.1.2
 

Anonymous user #53

30 months ago
Score 0  
hello, can you make the x735 on twister os. 2.1.2
 

Anonymous user #52

31 months ago
Score 0  
Can you tell me please how to install this script ob my raspiblitz node?
 

Harry

31 months ago
Score 0  

Thanks. We don't test this OS. Generally speaking, it is supported, and only the following points are required;

  1. This system is not open, allowing installation scripts;
  2. Need to install pigpiod library
 

Anonymous user #51

32 months ago
Score 0  

Hi Lisa,

The yellow wire was removed from the 4 pin molex, still no fan.

Sorry we haven't tested openmediavault, you can unplug the yellow wire to make the fan spin.
 

Lisa

32 months ago
Score 0  

Hi,

Please also remove the blue wire and test.

please refer hereNASPi#FAQ -- Q10
 

Anonymous user #49

32 months ago
Score 0  

I'm getting an error after "sudo bash install.sh":

Can't connect to pigpio at localhost(8888)

Did you start the pigpio daemon? E.g. sudo pigpiod

Did you specify the correct Pi host/port in the environment variables PIGPIO_ADDR/PIGPIO_PORT? E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888

Did you specify the correct Pi host/port in the pigpio.pi() function? E.g. pigpio.pi('soft', 8888)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 

Lisa

32 months ago
Score 0  

Hi,

please check if you install the pigpio liberary.
 

Lisa

32 months ago
Score 0  
please refer hereX-C1 Software#FAQ
 

Anonymous user #51

32 months ago
Score 0  

fan does not work with openmedia vault. I did test on light version and fan did work with the scripts provided.

any way to get this work with openmediavault?
 

Lisa

32 months ago
Score 0  

Hi,

Sorry we haven't tested openmediavault, you can unplug the yellow wire to make the fan spin.
 

Anonymous user #64

25 months ago
Score 0  

Maybe you do have pigpiod installed and you still get that error. That happened to me. I found the problem and the solución:

PROBLEM: I don’t know why, but when pigpiod is run with the parameter “-l” (small L), the pwm_fan_control.py script does not work.

SOLUTION: In Raspbian the script is run according to this file: /etc/systemd/system/multi-user.target.wants/pigpiod.service In that file, DELETE THE “-l” PARAMETER WHEN RUNNING pigpiod, so it should look like this: ExecStart=/usr/bin/pigpiod

Tested and working OK on Raspbian version 11 bullseye with OPENMEDIAVAULT installed.
 

Anonymous user #50

33 months ago
Score 0  
sudo python3 /home/admin/x735-v2.5/read_fan_speed.py&
 

Anonymous user #49

33 months ago
Score 0  
I'm getting a Package 'python-smbus' has no installation candidate after step 1 on a Raspberry pi 4 running Raspberry OS Lite
 

Lisa

33 months ago
Score 0  

Hello,

You do not need to install 'python-smbus' if use the new version(Raspbian - Bullseye )
 

Anonymous user #48

33 months ago
Score 0  

I am having a little trouble here i am getting

sudo: ./read_fan_speed: command not found

the power button is working as expected
 

Lisa

33 months ago
Score 0  

Hello,

we have modified the script. Please refer to the update information above.thanks.
 

Anonymous user #47

33 months ago
Score 0  
Hello, I just followed the steps to install X735 V2.5 Software, I have openmediavault installed in raspberry pi os Lite. After I install the software above, I reboot and the Raspberry always powers off, do you know why this happens?
 

Lisa

33 months ago
Score 0  

Hello,

Sorry,we have not tested it on openmediavault yet, please try to test it on RASPBIAN.
 

Anonymous user #46

35 months ago
Score 0  

Heya,

A while ago I bought a X835 x735(v1) combo, it worked fantastic untill now. I had to run a full kernel update, upgrading to raspbian bullseye, after I installed the script for the x735 (x700) My raspberry didn't want to boot anymore.

I tried the v2.5 version but this had the same result.. any ideas on how to get the script working again?
 

Lisa

35 months ago
Score 0  

Hello,

Please try to refresh the system, reinstall and test it again.
 

Anonymous user #44

35 months ago
Score 0  

Hello. I have X825 v2.0 + x735 v2.5 + Rpi 4B Problem! My system is up-to-date, I have added these packages: sudo apt-get install -y python-smbus python sudo apt-get install -y pigpio python-pigpio python3-pigpio git ....ect. ... At the end: sudo reboot And the system does not get up anymore !!! I have an external momentary switch. Two jumpers "L-SW" and "Auto On" removed. How can I save it?

Help
 

Lisa

35 months ago
Score 0  

Hello,

Please force shutdown and restart to test. or re-install the system.
 

Anonymous user #42

35 months ago
Score 0  

Hi, I have tried the steps indicated for Raspbian OS, and almost everything works fine... except the read_fan_speed.py script. It returns:

Traceback (most recent call last): File "./read_fan_speed.py", line 4, in <module> import RPi.GPIO as GPIO ImportError: No module named RPi.GPIO

I have these packages installes, as per instructions in wiki: pigpio python-pigpio python3-pigpio

I also tried to install: python-rpi.gpio but got this message from apt: "Package python-rpi.gpio is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source"

If i do: "dpkg -l | grep gpio" I get this:

ii libpigpio-dev ii libpigpio1 ii libpigpiod-if-dev ii libpigpiod-if1 ii libpigpiod-if2-1 ii pigpio ii pigpio-tools ii pigpiod ii python-pigpio ii python3-gpiozero ii python3-pigpio ii python3-rpi.gpio ii raspi-gpio ii rpi.gpio-common:armhf

python -V returns this: Python 2.7.18 (I guess it's all right, as read_fan_speed is a python-2 script)

I don't have pip nor pip3 installed, and I don't know how to install them, in case it's needed to further install something else... I have search in lots of python forums, but none of the solutions proposed worked.

What am I doing wrong? Any ideas?

Thanks a lot,
 

Anonymous user #43

35 months ago
Score 0  

Hi,

Please try the following command:

sudo apt-get update
sudo apt-get install python-dev
sudo apt-get install python-pip
sudo pip install rpi.gpio
 

Anonymous user #45

35 months ago
Score 0  

Hello, I solved the problem by changing the code: Row 1: #!/usr/bin/python3 instead of #!/usr/bin/python Row 33: print ("%.f RPM" % rpm) instead of print "%.f RPM" % rpm

Good luck !
 

Anonymous user #40

36 months ago
Score 0  

I am trying to install on the latest version of Raspbian - Bullseye - getting an error on the first line of the install 'sudo apt-get install -y python-smbus python' Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'python-is-python2' instead of 'python' Package python-smbus is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source

E: Package 'python-smbus' has no installation candidate


Works OK on the previous version - any advice please?
 

Harry

36 months ago
Score 0  
Please ignore the message.
 

Lisa

36 months ago
Score 0  
Hi,You don't need to install 'python-smbus' in the new version, please ignore it. But it's needed to install'python-smbus' in the previous version, so we keep it.
 

Anonymous user #41

36 months ago
Score 0  
Many thanks, all working OK for me - very pleased with the case.
 

Anonymous user #39

37 months ago
Score 0  

I get this output when running the fan control script on Raspbian, any help would be appreciated. Can't connect to pigpio at localhost(8888)

Did you start the pigpio daemon? E.g. sudo pigpiod

Did you specify the correct Pi host/port in the environment variables PIGPIO_ADDR/PIGPIO_PORT? E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888

Did you specify the correct Pi host/port in the pigpio.pi() function? E.g. pigpio.pi('soft', 8888) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Traceback (most recent call last): File "/home/pi/x735-v2.5/pwm_fan_control.py", line 8, in <module> pwm.set_mode(servo, pigpio.OUTPUT) File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1376, in set_mode return _u2i(_pigpio_command(self.sl, _PI_CMD_MODES, gpio, mode)) File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1025, in _pigpio_command sl.s.send(struct.pack('IIII', cmd, p1, p2, 0))

AttributeError: 'NoneType' object has no attribute 'send'
 

Lisa

36 months ago
Score 0  
Hi,you don't install the pigpiod liberary.please check again,thanks
 

Anonymous user #64

25 months ago
Score 0  

Maybe you do have pigpiod installed and you still get that error. That happened to me. I found the problem and the solución:

PROBLEM: I don’t know why, but when pigpiod is run with the parameter “-l” (small L), the pwm_fan_control.py script does not work.

SOLUTION: In Raspbian the script is run according to this file: /etc/systemd/system/multi-user.target.wants/pigpiod.service In that file, DELETE THE “-l” PARAMETER WHEN RUNNING pigpiod, so it should look like this: ExecStart=/usr/bin/pigpiod

Tested and working OK on Raspbian version 11 bullseye
 

Anonymous user #38

37 months ago
Score 0  
Could someone indicate how to install the script for the fan in manjaro of ronindojo. Thanks.
 

Harry

37 months ago
Score 0  
 

Anonymous user #37

37 months ago
Score 0  

An other nice (maybe the best?) Solution is to install the PWM fan control as a Service... in this case you are able to restart the Service in case you change some Values for temperature control...

To do this follow this steps:

1st. create a Service file for the x735 ppm service like:

sudo nano /lib/systemd/system/x735.service

into this file copy this:


[Unit] Description=x735 PWM Control Service After=multi-user.target Conflicts=getty@tty1.service

[Service] User=pi Group=pi Type=simple ExecStart=/usr/bin/python /home/pi/x735-v2.5/pwm_fan_control.py StandardInput=tty-force

[Install] WantedBy=multi-user.target

save & close this file:

ctrl+o ctrl+x

reload the systemctrl deamon:

sudo systemctl daemon-reload

Don't forget to remove any entrys in the /home/pi/.bashrc or if you follow my previous post in the boot_script.sh load this script twice or more often will have no effect to the fan but generate more system load...

Take care about your file path to the ppm_fan_control.py file and all the other you use in this case... ;)

after all, reboot your Pi:

sudo reboot

Make sure the fan DONT spin at this moment... If the Fan spin you should check everything twice... Somewhere the script will be loaded at an other place...

If the fan don't spin, it is time to enable the new service:

sudo systemctl enable x735.service

Now you can check if all this stuff will work by using

sudo service x735 start | stop

after reboot the fan should spinning...

If you change some temperature values in the pwm_fan_control.py it will take effect after save the file and restart the x735 service:

sudo service x735 stop sudo service x735 start

that's all...

Good Luck! Habe fun!
 

Anonymous user #36

37 months ago
Score 0  

Hello... I just installed the Scripts on a Raspberry Pi 3 Rasbian. 1st. The fan runs only after login via ssh, so i edit the crontab using following Command:

@reboot python /home/pi/x735-v2.5/pwm_fan_control.py&

so the Fan spins after booting without any user logged in..

The read_fan_speed command don't work... So i try following command:

python read_fan_speed.py

this one works fine..

Now i have one Problem: the Connected HDMI Display keeps blank... Only after a boot after a complete Shutdown enabled the Display..

What is wrong there?
 

Anonymous user #35

37 months ago
Score 0  
Thanks, I was looking for a way to start the fan on a headless installation too.
 

Lisa

37 months ago
Score 0  
Hi, The x735 is only a power management expansion board for Raspberry Pi, and will not have any effect on the display.
 

Anonymous user #37

37 months ago
Score 0  

In the time of my last Post i "played a little" and figured out, that a Crontab isn't the best way to start the x735 fan control...

so ich write a boot_script.sh and locate it in the /home/pi/scripts folder of the pi... this script will be triggered every boot by the /etc/rc.local if you enable it..

try this: sudo nano /etc/rc.local

add a line at the end of the file and insert the boot_script into it including full path.. in my case i add following line:

/home/pi/scripts/boot_script.sh

crtl+o to save crtl+x to close

insert into the boot_script.sh the following line(s):

  1. Start the x735_board Fan Control script

echo "Starting Fan & Temperature Control on x735" python /home/pi/x735-v2.5/pwm_fan_control.py &


that's all... in this file you can add more commands as you need, and its a easy way to do this.. ;) the boot_script need to be executable...

Any questions? feel free to ask... ;)
 

Anonymous user #35

38 months ago
Score 0  

1.When I connect to X735, Jumper 1-2 is open, Jumper 3-4 is closed, momentary and latching switches connected, the command "x735off" does not work. 2."sudo ./read_fan_speed" never worked. Only ~/x735-v2.5 $ python read_fan_speed.py works

Is that correct, or am I doing something wrong?
 

Lisa

38 months ago
Score 0  

please refer X735 Important Note; Full power off via software is not supported when using a external latching switch; "L-SW" Jumper on X735 should be removed when using onboard switch / momentary switch; "Auto On" Jumper on X735 should be removed when using external switch;

Both "L-SW" & "Auto On" Jumper caps should be removed when using momentary switch;
 

Anonymous user #35

38 months ago
Score 0  

Anonymous user #33:

I mean, there is no need to install both external switches, momentary and latching. They basically do the same, shutting down the Pi
 

Lisa

38 months ago
Score 0  
yes, you can only connect an external switch, latching switch or momentary switch
 

Anonymous user #34

38 months ago
Score 0  

I cannot make the fan to work. I have these files in the x735 folder: README.md install-mynode.sh pwm_fan_control.py uninstall-mynode.sh

install-dietpi.sh install.sh read_fan_speed.py uninstall.sh
 

Anonymous user #33

38 months ago
Score 0  
Do i get that right: You dont need both buttons? Each of them is doing much the same (Save shutdown)?
 

Lisa

38 months ago
Score 0  
Hi,Sorry I didn't get you mean. X735 has a button switch, and it can also be connected with an external switch.
 

Anonymous user #32

38 months ago
Score 0  

Hi,

I'm trying to install the fan script on dietpi, and while it's now working, whenever I try to run "read_fan_speed", I get an error that "RPi.GPIO not found" in the python script.

Any ideas?
 

Anonymous user #31

38 months ago
Score 0  
I build the box with RP4, X735 V2.5 and X825 V2.0. I install libreelec but it is not possible to install the script. How can I do for the fan? Regards.
 

Lisa

38 months ago
Score 0  
Hi,sorry,we have not tested libreelec. You can try to remove the red and yellow lines and let the fan work,but does not support pwm
 

Anonymous user #29

38 months ago
Score 0  

hi there the procedure for install software fail on debian buster

missing pigpio package !!! and even installing pgpio-tools, there are problems when I launch install.sh

The script seems to be incorrect.
 

Anonymous user #28

38 months ago
Score 0  
Thank you so much Harry! MyNode edition works perfect!! Next order of chasis and boards for second node can go out soon :)
 

Anonymous user #28

38 months ago
Score 0  
Discovered MyNode editon. Will put it in and report back. Thank you so much
 

Anonymous user #28

38 months ago
Score 0  
Thanks Harry. I tried the X-C1 Software. Completely crashed my Raspi. Does not boot up anymore, red leds, ethernet dead too.
 

Anonymous user #27

38 months ago
Score 0  

@Harry,

trying X-C1 Software or above X735 again? What would you recommend? Thank you so much
 

Anonymous user #27

38 months ago
Score 0  

@Harry,

Yes, it is MyNode Linux OS. When I install the software the fan starts spining fine. Read fan speed comes up with errors. x735off is not working and comes up with errors.

When I now restart the Pi4 the fan stops again.

Adding a chron job comes up with errors.
 

Anonymous user #26

38 months ago
Score 0  
All not working for my Raspi Pi4
 

Anonymous user #26

38 months ago
Score 0  

admin@myNode:~ $ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Can't connect to pigpio at localhost(8888)

Did you start the pigpio daemon? E.g. sudo pigpiod

Did you specify the correct Pi host/port in the environment variables PIGPIO_ADDR/PIGPIO_PORT? E.g. export PIGPIO_ADDR=soft, export PIGPIO_PORT=8888

Did you specify the correct Pi host/port in the pigpio.pi() function? E.g. pigpio.pi('soft', 8888) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Traceback (most recent call last): File "/home/pi/x735-v2.5/pwm_fan_control.py", line 8, in <module> pwm.set_mode(servo, pigpio.OUTPUT) File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1376, in set_mode return _u2i(_pigpio_command(self.sl, _PI_CMD_MODES, gpio, mode)) File "/usr/lib/python2.7/dist-packages/pigpio.py", line 1025, in _pigpio_command sl.s.send(struct.pack('IIII', cmd, p1, p2, 0)) AttributeError: 'NoneType' object has no attribute 'send' ^C

[1]+ Exit 1 python /home/pi/x735-v2.5/pwm_fan_control.py
 

Harry

38 months ago
Score 0  

Do you use myNode OS? We don't test it on myNode, but you can refer to X-C1 Software, BUT the used GPIO of x-c1 is dirrent with X735.

We will update the script base myNode OS in 2 days.
 

Harry

38 months ago
Score 0  
As long as it is a PWM fan, it needs script support, or you can consider using a 4010 2P ordinary fan
 

Harry

38 months ago
Score 0  

update script for myNode. Please check the above guide.

A little change.
 

Anonymous user #25

39 months ago
Score 0  

Hi Team Geekworm,

Im building a car dashboard solution, will this device be performing a safe shutdown once the power is cut?
 

Lisa

39 months ago
Score 0  
Hi,x735 does not support; you can refer to the 「Power loss detection」 function of x728ups or T208ups. But please note that X728 is for Raspberry Pi and T208 is for Jetson Nano.
 

Anonymous user #22

39 months ago
Score 0  
Hi. In the section "How to make the fan script run automatically after booting?", surely this is about running the fan after login, not boot...in fact it later states "[...]command will be executed automatically when the user logs in". So what happens if a different user logs in? It suggests this script has to be installed for every user. Wouldn't it be better to have the fan run when the Pi boots *before* anyone logs in? Surely we want the fan to run if required even if no one is logged in? Thanks.
 

Lisa

39 months ago
Score 0  
Hi,Because the v2.5 version is a PWM fan, the script must be installed. If you don’t need this function, you can remove the yellow wire and let the fan run directly.
 

Anonymous user #30

38 months ago
Score 0  

Two ways to do this: - Add the following two lines to end (before the exit) of /etc/rc.local

  1. start fan control

python /home/pi/x735-v2.5/pwm_fan_control.py &

- Install it as a systemd service Copy the following text in a file with the name x735-fan.service

==============================

[Unit] Description=x735 Fan control

[Service] User=root WorkingDirectory=/ ExecStart=/home/pi/x735-v2.5/pwm_fan_control.py Restart=always

[Install] WantedBy=multi-user.target

====================================

Copy the file to the directory /usr/lib/systemd/system/ With the command systemctl start x735-fan the service is started. You also have to do the following command that the service is started on a system boot: systemctl enable x735-fan systemd also takes care that the service is restarted if it dies.

This also has the advantage, that if you log in multiple times the script is not always started.