XScript HAOS: Difference between revisions

Ruby (talk | contribs)
Created page with "{{GD Template Impl}} ==Overview== This page provides {{red|a fan control tutorial}} for NASPi, NASPi Gemini 2.5, NASPi CM4-M2 and NASPi CM4-2.5 on '''Home Assistant OS'''. Due to various limitations, we were unable to run tests on Home Assistant OS, so guidance for this setup was previously missing from our tutorial - [https://wiki.geekworm.com/XScript ''XScript'']. Recently, a community member generously shared their configuration workflow - see the original [https://w..."
 
Ruby (talk | contribs)
No edit summary
 
Line 5: Line 5:
Due to various limitations, we were unable to run tests on Home Assistant OS, so guidance for this setup was previously missing from our tutorial - [https://wiki.geekworm.com/XScript ''XScript'']. Recently, a community member generously shared their configuration workflow - see the original [https://wiki.geekworm.com/NASPi#cs-comment-11256 comment - ''Fan control on Home Assistant / HAOS'']. This contribution greatly completes and improves our tutorial. We extend our sincere gratitude to this friend, and his guide is now included on this page for anyone in need of reference.
Due to various limitations, we were unable to run tests on Home Assistant OS, so guidance for this setup was previously missing from our tutorial - [https://wiki.geekworm.com/XScript ''XScript'']. Recently, a community member generously shared their configuration workflow - see the original [https://wiki.geekworm.com/NASPi#cs-comment-11256 comment - ''Fan control on Home Assistant / HAOS'']. This contribution greatly completes and improves our tutorial. We extend our sincere gratitude to this friend, and his guide is now included on this page for anyone in need of reference.


Fan control on Home Assistant / HAOS
==Fan control on Home Assistant / HAOS==


{| class="wikitable"
{| class="wikitable"
Line 16: Line 16:




<b>Step 1: Read CPU Temperature in HAOS</b>
===<b>Step 1: Read CPU Temperature in HAOS</b>===


To control the fan, we first need to monitor the temperature.
To control the fan, we first need to monitor the temperature.
Line 24: Line 24:




<b>Step 2: Install the "pigpio" Add-on</b>
===<b>Step 2: Install the "pigpio" Add-on</b>===


To allow HAOS to communicate with the GPIO pins on a hardware level, we need a small background daemon.
To allow HAOS to communicate with the GPIO pins on a hardware level, we need a small background daemon.
Line 34: Line 34:




<b>Step 3: Install the PWM Integration via HACS</b>
===<b>Step 3: Install the PWM Integration via HACS</b>===
:*Open HACS (Home Assistant Community Store) from your sidebar.
:*Open HACS (Home Assistant Community Store) from your sidebar.
:*Click the three dots in the top right corner and select Custom repositories.
:*Click the three dots in the top right corner and select Custom repositories.
Line 42: Line 42:




<b>Step 4: Configure the Fan</b>
===<b>Step 4: Configure the Fan</b>===


Next, we tell Home Assistant that there is a PWM device connected to GPIO pin 18.
Next, we tell Home Assistant that there is a PWM device connected to GPIO pin 18.
Line 61: Line 61:




<b>Step 5: The Automation</b>
===<b>Step 5: The Automation</b>===


Finally, we link the CPU temperature to the "brightness" of our pseudo-light, using hysteresis to prevent the fan from constantly turning on and off.
Finally, we link the CPU temperature to the "brightness" of our pseudo-light, using hysteresis to prevent the fan from constantly turning on and off.
Line 131: Line 131:


==FAQ==
==FAQ==
<!-- 这里提供了一个Q&A的模板,增加Q&A时按照下面的格式写就可以了 -->
<div class="toccolours mw-collapsible mw-collapsed">
<div class="toccolours mw-collapsible mw-collapsed">
<div style="font-weight:bold;line-height:1.0;">
<div style="font-weight:bold;line-height:1.0;">
Line 140: Line 139:
</div>
</div>
</div>
</div>
-->
-->