<?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>Homeassistant – Yeri Tiete</title>
    <link>https://yeri.be/tag/homeassistant/</link>
    <description>Yeri Tiete&#39;s blog</description>
    <language>en</language>
    <copyright>© Yeri Tiete</copyright>
    <lastBuildDate>Mon, 11 May 2026 14:42:22 +0200</lastBuildDate>
    <atom:link href="https://yeri.be/tag/homeassistant/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>SlimmeLezer&#43;</title>
      <link>https://yeri.be/slimmelezer-/</link>
      <pubDate>Mon, 11 May 2026 14:42:22 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/slimmelezer-/</guid><enclosure url="https://static.yeri.be/posts/slimmelezer/slimmelezer.jpg" length="0" type="image/jpeg" />
      <description>Notes (and a working config) on getting a SlimmeLezer+ talking to Home Assistant alongside a Marstek battery CT on the same P1 port and some context on my setup.</description>
      <content:encoded><![CDATA[<p><img src="https://static.yeri.be/posts/slimmelezer/slimmelezer.jpg" alt="SlimmeLezer+"></p><p>This is the foundation post for the rest of my <a href="/tag/homeassistant/">Home Assistant</a> energy series (if I ever get to it). Before I could automate around electricity, I obviously needed a (real-time) view of what&rsquo;s actually flowing in and out.</p>
<h2 id="some-context-first">Some context first</h2>
<ul>
<li>I have solar panels (with a Huawei inverter installed by the previous owner)</li>
<li><a href="https://www.smappee.com/eu/our-story" target="_blank" rel="noopener noreferrer">Smappee EV charger</a> (bad purchase, it&rsquo;s quite dumb and has a <em>terrible</em> UI and Home Assistant can&rsquo;t control it),</li>
<li>and I recently got 2x <a href="https://eu.marstekenergy.com/en-us/products/marstek-venus-e-gen-3" target="_blank" rel="noopener noreferrer">Marstek batteries</a> (great hardware, cheap, and the worst software ever, truly terrible software. Oh and support started ghosting me after I lost my patience around Lunar New Year — they just will not reply to any of my help messages anymore).</li>
<li>I drive a <a href="https://en.wikipedia.org/wiki/Polestar_4" target="_blank" rel="noopener noreferrer">Polestar 4</a> (first edition, 2025)</li>
</ul>
<p>note: the original Huawei inverter was dead when I moved in and likely never worked, don&rsquo;t think the previous owners ever noticed &amp; it got replaced under warranty after a lot of chasing and nagging Huawei directly. <a href="https://www.rensol.be/" target="_blank" rel="noopener noreferrer">Rensol</a> couldn&rsquo;t move it forward and I basically asked to be cc&rsquo;ed in the ticket and got my <a href="https://www.incrementum.biz/" target="_blank" rel="noopener noreferrer">PA</a> to chase Huawei with all het wrath. Great service from both Huawei and Rensol&hellip;</p>
<p>So that&rsquo;s that&hellip; ;)</p>
<h2 id="slimmelezer">SlimmeLezer</h2>
<p>&hellip; And more context.</p>
<p>I use a <a href="https://www.zuidwijk.com/product/slimmelezer-plus/" target="_blank" rel="noopener noreferrer">SlimmeLezer+</a> with my P1 port (<a href="https://www.fluvius.be/nl/meters-en-meterstanden/digitale-meter/maak-je-meter-slim" target="_blank" rel="noopener noreferrer">Fluvius smart meter</a>). As ESPHome has significantly changed since I got mine and it wouldn&rsquo;t compile on a recent release, here&rsquo;s my working config. ¯\<em>(ツ)</em>/¯</p>
<p>The SlimmeLezer used to be entirely powered by the P1 port but <a href="https://en.wikipedia.org/wiki/Brownout_%28electricity%29" target="_blank" rel="noopener noreferrer">brownouts</a> did happen; my initial config tried to limit memory and WiFi usage in an attempt to prevent these brownouts)&hellip; As this is no longer much of an issue (see below), I&rsquo;ve stopped optimising that. But YMMV depending on your setup.</p>
<p>As the Marstek CT also uses the P1 port and I needed a splitter: I started off with a passive splitter but it was quite clear from the get-go that there were tons of issues (both meters were powered over P1). It&rsquo;s been a while but I think roughly half the messages didn&rsquo;t go through to SlimmeLezer (IIRC the message would just be forwarded across the two ports but would be too weak to be consistently read or something). I then got an <a href="https://www.homewizard.com/shop/active-p1-splitter/" target="_blank" rel="noopener noreferrer">active P1 splitter</a>. As I only had one power plug available, I&rsquo;d power either the splitter or the SlimmeLezer over a USB-C PSU&hellip; But what really fixed it and brought stability was doubling the power sockets: the splitter is powered over P1 power, both the SlimmeLezer and the Marstek CT have their dedicated power in via USB-C.</p>
<p>Honestly, I had a lot of issues with the Marstek CT, to the point they actually shipped me a replacement unit. In hindsight I don&rsquo;t think it was broken, more a mix of crap software + P1 power issues + delayed/laggy Marstek dashboards + &hellip;</p>
<h2 id="the-setup-end-to-end">The setup, end to end</h2>
<pre tabindex="0"><code>                ┌─────────────┐
                │ Solar panels│
                └──────┬──────┘
                       │ DC
                ┌──────┴──────┐
                │   Huawei    │── fusion_solar (cloud)
                │   inverter  │
                └──────┬──────┘
                       │ AC
        ───────────────┴───────────────  ← house AC bus
        │              │                │
  ┌─────┴──────┐ ┌─────┴──────┐  ┌──────┴────────┐
  │ Marstek    │ │ Fluvius P1 │  │ Smappee EV    │
  │ Venus E ×2 │ │ smart meter│  │ Wall + CTs    │
  │ (1× CT003) │ └─────┬──────┘  └──────┬────────┘
  └─────┬──────┘       │ RJ12, DSMR     │ (cloud; read-only)
        │ Modbus       │                │ 
        │ TCP   ┌──────┴──────┐         │
        │       │SlimmeLezer+ │         │
        │       └──────┬──────┘         │
        ▼              ▼                ▼
        ┌────────────────────────────────┐
        │       Home Assistant           │
        └────────────────────────────────┘
</code></pre><p>SlimmeLezer is fire-and-forget (at least as long as you don&rsquo;t update ESPHome). Huawei is a cloud-poll. Marstek is local Modbus (<em>but Modbus/battery BMS or firmware does crash and gets stuck. Restarting the integration sometimes fixes it</em>). Smappee, cloud-only, can only read data (as opposed to telling it when to, for example, start/stop charging my EV).</p>
<h3 id="sensors">Sensors</h3>
<p>What you get out of it, sensor-wise:</p>
<pre tabindex="0"><code>sensor.slimmelezer_power_consumed — instantaneous import (kW)
sensor.slimmelezer_power_produced — instantaneous export (kW)
Per-phase power in / out
Per-phase voltage and current
Cumulative energy import + export per tariff
Gas consumption (if you have a gas meter on the same connector)
</code></pre><p>That&rsquo;s all I need to know whether I&rsquo;m paying or selling at any given moment.</p>
<h2 id="the-slimmelezer-yaml">The SlimmeLezer YAML</h2>
<p>Stock Zuidwijk firmware with three small tweaks and a few changes to get it to compile on the latest ESPHome at the time of writing):</p>
<ol>
<li><code>output_power: 14dB</code> on the WiFi to fit inside the P1 250mA budget without rebooting (before getting an active splitter and dedicated power).</li>
<li><code>rx_buffer_size: 1200</code> on UART (down from default 1700). Belgian P1 telegrams are well under 1200 bytes; saves ~500 bytes of heap which the ESP8266 will thank you for.</li>
<li>A &ldquo;Last Restart&rdquo; and &ldquo;Last Time Sync&rdquo; template sensor so I can spot if the device has flatlined.</li>
</ol>
<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-yaml" data-lang="yaml"><span class="line"><span class="cl"><span class="nn">---</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">substitutions</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">device_name</span><span class="p">:</span><span class="w"> </span><span class="l">slimmelezer</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">timezone</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Europe/Brussels&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">domain</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;.iot.internal&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">wifi_fast_connect</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;false&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">esphome</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">${device_name}</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">name_add_mac_suffix</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">project</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="l">zuidwijk.slimmelezer</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;2.0&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">on_boot</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">then</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">if</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">condition</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">            </span><span class="nt">lambda</span><span class="p">:</span><span class="w"> </span><span class="l">return id(has_key);</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">then</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">            </span>- <span class="nt">lambda</span><span class="p">:</span><span class="w"> </span><span class="p">|-</span><span class="sd">
</span></span></span><span class="line"><span class="cl"><span class="sd">                std::string key(id(stored_decryption_key), 32);
</span></span></span><span class="line"><span class="cl"><span class="sd">                id(dsmr_instance).set_decryption_key(key.c_str());</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">else</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">            </span>- <span class="nt">logger.log</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">                </span><span class="nt">level</span><span class="p">:</span><span class="w"> </span><span class="l">INFO</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">                </span><span class="nt">format</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Not using decryption key. If you need to set a key use Home Assistant service &#39;ESPHome: ${device_name}_set_dsmr_key&#39;&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">esp8266</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">restore_from_flash</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">board</span><span class="p">:</span><span class="w"> </span><span class="l">d1_mini</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">mdns</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">disabled</span><span class="p">:</span><span class="w"> </span><span class="kc">false</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">wifi</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">ssid</span><span class="p">:</span><span class="w"> </span>!<span class="l">secret wifi_ssid</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span>!<span class="l">secret wifi_password</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">fast_connect</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;${wifi_fast_connect}&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">domain</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;${domain}&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c"># Powersaving for brownout due to 250mA restriction P1</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">output_power</span><span class="p">:</span><span class="w"> </span><span class="l">14dB</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">logger</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">level</span><span class="p">:</span><span class="w"> </span><span class="l">INFO</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">baud_rate</span><span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">api</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">reboot_timeout</span><span class="p">:</span><span class="w"> </span><span class="l">15min</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">encryption</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span>!<span class="l">secret encryption_key_slimmelezer</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">services</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">service</span><span class="p">:</span><span class="w"> </span><span class="l">set_dsmr_key</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">variables</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">private_key</span><span class="p">:</span><span class="w"> </span><span class="l">string</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">then</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">logger.log</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">format</span><span class="p">:</span><span class="w"> </span><span class="l">Setting private key %s. Set to empty string to disable</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">args</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="l">std::string(private_key).c_str()]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">globals.set</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">has_key</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">value</span><span class="p">:</span><span class="w"> </span>!<span class="l">lambda &#34;return private_key.length() == 32;&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">lambda</span><span class="p">:</span><span class="w"> </span><span class="p">|-</span><span class="sd">
</span></span></span><span class="line"><span class="cl"><span class="sd">          std::string pk_str(private_key);
</span></span></span><span class="line"><span class="cl"><span class="sd">          if (pk_str.length() == 32)
</span></span></span><span class="line"><span class="cl"><span class="sd">            pk_str.copy(id(stored_decryption_key), 32);
</span></span></span><span class="line"><span class="cl"><span class="sd">          id(dsmr_instance).set_decryption_key(pk_str.c_str());</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">ota</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">esphome</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">password</span><span class="p">:</span><span class="w"> </span>!<span class="l">secret ota_password</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">on_error</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">then</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span>- <span class="nt">logger.log</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">format</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;OTA update error %s&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">          </span><span class="nt">args</span><span class="p">:</span><span class="w"> </span><span class="p">[</span><span class="s2">&#34;x&#34;</span><span class="p">]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">dashboard_import</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">package_import_url</span><span class="p">:</span><span class="w"> </span><span class="l">github://zuidwijk/dsmr/slimmelezer.yaml@main</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">import_full_config</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">time</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">homeassistant</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">homeassistant_time</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">timezone</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;${timezone}&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">on_time_sync</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">then</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span>- <span class="nt">text_sensor.template.publish</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">            </span><span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">last_time_sync</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">            </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span>!<span class="l">lambda &#39;return id(homeassistant_time).now().strftime(&#34;%Y-%m-%d %H:%M:%S&#34;);&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">        </span>- <span class="nt">if</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">            </span><span class="nt">condition</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">              </span><span class="nt">lambda</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;return id(device_last_restart).state == &#34;&#34;;&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">            </span><span class="nt">then</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">              </span>- <span class="nt">text_sensor.template.publish</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">                  </span><span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">device_last_restart</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">                  </span><span class="nt">state</span><span class="p">:</span><span class="w"> </span>!<span class="l">lambda &#39;return id(homeassistant_time).now().strftime(&#34;%Y-%m-%d %H:%M:%S&#34;);&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">globals</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">has_key</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">bool</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">restore_value</span><span class="p">:</span><span class="w"> </span><span class="kc">yes</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">initial_value</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;false&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">stored_decryption_key</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">type</span><span class="p">:</span><span class="w"> </span><span class="l">char[32]</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">restore_value</span><span class="p">:</span><span class="w"> </span><span class="kc">yes</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">uart</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">baud_rate</span><span class="p">:</span><span class="w"> </span><span class="m">115200</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">rx_pin</span><span class="p">:</span><span class="w"> </span><span class="l">D7</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="c"># Drop DSMR/UART buffers from 1700 → 1200 (Belgian P1 is fine at 1200; saves ~500–600 bytes).</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">rx_buffer_size</span><span class="p">:</span><span class="w"> </span><span class="m">1200</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">dsmr</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">dsmr_instance</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span><span class="nt">max_telegram_length</span><span class="p">:</span><span class="w"> </span><span class="m">1200</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">sensor</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">dsmr</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">energy_delivered_lux</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Energy Consumed Luxembourg&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">energy_delivered_tariff1</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Energy Consumed Tariff 1&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">energy_delivered_tariff2</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Energy Consumed Tariff 2&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">energy_returned_lux</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Energy Produced Luxembourg&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">energy_returned_tariff1</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Energy Produced Tariff 1&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">energy_returned_tariff2</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Energy Produced Tariff 2&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">power_delivered</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Power Consumed&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">power_returned</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Power Produced&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">electricity_failures</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Electricity Failures&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">icon</span><span class="p">:</span><span class="w"> </span><span class="l">mdi:alert</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">electricity_long_failures</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Long Electricity Failures&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">icon</span><span class="p">:</span><span class="w"> </span><span class="l">mdi:alert</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">voltage_l1</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Voltage Phase 1&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">voltage_l2</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Voltage Phase 2&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">voltage_l3</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Voltage Phase 3&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">current_l1</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Current Phase 1&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">current_l2</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Current Phase 2&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">current_l3</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Current Phase 3&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">power_delivered_l1</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Power Consumed Phase 1&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">power_delivered_l2</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Power Consumed Phase 2&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">power_delivered_l3</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Power Consumed Phase 3&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">power_returned_l1</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Power Produced Phase 1&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">power_returned_l2</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Power Produced Phase 2&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">power_returned_l3</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Power Produced Phase 3&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">3</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">gas_delivered</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Gas Consumed&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">gas_delivered_be</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Gas Consumed Belgium&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">uptime</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;SlimmeLezer Uptime&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">wifi_signal</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;SlimmeLezer Wi-Fi Signal&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">update_interval</span><span class="p">:</span><span class="w"> </span><span class="l">60s</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">template</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Free Heap&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">lambda</span><span class="p">:</span><span class="w"> </span><span class="p">|-</span><span class="sd">
</span></span></span><span class="line"><span class="cl"><span class="sd">      return (float)system_get_free_heap_size();</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">unit_of_measurement</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;bytes&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">accuracy_decimals</span><span class="p">:</span><span class="w"> </span><span class="m">0</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">entity_category</span><span class="p">:</span><span class="w"> </span><span class="l">diagnostic</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">icon</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;mdi:memory&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w"></span><span class="nt">text_sensor</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">dsmr</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">identification</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;DSMR Identification&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">p1_version</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;DSMR Version&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">p1_version_be</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;DSMR Version Belgium&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">wifi_info</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">ip_address</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;SlimmeLezer IP Address&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">ssid</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;SlimmeLezer Wi-Fi SSID&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">bssid</span><span class="p">:</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">      </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;SlimmeLezer Wi-Fi BSSID&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">version</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;ESPHome Version&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">hide_timestamp</span><span class="p">:</span><span class="w"> </span><span class="kc">true</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">template</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s1">&#39;Last Restart&#39;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">device_last_restart</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">icon</span><span class="p">:</span><span class="w"> </span><span class="l">mdi:timeline-clock</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">entity_category</span><span class="p">:</span><span class="w"> </span><span class="l">diagnostic</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">  </span>- <span class="nt">platform</span><span class="p">:</span><span class="w"> </span><span class="l">template</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">name</span><span class="p">:</span><span class="w"> </span><span class="s2">&#34;Last Time Sync&#34;</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">id</span><span class="p">:</span><span class="w"> </span><span class="l">last_time_sync</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">icon</span><span class="p">:</span><span class="w"> </span><span class="l">mdi:clock</span><span class="w">
</span></span></span><span class="line"><span class="cl"><span class="w">    </span><span class="nt">entity_category</span><span class="p">:</span><span class="w"> </span><span class="l">diagnostic</span><span class="w">
</span></span></span></code></pre></div><p>Drop that into ESPHome, set your WiFi/encryption secrets, flash, and the device will appear in HA&rsquo;s <a href="https://www.home-assistant.io/integrations/esphome/" target="_blank" rel="noopener noreferrer">ESPHome integration</a> with all the sensors above.</p>
<p><a href="https://static.yeri.be/posts/slimmelezer/graphs.png" target="_blank" rel="noopener noreferrer"><img src="https://static.yeri.be/posts/slimmelezer/graphs.png" alt="graphs"></a></p>
<p>I&rsquo;m very happy with the SlimmeLezer+ and got my parents one too.</p>
]]></content:encoded>
      <category>hardware</category><category>software</category>
      <category>homeassistant</category>
    </item>
    
    <item>
      <title>Home Assistant: WP6003 Air Box</title>
      <link>https://yeri.be/home-assistant-wp6003-air-box/</link>
      <pubDate>Thu, 20 Jun 2024 13:04:47 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/home-assistant-wp6003-air-box/</guid><enclosure url="https://static.yeri.be/2024/06/pollution.webp" length="0" type="image/webp" />
      <description>&lt;p&gt;I recently got a WP6003 Air Box (&lt;a href=&#34;https://www.aliexpress.com/item/1005001816855462.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Aliexpress&lt;/a&gt;). The official product page seems to be offline but &lt;a href=&#34;http://web.archive.org/web/20230102015437/http://www.vson.com.cn/English/Product/3614894931.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;can be accessed through Archive.org&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;It&#39;s quite straightforward to integrate in a Bluetooth Proxy and Home Assistant &lt;a href=&#34;https://omarghader.github.io/esp32-airquality-box-wp6003-homeassistant/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;thanks to Omar&#39;s work&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;The major problem I have with it, is that the Bluetooth (4.0) range is terrible. Neither my Mac Mini nor my Bluetooth Proxy could connect with it if I moved it from the office to the kitchen (had it on top of the fridge, so some metal there) that&#39;s roughly 10ish meters away.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://static.yeri.be/2024/06/pollution.webp" alt="Home Assistant: WP6003 Air Box"></p><p>I recently got a WP6003 Air Box (<a href="https://www.aliexpress.com/item/1005001816855462.html" target="_blank" rel="noreferrer noopener">Aliexpress</a>). The official product page seems to be offline but <a href="http://web.archive.org/web/20230102015437/http://www.vson.com.cn/English/Product/3614894931.html" target="_blank" rel="noreferrer noopener">can be accessed through Archive.org</a>.</p>
<p>It's quite straightforward to integrate in a Bluetooth Proxy and Home Assistant <a href="https://omarghader.github.io/esp32-airquality-box-wp6003-homeassistant/" target="_blank" rel="noreferrer noopener">thanks to Omar's work</a>.</p>
<p>The major problem I have with it, is that the Bluetooth (4.0) range is terrible. Neither my Mac Mini nor my Bluetooth Proxy could connect with it if I moved it from the office to the kitchen (had it on top of the fridge, so some metal there) that's roughly 10ish meters away.</p>
<figure class="wp-block-image size-full"><a href="https://static.yeri.be/2024/06/wp6003-sensors.png"><img src="https://static.yeri.be/2024/06/wp6003-sensors.png" alt="" class="wp-image-74646"/></a></figure>
<p>Sensor wise, I've only had it working for a few days, and so far, it doesn't seem to be very accurate. The temperature is 1-2° below my other sensors... But hey, it's quite cheap and the previous tool I linked has a way to calibrate it (but I haven't tried that yet).</p>
<p>In the screenshot, Airquality level converts bytes into meaningful sensor readings:</p>
<ul>
<li>Temperature: Extracted from bytes 6 and 7, then divided by 10 to get the temperature in degrees </li>
<li>TVOC (Total Volatile Organic Compounds): Extracted from bytes 10 and 11, then divided by 1000 to get the concentration in parts per </li>
<li>HCHO (Formaldehyde): Extracted from bytes 12 and 13, similarly processed to TVOC.</li>
<li>CO2 (Carbon Dioxide): Calculated from bytes 16 and 17, adjusted by subtracting 150 to correct the baseline.</li>
</ul>
<p>Each of these values is then published to different sensor IDs within <a href="https://esphome.io/" target="_blank" rel="noreferrer noopener">ESPHome</a>, allowing Home Assistant to display and use this data. </p>
<p>The function returns the size of the data packet as a float, which can be used for debugging or validation. In my case (and assume yours as well) it's 18. I've marked it as <code>internal: true</code> in my config, as it's not useful to show once it's  working. </p>
<p>My config for ESPhome <a href="https://gitlab.com/yeri/homeassistant/-/blob/main/esphome/ble_proxy/bluetooth-proxy.yaml?ref_type=heads" target="_blank" rel="noreferrer noopener">can be found here</a>.</p>
<p>You can <a href="https://saso5.github.io/WP6003-air-box/" target="_blank" rel="noreferrer noopener">use this tool</a> to read out the sensor (and find the MAC address) from Chrome.</p>
<p>Guess it's a bit hard to show (and for some reason Firefox refused to take a screenshot of the entire page) but this is my current view in Home Assistant.</p>
<figure class="wp-block-gallery has-nested-images columns-default is-cropped">
<figure class="wp-block-image size-large"><a href="https://static.yeri.be/2024/06/Screenshot-2024-06-11-at-23-35-24-Settings-–-Home-Assistant.png"><img src="https://static.yeri.be/2024/06/Screenshot-2024-06-11-at-23-35-24-Settings-–-Home-Assistant-1024x732.png" alt="" class="wp-image-74649"/></a></figure>
<figure class="wp-block-image size-large"><a href="https://static.yeri.be/2024/06/Screenshot-2024-06-11-at-23-35-47-Settings-–-Home-Assistant.png"><img src="https://static.yeri.be/2024/06/Screenshot-2024-06-11-at-23-35-47-Settings-–-Home-Assistant-1024x721.png" alt="" class="wp-image-74650"/></a></figure>
</figure>
<p>Note that I have since added 3 more <a href="https://github.com/atc1441/ATC_MiThermometer/" target="_blank" rel="noreferrer noopener">ATC Xiaomi thermometers</a> and hidden Airquality levels. </p>
]]></content:encoded>
      <category>hardware</category><category>software</category>
      <category>homeassistant</category>
    </item>
    
    <item>
      <title>Home Assistant: Zigbee routers</title>
      <link>https://yeri.be/home-assistant-zigbee-routers/</link>
      <pubDate>Thu, 13 Jun 2024 12:40:39 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/home-assistant-zigbee-routers/</guid><enclosure url="https://static.yeri.be/2024/05/zigbee-map.png" length="0" type="image/png" />
      <description>&lt;p&gt;In my Home Assistant quest and simplifying (not sure if that&#39;s actually happening) and getting more control (aka less reliant on the cloud and 3rd parties) I&#39;ve been playing with Zigbee.&lt;/p&gt;&#xA;&lt;p&gt;Zigbee is quite cool because it&#39;s a mesh network. As I used it before with my &lt;a href=&#34;https://yeri.be/tag/homeassistant/&#34;&gt;Philips Hue&lt;/a&gt; bulbs, I was eager to expand and play with Zigbee.&lt;/p&gt;&#xA;&lt;p&gt;First thing first. Not all routers are equal. I&#39;ve got &lt;a href=&#34;https://www.aliexpress.com/item/1005006812746892.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;these two smart power plugs&lt;/a&gt; as an example (Grey and Blue colour, v2 with HomeKit support) and they act weirdly. They don&#39;t seem to route sensors properly, and randomly turn off whatever is plugged in.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://static.yeri.be/2024/05/zigbee-map.png" alt="Home Assistant: Zigbee routers"></p><p>In my Home Assistant quest and simplifying (not sure if that's actually happening) and getting more control (aka less reliant on the cloud and 3rd parties) I've been playing with Zigbee.</p>
<p>Zigbee is quite cool because it's a mesh network. As I used it before with my <a href="https://yeri.be/tag/homeassistant/">Philips Hue</a> bulbs, I was eager to expand and play with Zigbee.</p>
<p>First thing first. Not all routers are equal. I've got <a href="https://www.aliexpress.com/item/1005006812746892.html" target="_blank" rel="noreferrer noopener">these two smart power plugs</a> as an example (Grey and Blue colour, v2 with HomeKit support) and they act weirdly. They don't seem to route sensors properly, and randomly turn off whatever is plugged in.</p>
<figure class="wp-block-image alignwide size-large"><a href="https://static.yeri.be/2024/05/powerplugs.png"><img src="https://static.yeri.be/2024/05/powerplugs-1024x357.png" alt="" class="wp-image-74640"/></a></figure>
<p>The one that seems to work reliably well is this <a href="https://www.aliexpress.com/item/1005006437054440.html" target="_blank" rel="noreferrer noopener">orange Zigbee plug</a>. </p>
<p>Compared to my bulbs (more on that <a href="https://yeri.be/home-assistant-getting-rid-of-philips-hue-bridge/">here</a>) the sensors do detect them the two aforementioned power plugs, and do connect, but generally little to no data flows. I'm not entirely sure what the issue is (bad antenna, bad routing software) but the consensus on the internet seems to be: add more routers, don't trust some routers (Ikea and Hue seem decent), and not all endpoints are very smart and pick the best router (so may need to repair or force it to join a specific router). Unlike WiFi, in this case it seems that more is better. </p>
<p>When setting up the network, it's also recommended to first set up and pair the routers and then the endpoints (battery-powered sensors).</p>
<p>And the network takes a while to stabilise (and all routes to be learned). Some people even suggest waiting one or two days for the dust to settle.  </p>
<pre class="wp-block-verse">Moving routers screws up a lot, too. I've had sensors stop working (and refusing to pair again) after moving some routers and turning some off -- routers that weren't used by said sensors. So really odd stuff.</pre>
<p>As always, with Aliexpress, it's very much unclear what the brand/model is, but according to <a href="https://www.zigbee2mqtt.io/" target="_blank" rel="noreferrer noopener">Z2M</a>, all three are <a href="https://www.zigbee2mqtt.io/devices/TS011F_plug_1.html#tuya-ts011f_plug_1" target="_blank" rel="noreferrer noopener">TS011F</a>, but two of the three are definitely different (has Apple Homekit support and the plugs are bigger). </p>
<p>The energy (kWh) and Power (W) reporting works well, though, on all three models.</p>
<figure class="wp-block-image alignwide size-large"><a href="https://static.yeri.be/2024/05/power.png"><img src="https://static.yeri.be/2024/05/power-1024x879.png" alt="" class="wp-image-74623"/></a></figure>
<p>Can see when a charger is plugged in, and charging a MacBook Air.</p>
<p>I'm buying EU plugs because I'll be relocating back to Europe in the next 6 months. So I'm slowly getting rid of my UK smart plugs and replacing them with EU plugs. </p>
<pre class="wp-block-verse">Note that these plugs are not approved for (official) sale in Belgium though: child safety is not up to spec and the grounding is not approved (i.e. needs to be a pin). </pre>
]]></content:encoded>
      <category>hardware</category><category>networking</category><category>software</category>
      <category>homeassistant</category>
    </item>
    
    <item>
      <title>Home Assistant: Getting rid of Philips Hue bridge</title>
      <link>https://yeri.be/home-assistant-getting-rid-of-philips-hue-bridge/</link>
      <pubDate>Wed, 12 Jun 2024 12:41:52 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/home-assistant-getting-rid-of-philips-hue-bridge/</guid><enclosure url="https://static.yeri.be/2024/06/bulbs.webp" length="0" type="image/webp" />
      <description>&lt;p&gt;In my Home Assistant quest and simplifying (not sure if that&#39;s actually happening) and getting more control (aka less reliant on the cloud and 3rd parties) I&#39;ve been playing with Zigbee.&lt;/p&gt;&#xA;&lt;p&gt;Zigbee is quite cool because it&#39;s a mesh network. As I used it before with my &lt;a href=&#34;https://yeri.be/ikea-tradfri-with-philips-hue/&#34;&gt;Philips Hue&lt;/a&gt; bulbs, I was eager to expand and play with Zigbee.&lt;/p&gt;&#xA;&lt;p&gt;I have several bulbs, including: &lt;a href=&#34;https://www.zigbee2mqtt.io/devices/7199960PH.html#philips-7199960ph&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Hue Iris, Hue Go&lt;/a&gt;, &lt;a href=&#34;https://www.zigbee2mqtt.io/devices/8718696449691.html#philips-8718696449691&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;some random bulb&lt;/a&gt;, &lt;a href=&#34;https://www.zigbee2mqtt.io/devices/929001953301.html#philips-929001953301&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;a reading spot&lt;/a&gt;, and &lt;a href=&#34;https://www.zigbee2mqtt.io/devices/915005733701.html#philips-915005733701&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Hue Play&lt;/a&gt; (3x).&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://static.yeri.be/2024/06/bulbs.webp" alt="Home Assistant: Getting rid of Philips Hue bridge"></p><p>In my Home Assistant quest and simplifying (not sure if that's actually happening) and getting more control (aka less reliant on the cloud and 3rd parties) I've been playing with Zigbee.</p>
<p>Zigbee is quite cool because it's a mesh network. As I used it before with my <a href="https://yeri.be/ikea-tradfri-with-philips-hue/">Philips Hue</a> bulbs, I was eager to expand and play with Zigbee.</p>
<p>I have several bulbs, including: <a href="https://www.zigbee2mqtt.io/devices/7199960PH.html#philips-7199960ph" target="_blank" rel="noreferrer noopener">Hue Iris, Hue Go</a>, <a href="https://www.zigbee2mqtt.io/devices/8718696449691.html#philips-8718696449691" target="_blank" rel="noreferrer noopener">some random bulb</a>, <a href="https://www.zigbee2mqtt.io/devices/929001953301.html#philips-929001953301" target="_blank" rel="noreferrer noopener">a reading spot</a>, and <a href="https://www.zigbee2mqtt.io/devices/915005733701.html#philips-915005733701" target="_blank" rel="noreferrer noopener">Hue Play</a> (3x).</p>
<figure class="wp-block-image alignwide size-large"><a href="https://static.yeri.be/2024/05/hue.png"><img src="https://static.yeri.be/2024/05/hue-1024x494.png" alt="" class="wp-image-74625"/></a></figure>
<p>My Home Assistant setup uses the <a href="https://www.home-assistant.io/skyconnect/" target="_blank" rel="noreferrer noopener">Skyconnect</a>. I've updated the firmware (on a Mac) to use <a href="https://github.com/Koenkk/zigbee2mqtt/discussions/21462" target="_blank" rel="noreferrer noopener">Ember firmware as ezsp</a> will be deprecated soon(™).  </p>
<pre class="wp-block-verse">At the time of writing you can't update the firmware directly from HA just yet, you need another device.</pre>
<p>As I had two Zigbee networks (one for Hue, and one for my sensors and Ikea bulb) it made sense to merge them (and have one less connected bridge): it would reduce interference, and the bulbs all act as a router, so that would greatly improve my network coverage and stability.</p>
<p>Generally speaking, it went quite smoothly: delete the devices in the Hue app (it factory resets them and puts them in pairing mode) and then pair them in <a href="https://www.zigbee2mqtt.io/" target="_blank" rel="noreferrer noopener">Zigbee2Mqtt</a> (I use that over <a href="https://www.home-assistant.io/integrations/zha/" target="_blank" rel="noreferrer noopener">ZHA</a>). </p>
<p>However, my main issue was that my Zigbee bulbs were unreliable: it sometimes worked, but often it lagged or timed out. Especially when controlling multiple bulbs at once (such as a big room such as the living room) or sending multiple commands in sequence (on/off/on/off). </p>
<pre class="wp-block-verse">In hindsight, my sensors were unreliable as well: there was data missing, and it didn't properly broadcast/update every 5 minutes. I first thought it was just because they were cheap Chinese (<a href="https://www.tuya.com/" target="_blank" rel="noreferrer noopener">TuYa</a>) sensors using battery-power. If the temp or humidity didn't change enough, it wouldn't broadcast.</pre>
<p>I often saw errors such as these in Z2M:</p>
<pre class="wp-block-code"><code>2024-05-26 22:29:02Publish 'set' 'state' to 'Hue Play Right' failed: 'Error: ZCL command 0x0017880104d89bc4/11 genOnOff.on({}, {"timeout":10000,"disableResponse":false,"disableRecovery":false,"disableDefaultResponse":false,"direction":0,"srcEndpoint":null,"reservedBits":0,"manufacturerCode":null,"transactionSequenceNumber":null,"writeUndiv":false}) failed ({"target":29608,"apsFrame":{"profileId":260,"clusterId":6,"sourceEndpoint":1,"destinationEndpoint":11,"options":4416,"groupId":0,"sequence":110},"zclSequence":244,"commandIdentifier":11} <strong>timed out after</strong> <strong>10000ms</strong>)'</code></pre>
<p>But the annoying thing (in debugging, and thinking the network "needs to settle") was that it often worked just fine, and then randomly started breaking down/time outing when I thought it was finally solved. </p>
<p>I almost gave up and went back to a Hue bridge, when I asked for some advice on <a href="https://discord.com/channels/556563650429583360/1052136886912688199" target="_blank" rel="noreferrer noopener">Discord</a>. The reason was the channel... </p>
<p>First off: check the Zigbee channel of your Hue. It's likely 25. Z2M uses channel 11 by default.</p>
<p>There are 4 channels that are getting the least WiFi interference. These are called <a href="https://www.zigbee2mqtt.io/guide/configuration/zigbee-network.html#network-config" target="_blank" rel="noreferrer noopener">ZLL channels</a> (whatever that stands for): 11, 15, 20, 25. However, it seems that 11 is <a href="https://www.reddit.com/r/homeassistant/comments/y1cm9q/i_changed_my_z2m_network_to_channel_25_and/" target="_blank" rel="noreferrer noopener">quite terrible</a>, and I would not recommend using it. </p>
<p>My Z2M sat on Channel 11 (which is Channel 1 for WiFi). I live in <a href="https://yeri.be/tag/singapore/">Singapore</a>, in an apartment building, with a shit-ton of WiFi, hence the massive interference and lag on Zigbee. </p>
<pre class="wp-block-verse">Also, 2.4Ghz WiFi is generally 20Mhz channel width, whereas Zigbee is 2Mhz, so one WiFi channel overlaps many Zigbee channels. </pre>
<p>You can modify the channel (via the config file in <code>/homeassistant/zigbee2mqtt/configuration.yaml</code>) by adding the following and restarting the Z2M container:</p>
<pre class="wp-block-code"><code>advanced:
  &#91;...] # there should already be a ton of things
  channel: 25</code></pre>
<p>The problem with changing the channel, is that it requires repairing (some of) the Zigbee devices. And it's a total mess to repair Hue bulbs once they are no longer on a Hue bridge.</p>
<pre class="wp-block-verse">There's no need to remove the devices from Z2M as that will wipe their configs (I believe). It's possible that removing the devices from Z2M will put them in pairing mode again (for Hue bulbs, see below) but I couldn't get a confirmation.</pre>
<p>Ikea has the 6x power off/on sequence that resets them, but Hue dropped support for something similar in some firmware upgrade (why?!?!). </p>
<p><a href="https://www.zigbee2mqtt.io/guide/usage/touchlink.html" target="_blank" rel="noreferrer noopener">TouchLink</a> is another option, but that didn't work for me at all. </p>
<p>Some Hue bulbs can be reset by long pressing (30-60seconds) the power button (for example the Hue Go), but what worked best for me is pairing them again on the Hue bridge using the serial (force pair), deleting them again, and pairing on Z2M. </p>
<p>However, I didn't have the serial of two bulbs: one Hue Play has the label missing, and the Hue Iris didn't have any label at all. I thought I would be forced to go and purchase a Hue dimmer/remote control (that comes with TouchLink and allows resetting the bulbs)... </p>
<p>However, suddenly, after an hour or two of messing around, the Hue bulbs that weren't repaired just started working again. </p>
<p>So it seems that if they are disconnected from their bridge for a while, they start changing channels until they find the bridge again. I guess there's a chance, with enough patience, that I didn't have to repair my Hue bulbs (not sure about Ikea, and I would definitely not trust my <a href="https://yeri.be/home-assistant-zigbee-routers/">Chinese Power plugs</a> and sensors to come back online). </p>
<p>The sensors are quite easily repaired (long press the pairing button or pinhole and done -- don't forget to set Z2M in <code>Permit join</code>)</p>
<p>Other stuff you can try if the range or network sucks can be found <a href="https://www.zigbee2mqtt.io/advanced/zigbee/02_improve_network_range_and_stability.html" target="_blank" rel="noreferrer noopener">here</a>. </p>
<p>However, if it kinda works, you better not mess with it... :) </p>
]]></content:encoded>
      <category>hardware</category><category>networking</category><category>software</category>
      <category>homeassistant</category>
    </item>
    
    <item>
      <title>Home Assistant: Assign entities to areas</title>
      <link>https://yeri.be/home-assistant-assign-entities-to-areas/</link>
      <pubDate>Thu, 06 Jun 2024 11:46:53 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/home-assistant-assign-entities-to-areas/</guid><enclosure url="https://static.yeri.be/2024/05/ble.webp" length="0" type="image/webp" />
      <description>&lt;p&gt;I&#39;ve finally started working with Home Assistant and while the learning curve has been steep, it&#39;s been fun.&lt;/p&gt;&#xA;&lt;p&gt;I&#39;m going to post some random notes (mostly for myself) on things I discovered, and I need to keep in mind.&lt;/p&gt;&#xA;&lt;p&gt;For example, I have set up an &lt;a href=&#34;https://www.aliexpress.com/item/1005005967641936.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;ESP32-c3&lt;/a&gt; Bluetooth Proxy for a &lt;a href=&#34;https://www.aliexpress.com/item/1005006414566166.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Mi ble thermometer&lt;/a&gt;. &lt;/p&gt;&#xA;&lt;p&gt;I&#39;ve assigned the ESP device to an area: IT cabinet. However, the BLE sensors are scattered across the house (in different areas). Took me a while to figure it out, but you can assign entities to specific areas.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://static.yeri.be/2024/05/ble.webp" alt="Home Assistant: Assign entities to areas"></p><p>I've finally started working with Home Assistant and while the learning curve has been steep, it's been fun.</p>
<p>I'm going to post some random notes (mostly for myself) on things I discovered, and I need to keep in mind.</p>
<p>For example, I have set up an <a href="https://www.aliexpress.com/item/1005005967641936.html" target="_blank" rel="noreferrer noopener">ESP32-c3</a> Bluetooth Proxy for a <a href="https://www.aliexpress.com/item/1005006414566166.html" target="_blank" rel="noreferrer noopener">Mi ble thermometer</a>. </p>
<p>I've assigned the ESP device to an area: IT cabinet. However, the BLE sensors are scattered across the house (in different areas). Took me a while to figure it out, but you can assign entities to specific areas.</p>
<figure class="wp-block-image size-large"><a href="https://static.yeri.be/2024/05/entities.png"><img src="https://static.yeri.be/2024/05/entities-1024x668.png" alt="" class="wp-image-74605"/></a></figure>
<p>Head to <code>Entities</code> and select the entity config, and at the bottom, unselect <code>use device area</code>, and select the correct area.</p>
<figure class="wp-block-image size-large"><a href="https://static.yeri.be/2024/05/entity-custom-area.png"><img src="https://static.yeri.be/2024/05/entity-custom-area-742x1024.png" alt="" class="wp-image-74606"/></a></figure>
<p>Tadaaa, you can now assign the sensors to the correct area, and they'll show up in the right dashboards/cards.</p>
<p>The proxy config <a href="https://yeri.be/home-assistant-esp32-c3-bluetooth-proxy/" data-type="link" data-id="https://yeri.be/home-assistant-esp32-c3-bluetooth-proxy/">can be found here</a>.</p>
]]></content:encoded>
      <category>hardware</category><category>software</category>
      <category>homeassistant</category>
    </item>
    
    <item>
      <title>Home Assistant: ESP32-C3 Bluetooth proxy</title>
      <link>https://yeri.be/home-assistant-esp32-c3-bluetooth-proxy/</link>
      <pubDate>Fri, 31 May 2024 11:33:03 +0200</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/home-assistant-esp32-c3-bluetooth-proxy/</guid><enclosure url="https://static.yeri.be/2024/05/sensors.webp" length="0" type="image/webp" />
      <description>&lt;p&gt;I have set up an &lt;a href=&#34;https://www.aliexpress.com/item/1005005967641936.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;ESP32-c3&lt;/a&gt; Bluetooth Proxy for a &lt;a href=&#34;https://www.aliexpress.com/item/1005006414566166.html&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Mi ble thermometer&lt;/a&gt; (and I have a few other BLE sensors that I haven&#39;t managed to set up yet).&lt;/p&gt;&#xA;&lt;p&gt;The proxy config &lt;a href=&#34;https://gitlab.com/yeri/homeassistant/-/blob/main/esphome/ble_proxy/bluetooth-proxy.yaml?ref_type=heads&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;can be found here&lt;/a&gt;. &lt;/p&gt;&#xA;&lt;p&gt;Be sure to modify the variables to match whatever you want to do. I&#39;m using static IPs because auto discovery is unreliable (&lt;code&gt;hostname.iot.internal&lt;/code&gt;). &lt;/p&gt;&#xA;&lt;p&gt;You&#39;ll also need to add the &lt;code&gt;!secret&lt;/code&gt; variables into the &lt;code&gt;secrets.yaml&lt;/code&gt; file.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://static.yeri.be/2024/05/sensors.webp" alt="Home Assistant: ESP32-C3 Bluetooth proxy"></p><p>I have set up an <a href="https://www.aliexpress.com/item/1005005967641936.html" target="_blank" rel="noreferrer noopener">ESP32-c3</a> Bluetooth Proxy for a <a href="https://www.aliexpress.com/item/1005006414566166.html" target="_blank" rel="noreferrer noopener">Mi ble thermometer</a> (and I have a few other BLE sensors that I haven't managed to set up yet).</p>
<p>The proxy config <a href="https://gitlab.com/yeri/homeassistant/-/blob/main/esphome/ble_proxy/bluetooth-proxy.yaml?ref_type=heads" target="_blank" rel="noreferrer noopener">can be found here</a>. </p>
<p>Be sure to modify the variables to match whatever you want to do. I'm using static IPs because auto discovery is unreliable (<code>hostname.iot.internal</code>). </p>
<p>You'll also need to add the <code>!secret</code> variables into the <code>secrets.yaml</code> file.</p>
<p>Note that there's an issue with Bluetooth and WiFi on single cores (i.e.: the ESP locks up as it can't do both at boot). The workaround is in that config file.</p>
<blockquote class="wp-block-quote">
<p>Use on single-core chips</p>
<p>On dual-core devices the WiFi component runs on core 1, while this component runs on core 0. When using this component on single core chips such as the ESP32-C3 both WiFi and ble_tracker must run on the same core, and this has been known to cause issues when connecting to WiFi. A work-around for this is to enable the tracker only while the native API is connected. The following config will achieve this:</p>
<pre class="wp-block-code"><code>esp32_ble_tracker:
  scan_parameters:
    continuous: false

api:
  encryption:
    key: !secret encryption_key
  on_client_connected:
    - esp32_ble_tracker.start_scan:
       continuous: true
  on_client_disconnected:
    - esp32_ble_tracker.stop_scan:</code></pre>
<p><cite><a href="https://esphome.io/components/esp32_ble_tracker.html#use-on-single-core-chips" target="_blank" rel="noreferrer noopener">Esphome</a></cite></blockquote></p>
<p>To flash the Mi thermometer, use <a href="https://atc1441.github.io/TelinkFlasher.html" target="_blank" rel="noreferrer noopener">this flasher</a> and the <a href="https://github.com/atc1441/ATC_MiThermometer/releases" target="_blank" rel="noreferrer noopener">firmware from here</a>.</p>
<p>Example output of the log (from <a href="https://esphome.io/" target="_blank" rel="noreferrer noopener">Esphome</a> in Home Assistant directly, but can be seen from the web interface as well):</p>
<figure class="wp-block-image alignwide size-large"><a href="https://static.yeri.be/2024/05/log.png"><img src="https://static.yeri.be/2024/05/log-1024x443.png" alt="" class="wp-image-74613"/></a></figure>
<p>You can then add the proxy (and the entities) in Home Assistant. It should update every couple of minutes (the Mi device updates every 5 or so minutes, the Proxy scans every channel every 3-ish minutes). </p>
<p>In the example above, I (at the time of writing) only have one Bluetooth sensor, but it should be quite trivial to add more. The hardest part is finding the right MAC address of the sensors... :) </p>
]]></content:encoded>
      <category>hardware</category><category>networking</category><category>software</category>
      <category>homeassistant</category>
    </item>
    
    <item>
      <title>Ikea Tradfri with Philips Hue</title>
      <link>https://yeri.be/ikea-tradfri-with-philips-hue/</link>
      <pubDate>Fri, 11 Nov 2022 09:47:00 +0100</pubDate>
      <author>Yeri Tiete</author>
      <guid isPermaLink="true">https://yeri.be/ikea-tradfri-with-philips-hue/</guid><enclosure url="https://static.yeri.be/2022/11/star.png" length="0" type="image/png" />
      <description>&lt;p&gt;Recently visited Ikea and had to get a Christmas star-light like I used to have during my childhood. &lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image aligncenter size-large&#34;&gt;&lt;a href=&#34;https://static.yeri.be/2022/11/tradfri.jpg&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;&lt;img src=&#34;https://static.yeri.be/2022/11/tradfri-768x1024.jpg&#34; alt=&#34;&#34; class=&#34;wp-image-70798&#34;/&gt;&lt;/a&gt;&lt;figcaption class=&#34;wp-element-caption&#34;&gt;Star-light with Tradfri, Philips Hue in the table lamp, and a Kasa smartplug powered Ikea LED light. Oh and &lt;a href=&#34;http://instagram.com/tofurawr/&#34; target=&#34;_blank&#34; rel=&#34;noreferrer noopener&#34;&gt;Taro&lt;/a&gt; in the corner.  &lt;/figcaption&gt;&lt;/figure&gt;&#xA;&lt;p&gt;Most of my (non-track) light at home is smart using either a TP-Link Kasa smartplug or Philips Hue (and I want to avoid adding more brands, more apps, and more shit). However, Philips Hue is quite $$$ and not always all that easy to get in Singapore (shady retailers, limited stock, not many options).&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p><img src="https://static.yeri.be/2022/11/star.png" alt="Ikea Tradfri with Philips Hue"></p><p>Recently visited Ikea and had to get a Christmas star-light like I used to have during my childhood. </p>
<figure class="wp-block-image aligncenter size-large"><a href="https://static.yeri.be/2022/11/tradfri.jpg" target="_blank" rel="noreferrer noopener"><img src="https://static.yeri.be/2022/11/tradfri-768x1024.jpg" alt="" class="wp-image-70798"/></a><figcaption class="wp-element-caption">Star-light with Tradfri, Philips Hue in the table lamp, and a Kasa smartplug powered Ikea LED light. Oh and <a href="http://instagram.com/tofurawr/" target="_blank" rel="noreferrer noopener">Taro</a> in the corner.  </figcaption></figure>
<p>Most of my (non-track) light at home is smart using either a TP-Link Kasa smartplug or Philips Hue (and I want to avoid adding more brands, more apps, and more shit). However, Philips Hue is quite $$$ and not always all that easy to get in Singapore (shady retailers, limited stock, not many options).</p>
<p>I knew that <a href="https://www.ikea.com/sg/en/p/tradfri-led-bulb-e14-470-lumen-smart-wireless-dimmable-white-spectrum-globe-20489730/">Tradfri</a> was technically compatible with the Hue Bridge, but never made the jump as I just wanted things to work (don't want to mess around with lights). Until today. Figured I may as well give it a go.</p>
<p>Surprisingly, everything worked out of the box. I had to do a factory reset (not sure if that's because I kept the light on for ~10 minutes before trying to set it up, or if this was a returned product as clearly the box had been opened before)...</p>
<figure class="wp-block-image aligncenter size-large"><a href="https://static.yeri.be/2022/11/Hue-settings.png" target="_blank" rel="noreferrer noopener"><img src="https://static.yeri.be/2022/11/Hue-settings-473x1024.png" alt="" class="wp-image-70799"/></a><figcaption class="wp-element-caption">Ikea light, in the Hue app.</figcaption></figure>
<ul>
<li>Turn on light</li>
<li>Reset light by turning it off and on 6 times</li>
<li>Open Philips Hue app and search/add light</li>
<li>Tada... Should work</li>
</ul>
<pre class="wp-block-verse">Side note: it requires a modern firmware (and I assume all lights being sold today have said firmware, but if for some reason you end up with old stock, you may need to update). To update you need the Ikea Bridge though (or... apparently the dimmers/buttons may work as well -- did not test).</pre>
<p>All the controls are working as well (dimming, changing colours, etc).</p>
<figure class="wp-block-video aligncenter"><video autoplay controls loop src="https://static.yeri.be/2022/11/light-settings-1.mp4"></video><figcaption class="wp-element-caption">Ikea Star light in the Hue app.</figcaption></figure>
<p></p>
]]></content:encoded>
      <category>hardware</category><category>networking</category><category>software</category>
      <category>christmas</category><category>homeassistant</category><category>interior</category><category>winter</category>
    </item>
    
  </channel>
</rss>
