<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Guides on Intelligent Dithering</title><link>https://intelligentdithering.com/categories/guides/</link><description>Overthinking technology so you don't have to</description><generator>Hugo</generator><language>en</language><atom:link href="https://intelligentdithering.com/categories/guides/index.xml" rel="self" type="application/rss+xml"/><lastBuildDate>Fri, 06 Jun 2025 00:00:00 +0000</lastBuildDate><item><title>5 Father's Day Gift Ideas for Geeks</title><link>https://intelligentdithering.com/posts/2025/06/5-fathers-day-gift-ideas-for-geeks/</link><pubDate>Fri, 06 Jun 2025 00:00:00 +0000</pubDate><guid isPermaLink="true">https://intelligentdithering.com/posts/2025/06/5-fathers-day-gift-ideas-for-geeks/</guid><description>Father&amp;rsquo;s Day 2025 is rapidly approaching so here are a few ideas to help you keep that geeky dad in your life happy!&#10;Whether it is for a new dad, a dad-to-be or an old hand, these gifts will hopefully spark your inspiration and ensure they have a smile on their face come the 15th June.&#10;Raspberry Pi Starter Kit Home Assistant Green Soldering Iron Kit Mini Bluetooth Label Printer - BIG DISCOUNT! Precision motorised screwdriver Raspberry Pi Starter KitMid-life crisis hits people differently, but a new hobby is usually on the cards. If they are interested in tech and tinkering, then a Raspberry Pi will open a whole world of possibilities for them. From Home Automation to programming, robot building or just playing around with some LEDs anyone who likes to fidget and tinker will love this.&#10;</description><content:encoded>&lt;p&gt;Father&amp;rsquo;s Day 2025 is rapidly approaching so here are a few ideas to help you keep that geeky dad in your life happy!&lt;/p&gt;&#10;&lt;p&gt;Whether it is for a new dad, a dad-to-be or an old hand, these gifts will hopefully spark your inspiration and ensure they have a smile on their face come the 15th June.&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#raspberry-pi-starter-kit"&gt;Raspberry Pi Starter Kit&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#home-assistant-green"&gt;Home Assistant Green&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#s"&gt;Soldering Iron Kit&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#m"&gt;Mini Bluetooth Label Printer - BIG DISCOUNT!&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#p"&gt;Precision motorised screwdriver&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="raspberry-pi-starter-kit"&gt;Raspberry Pi Starter Kit&lt;a class="anchorjs-link" href="#raspberry-pi-starter-kit"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Mid-life crisis hits people differently, but a new hobby is usually on the cards. If they are interested in tech and tinkering, then a Raspberry Pi will open a whole world of possibilities for them. From &lt;a href="https://intelligentdithering.com/tag/home-automation/" target="_blank"&gt;Home Automation&lt;/a&gt; to programming, robot building or just playing around with some LEDs anyone who likes to fidget and tinker will love this.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2025/06/5-fathers-day-gift-ideas-for-geeks/images/image-1024x1016.png" data-action="zoom" alt="Raspberry Pi Kit bundle as a Father&amp;rsquo;s Day Gift" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/4kRJKxI" target="_blank"&gt;https://amzn.to/4kRJKxI&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="home-assistant-green"&gt;Home Assistant Green&lt;a class="anchorjs-link" href="#home-assistant-green"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The Home Assistant / Nabu Case Green is a dedicated hardware device to run your Home Assistant software. As it is made by Nabu Casa, it is fully supported by them. It is one of the easiest and most reliable ways to get started on your Home Automation journey. I run my house on one of these and it hasn&amp;rsquo;t missed a beat in over 9 months. It is what I connect my &lt;a href="https://intelligentdithering.com/diy-whole-home-energy-monitoring-with-home-assistant/" target="_blank"&gt;DIY home energy monitoring&lt;/a&gt; project to.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2025/06/5-fathers-day-gift-ideas-for-geeks/images/image-1-1024x1024.png" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/4jEvSpJ" target="_blank"&gt;https://amzn.to/4jEvSpJ&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="soldering-iron-kit"&gt;Soldering Iron Kit&lt;a class="anchorjs-link" href="#soldering-iron-kit"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;No self-respecting geek should be without a soldering kit in their home. Especially paired with the Raspberry Pi, soldering can be incredibly rewarding when you build your first circuit and control it from code that you wrote. Being able to fix faulty Christmas tree lights and other items around the home just makes having a kit like this all the more worthwhile.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2025/06/5-fathers-day-gift-ideas-for-geeks/images/image-2.png" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/3TaplIq" target="_blank"&gt;https://amzn.to/3TaplIq&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="mini-bluetooth-label-printer---big-discount"&gt;Mini Bluetooth Label Printer - BIG DISCOUNT!&lt;a class="anchorjs-link" href="#mini-bluetooth-label-printer---big-discount"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once you start amassing tinkering kit, you will end up with drawers and drawers of components and it soon gets hard to find things. And another critical component of a mid-life crisis is a sense of dread and overwhelm leading to a deep want to reorganise EVERYTHING. Labelling is your friend in this endeavour!&lt;/p&gt;&#10;&lt;p&gt;Plus this one is on a deep discount at the moment. Snap it up before it&amp;rsquo;s too late!&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2025/06/5-fathers-day-gift-ideas-for-geeks/images/image-3-1024x873.png" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/4dRyv69" target="_blank"&gt;https://amzn.to/4dRyv69&lt;/a&gt;&lt;/p&gt;&#10;&lt;h2 id="precision-motorised-screwdriver"&gt;Precision motorised screwdriver&lt;a class="anchorjs-link" href="#precision-motorised-screwdriver"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once you get into tinkering a decent screwdriver set is an absolute necessity. You want a kit that has lots of tiny interchangeable heads and these kits also come with an electric screwdriver designed for working with very delicate screws found in electronics. Save your aging wrists and invest in one of these today. You won&amp;rsquo;t regret it!&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2025/06/5-fathers-day-gift-ideas-for-geeks/images/image-4-742x1024.png" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/4kMY36I" target="_blank"&gt;https://amzn.to/4kMY36I&lt;/a&gt;&lt;/p&gt;&#10;</content:encoded></item><item><title>Cheap DIY 8 Port IP KVM on a budget</title><link>https://intelligentdithering.com/posts/2025/01/8-port-ip-kvm-on-a-budget/</link><pubDate>Fri, 31 Jan 2025 00:00:00 +0000</pubDate><guid isPermaLink="false">http://localhost:1313/8-port-ip-kvm-on-a-budget/</guid><description>Building a cheap IP KVM using open source software and Raspberry Pi&#10;DIY IP KVM Parts￼ Step 1: Fit the KVM Switch￼ Step 2: Setup and connect PiKVM￼ Step 3: Reverse engineer the control box!￼ /usr/bin/local/kvm.py /etc/kvmd/override.yaml Conclusion￼ We recently had a small server outage in work. Nothing mission critical, it was over a weekend and coming up to Christmas holidays. It could wait, but that little itch in my brain couldn’t let it sit. I tried several remote remedies to bring it back online but it needed physical access. It had to wait until Monday.&#10;</description><content:encoded>&lt;p&gt;&lt;em&gt;Building a cheap IP KVM using open source software and Raspberry Pi&lt;/em&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#parts"&gt;DIY IP KVM Parts￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#step-1-fit-the-kvm-switch"&gt;Step 1: Fit the KVM Switch￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#step-2-setup-and-connect-pikvm"&gt;Step 2: Setup and connect PiKVM￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#step-3-reverse-engineer-the-control-box"&gt;Step 3: Reverse engineer the control box!￼&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#usrbinlocalkvmpy"&gt;/usr/bin/local/kvm.py&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#overrideyaml"&gt;/etc/kvmd/override.yaml&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#conclusion"&gt;Conclusion￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;We recently had a small server outage in work. Nothing mission critical, it was over a weekend and coming up to Christmas holidays. It could wait, but that little itch in my brain couldn’t let it sit. I tried several remote remedies to bring it back online but it needed physical access. It had to wait until Monday.&lt;/p&gt;&#10;&lt;p&gt;We use older Mac Minis as compact Linux servers and they have been working brilliantly for years. And so much quieter than sitting beside a massive rack of noisy servers!&lt;/p&gt;&#10;&lt;p&gt;But if they go down physical access can be a pain as we don’t have a KVM switch. I really wanted to go for an IP KVM switch but they are so expensive! So I figured we could come up with a cheaper solution using, you guessed it, a Raspberry Pi!&lt;/p&gt;&#10;&lt;p&gt;So the plan was to get a cheap 8-port USB and HDMI KVM switch, attach it to a &lt;a href="https://pikvm.org/" target="_blank"&gt;PiKVM&lt;/a&gt; device to get it on the network and Bob’s your uncle, you now have a DIY IP KVM. I hit a few snags along the way but we got it running, so this is documentation of the process for my own records and to help anyone else hoping to replicate this.&lt;/p&gt;&#10;&lt;h2 id="diy-ip-kvm-parts"&gt;DIY IP KVM Parts&lt;a href="https://intelligentdithering.com/#parts"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#diy-ip-kvm-parts"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/3DOeVKt" target="_blank"&gt;8 port HDMI KVM Switch&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/40arRl5" target="_blank"&gt;Raspberry Pi 4&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/40avjwb" target="_blank"&gt;Micro SD Card&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/40ruccF" target="_blank"&gt;USB-C Power and Data splitter cable&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/40pMvz8" target="_blank"&gt;HDMI mirror / splitter&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;🔗 &lt;a href="https://amzn.to/40u3rV6" target="_blank"&gt;WaveShare HDMI - CSI bridge for Pi&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2025/01/8-port-ip-kvm-on-a-budget/images/kvmswitch-1024x896.webp" data-action="zoom" alt="IP KVM using cheap parts and open source" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h2 id="step-1-fit-the-kvm-switch"&gt;Step 1: Fit the KVM Switch&lt;a href="https://intelligentdithering.com/#step-1-fit-the-kvm-switch"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#step-1-fit-the-kvm-switch"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This part was the easiest. Just hook up all your servers to the KVM switch and test it out.&lt;/p&gt;&#10;&lt;p&gt;However it was at this point I noticed what could have been a show stopper. Most KVM switches have a key sequence you can use to switch between machines, usually something like tapping Scroll Lock twice and then hitting Escape, or Scroll Lock followed by the number of the port you wish to switch to. This one didn’t! It comes with a switch panel with 8 buttons on it and an IR remote, as well as being able to press the illuminated buttons on the front panel.&lt;/p&gt;&#10;&lt;h2 id="step-2-setup-and-connect-pikvm"&gt;Step 2: Setup and connect PiKVM&lt;a href="https://intelligentdithering.com/#step-2-setup-and-connect-pikvm"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#step-2-setup-and-connect-pikvm"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This step is well documented at the &lt;a href="https://pikvm.org" target="_blank"&gt;PiKVM website&lt;/a&gt;. Basically download the appropriate image for your Raspberry Pi it will be hosted on (I used &lt;a href="https://intelligentdithering.com/raspberry-pi-5-announced/" target="_blank"&gt;a Pi4&lt;/a&gt;), flash it to an SD card, boot the Pi and then SSH in to configure some options.&lt;/p&gt;&#10;&lt;p&gt;You will also need to connect the WaveShare HDMI capture device to the CSI port on the Pi and connect the HDMI output from the KVM switch to the Pi.&lt;/p&gt;&#10;&lt;p&gt;BONUS TIP: If you connect this via the &lt;a href="https://amzn.to/40pMvz8" target="_blank"&gt;HDMI mirror splitter device&lt;/a&gt;, you can have the display going to the PiKVM AND a physical monitor, which means we can remote in or just use the physical keyboard etc at the server rack.&lt;/p&gt;&#10;&lt;p&gt;Then you will need to connect the power to the PiKVM via the USB-C Power and data splitter cable, so that power goes into the Pi 4 power port and then use a USB-C to A cable to connect the other half to the KVM switch keyboard and mouse port.&lt;/p&gt;&#10;&lt;p&gt;This KVM switch has 4 ports so we are able to connect the PiKVM for control as well as a physical keyboard and mouse.&lt;/p&gt;&#10;&lt;h2 id="step-3-reverse-engineer-the-control-box"&gt;Step 3: Reverse engineer the control box!&lt;a class="anchorjs-link" href="#step-3-reverse-engineer-the-control-box"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;As previously mentioned, the KVM switch did not have keyboard hotkey switching so I couldn’t remotely switch from the PiKVM software. Oops!&lt;/p&gt;&#10;&lt;p&gt;So I took apart the control box that was connected via a USB cable. Unfortunately it doesn’t use the USB protocol, just the cables! Luckily a bit of Googling located someone &lt;a href="https://www.reddit.com/r/pikvm/comments/yt0lne/comment/j92dfmv/?utm_source=share&amp;amp;utm_medium=web3x&amp;amp;utm_name=web3xcss&amp;amp;utm_term=1&amp;amp;utm_content=share_button" target="_blank"&gt;who had already worked out the communication signals it was using&lt;/a&gt;. It seems to send a pulse of varying length to choose the port it switches to.&lt;/p&gt;&#10;&lt;p&gt;I used the &lt;a href="https://gist.github.com/mharsch/52b0a99a945711385fb0120020d8226d" target="_blank"&gt;Python code from here&lt;/a&gt; and saved it to /usr/local/bin/kvm.py making sure to chmod +x to make it executable.&lt;/p&gt;&#10;&lt;p&gt;This &lt;a href="https://www.reddit.com/r/pikvm/comments/yt0lne/comment/kzt0lur/?utm_source=share&amp;amp;utm_medium=web3x&amp;amp;utm_name=web3xcss&amp;amp;utm_term=1&amp;amp;utm_content=share_button" target="_blank"&gt;reddit post&lt;/a&gt; also has some useful pointers.&lt;/p&gt;&#10;&lt;h3 id="usrbinlocalkvmpy"&gt;/usr/bin/local/kvm.py&lt;a class="anchorjs-link" href="#usrbinlocalkvmpy"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 1&lt;/span&gt;&lt;span&gt;#!/usr/bin/env python&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 2&lt;/span&gt;&lt;span&gt;import RPi.GPIO as GPIO&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 3&lt;/span&gt;&lt;span&gt;import sys&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 4&lt;/span&gt;&lt;span&gt;import time&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 5&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 6&lt;/span&gt;&lt;span&gt;input_pin = 24 # connected to &amp;#39;D+&amp;#39; pin on mini USB&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 7&lt;/span&gt;&lt;span&gt;output_pin = 23 # connected to &amp;#39;D-&amp;#39; pin on mini USB&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 8&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 9&lt;/span&gt;&lt;span&gt;def setup():&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;10&lt;/span&gt;&lt;span&gt;GPIO.setmode(GPIO.BCM)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;11&lt;/span&gt;&lt;span&gt;GPIO.setwarnings(False)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;12&lt;/span&gt;&lt;span&gt;GPIO.setup(input_pin, GPIO.IN)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;13&lt;/span&gt;&lt;span&gt;GPIO.setup(output_pin, GPIO.OUT)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;14&lt;/span&gt;&lt;span&gt;GPIO.output(output_pin, GPIO.HIGH)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;15&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;16&lt;/span&gt;&lt;span&gt;def get_port() -&amp;gt; int:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;17&lt;/span&gt;&lt;span&gt;while GPIO.input(input_pin) == GPIO.LOW:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;18&lt;/span&gt;&lt;span&gt;time.sleep(0.001)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;19&lt;/span&gt;&lt;span&gt;while GPIO.input(input_pin) == GPIO.HIGH:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;20&lt;/span&gt;&lt;span&gt;time.sleep(0.001)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;21&lt;/span&gt;&lt;span&gt;start = time.time()&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;22&lt;/span&gt;&lt;span&gt;while GPIO.input(input_pin) == GPIO.LOW:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;23&lt;/span&gt;&lt;span&gt;time.sleep(0.001)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;24&lt;/span&gt;&lt;span&gt;stop = time.time()&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;25&lt;/span&gt;&lt;span&gt;return round((stop - start) * 50)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;26&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;27&lt;/span&gt;&lt;span&gt;def set_port(port: int):&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;28&lt;/span&gt;&lt;span&gt;GPIO.output(output_pin, GPIO.LOW)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;29&lt;/span&gt;&lt;span&gt;time.sleep(0.02)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;30&lt;/span&gt;&lt;span&gt;GPIO.output(output_pin, GPIO.HIGH)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;31&lt;/span&gt;&lt;span&gt;time.sleep(0.02)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;32&lt;/span&gt;&lt;span&gt;GPIO.output(output_pin, GPIO.LOW)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;33&lt;/span&gt;&lt;span&gt;time.sleep(0.02 * port)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;34&lt;/span&gt;&lt;span&gt;GPIO.output(output_pin, GPIO.HIGH)&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;35&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;36&lt;/span&gt;&lt;span&gt;setup()&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;37&lt;/span&gt;&lt;span&gt;set_port(int(sys.argv[1]))&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Then in the /etc/kvmd/override.yaml file I added the following:&lt;/p&gt;&#10;&lt;h3 id="etckvmdoverrideyaml"&gt;/etc/kvmd/override.yaml&lt;a class="anchorjs-link" href="#etckvmdoverrideyaml"&gt;&lt;/a&gt;&lt;/h3&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 1&lt;/span&gt;&lt;span&gt;kvmd:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 2&lt;/span&gt;&lt;span&gt; gpio:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 3&lt;/span&gt;&lt;span&gt; drivers:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 4&lt;/span&gt;&lt;span&gt; kvm_set_input_1:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 5&lt;/span&gt;&lt;span&gt; type: cmd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 6&lt;/span&gt;&lt;span&gt; cmd: [/usr/bin/sudo, /usr/local/bin/kvm.py, 1]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 7&lt;/span&gt;&lt;span&gt; kvm_set_input_2:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 8&lt;/span&gt;&lt;span&gt; type: cmd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 9&lt;/span&gt;&lt;span&gt; cmd: [/usr/bin/sudo, /usr/local/bin/kvm.py, 2]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;10&lt;/span&gt;&lt;span&gt; kvm_set_input_3:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;11&lt;/span&gt;&lt;span&gt; type: cmd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;12&lt;/span&gt;&lt;span&gt; cmd: [/usr/bin/sudo, /usr/local/bin/kvm.py, 3]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;13&lt;/span&gt;&lt;span&gt; kvm_set_input_4:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;14&lt;/span&gt;&lt;span&gt; type: cmd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;15&lt;/span&gt;&lt;span&gt; cmd: [/usr/bin/sudo, /usr/local/bin/kvm.py, 4]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;16&lt;/span&gt;&lt;span&gt; kvm_set_input_5:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;17&lt;/span&gt;&lt;span&gt; type: cmd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;18&lt;/span&gt;&lt;span&gt; cmd: [/usr/bin/sudo, /usr/local/bin/kvm.py, 5]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;19&lt;/span&gt;&lt;span&gt; kvm_set_input_6:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;20&lt;/span&gt;&lt;span&gt; type: cmd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;21&lt;/span&gt;&lt;span&gt; cmd: [/usr/bin/sudo, /usr/local/bin/kvm.py, 6]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;22&lt;/span&gt;&lt;span&gt; kvm_set_input_7:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;23&lt;/span&gt;&lt;span&gt; type: cmd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;24&lt;/span&gt;&lt;span&gt; cmd: [/usr/bin/sudo, /usr/local/bin/kvm.py, 7]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;25&lt;/span&gt;&lt;span&gt; kvm_set_input_8:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;26&lt;/span&gt;&lt;span&gt; type: cmd&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;27&lt;/span&gt;&lt;span&gt; cmd: [/usr/bin/sudo, /usr/local/bin/kvm.py, 8]&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;28&lt;/span&gt;&lt;span&gt; scheme:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;29&lt;/span&gt;&lt;span&gt; kvm_input_1_button:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;30&lt;/span&gt;&lt;span&gt; driver: kvm_set_input_1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;31&lt;/span&gt;&lt;span&gt; pin: 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;32&lt;/span&gt;&lt;span&gt; mode: output&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;33&lt;/span&gt;&lt;span&gt; switch: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;34&lt;/span&gt;&lt;span&gt; kvm_input_2_button:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;35&lt;/span&gt;&lt;span&gt; driver: kvm_set_input_2&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;36&lt;/span&gt;&lt;span&gt; pin: 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;37&lt;/span&gt;&lt;span&gt; mode: output&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;38&lt;/span&gt;&lt;span&gt; switch: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;39&lt;/span&gt;&lt;span&gt; kvm_input_3_button:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;40&lt;/span&gt;&lt;span&gt; driver: kvm_set_input_3&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;41&lt;/span&gt;&lt;span&gt; pin: 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;42&lt;/span&gt;&lt;span&gt; mode: output&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;43&lt;/span&gt;&lt;span&gt; switch: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;44&lt;/span&gt;&lt;span&gt; kvm_input_4_button:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;45&lt;/span&gt;&lt;span&gt; driver: kvm_set_input_4&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;46&lt;/span&gt;&lt;span&gt; pin: 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;47&lt;/span&gt;&lt;span&gt; mode: output&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;48&lt;/span&gt;&lt;span&gt; switch: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;49&lt;/span&gt;&lt;span&gt; kvm_input_5_button:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;50&lt;/span&gt;&lt;span&gt; driver: kvm_set_input_5&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;51&lt;/span&gt;&lt;span&gt; pin: 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;52&lt;/span&gt;&lt;span&gt; mode: output&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;53&lt;/span&gt;&lt;span&gt; switch: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;54&lt;/span&gt;&lt;span&gt; kvm_input_6_button:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;55&lt;/span&gt;&lt;span&gt; driver: kvm_set_input_6&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;56&lt;/span&gt;&lt;span&gt; pin: 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;57&lt;/span&gt;&lt;span&gt; mode: output&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;58&lt;/span&gt;&lt;span&gt; switch: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;59&lt;/span&gt;&lt;span&gt; kvm_input_7_button:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;60&lt;/span&gt;&lt;span&gt; driver: kvm_set_input_7&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;61&lt;/span&gt;&lt;span&gt; pin: 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;62&lt;/span&gt;&lt;span&gt; mode: output&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;63&lt;/span&gt;&lt;span&gt; switch: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;64&lt;/span&gt;&lt;span&gt; kvm_input_8_button:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;65&lt;/span&gt;&lt;span&gt; driver: kvm_set_input_8&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;66&lt;/span&gt;&lt;span&gt; pin: 0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;67&lt;/span&gt;&lt;span&gt; mode: output&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;68&lt;/span&gt;&lt;span&gt; switch: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;69&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;70&lt;/span&gt;&lt;span&gt; view:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;71&lt;/span&gt;&lt;span&gt; header:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;72&lt;/span&gt;&lt;span&gt; title: Input&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;73&lt;/span&gt;&lt;span&gt; table:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;74&lt;/span&gt;&lt;span&gt; - [&amp;#34;#Console:&amp;#34;, &amp;#34;kvm_input_1_button|Prox1&amp;#34;, &amp;#34;kvm_input_2_button|Prox2&amp;#34;, &amp;#34;kvm_input_3_button|Prox3&amp;#34;, &amp;#34;kvm_input_4_button|Lambda&amp;#34;, &amp;#34;kvm_input_5_button|NA01&amp;#34;, &amp;#34;kvm_input_6_button|NA02&amp;#34;, &amp;#34;kvm_input_7_button|ProxBackup&amp;#34;, &amp;#34;kvm_input_8_button|FOG&amp;#34;]&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The bottom section labelled “view” creates a new button in the top menu of PiKVM called Input, and then it has 8 buttons within it. The names of the buttons are Prox1, Prox2 etc. You should change those to the names of the machines you have connected to each port.&lt;/p&gt;&#10;&lt;p&gt;Then I cut open an old Mini-USB cable and exposed the data lines. You do not need the red or black power lines. I soldered on DuPont connectors and attached the data lines to pins 23 and 24 on the Pi GPIO pins.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2025/01/8-port-ip-kvm-on-a-budget/images/IMG_2583.jpeg" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;I then tested the switching using the kvm.py script above from the command line. Bingo!&lt;/p&gt;&#10;&lt;h2 id="conclusion"&gt;Conclusion&lt;a href="https://intelligentdithering.com/#conclusion"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#conclusion"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;It was a lot of fiddling about but we now have web based IP KVM access to all of our servers and the ability to easily switch between them in the web interface.&lt;/p&gt;&#10;&lt;p&gt;PiKVM also has the ability to emulate a USB disk or CD drive, so you can upload ISOs to it and attach them, allowing you to fully reimage a machine remotely. It really is a fantastic project and I am glad it exists!&lt;/p&gt;&#10;</content:encoded></item><item><title>DIY Whole Home Energy Monitoring with Home Assistant</title><link>https://intelligentdithering.com/posts/2024/03/diy-whole-home-energy-monitoring-with-home-assistant/</link><pubDate>Mon, 25 Mar 2024 00:00:00 +0000</pubDate><guid isPermaLink="false">http://localhost:1313/diy-whole-home-energy-monitoring-with-home-assistant/</guid><description> Why energy monitoring?￼ Important warning The Plan￼ The Parts￼ Prepare the sensor￼ Install the sensor￼ Conclusion￼ Why energy monitoring?I recently decided I wanted more data on our home energy usage. Unfortunately our meter box is over 20 years old and our energy supplier wont replace it until it is 30 years old. It is an old spinning disk style meter with analog display.&#10;I had considered using a camera and some machine learning to read the digits from the display, but I think monitoring the actual power usage will be much better. Doing this is dangerous however so I needed a way to do it without my wife cashing in the life insurance!&#10;</description><content:encoded>&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#why-energy-monitoring"&gt;Why energy monitoring?￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#important-warning"&gt;Important warning&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#the-plan"&gt;The Plan￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#the-parts"&gt;The Parts￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#prepare-the-sensor"&gt;Prepare the sensor￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#install-the-sensor"&gt;Install the sensor￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#conclusion"&gt;Conclusion￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="why-energy-monitoring"&gt;Why energy monitoring?&lt;a href="https://intelligentdithering.com/#why-energy-monitoring"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#why-energy-monitoring"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;I recently decided I wanted more data on our home energy usage. Unfortunately our meter box is over 20 years old and our energy supplier wont replace it until it is 30 years old. It is an old spinning disk style meter with analog display.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2024/03/diy-whole-home-energy-monitoring-with-home-assistant/images/analogmeter-1024x768.webp" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;I had considered using a camera and some machine learning to read the digits from the display, but I think monitoring the actual power usage will be much better. Doing this is dangerous however so I needed a way to do it without my wife cashing in the life insurance!&lt;/p&gt;&#10;&lt;p&gt;CT Clamps measure the magnetic field coming from an electrical cable. My measuring the strength of the field via the induced current into a coil, you can get a measurement of the current flowing through the wire without being electrically connected to it. Split core CT Clamps make this even safer, by allowing you to “clamp” the sensor around the wire without having to disconnect anything.&lt;/p&gt;&#10;&lt;h2 id="important-warning"&gt;Important warning&lt;a class="anchorjs-link" href="#important-warning"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;strong&gt;&lt;em&gt;I am not a qualified electrician. Using even these “safe” CT clamps does have a risk associated with it, and being in and around your electricity meter is obviously risky business. Please consult a suitably certified expert before attempting any of this! YOU HAVE BEEN WARNED!&lt;/em&gt;&lt;/strong&gt;&lt;a href="https://intelligentdithering.com/#important-warning"&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2024/03/diy-whole-home-energy-monitoring-with-home-assistant/images/electric-shock.gif" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;h2 id="the-plan"&gt;The Plan&lt;a href="https://intelligentdithering.com/#the-plan"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#the-plan"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;My plan is to build a small system using some pre-made circuit boards for this purpose. Then install ESPHome onto an ESP8266 chip to allow easy programming and connection with Home Assistant. Once it is all installed, I should be able to have a nice simple gauge on my Home Assistant dashboard showing the live energy usage in the house. Home Assistant will also graph this data historically to allow us to see patterns of use and perhaps adjust our behaviour to help reduce our energy costs.&lt;/p&gt;&#10;&lt;p&gt;The parts should cost less that £20 ($25 USD).&lt;/p&gt;&#10;&lt;h2 id="the-parts"&gt;The Parts&lt;a href="https://intelligentdithering.com/#the-parts"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#the-parts"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://amzn.to/3IWuZJ3" target="_blank"&gt;Wemos D1 Mini board with header pins ~£6&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://www.ebay.co.uk/itm/134309518629?itmmeta=01HSPJ0518NW8JBEYSX3PC0K85&amp;amp;hash=item1f45789d25:g:eK0AAOSwV6RjXW7V" target="_blank"&gt;Mottram Labs CT Clamp Adaptor Board (MLP201083 for the D1 Mini) ~£3&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://amzn.to/3TyEwLo" target="_blank"&gt;SCT013-000 100A - 50ma Split core CT Clamp sensor ~£9&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://www.thingiverse.com/thing:3169243" target="_blank"&gt;3D Printed Case (optional)&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="prepare-the-sensor"&gt;Prepare the sensor&lt;a href="https://intelligentdithering.com/#prepare-the-sensor"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#prepare-the-sensor"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The first thing to do was to assemble the parts. This was pretty straightforward once I had the header pins soldered onto the Wemos D1 Mini. Just snap the two parts together and then connected it to my Mac via USB cable.&lt;/p&gt;&#10;&lt;p&gt;Then I navigated to the &lt;a href="https://web.esphome.io/?dashboard_wizard" target="_blank"&gt;ESPHome web installer&lt;/a&gt;. I had to do this using Google Chrome as Safari on Mac does not currently support WebSerial.&lt;/p&gt;&#10;&lt;p&gt;Just click Connect and then choose the serial port from the menu that pops up. Add in your home WiFi details and that is your ESPHome device created and it should appear in Home Assistant ready for adoption.&lt;/p&gt;&#10;&lt;p&gt;Once I had the device connected to Home Assistant it was time to program it. ESPHome allows you to use YAML files to configure the devices. Simply change the YAML, hit Save and Install and then choose WiFi. This will send your new device configuration over to the ESPHome device and reboot it, displaying logs to show how it went.&lt;/p&gt;&#10;&lt;p&gt;Here is the code I used for my sensor:&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#282a36;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-mysql" data-lang="mysql"&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 1&lt;/span&gt;&lt;span&gt;substitutions:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 2&lt;/span&gt;&lt;span&gt;name: esphome&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt;web&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt;&lt;span style="color:#bd93f9"&gt;6&lt;/span&gt;eb49e&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 3&lt;/span&gt;&lt;span&gt;friendly_name: CT Clamp&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 4&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 5&lt;/span&gt;&lt;span&gt;esphome:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 6&lt;/span&gt;&lt;span&gt;name: ${name}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 7&lt;/span&gt;&lt;span&gt;friendly_name: ${friendly_name}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 8&lt;/span&gt;&lt;span&gt;name_add_mac_suffix: false&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt; 9&lt;/span&gt;&lt;span&gt;project:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;10&lt;/span&gt;&lt;span&gt;name: esphome.web&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;11&lt;/span&gt;&lt;span&gt;version: &lt;span style="color:#f1fa8c"&gt;&amp;#39;1.0&amp;#39;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;12&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;13&lt;/span&gt;&lt;span&gt;esp8266:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;14&lt;/span&gt;&lt;span&gt;board: esp01_1m&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;15&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;16&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Enable logging&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;17&lt;/span&gt;&lt;span&gt;logger:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;18&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;19&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Enable Home Assistant API&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;20&lt;/span&gt;&lt;span&gt;api:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;21&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;22&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Allow Over-The-Air updates&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;23&lt;/span&gt;&lt;span&gt;ota:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;24&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;25&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Allow provisioning Wi-Fi via serial&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;26&lt;/span&gt;&lt;span&gt;improv_serial:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;27&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;28&lt;/span&gt;&lt;span&gt;wifi:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;29&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Set up a wifi access point&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;30&lt;/span&gt;&lt;span&gt;ap: {}&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;31&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;32&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# In combination with the `ap` this allows the user&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;33&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# to provision wifi credentials to the device via WiFi AP.&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;34&lt;/span&gt;&lt;span&gt;captive_portal:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;35&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;36&lt;/span&gt;&lt;span&gt;dashboard_import:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;37&lt;/span&gt;&lt;span&gt;package_import_url: github:&lt;span style="color:#ff79c6"&gt;//&lt;/span&gt;esphome&lt;span style="color:#ff79c6"&gt;/&lt;/span&gt;example&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt;configs&lt;span style="color:#ff79c6"&gt;/&lt;/span&gt;esphome&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt;web&lt;span style="color:#ff79c6"&gt;/&lt;/span&gt;esp8266.yaml&lt;span style="color:#ff79c6"&gt;@&lt;/span&gt;main&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;38&lt;/span&gt;&lt;span&gt;import_full_config: true&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;39&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;40&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# To have a &amp;#34;next url&amp;#34; for improv serial&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;41&lt;/span&gt;&lt;span&gt;web_server:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;42&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;43&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Example configuration entry&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;44&lt;/span&gt;&lt;span&gt;sensor:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;45&lt;/span&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; platform: ct_clamp&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;46&lt;/span&gt;&lt;span&gt;sensor: adc_sensor&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;47&lt;/span&gt;&lt;span&gt;name: &lt;span style="color:#f1fa8c"&gt;&amp;#34;Measured Current&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;48&lt;/span&gt;&lt;span&gt;id: home_current&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;49&lt;/span&gt;&lt;span&gt;update_interval: &lt;span style="color:#bd93f9"&gt;15&lt;/span&gt;s&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;50&lt;/span&gt;&lt;span&gt;filters:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;51&lt;/span&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; calibrate_linear:&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;52&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Measured value of 0 maps to 0A&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;53&lt;/span&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;54&lt;/span&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;0&lt;/span&gt;.&lt;span style="color:#bd93f9"&gt;028&lt;/span&gt; &lt;span style="color:#ff79c6"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;8&lt;/span&gt;.&lt;span style="color:#bd93f9"&gt;8&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;55&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;56&lt;/span&gt;&lt;span&gt;&lt;span style="color:#6272a4"&gt;# Example source sensor&#10;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;57&lt;/span&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; platform: adc&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;58&lt;/span&gt;&lt;span&gt;pin: A0&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;59&lt;/span&gt;&lt;span&gt;id: adc_sensor&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;60&lt;/span&gt;&lt;span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;61&lt;/span&gt;&lt;span&gt;&lt;span style="color:#ff79c6"&gt;-&lt;/span&gt; platform: template&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;62&lt;/span&gt;&lt;span&gt;id: my_power&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;63&lt;/span&gt;&lt;span&gt;name: &lt;span style="color:#f1fa8c"&gt;&amp;#34;Home Power&amp;#34;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;64&lt;/span&gt;&lt;span&gt;lambda: &lt;span style="color:#ff79c6"&gt;return&lt;/span&gt; &lt;span style="color:#50fa7b"&gt;id&lt;/span&gt;(home_current).state &lt;span style="color:#ff79c6"&gt;*&lt;/span&gt; &lt;span style="color:#bd93f9"&gt;230&lt;/span&gt;;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;65&lt;/span&gt;&lt;span&gt;device_class: power&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;66&lt;/span&gt;&lt;span&gt;unit_of_measurement: &lt;span style="color:#f1fa8c"&gt;&amp;#39;W&amp;#39;&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span style="white-space:pre;-webkit-user-select:none;user-select:none;margin-right:0.4em;padding:0 0.4em 0 0.4em;color:#7f7f7f"&gt;67&lt;/span&gt;&lt;span&gt;update_interval: &lt;span style="color:#bd93f9"&gt;15&lt;/span&gt;s&#10;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You have to calibrate the sensor using a known load. How I did this was to strip back the out sheath from an extension cable, allowing me to access the live wire separately. I could then clamp the CT over the live wire, and then plug in a known load to the extension cable. I also used a plug in energy monitoring plug to verify results.&lt;/p&gt;&#10;&lt;figure&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2024/03/diy-whole-home-energy-monitoring-with-home-assistant/images/testcable-225x300.webp" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;figcaption&gt;&#10;&lt;p&gt;Do not make a cable like this!&lt;/p&gt;&#10;&lt;/figcaption&gt;&#10;&lt;/figure&gt;&#10;&lt;p&gt;I ran a hairdryer on its medium setting and saw that it produced 4.4 amps on the digital meter, while the ESPHome chip was reporting 0.014A. I then ran it on max, and saw the digital meter showing 8.8 amps of draw, and the ESPHome showing 0.028.&lt;/p&gt;&#10;&lt;p&gt;So in the YAML file under the &lt;strong&gt;calibrate linear&lt;/strong&gt; section I add 0 -&amp;gt; 0 and 0.028 -&amp;gt; 8.8. This will then allow the sensor to work out what to convert when taking reading. I should probably have put in more readings to help make it more accurate but for my needs this will suffice.&lt;/p&gt;&#10;&lt;h2 id="install-the-sensor"&gt;Install the sensor&lt;a href="https://intelligentdithering.com/#install-the-sensor"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#install-the-sensor"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Happy that I had reasonably accurate readings it was now time to install the sensor. Luckily for me my power meter has the output cables easily accessible. It was simply a matter of installing the CT Clamp around one of the cables and then powering on the sensor.&lt;/p&gt;&#10;&lt;p&gt;I also 3D printed the case for the Wemos and adaptor board to keep everything neat and safe.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2024/03/diy-whole-home-energy-monitoring-with-home-assistant/images/clampinstalled-1024x768.webp" data-action="zoom" alt="energy monitoring device installed" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2024/03/diy-whole-home-energy-monitoring-with-home-assistant/images/sensorincase-1024x768.webp" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Within minutes I had data flowing to Home Assistant. All that was left to do is add it to the dashboard.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2024/03/diy-whole-home-energy-monitoring-with-home-assistant/images/dashboard-473x1024.webp" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;I chose to use the Gauge type widget for this and will adjust the markings of the green, yellow and red areas as I monitor our usage.&lt;/p&gt;&#10;&lt;h2 id="conclusion"&gt;Conclusion&lt;a href="https://intelligentdithering.com/#conclusion"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#conclusion"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;This was a really fun little project. For under £20 I now have a gauge of how much energy we are using despite having an incredibly old analog power meter.&lt;/p&gt;&#10;&lt;p&gt;This project hit a lot of areas: soldering, 3d printing, software, hardware and a little bit of potentially dangerous electricity. Perfect mix for tinkering!&lt;/p&gt;&#10;&lt;p&gt;I hope to make a few more dashboard widgets translating the power usage into monetary value to give us a better sense of how much things cost to run. This will hopefully help us as a family adjust our behaviours a little to save some money (and perhaps the planet!).&lt;/p&gt;&#10;&lt;p&gt;If you give this a go be sure to heed the warnings and let me know in the comments how you get on!&lt;/p&gt;&#10;&lt;p&gt;Happy tinkering!&lt;/p&gt;&#10;</content:encoded></item><item><title>Brain dump fast with this free iOS Shortcut</title><link>https://intelligentdithering.com/posts/2023/10/dump-your-brain-fast-with-this-free-ios-shortcut/</link><pubDate>Sun, 22 Oct 2023 00:00:00 +0000</pubDate><guid isPermaLink="false">http://localhost:1313/dump-your-brain-fast-with-this-free-ios-shortcut/</guid><description> Introduction So how do we combat Messy Brain / overwhelm?￼ Enter the Brain Dumper iOS shortcut!￼ IntroductionGet things out of your head and into your task manager FAST with this free iOS shortcut!&#10;I use my devices for everything. My iPhone is always at hand and I am never far from my iPad or Mac. Having my to-do list all in one place that I can access at any time is critical for me to function.&#10;</description><content:encoded>&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2023/10/dump-your-brain-fast-with-this-free-ios-shortcut/images/image.png" data-action="zoom" alt="brain dump into your phone" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#introduction"&gt;Introduction&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#so-how-do-we-combat-messy-brain--overwhelm"&gt;So how do we combat Messy Brain / overwhelm?￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://intelligentdithering.com/#enter-the-brain-dumper-ios-shortcut"&gt;Enter the Brain Dumper iOS shortcut!￼&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="introduction"&gt;Introduction&lt;a class="anchorjs-link" href="#introduction"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Get things out of your head and into your task manager FAST with this free iOS shortcut!&lt;/p&gt;&#10;&lt;p&gt;I use my devices for everything. My iPhone is always at hand and I am never far from my iPad or Mac. Having my to-do list all in one place that I can access at any time is critical for me to function.&lt;/p&gt;&#10;&lt;p&gt;With my &lt;a href="https://intelligentdithering.com/improving-mental-health-during-troubling-times/" target="_blank"&gt;particular cocktail of mental disorders&lt;/a&gt; I find that sometimes I can get a serious feeling of overwhelm. My wife calls this “Messy Brain”, and it’s pretty obvious when it is happening to me. I tend to dull down, withdraw, get even more introverted than normal and just feel totally “meh”.&lt;/p&gt;&#10;&lt;p&gt;The human brain’s working memory can really only hold around &lt;a href="https://en.wikipedia.org/wiki/The_Magical_Number_Seven,_Plus_or_Minus_Two#:~:text=It%20was%20written%20by%20the,memory%20is%207%20%c2%b1%202." target="_blank"&gt;7 items (plus or minus 2)&lt;/a&gt; at a time before it runs into problems. This is not ideal for holding a task list of 30 or 40 things you need to do. Inevitably you will forget them: as another item gets added to the list, one drops off the end. But the brain still remembers that there WAS something on that list. You don’t know what you have forgotten but you DO get the horrible dread that you are going to drop the ball. That’s when Messy Brain kicks in.&lt;/p&gt;&#10;&lt;h2 id="so-how-do-we-combat-messy-brain--overwhelm"&gt;So how do we combat Messy Brain / overwhelm?&lt;a href="https://intelligentdithering.com/#so-how-do-we-combat-messy-brain--overwhelm"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#so-how-do-we-combat-messy-brain--overwhelm"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;The first course of action I take when this happens is to notice it. Once I have accepted I am in overwhelm mode, I just need to get everything out of my head in front of me so that it is easier to break down into smaller chunks to process.&lt;/p&gt;&#10;&lt;p&gt;Usually I would write things down but I find that can be too slow for me (in many cases the “slowness” of writing things down can actually be a benefit, especially when journalling as it makes you take more time to reflect properly).&lt;/p&gt;&#10;&lt;p&gt;I needed a fast way to get things into my task manager of choice &lt;strong&gt;&lt;a href="https://things.app" target="_blank"&gt;Things&lt;/a&gt;&lt;/strong&gt;. Things is pretty good about quick task entry on all platforms but it relies on typing, and one of the time I get a chance to dump my tasks out of my head is on my commute. I needed a way to get things off my mind fast and into Things so I can easily sort them again later.&lt;/p&gt;&#10;&lt;p&gt;This has been bugging me for a while as trying to use Siri to do it is a pain in the car.&lt;/p&gt;&#10;&lt;p&gt;You have to say:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;ME: “Hey Siri, add a task to Things”&lt;/p&gt;&#10;&lt;p&gt;SIRI: “Ok, what do you want me to add to things?”&lt;/p&gt;&#10;&lt;p&gt;ME: “Write a blog post”&lt;/p&gt;&#10;&lt;p&gt;SIRI: “OK, I have added Write a blog post to Things”&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;Then repeat that whole process for each item.&lt;/p&gt;&#10;&lt;p&gt;I wanted a way to dump tasks out fast with minimal speech in between all from a single button press or voice command. It was time to make an iOS Shortcut to do the heavy lifting!&lt;/p&gt;&#10;&lt;h2 id="enter-the-brain-dumper-ios-shortcut"&gt;Enter the Brain Dumper iOS shortcut!&lt;a class="anchorjs-link" href="#enter-the-brain-dumper-ios-shortcut"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;a href="https://www.icloud.com/shortcuts/d33b93a222184073abc2e2e3297a940c" target="_blank"&gt;Download the Brain Dumper Shortcut for Things&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://www.icloud.com/shortcuts/35a6c4374fb34632af6dacaea52794ee" target="_blank"&gt;Download the Brain Dumper Shortcut for Reminders&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;You can use this iOS shortcut I made to achieve this. Tap the link to install it in the Shortcuts app on your iPhone / iPad or Mac.&lt;/p&gt;&#10;&lt;p&gt;You can invoke the iOS shortcut by tapping it or simple saying “Siri, Brain Dumper”&lt;/p&gt;&#10;&lt;p&gt;The conversation flow is more like this now:&lt;/p&gt;&#10;&lt;blockquote&gt;&#10;&lt;p&gt;ME: “Siri, Brain Dumper”&lt;/p&gt;&#10;&lt;p&gt;SIRI: “What would you like me to add to Things? What’s the text?”&lt;/p&gt;&#10;&lt;p&gt;ME: “Buy milk”&lt;/p&gt;&#10;&lt;p&gt;SIRI: “Ok what’s next?”&lt;/p&gt;&#10;&lt;p&gt;ME: “Publish blog post”&lt;/p&gt;&#10;&lt;p&gt;SIRI: “OK. What’s next?”&lt;/p&gt;&#10;&lt;p&gt;ME: “Admire this amazing shortcut”&lt;/p&gt;&#10;&lt;p&gt;SIRI: “OK. What’s next?”&lt;/p&gt;&#10;&lt;p&gt;ME: “Stop”&lt;/p&gt;&#10;&lt;p&gt;SIRI: “OK. All done.”&lt;/p&gt;&#10;&lt;/blockquote&gt;&#10;&lt;p&gt;You can see this is a much faster interaction, both in the adding of a single task and the fact it asks repeatedly for more tasks until you say “Stop”.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2023/10/dump-your-brain-fast-with-this-free-ios-shortcut/images/image-1-1024x664.png" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Once you have downloaded the shortcut you can customise the spoken prompts and the task app that you prefer, just swap out the Things block for the app you use. For example I duplicated this Shortcut and changed the target app to Reminders, and we use that to quickly add a list of items to our family shared Shopping List in Reminders. This means you can open the kitchen cupboards and just shout ingredients to your phone to get the list entered quickly. It is a game changer!&lt;/p&gt;&#10;&lt;p&gt;Let me know if you use this iOS shortcut and if you have any cool tweaks to make it better!&lt;/p&gt;&#10;</content:encoded></item><item><title>Make the ultimate bootable USB drive</title><link>https://intelligentdithering.com/posts/2023/10/make-the-ultimate-bootable-usb-drive/</link><pubDate>Sun, 15 Oct 2023 00:00:00 +0000</pubDate><guid isPermaLink="false">http://localhost:1313/make-the-ultimate-bootable-usb-drive/</guid><description>Creating a USB Swiss army knife full of tech tools for all your geeky needs&#10;Today we are going to make the ultimate bootable USB drive to have with you at all times. This is an invaluable tool and it is all made possible by the Open Source tool Ventoy.&#10;This post is available in video form on YouTube as well for the visual learners among us.&#10;Ventoy is basically a bootloader that goes onto a USB drive that allows you to easily boot from any of the ISO disc images contained within it. This allows you to have a single USB drive with all of the tools you need on it, Windows installer images, file rescue kits, hacking tools etc.&#10;</description><content:encoded>&lt;p&gt;&lt;em&gt;Creating a USB Swiss army knife full of tech tools for all your geeky needs&lt;/em&gt;&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2023/10/make-the-ultimate-bootable-usb-drive/images/image-2-1024x682.png" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Today we are going to make the ultimate bootable USB drive to have with you at all times. This is an invaluable tool and it is all made possible by the Open Source tool &lt;a href="https://ventoy.net" target="_blank"&gt;Ventoy&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;This post is available in video form on YouTube as well for the visual learners among us.&lt;/p&gt;&#10;&lt;div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden;"&gt;&#10;&#9;&#9;&#9;&lt;iframe allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share; fullscreen" loading="eager" referrerpolicy="strict-origin-when-cross-origin" src="https://www.youtube.com/embed/eEQJGVzGQqk?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=0" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0;" title="YouTube video"&gt;&lt;/iframe&gt;&#10;&#9;&#9;&lt;/div&gt;&#10;&#10;&lt;p&gt;Ventoy is basically a bootloader that goes onto a USB drive that allows you to easily boot from any of the ISO disc images contained within it. This allows you to have a single USB drive with all of the tools you need on it, Windows installer images, file rescue kits, hacking tools etc.&lt;/p&gt;&#10;&lt;p&gt;It lets you make a personalised USB Swiss army knife of all the tools you use most often.&lt;/p&gt;&#10;&lt;h2 id="preparation-to-make-the-bootable-usb-drive"&gt;Preparation to make the bootable USB drive&lt;a href="https://intelligentdithering.com/#preparation-to-make-the-bootable-usb-drive"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#preparation-to-make-the-bootable-usb-drive"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;What do we need to begin:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;A USB drive to hold our ultimate bootable USB toolkit&lt;/strong&gt;&lt;br&gt;&#10;I find that keeping the drive below 128GB helps with compatibility with some older BIOS versions. I found &lt;a href="https://amzn.to/3s1rVGK" target="_blank"&gt;this great&lt;/a&gt; &lt;a href="https://amzn.to/3tTzfEV" target="_blank"&gt;little&lt;/a&gt; &lt;a href="https://amzn.to/3s1rVGK" target="_blank"&gt;drive&lt;/a&gt; &lt;a href="https://amzn.to/3MlhHYI" target="_blank"&gt;on&lt;/a&gt; &lt;a href="https://amzn.to/3s1rVGK" target="_blank"&gt;Amazon&lt;/a&gt; that I use personally&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;The Ventoy application&lt;/strong&gt;&lt;br&gt;&#10;You can get this from &lt;a href="https://ventoy.net" target="_blank"&gt;Ventoy.net&lt;/a&gt; for either Linux or Windows. Download the appropriate file and extract the contents of the zip file.&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;strong&gt;ISO files you want to boot from&lt;/strong&gt;&lt;br&gt;&#10;You will need some disk images that you want to put onto the bootable USB drive. I would recommend things like the &lt;a href="https://www.microsoft.com/en-gb/software-download/windows10" target="_blank"&gt;Windows installer DVDs&lt;/a&gt;, &lt;a href="https://www.hirensbootcd.org" target="_blank"&gt;Hirens BootCD&lt;/a&gt;, &lt;a href="https://clonezilla.org" target="_blank"&gt;Clonezilla&lt;/a&gt;, SystemRescue etc. Maybe even a &lt;a href="https://ubuntu.com/tutorials/try-ubuntu-before-you-install#1-getting-started" target="_blank"&gt;Ubuntu Live CD&lt;/a&gt; would be useful!&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;h2 id="creating-the-bootable-usb-drive"&gt;Creating the bootable USB drive&lt;a href="https://intelligentdithering.com/#creating-the-bootable-usb-drive"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#creating-the-bootable-usb-drive"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once you have the Ventoy application downloaded, extract the files and run the file called Ventoy2Disk.exe&lt;/p&gt;&#10;&lt;p&gt;You will get a window like the one below.&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2023/10/make-the-ultimate-bootable-usb-drive/images/image-3.png" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Choose your bootable USB drive in the dropdown and &lt;strong&gt;double check to make sure it is the right one&lt;/strong&gt;. This tool will destroy all data on the drive so be very sure at this stage!&lt;/p&gt;&#10;&lt;p&gt;Click &lt;strong&gt;Install&lt;/strong&gt;. It will warn you twice that it is going to wipe the drive before proceeding. The process only takes 20 seconds or so.&lt;/p&gt;&#10;&lt;p&gt;Once it has completed you will have a new USB drive show up in Windows Explorer named Ventoy.&lt;/p&gt;&#10;&lt;p&gt;Now all you have to do is copy over your ISO files to that drive. It really is that simple!&lt;/p&gt;&#10;&lt;p&gt;If you need to update or add a new ISO file in the future, just plug the drive in and copy the files over. You do not need to run the Ventoy2Disk app again unless you wish to update the Ventoy boot loader (perhaps if they release updates to fix bugs on certain systems)&lt;/p&gt;&#10;&lt;h2 id="using-your-new-bootable-usb-drive"&gt;Using your new bootable USB drive&lt;a href="https://intelligentdithering.com/#using-your-new-bootable-usb-drive"&gt;&lt;/a&gt;&lt;a class="anchorjs-link" href="#using-your-new-bootable-usb-drive"&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;Once you have made the drive and copied over some ISO files now you just need to try it out.&lt;/p&gt;&#10;&lt;p&gt;Plug the drive into a computer and turn it on. If the computer is set to boot from USB drives, the Ventoy boot window will appear. If not you may have to press the appropriate key to bring up the boot menu on your computer (typically one of the top row function keys)&lt;/p&gt;&#10;&lt;p&gt;&lt;figure&gt;&#10; &lt;a class="paragraph-image"&gt;&#10; &lt;img src="https://intelligentdithering.com/posts/2023/10/make-the-ultimate-bootable-usb-drive/images/image-4-1024x574.png" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;When the Ventoy window appears, simply choose the ISO you wish to boot from and hit Return. It really is that easy!&lt;/p&gt;&#10;&lt;p&gt;No more lugging around a bag full of poorly labelled USB drives with every possible Windows or Linux install on them. Everything in one place on your new Swiss army knife of IT tools!&lt;/p&gt;&#10;&lt;p&gt;Let me know if you find this useful and what tools you like to put on your bootable USB disk.&lt;/p&gt;&#10;</content:encoded></item></channel></rss>