X735 Software

From Geekworm Wiki
(Redirected from X735 V2.5 Software)
Jump to navigation Jump to search


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

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
 1 #!/bin/sh -e
 2 #
 3 # rc.local
 4 #
 5 # This script is executed at the end of each multiuser runlevel.
 6 # Make sure that the script will "exit 0" on success or any other
 7 # value on error.
 8 #
 9 # In order to enable or disable this script just change the execution
10 # bits.
11 #
12 # By default this script does nothing.
13 
14 # Print the IP address
15 _IP=$(hostname -I) || true
16 if [ "$_IP" ]; then
17   printf "My IP address is %s\n" "$_IP"
18 fi
19 
20 /etc/x735pwr.sh &
21 python /home/pi/x735-v2.5/pwm_fan_control.py&
22 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 #63

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

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

2 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

2 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

2 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

5 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

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

Lisa

5 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

4 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

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

Anonymous user #59

5 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

5 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

5 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

5 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

5 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

5 months ago
Score 0++

Hi,

Sorry,we haven't tested this system yet.

Anonymous user #56

5 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

5 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

5 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

5 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

6 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

6 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

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

Anonymous user #53

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

Anonymous user #52

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

Harry

7 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

8 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

8 months ago
Score 0++

Hi,

Please also remove the blue wire and test.

please refer hereNASPi#FAQ -- Q10

Anonymous user #49

8 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

8 months ago
Score 0++

Hi,

please check if you install the pigpio liberary.

Lisa

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

Anonymous user #51

8 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

8 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

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

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

Anonymous user #49

9 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

9 months ago
Score 0++

Hello,

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

Anonymous user #48

9 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

9 months ago
Score 0++

Hello,

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

Anonymous user #47

9 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

9 months ago
Score 0++

Hello,

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

Anonymous user #46

11 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

11 months ago
Score 0++

Hello,

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

Anonymous user #44

11 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

11 months ago
Score 0++

Hello,

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

Anonymous user #42

11 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

11 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

11 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

12 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

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

Lisa

12 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

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

Anonymous user #39

13 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

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

Anonymous user #64

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

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

Harry

13 months ago
Score 0++

Anonymous user #37

13 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

13 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

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

Lisa

13 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

13 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

14 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

14 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

14 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

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

Anonymous user #34

14 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

14 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

14 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

14 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

14 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

14 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

14 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

14 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

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

Anonymous user #28

14 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

14 months ago
Score 0++

@Harry,

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

Anonymous user #27

14 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

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

Anonymous user #26

14 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

14 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

14 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

14 months ago
Score 0++

update script for myNode. Please check the above guide.

A little change.

Anonymous user #25

15 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

15 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

15 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

15 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

14 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

16 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

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

Harry

16 months ago
Score 0++

Anonymous user #20

16 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

Anonymous user #18

16 months ago
Score 0++

I have a problem with my X735. Every time I run the shutdown command and turn off the power, I have to run the command lines below again to get my X735 working again:

sudo python /home/admin/x735-v2.5/read_fan_speed.py& sudo python /home/admin/x735-v2.5/pwm_fan_control.py&

The command line entered into bash does not work.

Anonymous user #19

16 months ago
Score 0++
what error message ??

Harry

16 months ago
Score 0++
run the 'x735off' to safe shutdown.

Anonymous user #18

16 months ago
Score 0++

When I execute the command line below occurr error:

sudo python /home/admin/x735-v2.5/read_fan_speed.py&

admin@raspberrypi:~ $ File "/home/admin/x735-v2.5/read_fan_speed.py", line 33 print "%.f RPM" % rpm ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print("%.f RPM" % rpm)?

[1]+ Exit 1 sudo python /home/admin/x735-v2.5/read_fan_speed.py


I solved the problem. I changed command print to :

print("%.f RPM" % rpm)

Harry

16 months ago
Score 0++
Yes, it's python version question.

Anonymous user #17

16 months ago
Score 0++
I'm using x735+x825 AND HiFiBerry DAC2 Pro on top. After v2.5 software installation DAC2 started to play songs at 0.10x of its original speed, I mean sound was really slow. I uninstalled v2.5 software and fixed the problem, but fan stopped working also.

Lisa

16 months ago
Score 0++
Hello,friend:We checked your email, please email us your order number and what OS you use, thanks!

Anonymous user #23

15 months ago
Score 0++
Hi, did you ever get a solution to this? I have the same problem on RPi 4, Raspberry Pi OS, HiFiBerry DAC+ DSP.

Anonymous user #24

15 months ago
Score 0++

Hi, please check X735 V2.5 Hardware.

It should be that the GPIO of X735 conflicts with the GPIO of HIFIBERRY DAC. Please contact HIFIBERRY DAC to find out the GPIO occupancy of this product.

Anonymous user #16

16 months ago
Score 0++
im using the X735 together with the X825 on a PI (8GB) - since and psu 5V 10A - everthing was fine booting from SD CARD - but switching to boot from HDD there is low voltage warning ... it s the same psu with 5V 10A. psu is connected via DC 5525 jack on the X735 - any ideas? should i use the DV 5525 Jack on the X825?

Anonymous user #16

16 months ago
Score 0++
and there is no possibility to power the X825 via 2PIN cable from X735 because that was for the older version

Lisa

16 months ago
Score 0++
Hi,There is no problem connecting the power supply via x735.please measure the voltage of PIN4 (5V) and PIN6 (GND) of Pi 40-PIN header.

Lisa

16 months ago
Score 0++

Hi,add 4 test pins to achieve powered between X825 V2.0 and Pi4 without additional cable.

So no need to 2pin cable, x825 is powered by Pi4

Anonymous user #16

16 months ago
Score 0++
sudo python2 read_fan_speed.py starts the script ...