X735 Software

From Geekworm Wiki
Jump to navigation Jump to search

For Raspbian / RetroPie / Twister OS v2.0.2

This guide is only for X735 V2.5 shield based on RASPBIAN. (Not tested on Ubuntu, openmediavault, retropie or other third party OS like Manjaro,RoninDojo.)

install

Assuming your system is updated, add these packages:

sudo apt-get install -y python-smbus python
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.sh
echo "alias xoff='sudo 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 ./read_fan_speed

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

How to make the fan script run automatically after booting?

There are two ways to achieve it; 1. Put the following line at the end of .bashrc file: (Default)

cd ~
nano .bashrc

copy the following line to .bashrc file.

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

NOTE: Maybe you need to modify the file path if you use other OS.

In this way, this line of command will be executed automatically when the user logs in;

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
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

For myNode OS and Umbrel

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

About Umbrel, please refetrto https://getumbrel.com/

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 umbrel@umbrel.local (or ssh umbrel@<IP address of your Umbrel>). The password is the same as your Umbrel's password. If you haven't set a password yet, the default password is: 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 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

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

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 #68

4 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

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

Anonymous user #68

4 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

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

Anonymous user #67

7 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

7 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

13 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

13 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

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

Lisa

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

Anonymous user #63

17 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

17 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

18 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

18 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

18 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

21 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

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

Lisa

21 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

21 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

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

Anonymous user #59

21 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

21 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

21 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

21 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

21 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

21 months ago
Score 0++

Hi,

Sorry,we haven't tested this system yet.

Anonymous user #56

21 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

21 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

22 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

21 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

22 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

22 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

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

Anonymous user #53

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

Anonymous user #52

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

Harry

23 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

24 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

24 months ago
Score 0++

Hi,

Please also remove the blue wire and test.

please refer hereNASPi#FAQ -- Q10

Anonymous user #49

24 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

24 months ago
Score 0++

Hi,

please check if you install the pigpio liberary.

Lisa

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

Anonymous user #51

24 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

24 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

17 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

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

Anonymous user #49

25 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

25 months ago
Score 0++

Hello,

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

Anonymous user #48

25 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

25 months ago
Score 0++

Hello,

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

Anonymous user #47

25 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

25 months ago
Score 0++

Hello,

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

Anonymous user #46

27 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

27 months ago
Score 0++

Hello,

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

Anonymous user #44

27 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

27 months ago
Score 0++

Hello,

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

Anonymous user #42

28 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

27 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

27 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

28 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

28 months ago
Score 0++
Please ignore the message.

Lisa

28 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

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

Anonymous user #39

29 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

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

Anonymous user #64

17 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

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

Harry

29 months ago
Score 0++

Anonymous user #37

29 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

29 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

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

Lisa

29 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

29 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

30 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

30 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

30 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

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

Anonymous user #34

30 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

30 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

30 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

30 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

30 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

30 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

30 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

30 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

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

Anonymous user #28

30 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

30 months ago
Score 0++

@Harry,

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

Anonymous user #27

30 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

30 months ago
Score 0++
All not working for my Raspi Pi4

Anonymous user #26

30 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

30 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

30 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

30 months ago
Score 0++

update script for myNode. Please check the above guide.

A little change.

Anonymous user #25

31 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

31 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

31 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

31 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

30 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.

Anonymous user #21

32 months ago
Score 0++
Fan not turning on … using a Raspberry Pi 4B running DietPi. Not sure where to place the jumper. No case attached.

Lisa

32 months ago
Score 0++
Hello,We have updated it, please refer to the above. Jumper function please refer to X735 V2.5 Hardware

Harry

32 months ago
Score 0++

Anonymous user #20

32 months ago
Score 0++

2nd board works flawless - first one didn't start up the Pi with jumpers on board and died in a little cloud of smoke after a few hours. 2nd one first tested without Pi as described works great and stable. Added a little alias at the end of bashrc :

sudo nano ~/.bashrc alias fan='sudo python /home/pi/x735-v2.5/read_fan_speed.py'

reboot

and now a simple "fan" displays the fan speed:

pi@RaspberryPi:~ $ fan 0 RPM 1781 RPM

1782 RPM