X-C1 Software

From Geekworm Wiki
Jump to navigation Jump to search

This tutorial is deprecated, please use the new tutorial: XScript

Note: Not tested with Home Assistant, for some reason, we are not able to upgrade and use the Home Assistant to test, please pay attention to check if there is any update in the future.(If you have successfully tested Home Assistant, welcome to share your experience via email at: support@geekworm.com)


[Update]

Support Umbrel now.

The script is not tested VMware ESXI ARM operating system. To make the 3pin PWM cooling fan running, please remove/pull out the yellow cable if you use X-C1 V1.3 version. Remove the jumper cap on "Fan FS" PIN of X-C1 V2.0 to let the fan running at full speed.

NOTE:

In general, two important libraries are needed to run this script:

1. pigpiod, refer to http://abyz.me.uk/rpi/pigpio/download.html

2. Python, try to run 'python --version' to check it.

For Raspbian / RetroPie / Twister OS v2.0.2

Test this script based on the following OS:

  • Tested '2022-04-04-raspios-buster-armhf.img" on Apr. 13, 2022;
  • Raspbian 2021-05-07-raspios-buster-armhf, 2021-10-30-raspios-bullseye-armhf.img, 2021-10-30-raspios-bullseye-armhf-lite.img
  • RetroPie 4.7.1
  • Twister OS v2.0.2 / Twister OS 2.1.2

install

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

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

PWM fan control

The script is installed successfully and the fan starts to run

Test safe shutdown

xoff
  • Please run 'xoff' 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 X-C1 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

sudo ./uninstall.sh

For ubuntu mate / ubuntun desktop / ubuntu server

Test this script based on the following OS:

  • ubuntu-mate-20.04.1-desktop
  • ubuntu server 21.04
  • ubuntu-21.04-preinstalled-desktop-arm64+raspi

install

cd ~
sudo apt-get update
sudo apt-get upgrade

sudo apt-get install -y unzip make gcc python git wiringpi python3-pigpio python-setuptools python3-rpi.gpio
sudo apt-get install -y python3-distutils

#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

cd ~
git clone https://github.com/geekworm-com/x-c1
cd x-c1
sudo chmod +x *.sh
sudo bash install-ubuntu.sh

echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc
sudo reboot

Test safe shutdown

xoff
  • Please run 'xoff' 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 X-C1 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

sudo ./uninstall-ubuntu.sh

For myNode OS and Umbrel

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

About Umbrel, please refer to https://getumbrel.com/

Install

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

Login to Umbrel 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 pigpio python-pigpio python-smbus wiringpi -y
 git clone https://github.com/geekworm-com/x-c1
 cd x-c1
 chmod +x *.sh
 sudo bash install-mynode.sh
 echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc

 sudo reboot

PWM fan control

The script is installed successfully and the fan starts to run

Test safe shutdown

xoff
  • Please run 'xoff' 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 X-C1 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 DietPi

About DietPi, please refer to URL

Test 'DietPi_RPi-ARMv6-Bullseye.image' on May 5th, 2022.

Install

Test it base DietPi_RPi-ARMv8-Buster.img

login via teminal window, the default user name is `root`, password is `dietpi`, then run the following command:

 sudo apt-get update
 sudo apt-get install git pigpiod python3-pigpio python3-smbus python3-rpi.gpio -y
 git clone https://github.com/geekworm-com/x-c1
 cd x-c1
 chmod +x *.sh

 sudo bash install-dietPi.sh

 echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc
 sudo reboot

PWM fan control

The script is installed successfully and the fan starts to run

Test safe shutdown

xoff
  • Please run 'xoff' 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 X-C1 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

sudo ./uninstall-dietPi.sh

For Manjaro

About Manjaro, please refer to https://manjaro.org/

Test this script based on Manjaro-ARM-kde-plasma-rpi4-21.07.img

install

cd ~
sudo pacman -Syyu
sudo pacman -S unzip make gcc python python-setuptools git

#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
sudo cp /usr/local/lib/libpigpio* /usr/lib/

#install wiringpi
git clone https://github.com/WiringPi/WiringPi.git
cd WiringPi
./build

cd ~
git clone https://github.com/geekworm-com/x-c1
cd x-c1
sudo chmod +x *.sh
sudo bash install-manjaro.sh

#create a alias xoff
echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc
sudo reboot

PWM fan control

The script is installed successfully and the fan starts to run

Test safe shutdown

xoff
  • Please run 'xoff' 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 X-C1 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

sudo ./uninstall-ubuntu.sh

For LibreELEC

With LibreELEC it is not possible to change the system for security and stability reasons so even 'apt-get' would not be able to do this, so we cannot install some third-party libraries like pigpiod, Therefore, safe shutdown and dynamic adjustment of fan speed cannot be supported on liberelec.

Please pull out the yellow wire of the fan to make the fan run immediately

return to NASPi

For Volumio

Test this script based on the following OS:

  • Volumio-3.175-2021-12-13-pi.img

install

cd ~
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y git pigpio 
sudo apt-get install -y python-pigpio python3-pigpio
sudo apt-get install -y python-smbus python3-smbus
git clone https://github.com/geekworm-com/x-c1.git
cd x-c1
sudo chmod +x *.sh
sudo bash volumio.sh
echo "alias xoff='sudo /usr/local/bin/x-c1-softsd.sh'" >> ~/.bashrc
sudo reboot

PWM fan control

The script is installed successfully and the fan starts to run

Test safe shutdown

xoff
  • Please run 'xoff' 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 X-C1 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

sudo ./uninstall.sh

Note

Enable SSH:
http://volumio.local/dev/
Name: volumio
Password: volumio

we use the default password to run the volumio.sh, please replace default password 'volumio' with your new password in volumio.sh file .(Line 72)

FAQ

Q1: Can't connect to pigpio at localhost(8888)

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/volumio/x-c1/fan.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'

A: If you find an error similar to the above, it is because pigpiod library is not started, we need to run pigpiod first,

sudo pigpiod
python 'your directory'/x-c1/fan.py &

If 'sudo' command request a password, you can use the following command:

echo 'your password' | sudo -S pigpiod
python 'your directory'/x-c1/fan.py &

You can put these two lines in the /etc/rc.local file so that it will run automatically after booting.

Volumio-rc-local.jpg

Q2:How to get the current fan speed value? As I remember old x735 software where with such read_fan_speed.py script example, but not found such in X-C1.

A: The X-C1's PWM fan is a 3Pin FAN, and does not support reading speed. The Fan of X735 is a 4Pin PWM fan.


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

4 months ago
Score 0++

For anyone for whom the install.sh breaks the boot sequence with an infinite loop of error messages (complaining that the file or directory wasn't found for /sys/class/gpio/gpio17/ or something):

1. Go to the install.sh file 2. Replace the first echo block with:

``` echo '#!/bin/bash

SHUTDOWN=4 REBOOTPULSEMINIMUM=200 REBOOTPULSEMAXIMUM=600

  1. echo "$SHUTDOWN" > /sys/class/gpio/export
  2. echo "in" > /sys/class/gpio/gpio$SHUTDOWN/direction

BOOT=17

  1. echo "$BOOT" > /sys/class/gpio/export
  2. echo "out" > /sys/class/gpio/gpio$BOOT/direction
  3. echo "1" > /sys/class/gpio/gpio$BOOT/value

gpioset --mode=wait gpiochip0 $BOOT=1

echo "Your device are shutting down..."

while [ 1 ]; do

  1. shutdownSignal=$(cat /sys/class/gpio/gpio$SHUTDOWN/value)

shutdownSignal=$(gpioget gpiochip0 $SHUTDOWN)

if [ $shutdownSignal = 0 ]; then /bin/sleep 0.2 else pulseStart=$(date +%s%N | cut -b1-13) while [ $shutdownSignal = 1 ]; do /bin/sleep 0.02 if [ $(($(date +%s%N | cut -b1-13)-$pulseStart)) -gt $REBOOTPULSEMAXIMUM ]; then echo "Your device are shutting down", SHUTDOWN, ", halting Rpi ..." sudo poweroff exit fi

  1. shutdownSignal=$(cat /sys/class/gpio/gpio$SHUTDOWN/value)

shutdownSignal=$(gpioget gpiochip0 $SHUTDOWN) done if [ $(($(date +%s%N | cut -b1-13)-$pulseStart)) -gt $REBOOTPULSEMINIMUM ]; then echo "Your device are rebooting", SHUTDOWN, ", recycling Rpi ..." sudo reboot exit fi fi done' > /etc/x-c1-pwr.sh ```

3. Replace the shutdown echo block with:

``` echo '#!/bin/bash

BUTTON=27

  1. echo "$BUTTON" > /sys/class/gpio/export;
  2. echo "out" > /sys/class/gpio/gpio$BUTTON/direction
  3. echo "1" > /sys/class/gpio/gpio$BUTTON/value

gpioset --mode=wait gpiochip0 $BUTTON=1

SLEEP=${1:-4}

re='^[0-9\.]+$' if ! $SLEEP =~ $re  ; then echo "error: sleep time not a number" >&2; exit 1 fi

echo "Your device will shutting down in 4 seconds..." /bin/sleep $SLEEP

gpioset --mode=wait gpiochip0 $BUTTON=0

  1. echo "0" > /sys/class/gpio/gpio$BUTTON/value

' > /usr/local/bin/x-c1-softsd.sh ```

Now it should be safe to run `sudo bash install.sh`. Worked for me at least.

The echo > sys/classes/gpio method is no longer supported on newer releases of raspberry pi's os. The commented out lines are the original ones, below them is usually my correction.

Anonymous user #73

9 months ago
Score 0++

howto on esxi fling raspberry?

does the script work on it?

Lisa

9 months ago
Score 0++
The script is not tested VMware ESXI ARM operating system. To make the 3pin PWM cooling fan running, please remove/pull out the yellow cable if you use X-C1 V1.3 version. Remove the jumper cap on "Fan FS" PIN of X-C1 V2.0 to let the fan running at full speed.

Anonymous user #72

10 months ago
Score 0++

Fan control and work with power button for NASPi Gemini 3.5 and Raspberry Pi Debian

github.com/aardzhanov/naspi35_xscript

Anonymous user #71

17 months ago
Score 0++
Question: The fan isn't running, likely it's not hot enough, how can I test it is working correctly without waiting until it is hot enough?

Anonymous user #70

17 months ago
Score 0++
Doesn't work under Home Assistant OS on a Raspberry Pi... fan running at fuul speed ans thus very noisy.

Walker

17 months ago
Score 0++

Hello, we have not tested Home As sistant OS, only some other systems have been tested, you can browse here for details:

https://wiki....com/XScript

Anonymous user #69

18 months ago
Score 0++
Hello, would this fan script work to control the 3-pin version of the Noctua NF-A4x10 5V fan?

Anonymous user #68

21 months ago
Score 0++

Hi, thank you for your efforts. I may have wrecked my install at a certain point. Entered the sudo raspi-config -> Performance options -> Fan control. Here I didnt want to choose anything but couldnt go back so ended up picking 14 (the default value). Now my fan seems not to be working. Can you tell me which value should be there so I can default to it again please?

Thanks

Harry

21 months ago
Score 0++
Hello, X-C1 use the GPIO 18 NOT 14.

Harry

21 months ago
Score 0++
But actually we do not recommend you to use the official FAN CONTROL, because it does not support fan speed adjustment, it just makes the fan run at full speed when the temperature exceeds your set temperature. If you want to run the fan at full speed unconditionally, just remove the FAN CONTROL jumper on the x-c1 shield.

Harry

21 months ago
Score 0++

It is recommended that you install our script so that the fan speed is automatically adjusted according to the CPU temperature

Please contact us at email support@geekworm.com if you have any questions.

Anonymous user #66

22 months ago
Score 0++

I've seen that the '/usr/local/bin/x-c1-softsd.sh' is added in the rc.local during installation, comment this line fix the reboot/boot issue. But the fan script doesn't work. Is it best to use the fan-rpi.py instead ?

When I turn off the rpi, the fan still working, any solutions ?

Anonymous user #67

22 months ago
Score 0++

Don't comment out '/usr/local/bin/x-c1-softsd.sh' in rc.local file, and this file is to safe shutdown.

You need to use 'xoff' to turn off the pi 4 not 'poweroff'.

Anonymous user #66

22 months ago
Score 0++

But if I uncomment this line, the rpi will not reboot properly using xoff. That's the problem.

The fan script don't work. the fan still running at full speed even if I set the speed to 0.

Anonymous user #64

22 months ago
Score 0++
Wrecked my Pi. Stuck in boot loop with watchdog randomly cycling it. Uninstall script doesnt work. Will return.

Anonymous user #65

22 months ago
Score 0++
Hi, please contact us via mail:support@geekworm.com

Anonymous user #63

22 months ago
Score 0++

Hi, I've tried Raspbian, Ubuntu and DietPi and everytime I have the same issue.. All the installation process goes well. But when I "sudo reboot", the fan still working at full and the rpi4 doesn't boot anymore..

I have the X-C1 PWM with the RPI 4 2GB, connected via ethernet.

Anonymous user #65

22 months ago
Score 0++

Hi, plese direct remove the PSU, then restart it.

Regards,

Anonymous user #62

23 months ago
Score 0++
Can you tell me when Home Assistant support will arrive ?

Lisa

23 months ago
Score 0++
Sorry, the X-C1 does not yet support Home Assistant.

Anonymous user #61

23 months ago
Score 0++

rc.local


GNU nano 6.2 /etc/rc.local

  1. !/bin/bash
  2. !/bin/sh -e
  3. rc.local
  4. This script is executed at the end of each multiuser runlevel.
  5. Make sure that the script will exit 0 on success or any other
  6. value on error.
  7. In order to enable or disable this script just change the execution
  8. bits.
  9. By default this script does nothing.


/etc/x-c1-pwr.sh & python3 /home/shanks/x-c1/fan.py & exit 0


Fan.py


  1. !/usr/bin/python

import pigpio import time

servo = 18

pwm = pigpio.pi() pwm.set_mode(servo, pigpio.OUTPUT) pwm.set_PWM_frequency( servo, 25000 ) pwm.set_PWM_range(servo, 100) while(1):

  1. get CPU temp

file = open("/sys/class/thermal/thermal_zone0/temp") temp = float(file.read()) / 1000.00 temp = float('%.2f' % temp) file.close() if(temp > 30): pwm.set_PWM_dutycycle(servo, 40) if(temp > 50): pwm.set_PWM_dutycycle(servo, 50) if(temp > 60): pwm.set_PWM_dutycycle(servo, 70) if(temp > 70): pwm.set_PWM_dutycycle(servo, 80) if(temp > 75): pwm.set_PWM_dutycycle(servo, 100) if(temp < 30): pwm.set_PWM_dutycycle(servo, 0) time.sleep(1)


rc.local is running


shanks@ubuntu:~/x-c1$ sudo systemctl status rc-local ● rc-local.service - /etc/rc.local Compatibility Loaded: loaded (/lib/systemd/system/rc-local.service; enabled-runtime; vendor preset: enabled) Drop-In: /usr/lib/systemd/system/rc-local.service.d └─debian.conf Active: active (running) since Mon 2023-01-09 15:38:09 CET; 17min ago Docs: man:systemd-rc-local-generator(8) Process: 809 ExecStart=/etc/rc.local start (code=exited, status=0/SUCCESS) Tasks: 4 (limit: 2082) Memory: 5.7M CPU: 1min 8.055s CGroup: /system.slice/rc-local.service ├─ 812 /bin/bash /etc/x-c1-pwr.sh ├─ 813 python3 /home/shanks/x-c1/fan.py └─12725 /bin/sleep 0.2

Jan 09 15:38:09 ubuntu systemd[1]: Starting /etc/rc.local Compatibility... Jan 09 15:38:09 ubuntu rc.local[812]: Your device are shutting down... Jan 09 15:38:09 ubuntu systemd[1]: Started /etc/rc.local Compatibility.


Ubuntu version: Ubuntu 22.04.1 LTS


Python version : Python 3.10.6


xoff is now working fine but the fan script is not working.

i tried to execute is manually but nothins happens (i did set the values to 0 to see if the commands will stop the fan but it didn't)

Anonymous user #65

22 months ago
Score 0++
Note: the fan script is only required pigpiod library and python3-rpi.gpio dependent library. it has nothing to do with x-c1-softsd.sh. The x-c1-softsd.sh file is only responsible for safe shutdown

Anonymous user #65

22 months ago
Score 0++
Of course, if you don’t want to use the pigpiod library, you can use the fan-rpi.py file, which removes the dependency on the pigpiod library; for example, python3 fan-rpi.py

Anonymous user #59

23 months ago
Score 0++
Hey, i have a question regarding the fan speed control. do i have to run the fan.py each time i reboot or turn on the system or does it run automatically after booting. because i couldn't see it in the jobs list.

Anonymous user #60

23 months ago
Score 0++

Hi, After you install it correctly, you don't need to re-run fan.py commands

You can run the following command to found it: cat /etc/rc.local

'python3 /home/pi/x-c1/fan.py &' this is the fan running command

Anonymous user #61

23 months ago
Score 0++
Thanks. I just saw the command

Anonymous user #58

23 months ago
Score 0++

I installed Ubuntu 22.04.1 LTS (64) on a raspberry pi 4b 2gb, followed the instructions on how to install the x-c1 software on ubuntu but it is not working. In this command i had to install python-is-python3 instead of python as python3 was already installed (3.10.6). """ sudo apt-get install -y unzip make gcc python git wiringpi python3-pigpio python-setuptools """ i got this message when running install-ubuntu

1. DON'T modify the name fold: x-c1, or the PWM fan will not work after reboot. 2. fan.py is python file to control fan speed according temperature of CPU, you can modify it according your needs. 3. PWM fan needs a PWM signal to start working. If fan doesn't work in third-party OS afer reboot only remove the YELLOW wire of fan to let the fan run immediately or contact us: info@geekworm.com.

Xoff and fan control is still not working!! can you help?? xoff shows the shutdown in 4 sec message but nothing happens fan is running on high speed (noisy) and fan.py doesn't seem to be controlling it

thanks

Lisa

23 months ago
Score 0++
Hi,Which version of X-C1 are you using? If you use the X-C1 V2.0,please check if [FAN FS] is shorted by jumper cap. please refer to NASPi picture : X-C1 v2.0 Adapter Board.

Anonymous user #58

23 months ago
Score 0++
Hey Lisa, Thanks for your quick reply. I have the X-C1 V2.0. should i remove the jumper cap for it to work or keep it there. The documentation mention only that Remove the jumper cap on "Fan FS" PIN of X-C1 V2.0 will lead to getting the fan to run on full speed. it doesn't mention removing the pin to get the script to work.so should i remove the jumper cap and test ?

Lisa

23 months ago
Score 0++

you donot need to remove the jumper cap to test. Please send more details, script installation pictures etc by mail.

Thanks~

Anonymous user #56

24 months ago
Score 0++

I bought a Pi4 and followed the procedure in "For myNode OS and Umbrel" to control the fan based on temp. But it does not seem to work, fan seems to run at high speed. Anyone else experiencing issue and found a solution?

For now, I've decided to disable the fan until a solution is found (temp is 47.7)

Lisa

24 months ago
Score 0++
Hi,Please check if 【FAN FS】pin is shorted by a jumper cap before installing the script.

Anonymous user #57

24 months ago
Score 0++
@Lisa Thanks for the answer. Not familiar with this but how could I check this "【FAN FS】pin is shorted by a jumper cap"? Any hints or links would be great :)

Lisa

24 months ago
Score 0++
Plese refer toNASPi picture: X-C1 v2.0 Adapter Board

Anonymous user #55

25 months ago
Score 0++
Do you support Batocera? I only enough enough about Linux to be dangerous...

Lisa

25 months ago
Score 0++
There are many open source systems for linux. Sorry,we have not tested all of them.

Anonymous user #54

25 months ago
Score 0++
How to get the current fan speed value? As I remember old x735 software where with such read_fan_speed.py script example, but not found such in X-C1

Lisa

25 months ago
Score 0++
Hi,The X-C1's PWM fan does not support reading speed. It only has three wires (3 pins), and the X735 fan has 4 wires.

Anonymous user #53

25 months ago
Score 0++

Can't install the script on retropie running raspbian OS.

Getting error:

File "/home/pi/x-c1/fan.py", line 2, in <module> import pigpio

ImportError: No module named pigpio

Anonymous user #52

25 months ago
Score 0++
Hi! One more request for HomeAssistant Support. This is the perfect case for an HA deployment.

Lisa

25 months ago
Score 0++

Hi,

Sorry, it doesn't support Home Assitant yet.

Anonymous user #51

27 months ago
Score 0++
Hi, is it possible on Home Assistant?

Lisa

27 months ago
Score 0++

Hi,

Sorry, it doesn't support Home Assitant yet.

Anonymous user #50

27 months ago
Score 0++
Hello

Anonymous user #49

27 months ago
Score 0++
any fan speed control script for moode audio?

Anonymous user #48

29 months ago
Score 0++
Hello. Is it possible to have auto power on in v1.3 using the reserved SW?. Thanks

Lisa

29 months ago
Score 0++

Hello,

SW is only an external switch interface and cannot realize the auto power on function.

Anonymous user #47

29 months ago
Score 0++

Hello, Installed the script on a Raspberry Pi 4 with newest version of raspbian on it. xoff is not working. After the 4 seconds, nothing happens.

Fan speed is controlled so the script somehow works, but xoff not..

Lisa

29 months ago
Score 0++
Could you you provide more details? For example, the installed script, is there any error message?

Anonymous user #46

29 months ago
Score 0++

Hello, after creating a new image I was able to install the required programs. The pin for FanFS is bridged. The script Pigpio is present and also the script x-C1. No matter what I change in the fan.pi file, the fan does not turn off.

My OS ist Citadel-Node (similar Umbrel), Hardware P4

Lisa

29 months ago
Score 0++

Hi,

Is there any error message? Or you can try to reinstall the system to test it.

Anonymous user #44

29 months ago
Score 0++
Hello, I wanted to use this case with Citadel Node. Apart from the x-c1-softsd file, no other file is created when the script for My-Node is executed. The fan runs but is not regulated. ;-/

Lisa

29 months ago
Score 0++

Hi,

What version is your X-C1?

X-C1 v2.0 added Fan FS jumper, please check if the Fan FS jumper cap is shorted.

Anonymous user #45

29 months ago
Score 0++
The data for the fan is not installed with the script. The former file that was installed was used for the shutdown.

Anonymous user #46

29 months ago
Score 0++
Hello, after creating a new image I was able to install the required programs. The pin for FanFS is bridged. The script Pigpio is present and also the script x-C1. No matter what I change in the fan.pi file, the fan does not turn off.

Anonymous user #43

30 months ago
Score 0++

For anyone installing the script on Raspian who found that after installation the fan runs at 100% and is very noisy here is my solution.

cd x-c1/ cp fan.py fan.py.original vi fan.py

Change the following line...

pwm = pigpio.pi()

To...

pwm = pigpio.pi('::1', 8888)

Save changes and reboot your Raspberry Pi.

Hope this helps someone!

Anonymous user #42

31 months ago
Score 0++
Is it possible to install pwm fan and power button control under OMV6 on a Pi4B?

Lisa

31 months ago
Score 0++

Hi,

Yes,you can try to install it.

Anonymous user #41

31 months ago
Score 0++

Hello, I´m running dualboot raspberry OS and LineageOS 18.1 Android TV. Is it possible to run x-c1 on android 11 somehow?

thanks

Lisa

31 months ago
Score 0++

Hi,

It depends on whether your raspberry pi supports android 11;

X-C1 is just an adapter board

Lisa

32 months ago
Score 0++

Hi,Andi

5 seconds after the MCU detects the low level, it cuts off the power; this time is sufficient.

if you want to change it, you can try this: add ‘/bin/sleep/ 2’ in place of 1 or 2 in the picture NASPI-X-C1-shutdown.png . But we haven't tested it this way.

Anonymous user #40

32 months ago
Score 0++

Hi Lisa

Thanks for getting back to me. I try the sleep command but it does not work for me as it only extends the time before the shutdown starts but not the shutdown time itself. I will try to work my way thrue systemd, define the script as a service and find the right order to shutdown. If i will find the right systemd order, i will post it here.

Anonymous user #40

32 months ago
Score 0++

Hi

after run x-c1-softsd.sh my NASPI start to shutdown and powers off after 4 seconds. That seems to be not long enogh for my raspberry os to properly shut down and reach the power off target. My NASPI powers off while systemd is still busy to stop all the processes. Is there a way to extend the time between start the shutdown and power off or even better: check if systemd power off target is reached before power off ? thx best regards

Andi

Anonymous user #39

32 months ago
Score 0++
after 4 months the fan start to make noise and doesn't have the same performance anymore. Please can someone tell me what model it is, or something compatible? some link where I can buy it, i tried another fan but is working always at max power

Lisa

32 months ago
Score 0++
Hello,It's a 4010 PWM Fan-3Pin for NASPi. you can buy it from here[[1]]

Anonymous user #38

33 months ago
Score 0++

How can the fan be stopped without pulling out wires? The fan control script does nothing on debian 11.2 aarch64

I'd like to start/stop fan on demand.

Lisa

33 months ago
Score 0++

Hi,

You can modify the fan's script to stop it.

Anonymous user #37

33 months ago
Score 0++

I'm using latest version of Raspberry Pi Bullseye Release date: January 28th 2022 Kernel version: 5.10 Debian version: 11 (bullseye) When I get to this line in the above install process: sudo apt-get install -y python-smbus python3-smbus It fails to install python-smbus. I changed the command to sudo apt-get install -y python3-smbus And continued the install without it.

When the install was complete the fan seems to run OK and xoff and the power work.

Anonymous user #36

34 months ago
Score 0++
Hi, is there a version for "Debian GNU/Linux 11 (bullseye)"?

Lisa

34 months ago
Score 0++

Hi,

For bullseye :

please refer toX-C1 Software#For Raspbian / RetroPie / Twister OS v2.0.2

Anonymous user #35

35 months ago
Score 0++
Hello, the script for Dietpi doesn't seem to work. I installed the latest Dietpi on my Raspberry Pi 4 4Gb and I couldn't get the fan to run. The script aborts during installation. What can I do?

Lisa

34 months ago
Score 0++

Hello,

Could you please tell us more details? What is the error message when installing the script?

Anonymous user #34

35 months ago
Score 0++

I tried doing this with Raspberry Pi OS and it didn't work. I did use the one at the top that says Raspbian. I forgot it isn't called Raspbian any more so maybe that was why? I cut and pasted the instructions to avoid errors. Being a bit of a noob, I might have got the bit that sends you to github wrong. I just copy and pasted the line as above. Don't know if I was meant to go to github and do something? Anyway, followed it through. Did reboot as stated. It seemed to reboot but I lost display. I could see that it was connected to internet the first couple of times. Then after that, it would start to load up. (I could see that bit) then it got to a point and i lost display. It didn't show up as connected to internet either and i cpu light stopped flashing. Left it ages a couple of times.

Gave up, had to start again from fresh, reinstalled Raspberry Pi OS.

Anonymous user #33

36 months ago
Score 0++

Your ubuntu install script just hard overwrites rc.local without checking if there's anything there alread and doesn't back it up

this is really poor practice you're not the only folks who might want to use rc.local on ubuntu... please consider more "defensive programming"

Anonymous user #32

36 months ago
Score 0++
Hi. Any update on Home Assistant support?

Lisa

35 months ago
Score 0++
Hi,Sorry, it is not supported yet

Anonymous user #31

36 months ago
Score 0++

OS: 2021-10-30-raspbian-bullseye-armhf lite version

Your script doesn't work. After using the xoff command the system turns off, but using the button the fan starts at maximum and the red led does not turn off. Also I point out that it is impossible to install python-smbus as it reports me that the package is missing. The script has been tested on at least 5 raspberry with your case but none seem to work. I would also like an implementation of a custom path for the installation of the script, as it seems to me that your product was not given to me but was purchased.

Lisa

36 months ago
Score 0++
Hello,If the system is turned off, the indicator light should not light up. But based on what you said, we cannot tell what the problem is.Could you please provide some installation and test pictures,

Anonymous user #30

37 months ago
Score 0++
Hello.I am using raspbian lite arm64 on RPI 4 8Gb, the fan is working, but when I turn off by switch (3s) it looks like is turnung off but the red light on RPI4 and the blue light on the switch stays on, is compatible with ARM64 OS?

Lisa

37 months ago
Score 0++
Hi,If it is turned off, the LED indicator should be off. Could you please send some pictures by email ?[support@geekworm.com],and please let us know your Order NO. Thanks

Anonymous user #28

37 months ago
Score 0++
Hi. Amy update on a possible Home Assistant support?

Anonymous user #29

37 months ago
Score 0++

Hi, @user#28: Did you try the Unbuntu scripts proposed here in this Wiki on your Home Assistant PI? Was this not working?

I just bought this board also. I am setting up this board fright now, and was looking at this WiKi to now implement the Temperature monitoring on this XC-1 board to have the fan monitor the temperature.

I think this board is perfekt for any Smarthome solution based on Raspberry PI ...

Anonymous user #27

37 months ago
Score 0++

Hello,

I am trying to use the on the new Raspberry Pi 4 with Pop Os as my system. Pop Os is based on Ubuntu but I can't get the install script to work I get error line 121. Could you tell me how to fix this. Thanks for any help on this.

Lisa

37 months ago
Score 0++

Hello,please send us 【Pop Os】link and let us try to test.

Because there are too many operating systems for the Raspberry Pi, we cannot provide installation scripts for all systems, so we strongly recommend buying the NASPi Lite version if you are using a third-party system.

Anonymous user #25

37 months ago
Score 0++

Could you update the script for 2021-10-30-raspios-bullseye-armhf? The actual script isn't working with that OS.

I'm getting this error with "sudo apt-get install -y pigpio python-pigpio python-smbus python3-pigpio wiringpi git" command:

"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 E: Unable to locate package wiringpi"

I'm using the lite version.

Lisa

37 months ago
Score 0++
Hi,Are you using the NASPi Lite case fo Raspberry Pi4? NASPi Lite does not need to install script, it uses X-C2 adapter board, not X-C1. please refer NASPi Lite

Anonymous user #26

37 months ago
Score 0++

No, the lite version of the raspberry OS.

I have the standard NASPi 2.5.

Lisa

37 months ago
Score 0++
Hi,Please ignore the above the warning...We tested again and there was no problem with the installation, please try to install it again.

Anonymous user #17

37 months ago
Score 0++
With Bullseye, one might also want to install (with apt) the package python-is-python3 that creates a symlink from "python" to "python3" - some scripts seem to refer to python only causing "command not found" problems.

Anonymous user #24

38 months ago
Score 0++

For future generations looking for software night mode indication: power button's LED is powered by 1.83 mA at 2.57 V, so you need a 400 ohm resistor to drive it directly from the 3.3V raspberry pin.

Pin, marked in FAQ (linked below) is GND, the one to be cut off (and point to connect from gpio) is right above it.

Anonymous user #24

38 months ago
Score 0++
Is there any chance to dim power button's LED in code? Please don't suggest using duct tape :)

Lisa

38 months ago
Score 0++
Hi,Sorry, the brightness of the LED indicator does not support adjustment

Anonymous user #24

38 months ago
Score 0++

Hi, and thank you for your answer.

Then could it be disabled programatically?

Anonymous user #24

38 months ago
Score 0++
..or, if it's impossible to turn off led, is is possible to disable entire button?

Lisa

38 months ago
Score 0++
LED is controlled by MCU. We cannot disable the LED programmatically. But you can refer to the method here NASPi#FAQ

Anonymous user #24

38 months ago
Score 0++
OK, then could you please tell me operating current and voltage of this LED? If it can be safely cut off, then it can be controlled by another GPIO pin after that.

Anonymous user #23

38 months ago
Score 0++
+1 for Home-Assistant integration. This would be really great!

Anonymous user #8

38 months ago
Score 0++

dont work for dietpi anymore... apt-get install git pigpio python python-pigpio python-smbus wiringpi -y 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

Anonymous user #21

38 months ago
Score 0++
The fan is very noisy, and seems to run full-speed all the time - is this expected behaviour, or can the speed be controlled?

Lisa

38 months ago
Score 0++
Hello,It is a PWM fan, you can adjust the speed of the fan.

Anonymous user #22

38 months ago
Score 0++
Another vote for HassOS support of xoff and Fan control please in Hass iuntegration