<?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>Posts on Intelligent Dithering</title><link>https://intelligentdithering.com/posts/</link><description>Overthinking technology so you don't have to</description><generator>Hugo</generator><language>en</language><atom:link href="https://intelligentdithering.com/posts/index.xml" rel="self" type="application/rss+xml"/><lastBuildDate>Wed, 30 Jul 2025 10:52:46 +0000</lastBuildDate><item><title>Dual Screen DIY CyberDeck</title><link>https://intelligentdithering.com/posts/2025/07/dual-screen-diy-cyberdeck/</link><pubDate>Wed, 30 Jul 2025 10:52:46 +0000</pubDate><guid isPermaLink="false">https://intelligentdithering.com/?p=470</guid><description>A cyberdeck is a custom-built, portable computer, often with a cyberpunk aesthetic, designed for accessing and interacting with cyberspace. In science fiction, they are used by hackers to connect to digital worlds, often for activities like hacking, data theft, or controlling machines. Real-world cyberdecks are typically built around single-board computers and designed to evoke this cyberpunk style and scratch an itch for the maker who designs it.&#10;There are plenty of &amp;ldquo;cyberdeck&amp;rdquo; builds out there but this latest one from Sector 07 has really caught my eye. It is a Dual Screen DIY Cyberdeck built around the Raspberry Pi single board computer featuring twin rotating touchscreens.&#10;</description><content:encoded>&lt;p&gt;A cyberdeck is a custom-built, portable computer, often with a cyberpunk aesthetic, designed for accessing and interacting with cyberspace. In science fiction, they are used by hackers to connect to digital worlds, often for activities like hacking, data theft, or controlling machines. Real-world cyberdecks are typically built around single-board computers and designed to evoke this cyberpunk style and scratch an itch for the maker who designs it.&lt;/p&gt;&#10;&lt;p&gt;There are plenty of &amp;ldquo;cyberdeck&amp;rdquo; builds out there but this latest one from Sector 07 has really caught my eye. It is a Dual Screen DIY Cyberdeck built around the &lt;a href="https://amzn.to/3IT8FU7" target="_blank"&gt;Raspberry Pi single board computer&lt;/a&gt; featuring twin rotating touchscreens.&lt;/p&gt;&#10;&lt;p&gt;&lt;strong&gt;This one has it all.&lt;/strong&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Stunning retro-futuristic look&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://amzn.to/46unciT" target="_blank"&gt;Dual rotating touch screens&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Snap-fit 3D printed enclosure&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Access to GPIO for prototyping&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Integrated keyboard&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;Open source files and parts so you can build your own&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://github.com/sector07-dev/RPI_DEV" target="_blank"&gt;Extensive documentation&lt;/a&gt;&lt;/p&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The attention to detail that Sector 07 have given to this device is amazing. It looks like a finished product and the aesthetic is super cool.&lt;/p&gt;&#10;&lt;p&gt;Take a break to watch the video below, it really is worth your time and if you decide to build one yourself or have other cyberdecks you think we should know about let us know in the comments.&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/cigAxzQGeLg?autoplay=0&amp;amp;controls=1&amp;amp;end=0&amp;amp;loop=0&amp;amp;mute=0&amp;amp;start=902" 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;</content:encoded></item><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>TLS Inspector: essential free iOS app for webmasters</title><link>https://intelligentdithering.com/posts/2024/03/tls-inspector-essential-free-ios-app-for-webmasters/</link><pubDate>Sun, 24 Mar 2024 00:00:00 +0000</pubDate><guid isPermaLink="false">http://localhost:1313/tls-inspector-essential-free-ios-app-for-webmasters/</guid><description>TLS Inspector is a great free app from developer Ian Spence that I use quite regularly at home and especially in work.&#10;It is great for quickly checking for expiry dates on certificates, or why a certificate is not working as expected. You can also delve into the certificate chain to check for any inconsistencies. Very useful if you think a website might be suspect!&#10;There have been other apps like this in the past but the one feature that I particularly love about TLS Inspector is the Share Sheet extension. This allows you to quickly check website you have open in Safari simply by using the share menu. No faffing about copying the URL, switching apps, trying to paste it and remove the non-domain bits.&#10;</description><content:encoded>&lt;p&gt;&lt;a href="https://tlsinspector.com" target="_blank"&gt;TLS Inspector&lt;/a&gt; is a great &lt;strong&gt;free&lt;/strong&gt; app from developer Ian Spence that I use quite regularly at home and &lt;em&gt;especially&lt;/em&gt; in work.&lt;/p&gt;&#10;&lt;p&gt;It is great for quickly checking for expiry dates on certificates, or why a certificate is not working as expected. You can also delve into the certificate chain to check for any inconsistencies. Very useful if you think a website might be suspect!&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/tls-inspector-essential-free-ios-app-for-webmasters/images/tlsinspector-762x1024.webp" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;There have been other apps like this in the past but the one feature that I particularly love about TLS Inspector is the Share Sheet extension. This allows you to quickly check website you have open in Safari simply by using the share menu. No faffing about copying the URL, switching apps, trying to paste it and remove the non-domain bits.&lt;/p&gt;&#10;&lt;p&gt;Just tap “Show Certificate” and off you go!&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/tls-inspector-essential-free-ios-app-for-webmasters/images/showcert-472x1024.webp" data-action="zoom" alt="" class="lazyload"&gt;&#10; &lt;/a&gt;&#10; &#10;&lt;/figure&gt;&lt;/p&gt;&#10;&lt;p&gt;Download a copy of it for free now &lt;a href="https://apps.apple.com/app/apple-store/id1100539810?pt=962148&amp;amp;ct=crash-override&amp;amp;mt=8" target="_blank"&gt;from the App Store.&lt;/a&gt;&lt;/p&gt;&#10;</content:encoded></item></channel></rss>