PiHole v6 Missing Temperature

For some reason the temperature was removed from PiHole v6 instead of making it an option for those who still want it. (it seems that it was pointless if used in a VM)

I found the following information from: https://www.reddit.com/r/pihole/comments/1ithei7/if_you_want_to_see_the_temperature_in_the_status/

sudo nano /var/www/html/admin/scripts/lua/sidebar.lp

Find:

<div class="pull-left info">
    <p>Status</p>
    <span id="status"></span><br/>
    <span id="query_frequency"></span><br/>
    <span id="cpu"></span><br/>
    <span id="memory"></span>
</div>

Add either or both of the following somewhere EX: right below <p>Status</p>

Fahrenheit:

<span id="temperature">&nbsp;&nbsp;<i class="fa-solid fa-temperature-three-quarters text-green-light"></i>&nbsp;&nbsp; Temp: <%= string.format("%.1f°F", (tonumber(io.open("/sys/class/thermal/thermal_zone0/temp"):read("*a")) / 1000) * 9/5 + 32) %></span><br/>

Celsius:

<span id="temperature">&nbsp;&nbsp;<i class="fa-solid fa-temperature-three-quarters text-green-light"></i>&nbsp;&nbsp; Temp: <%= string.format("%.1f°C", tonumber(io.open("/sys/class/thermal/thermal_zone0/temp"):read("*a")) / 1000) %></span><br/>

EX:

<div class="pull-left info">
    <p>Status</p>
    <span id="temperature">&nbsp;&nbsp;<i class="fa-solid fa-temperature-three-quarters text-green-light"></i>&nbsp;&nbsp; Temp: <%= string.format("%.1f°F", (tonumber(io.open("/sys/class/thermal/thermal_zone0/temp"):read("*a")) / 1000) * 9/5 + 32) %></span><br/>
    <span id="status"></span><br/>
    <span id="query_frequency"></span><br/>
    <span id="cpu"></span><br/>
    <span id="memory"></span>
</div>

Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *