XScript: Difference between revisions

Ruby (talk | contribs)
 
(14 intermediate revisions by 3 users not shown)
Line 19: Line 19:
2. Use gpiod instead of obsolete interface, and supports ubuntu 23.04 also
2. Use gpiod instead of obsolete interface, and supports ubuntu 23.04 also


3. The script now supports the Raspberry Pi OS '''BOOKWORM''' version. You just need to '''uninstall''' the original script and '''reinstall''' it. Please refer to the following:
3. The script now supports the Raspberry Pi OS '''Trixie''' and '''BOOKWORM''' version. You just need to '''uninstall''' the original script and '''reinstall''' it. Please refer to the following:


OPen ternimal window, then run the following command:
OPen ternimal window, then run the following command:
Line 41: Line 41:
* RetroPie
* RetroPie
* Twister
* Twister
* Home Assistant OS ({{red|Solution shared by a user.}} See [https://wiki.geekworm.com/XScript_HAOS ''full setup steps''])


'''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)
'''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)
Line 56: Line 57:


===Install gpiod package===
===Install gpiod package===
  sudo apt install -y gpiod
  sudo apt install -y gpiod bc
'''PS''': The reason for installing the <code>bc</code> command is because we use the <code>bc</code> command in the fan script file to obtain the CPU temperature


==Download the script==
==Download the script==
Clone pruduct software script if use the last '''Trixie''' OS, please adhere to capitalization.
git clone -b trixie https://github.com/geekworm-com/xscript.git
Please use the following command to get the software script if you are using '''BOOKWORM''' OS
git clone https://github.com/geekworm-com/xscript.git
'''PS''': Run the following command to view OS information:
<pre>
<pre>
git clone https://github.com/geekworm-com/xscript
pi@geekworm:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 13 (trixie)
Release: 13
Codename: trixie
</pre>
The above last line "Codename" indicates that the current system is Trixie OS.


Then set executable permissions for script files with the following command:
<pre>
cd xscript
cd xscript
chmod +x *.sh
chmod +x *.sh
Line 79: Line 96:


==Create alias 'xoff' command to execute safe shutdown==
==Create alias 'xoff' command to execute safe shutdown==
Then run the following command to create a alias 'xoff' command
1. Prepaid the xSoft.sh command
sudo cp -f ./xSoft.sh                /usr/local/bin/
2. Then run the following command to create a alias '''xoff''' command
  echo "alias xoff='sudo /usr/local/bin/xSoft.sh 0 27'" >>  ~/.bashrc
  echo "alias xoff='sudo /usr/local/bin/xSoft.sh 0 27'" >>  ~/.bashrc
3. Run the following command to make the alias '''xoff''' effective
  source ~/.bashrc
  source ~/.bashrc
After the installation is complete, an <code>xoff</code> command will be created to shut down the software.Then you can run <code>xoff</code> to execute software shutdown.
After the installation is complete, an <code>xoff</code> command will be created to shut down the software.Then you can run <code>xoff</code> to execute software shutdown.
Line 139: Line 159:


A: TODO
A: TODO
</details>
<details>
<summary>Q: Why is my replaced PWM fan running at full speed and unresponsive to script control?</summary>
A: The PWM 4010 fan for NASPi uses the yellow wire for PWM signal transmission, while most regular PWM fans typically use the blue wire for this signal. Please refer to the below photo of the fan port interface definition of X-C1 adapter:
<br>
red cable = 5V
<br>
black cable = GND
<br>
yellow cable = for PWM signal
<br>
If you encounter such issues, please check if this wiring difference is the cause.
<p><a href="/File:X-C1-fan-Port.png" class="image" title="X-C1 Fan"><img alt="X-C1 Fan" src="/images/thumb/4/48/X-C1-fan-Port.png/500px-X-C1-fan-Port.png" decoding="async" width="500" height="309" srcset="/images/thumb/4/48/X-C1-fan-Port.png/750px-X-C1-fan-Port.png 1.5x, /images/thumb/4/48/X-C1-fan-Port.png/1000px-X-C1-fan-Port.png 2x" data-file-width="1233" data-file-height="763"></a>
</p>
</details>
</details>


</html>
</html>






<!--Add review function! -->
<!--Add review function! -->
<comments />
<comment-streams id="main" />


<!--Please choose the  -->
<!--Please choose the  -->