<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>HomeAssistant on Codewrite Dev Doc</title><link>https://dev.codewrite.co.uk/categories/homeassistant/</link><description>Recent content in HomeAssistant on Codewrite Dev Doc</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 24 Mar 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://dev.codewrite.co.uk/categories/homeassistant/index.xml" rel="self" type="application/rss+xml"/><item><title>Mouse Trap Mk II</title><link>https://dev.codewrite.co.uk/posts/2026-03-24-mousetrap-mk2/</link><pubDate>Tue, 24 Mar 2026 00:00:00 +0000</pubDate><guid>https://dev.codewrite.co.uk/posts/2026-03-24-mousetrap-mk2/</guid><description>&lt;p&gt;It turned out that the original
&lt;a href="https://dev.codewrite.co.uk/posts/2026-03-11-mousetrap/"&gt;mouse trap&lt;/a&gt;
wasn&amp;rsquo;t sensitive enough. Very small mice just didn&amp;rsquo;t trigger it. So I decided to improve the design.&lt;/p&gt;
&lt;p&gt;The case of the trap is clear, so I thought I could have a beam of light going from one side to the other. When the mouse broke the beam, it would trigger a solenoid that would close the door. After some thought, I decided to use a white LED and LDR (so no lasers or signal modulation). The LED was quite bright (even though it was only driven by 5mA) but bright lights don&amp;rsquo;t seem to put the mice off. The LED illuminated the LDR much more than ambient light (except in bright sunlight - but that&amp;rsquo;s not the best conditions to catch mice, and even if it did need to work in sunlight the case could be covered to reduce the ambient light falling on the LDR).&lt;/p&gt;</description></item><item><title>Mouse Trap Mk I</title><link>https://dev.codewrite.co.uk/posts/2026-03-11-mousetrap/</link><pubDate>Wed, 11 Mar 2026 00:00:00 +0000</pubDate><guid>https://dev.codewrite.co.uk/posts/2026-03-11-mousetrap/</guid><description>&lt;p&gt;So we thought we might have a mouse under the kitchen units&amp;hellip;&lt;/p&gt;
&lt;p&gt;This isn&amp;rsquo;t the first time we&amp;rsquo;ve had mice. And if you don&amp;rsquo;t think there are any in your house, well maybe it&amp;rsquo;s because you haven&amp;rsquo;t noticed them. They are very elusive, generally coming out in the middle of the night, and they are &lt;strong&gt;very&lt;/strong&gt; shy!&lt;/p&gt;
&lt;p&gt;I already had all the bits I needed to catch and re-home the mouse (you have to take it quite a long way - a mile or two - otherwise it will find it&amp;rsquo;s way back!). The central component is a humane mouse trap, which has a pressure sensitive pad and door that stops the mouse escaping. They typically cost about £10 (e.g. on Amazon). My advice - do a bit of research - don&amp;rsquo;t just get the cheapest one. They are very sensitive, but mice are very light, so the one I have had to be adjusted by putting a couple of coins on the pressure pad so that even the lightest mouse would trigger it.&lt;/p&gt;</description></item><item><title>Home Assistant Serial Link to an Arduino</title><link>https://dev.codewrite.co.uk/posts/2026-02-27-homeassistantwithserialarduino/</link><pubDate>Fri, 27 Feb 2026 00:00:00 +0000</pubDate><guid>https://dev.codewrite.co.uk/posts/2026-02-27-homeassistantwithserialarduino/</guid><description>&lt;p&gt;The purpose of this project was to connect an Arduino Nano to the USB port that Home Assistant was running on. For me that is a Raspberry Pi 4 but this solution should work with any Home Assistant hardware. And the reason for using a serial connection over USB (rather than wirelessly with WiFi or similar) could be for many reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wifi may not be available (e.g. if the network is down)&lt;/li&gt;
&lt;li&gt;It is more secure&lt;/li&gt;
&lt;li&gt;It is un-jammable&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The ultimate plan for me was to create an uninterruptable power supply for Home Assistant from bits that I had:&lt;/p&gt;</description></item></channel></rss>