<?xml version="1.0" encoding="utf-8" standalone="yes"?><?xml-stylesheet type="text/xsl" href="/index.xsl"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>./techtipsy</title><link>https://ounapuu.ee/tags/monitoring/</link><description>Recent content on ./techtipsy, a blog written by Herman Õunapuu.</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><managingEditor>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</managingEditor><webMaster>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</webMaster><lastBuildDate>Tue, 14 Oct 2025 06:00:00 +0300</lastBuildDate><atom:link href="https://ounapuu.ee/tags/monitoring/index.xml" rel="self" type="application/rss+xml"/><item><title>Comparing the power consumption of a 30 year old refrigerator to a brand new one</title><link>https://ounapuu.ee/posts/2025/10/14/fridge-power-consumption/</link><pubDate>Tue, 14 Oct 2025 06:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2025/10/14/fridge-power-consumption/</guid><description>Having a home server and a few smart plugs leads to interesting data points like this one. Well, interesting to me, at least.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2025/10/14/fridge-power-consumption/media/cover_hu_c10a0f2e1329e560.jpg" width="1200" height="630" alt="Comparing the power consumption of a 30 year old refrigerator to a brand new one" /><p>Our apartment came with a refrigerator. It was alright, it made things cold, it kept them cold. It was also
incredibly noisy, and no matter how much I fiddled with its settings, the compressor was always running and any ice
cream left in the deep freeze part got rock solid.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<p>When I hooked up <a href="/posts/2024/05/02/smartplugs/">one of my smart plugs</a> to it, I soon learned why: one of the two compressors was
running all the time. This lead to a huge block of ice forming on the back
of the main compartment, and the deep freeze section icing up really quickly. I suspect that the thermostat may have
been busted and contributed to the issue, but after trying to repair a dishwasher, getting cut about 10 times on my
hands and losing, I had zero interest in attempting another home appliance repair on my own.</p>
<p>The refrigerator was the UPO Jääkarhu (<em>jääkarhu</em> means polar bear in Finnish), and the manual that the previous owner
had still kept around had July 1995 on it, meaning that the refrigerator was about the same age as I am: 30 years old.
Not bad at all for a home appliance!</p>









<figure class="center">
  <a href="/posts/2025/10/14/fridge-power-consumption/media/refrigerator.jpg">
    <img src="/posts/2025/10/14/fridge-power-consumption/media/refrigerator_hu_956de92cb4f3e17d.webp"
     width="647"
     height="1000"
     loading="lazy"
     decoding="async"
     alt="Behold, the UPO Jääkarhu!">

  </a>
  <figcaption class="center">Behold, the UPO Jääkarhu!</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2025/10/14/fridge-power-consumption/media/manual.jpg">
    <img src="/posts/2025/10/14/fridge-power-consumption/media/manual_hu_53f4af67bd2f2487.webp"
     width="732"
     height="1000"
     loading="lazy"
     decoding="async"
     alt="The manual that came with the refrigerator.">

  </a>
  <figcaption class="center">The manual that came with the refrigerator.</figcaption>
</figure>

<p>I shopped around for a new refrigerator and got a decent one that&rsquo;s about the same size, except newer. I won&rsquo;t mention
the brand here because they didn&rsquo;t pay me anything and this post really isn&rsquo;t a refrigerator review, but it was in the
low-to-midrange class, sporting a &ldquo;no frost&rdquo; feature, and could be bought for about 369 EUR in Estonia in the summer of
2025. Based on some napkin math, I assumed that within a few years, the electricity savings will cover the upfront
cost of buying the new refrigerator, assuming that it doesn&rsquo;t break down.</p>
<p>After letting it run for a while, I had some <em><strong>data!</strong></em></p>
<p>Turns out that the old one consumed <strong>3.7x</strong> more electricity compared to the new one.</p>
<p>Here are some typical daily power consumption numbers:</p>
<ul>
<li>old refrigerator: <strong>2.6 kWh</strong></li>
<li>new refrigerator: <strong>0.7 kWh</strong></li>
</ul>









<figure class="center">
  <a href="/posts/2025/10/14/fridge-power-consumption/media/old-fridge-daily.png">
    <img src="/posts/2025/10/14/fridge-power-consumption/media/old-fridge-daily_hu_23e52ba435fe7f10.webp"
     width="1000"
     height="457"
     loading="lazy"
     decoding="async"
     alt="Daily power consumption of the old fridge, in kilowatt-hours (kWh).">

  </a>
  <figcaption class="center">Daily power consumption of the old fridge, in kilowatt-hours (kWh).</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2025/10/14/fridge-power-consumption/media/new-fridge-daily.png">
    <img src="/posts/2025/10/14/fridge-power-consumption/media/new-fridge-daily_hu_27c3472be5b7956c.webp"
     width="1000"
     height="457"
     loading="lazy"
     decoding="async"
     alt="Daily power consumption of the new fridge, in kilowatt-hours (kWh).">

  </a>
  <figcaption class="center">Daily power consumption of the new fridge, in kilowatt-hours (kWh).</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2025/10/14/fridge-power-consumption/media/old-fridge-active.png">
    <img src="/posts/2025/10/14/fridge-power-consumption/media/old-fridge-active_hu_a0e3adc6d0b4295d.webp"
     width="1000"
     height="457"
     loading="lazy"
     decoding="async"
     alt="You can really see one of the two compressors constantly running on this one.">

  </a>
  <figcaption class="center">You can really see one of the two compressors constantly running on this one.</figcaption>
</figure>










<figure class="center">
  <a href="/posts/2025/10/14/fridge-power-consumption/media/new-fridge-active.png">
    <img src="/posts/2025/10/14/fridge-power-consumption/media/new-fridge-active_hu_36632025d4af4b2a.webp"
     width="1000"
     height="457"
     loading="lazy"
     decoding="async"
     alt="On the new fridge, we actually have moments where the compressor shuts off, which is great for the power consumption and
also my ears.">

  </a>
  <figcaption class="center">On the new fridge, we actually have moments where the compressor shuts off, which is great for the power consumption and
also my ears.</figcaption>
</figure>

<p>The difference is more noticeable if we zoom out a bit.</p>









<figure class="center">
  <a href="/posts/2025/10/14/fridge-power-consumption/media/comparison-daily.png">
    <img src="/posts/2025/10/14/fridge-power-consumption/media/comparison-daily_hu_3afee7154e3a6a95.webp"
     width="1000"
     height="457"
     loading="lazy"
     decoding="async"
     alt="Old vs new fridge daily power consumption, in kilowatt-hours (kWh).">

  </a>
  <figcaption class="center">Old vs new fridge daily power consumption, in kilowatt-hours (kWh).</figcaption>
</figure>

<p>Moving from ~78 kWh to ~21 kWh consumed each month is nice. Around the time we replaced the refrigerator, we
also got a working dishwasher, and with those two combined I saw a solid 10-20% decrease in the overall power usage of
the whole apartment. We went from using 334 kWh in June to 268 kWh in July, 298 kWh in August and 279 kWh in September.</p>
<p>Remember that napkin math I made earlier? If we assume about 57 kWh savings per month, and an average electricity price
of 17 cents per kWh (based on actual rates during August 2025), it will take about 38 months or a bit over 3 years for
the new refrigerator to pay off in the most pessimistic scenario. The pay-off will likely be larger if we account for
energy prices usually rising during winter.</p>
<p>Don&rsquo;t worry about the old refrigerator, we gave it away to a person who needed one for their new home in the short term
as a stopgap until they get further with renovation work. Even got some good chocolate for that!</p>
<p>The only point of concern with this change is that I don&rsquo;t really trust the new refrigerator to last as long as the old
one. The previous one was good for 30 years if you look past the whole ice buildup, heat and noise, but with the new one
I suspect that it&rsquo;s not going to last as long.</p>
<p><a href="https://arstechnica.com/gadgets/2025/09/samsung-forces-ads-onto-fridges-is-a-bad-sign-for-other-appliances/">At least my new refrigerator doesn&rsquo;t have a Wi-Fi-connected screen on it!</a></p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>honestly, I miss that a lot, the ice cream was colder for longer, I ate it in smaller bites and savored it more.&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item><item><title>How to run Uptime Kuma in Docker in an IPv6-only environment</title><link>https://ounapuu.ee/posts/2025/08/05/uptime-kuma-ipv6/</link><pubDate>Tue, 05 Aug 2025 21:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2025/08/05/uptime-kuma-ipv6/</guid><description>When you're too cheap to pay for an IPv4 address but you'd really like to monitor your services.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2025/08/05/uptime-kuma-ipv6/media/cover_hu_25de9680b02fc40f.jpg" width="1200" height="630" alt="How to run Uptime Kuma in Docker in an IPv6-only environment" /><p>I use <a href="https://github.com/louislam/uptime-kuma">Uptime Kuma</a> to check the availability of a few services that I run,
with the most important one being my blog. It&rsquo;s really nice.</p>
<p>Today I wanted to set it up on a different machine to help troubleshoot and confirm some latency issues that I&rsquo;ve
observed, and for that purpose I picked the cheapest ARM-based Hetzner Cloud VM hosted in Helsinki, Finland.</p>
<p>Hetzner provides a public IPv6 address for free, but you have to pay extra for an IPv4 address. I didn&rsquo;t want to do that
out of
principle, so I went ahead and copied my Docker Compose definition over to the new server.</p>
<p>For some reason, Uptime Kuma would start up on the new IPv6-only VM, but it was unsuccessful in making requests to my
services, which support both IPv4 and IPv6. The requests would time out and show up as &ldquo;Pending&rdquo; in the UI, and the
service logs complained about not being able to deliver e-mails about the failures.</p>
<p>I confirmed IPv6 connectivity within the container by running <code>docker exec -it uptime-kuma bash</code> and running a
few <code>curl</code> and <code>ping</code> commands with IPv6 flags, had no issues with those.</p>
<p>When I added a public IPv4 address to the container, everything started working again.</p>
<p>I fixed the issue by explicitly disabling the IPv4 network in the Docker Compose service definition, and that did the
trick, Uptime Kuma made successful requests towards my services. It seems that the service defaults to IPv4 due to the
internal Docker network giving it an IPv4 network to work with, and that causes issues when your machine doesn&rsquo;t have
any IPv4 network or public IPv4 address associated with it.</p>
<p>Here&rsquo;s an example Docker Compose file:</p>
<pre tabindex="0"><code>name: uptime-kuma
services:
  uptime-kuma:
    container_name: uptime-kuma
    networks:
      - uptime-kuma
    ports:
      - 3001:3001
    volumes:
      - /path/to/your/storage:/app/data
    image: docker.io/louislam/uptime-kuma
    restart: always
networks:
  uptime-kuma:
    enable_ipv6: true
    enable_ipv4: false
</code></pre><p>That&rsquo;s it!</p>
<p>If you&rsquo;re interested in different ways to set up IPv6 networking in
Docker, <a href="/posts/2024/12/20/docker-ipv6/">check out this overview that I wrote a while ago.</a></p>
]]></content:encoded></item><item><title>Monitoring energy usage with smart plugs, Prometheus and Grafana</title><link>https://ounapuu.ee/posts/2024/05/02/smartplugs/</link><pubDate>Thu, 02 May 2024 06:00:00 +0300</pubDate><author>ihavesomethoughtsonyourblog@ounapuu.ee (Herman Õunapuu)</author><guid>https://ounapuu.ee/posts/2024/05/02/smartplugs/</guid><description>My obsession with measuring the power consumption of my devices reached a whole new level.</description><content:encoded><![CDATA[<img src="https://ounapuu.ee/posts/2024/05/02/smartplugs/media/cover_hu_1ceb39d1f5a6c2e9.jpg" width="1200" height="630" alt="Monitoring energy usage with smart plugs, Prometheus and Grafana" /><p>This post <strong>isn&rsquo;t</strong> a detailed line-by-line tutorial on how to set up each individual piece of the setup as those types of
guides tend to get out of date really easily, but if you know your way around Linux and the command line, then you can
definitely replicate this setup on your own.</p>
<p>Over the past few years I&rsquo;ve been interested in learning about how much energy my computing setup and home
appliances use.
I&rsquo;ve used a simple digital energy meter before to get instantaneous readings, but that was not ideal for monitoring
how an electrical appliance consumes power over a longer time period.</p>
<p>My friend bought a few smart plugs from <a href="https://www.athom.tech/">athom.tech</a>. After getting confirmation
that they don&rsquo;t suck, I went ahead and ordered some myself.</p>
<p>The smart plugs I bought were the <code>EU style plug V3</code> variant. The shipping times in EU were reasonably fast, shipping in 9
days (and that included Christmas!).</p>
<p>The plugs ship with <a href="https://tasmota.github.io/docs/">Tasmota</a> pre-flashed. The plugs come with a small paper strip explaining
the steps to take to connect the plug to your Wi-Fi network, and after that you can manage the plug in your browser.</p>









<figure class="center">
  <a href="/posts/2024/05/02/smartplugs/media/tasmota-quick-start.jpg">
    <img src="/posts/2024/05/02/smartplugs/media/tasmota-quick-start_hu_a32ff56422f86b3b.webp"
     width="1280"
     height="502"
     loading="lazy"
     decoding="async"
     alt="Quick start instructions that ship with the smart plug.">

  </a>
  <figcaption class="center">Quick start instructions that ship with the smart plug.</figcaption>
</figure>

<p>Updating the firmware to the latest version is easy and doable in the web GUI with just a few clicks.</p>









<figure class="center">
  <a href="/posts/2024/05/02/smartplugs/media/webui.png">
    <img src="/posts/2024/05/02/smartplugs/media/webui_hu_56745710490202cf.webp"
     width="395"
     height="800"
     loading="lazy"
     decoding="async"
     alt="The web UI is simple and very functional.">

  </a>
  <figcaption class="center">The web UI is simple and very functional.</figcaption>
</figure>

<h2 id="the-software-stack">
  <a class="heading-anchor" href="#the-software-stack">The software stack<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>My initial goal with these plugs was to visually monitor the power consumption of a few devices, such as my home server, router,
workstation setup and the electric water heater.</p>
<p>The power meter data is collected to an existing <a href="https://prometheus.io/">Prometheus</a> instance on my home server.
If you&rsquo;re not sure what Prometheus is, then think of it as a tool that periodically reads metrics from different
sources, saves them to disk and allows you to later query and manipulate that information.</p>
<p>I run multiple instances of this <a href="https://github.com/astr0n8t/tasmota-power-exporter">tasmota-power-exporter</a> solution on my server, one per plug, which get scraped once
per second by the Prometheus instance. <a href="https://github.com/arendst/Tasmota/issues/9206">It is possible to also make the plugs themselves export these metrics,</a>
but I didn&rsquo;t fancy building Tasmota firmware myself, yet.<sup id="fnref:1"><a href="#fn:1" class="footnote-ref" role="doc-noteref">1</a></sup></p>
<p>I already had a <a href="https://grafana.com/">Grafana</a> instance running on my home server, so I reused that to show a few basic
graphs for the power meter setup.</p>
<p><em>Free tech tip</em>: make sure to change the <code>min step</code> setting to 1 second to get the most detailed data points on your graphs.</p>









<figure class="center">
  <a href="/posts/2024/05/02/smartplugs/media/grafana-minstep.png">
    <img src="/posts/2024/05/02/smartplugs/media/grafana-minstep_hu_eca401c841351ce8.webp"
     width="550"
     height="317"
     loading="lazy"
     decoding="async"
     alt="It&#39;s this one. ">

  </a>
  <figcaption class="center">It&#39;s this one. </figcaption>
</figure>

<h2 id="observations-and-findings">
  <a class="heading-anchor" href="#observations-and-findings">Observations and findings<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>So, what have I learned after running this setup for almost 4 months?</p>
<h3 id="water-heater">
  <a class="heading-anchor" href="#water-heater">Water heater<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>It shouldn&rsquo;t come as a surprise that the electric water heater uses up the most power. The one we have is a 30L one,
just enough for a quick shower or two or for washing a large load of dishes.</p>
<p>Typical power usage: 4.51 kWh/day.</p>
<p>Minimum observed: 0.56 kWh/day, happens usually when nobody is at home</p>
<p>Maximum observed: 11.1 kWh/day, a lot of washing and showering happened on that day</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/boiler-graph.png">
    <img src="/posts/2024/05/02/smartplugs/media/boiler-graph_hu_2a8c28d3af743eba.webp"
     width="1120"
     height="475"
     loading="lazy"
     decoding="async"
     alt="Typical power consumption pattern of a water heater.">

  </a>
  <figcaption class="center">Typical power consumption pattern of a water heater.</figcaption>
</figure>

<h3 id="home-server-setup">
  <a class="heading-anchor" href="#home-server-setup">Home server setup<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>I run all my home server workloads off of a <a href="/posts/2023/10/09/zimaboard/">Zimaboard</a>. One of its big selling
points for me was its super low power consumption.
When idling, the Zimaboard can use about 2 W, typical power usage with all my services running was about 7 W and the
maximum power consumption was around 15 W.</p>
<p>The Zimaboard was actually using <em>less power</em> than my internet modem/router box (which is hot garbage by the way).
The ISP-provided box used 12-14 W at all times, regardless if it was operating in router or bridge mode.</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/zimaboard-graph.png">
    <img src="/posts/2024/05/02/smartplugs/media/zimaboard-graph_hu_c8343b4afdf7d1d8.webp"
     width="1120"
     height="475"
     loading="lazy"
     decoding="async"
     alt="Zimaboard &#43; modem/router box power consumption.">

  </a>
  <figcaption class="center">Zimaboard &#43; modem/router box power consumption.</figcaption>
</figure>










<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/isp-box-graph.png">
    <img src="/posts/2024/05/02/smartplugs/media/isp-box-graph_hu_608b69787ca51534.webp"
     width="1120"
     height="475"
     loading="lazy"
     decoding="async"
     alt="The ISP modem/router box is a horribly inefficient device for what it does.">

  </a>
  <figcaption class="center">The ISP modem/router box is a horribly inefficient device for what it does.</figcaption>
</figure>

<p>At one point I temporarily switched my home server setup back to <a href="/posts/2022/01/17/asrock-x300-future-of-desktops/">the ASRock Deskmini X300</a>,
mainly because I added some latency-sensitive workloads onto my home server setup and the Zimaboard was a bit too weak
for those.</p>
<p>One thing that became really obvious from the power meter is that the Deskmini idle power consumption is
horrible in comparison to the Zimaboard, coming in at around 15-20 W. This might be in part because my Deskmini doesn&rsquo;t
seem to expose any lower CPU power states than C3 while the Zimaboard exposed C-states all the way down to C10. I could not
find a way to expose lower C-states in UEFI settings or the Linux kernel. Based on a quick remark in <a href="https://www.youtube.com/watch?v=J_WJI4hp_B8">this video</a> I believe that it should
be possible to drop ASRock a message and receive a custom BIOS that enables some extra features, but that seems even
more unlikely for a consumer-grade device such as this one.</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/deskmini-graph.png">
    <img src="/posts/2024/05/02/smartplugs/media/deskmini-graph_hu_6e08750be9fec2.webp"
     width="1120"
     height="475"
     loading="lazy"
     decoding="async"
     alt="ASRock Deskmini X300 &#43; ISP box power consumption.">

  </a>
  <figcaption class="center">ASRock Deskmini X300 &#43; ISP box power consumption.</figcaption>
</figure>

<p>I&rsquo;ve added a panel to my usual Prometheus node exporter Grafana view that shows the server setup power consumption alongside
other metrics. Higher CPU activity is clearly visible on the power consumption graphs.</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/cpu-power-correlation.png">
    <img src="/posts/2024/05/02/smartplugs/media/cpu-power-correlation_hu_6883771b31c2a56.webp"
     width="1280"
     height="397"
     loading="lazy"
     decoding="async"
     alt="A moderate jump in CPU usage can result in a big jump in power consumption.">

  </a>
  <figcaption class="center">A moderate jump in CPU usage can result in a big jump in power consumption.</figcaption>
</figure>

<h3 id="voltage">
  <a class="heading-anchor" href="#voltage">Voltage<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>The Tasmota plugs also report current voltage values. I graphed them just for fun, but noticed that there is a sort of
seasonality to the values. During the usual peak power consumption hours the voltage drops across the board.</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/voltage-seasonality.png">
    <img src="/posts/2024/05/02/smartplugs/media/voltage-seasonality_hu_21ee4babcb7c3385.webp"
     width="1280"
     height="404"
     loading="lazy"
     decoding="async"
     alt="Seasonality as expressed through voltage readings.">

  </a>
  <figcaption class="center">Seasonality as expressed through voltage readings.</figcaption>
</figure>

<p>This seems like a candidate for testing anomaly detection, as shown in <a href="https://about.gitlab.com/blog/2019/07/23/anomaly-detection-using-prometheus/">this great GitLab article.</a>
I&rsquo;ve used this concept at work and it works reasonably well for some metrics.</p>
<p>In other cases the voltage drops were caused by running appliances that use a lot of power, such as the water heater, electric kettle, electric stove or the microwave.</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/voltage-correlation.png">
    <img src="/posts/2024/05/02/smartplugs/media/voltage-correlation_hu_7815ab709ab90ee5.webp"
     width="1280"
     height="640"
     loading="lazy"
     decoding="async"
     alt="Water heater causing the voltage to drop slightly for all plugs.">

  </a>
  <figcaption class="center">Water heater causing the voltage to drop slightly for all plugs.</figcaption>
</figure>

<p>During cooking with an electric stove, the on-off cycles were also noticeable on
the voltage reading on all of the plugs.</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/voltage-cooking.png">
    <img src="/posts/2024/05/02/smartplugs/media/voltage-cooking_hu_bb3303151c1e2b9c.webp"
     width="1277"
     height="483"
     loading="lazy"
     decoding="async"
     alt="The impact of an electric stove on the voltage.">

  </a>
  <figcaption class="center">The impact of an electric stove on the voltage.</figcaption>
</figure>

<h3 id="workstation">
  <a class="heading-anchor" href="#workstation">Workstation<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>I have one plug that reports numbers for everything that&rsquo;s connected to my home office setup: monitor, USB-C dock,
monitor light bar and anything that might be charging on the table.</p>
<p>The power consumption of this setup varies a lot. Sometimes I do a longer home office stint. Sometimes I recharge various
devices.</p>
<p>The typical power consumption of the whole setup while doing something on my computer is around 45-60 W, with peaks near
90-110 W. For an ultrawide monitor, USB-C dock and my laptop I think this is a pretty good result. I&rsquo;ve had desktop PC-s
that have used just as much power at idle, and in the olden days there were incandescent light bulbs that used up more
electricity than this!</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/workstation-graph.png">
    <img src="/posts/2024/05/02/smartplugs/media/workstation-graph_hu_baa39b967d92af97.webp"
     width="1280"
     height="474"
     loading="lazy"
     decoding="async"
     alt="Typical power consumption of my work desk when working from home.">

  </a>
  <figcaption class="center">Typical power consumption of my work desk when working from home.</figcaption>
</figure>

<p>Typical power usage: 0.95 kWh/day.</p>
<p>Minimum observed: 0.07 kWh/day</p>
<p>Maximum observed: 1.52 kWh/day</p>
<h3 id="charging">
  <a class="heading-anchor" href="#charging">Charging<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>These plugs are also great for observing the charging patterns of various devices.</p>
<p>A laptop or a power bank charges faster at the beginning, but the speed drops off as the battery gets more full.
At one point trickle charging seems to kick in until the device is fully charged.</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/charging-powerbank.png">
    <img src="/posts/2024/05/02/smartplugs/media/charging-powerbank_hu_62e637cb8024eed0.webp"
     width="1279"
     height="530"
     loading="lazy"
     decoding="async"
     alt="A power bank charges quickly in the beginning and starts slowing down once it gets close to being fully charged.">

  </a>
  <figcaption class="center">A power bank charges quickly in the beginning and starts slowing down once it gets close to being fully charged.</figcaption>
</figure>

<p>This pattern is similar on most devices that I charge. The battery on my e-bike seems to be an exception to the rule,
with a slighly increasing power consumption throughout, and a faster drop at the end of the charging cycle.</p>









<figure class="left">
  <a href="/posts/2024/05/02/smartplugs/media/charging-ebike-battery.png">
    <img src="/posts/2024/05/02/smartplugs/media/charging-ebike-battery_hu_dbfbc4ce58dac808.webp"
     width="1279"
     height="530"
     loading="lazy"
     decoding="async"
     alt="E-bike battery charging pattern, from nearly empty to full.">

  </a>
  <figcaption class="center">E-bike battery charging pattern, from nearly empty to full.</figcaption>
</figure>

<p>0.5kWh of power consumed for 60km of range with the &ldquo;Turbo&rdquo; preset on the bike doesn&rsquo;t sound bad at all. Half a cent per
kilometer!</p>
<h3 id="stability">
  <a class="heading-anchor" href="#stability">Stability<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>The stability of the smart plugs is usually fine, but there are frequent cases where certain plugs don&rsquo;t report back in time
with the statistics. This may be a Wi-Fi access point issue, but annoying nevertheless.</p>
<p>I&rsquo;ve had to completely power cycle two plugs a few times because they dropped off from the network completely and would
not come back. Again, could be the fault of my Wi-Fi AP.</p>
<h3 id="future-ideas">
  <a class="heading-anchor" href="#future-ideas">Future ideas<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h3>
<p>The plugs also provide a way to turn the devices on and off over different
API-s (even over HTTP!), which is something I&rsquo;d like to utilize either using something like <a href="https://www.home-assistant.io/">Home Assistant</a>, or a simple
script that toggles certain devices on and off based on the current electricity price.</p>
<p>I haven&rsquo;t gotten around to this part yet, but from my research it seems that <a href="https://github.com/custom-components/nordpool">the necessary integrations
exist for Home Assistant.</a></p>
<h2 id="closing-thoughts">
  <a class="heading-anchor" href="#closing-thoughts">Closing thoughts<svg class="heading-anchor__icon" viewBox="0 0 24 24" width="0.75em" height="0.75em" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/></svg></a>
</h2>
<p>Overall, I&rsquo;m very happy with this setup. I can get reliable measurements for all sorts of computing setups from now on,
which will make judging the power efficiency of the devices I use much easier. No more guesswork!</p>
<p>If you enjoyed this post, then I highly recommend giving <a href="https://fosdem.org/2024/schedule/event/fosdem-2024-2723-power-profiling-my-entire-house-with-the-firefox-profiler/">this FOSDEM 2024 talk by Florian Quèze a listen.</a>
The talk also goes into details about measuring the power consumption of various devices in the speakers&rsquo; home and
observations that they&rsquo;ve made.</p>
<div class="footnotes" role="doc-endnotes">
<hr>
<ol>
<li id="fn:1">
<p>This was pointed out to me by a fellow reader. Thank you!&#160;<a href="#fnref:1" class="footnote-backref" role="doc-backlink">&#x21a9;&#xfe0e;</a></p>
</li>
</ol>
</div>
]]></content:encoded></item></channel></rss>