<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>OpenOBI on Smart Home? Sure — But Secure!</title><link>https://smarthome-aber-sicher.de/en/tags/openobi/</link><description>Recent content in OpenOBI on Smart Home? Sure — But Secure!</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 13 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://smarthome-aber-sicher.de/en/tags/openobi/index.xml" rel="self" type="application/rss+xml"/><item><title>OBI Energy Tracker Fully Local: OpenOBI Without the Cloud</title><link>https://smarthome-aber-sicher.de/en/blog/2026/08/13/obi-energy-tracker-lokal/</link><pubDate>Thu, 13 Aug 2026 00:00:00 +0000</pubDate><guid>https://smarthome-aber-sicher.de/en/blog/2026/08/13/obi-energy-tracker-lokal/</guid><description>&lt;img src="https://smarthome-aber-sicher.de/blog/2026/08/13/obi-energy-tracker-lokal/cover.jpeg" alt="Featured image of post OBI Energy Tracker Fully Local: OpenOBI Without the Cloud" /&gt;&lt;p&gt;The OBI Energy Tracker is an inexpensive way to read a smart electricity meter. Out of the box, however, its readings pass through the heyOBI app and OBI&amp;rsquo;s cloud. The open-source &lt;strong&gt;OpenOBI&lt;/strong&gt; firmware lets you run the bridge entirely on your local network: the reader still communicates over LoRa, the bridge provides a local dashboard, and Home Assistant receives the data from your own MQTT broker.&lt;/p&gt;
&lt;p&gt;This guide covers the complete migration. The initial setup is fairly technical, but once it is finished, the OBI app, OBI cloud, and HACS integration are no longer required.&lt;/p&gt;
&lt;div class="video-wrapper"&gt;
&lt;div class="video-placeholder" data-embed="https://www.youtube-nocookie.com/embed/jpf5LPp90N4?autoplay=1" onclick="loadYtIframe(this)"&gt;
&lt;img src="https://smarthome-aber-sicher.de/maxresdefault_10288586215662482266_hu_495c2c20d394e4ec.jpg" alt="YouTube Video" loading="lazy"&gt;
&lt;div class="play-button"&gt;&lt;/div&gt;
&lt;div class="privacy-notice"&gt;
To load the video, please click the image. Please note that by doing so, data will be transmitted to YouTube.
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;script&gt;
function loadYtIframe(element) {
var iframe = document.createElement('iframe');
iframe.setAttribute('loading', 'lazy');
iframe.setAttribute('src', element.dataset.embed);
iframe.setAttribute('allow', 'autoplay; fullscreen');
iframe.setAttribute('allowfullscreen', '');
iframe.setAttribute('title', 'YouTube Video');
element.parentNode.replaceChild(iframe, element);
}
&lt;/script&gt;
&lt;style&gt;
.video-placeholder {
position: absolute;
inset: 0;
cursor: pointer;
}
.video-placeholder img {
width: 100%;
height: 100%;
object-fit: cover;
}
.play-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60px;
height: 60px;
background: url('/img/youtube_button.svg') no-repeat center center;
background-size: contain;
}
.video-placeholder:hover .play-button {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 60px;
height: 60px;
background: url('/img/youtube_button_hover.svg') no-repeat center center;
background-size: contain;
}
.privacy-notice {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
box-sizing: border-box;
background-color: rgba(0, 0, 0, 0.75);
color: #fff;
padding: 6px 12px;
font-size: 12px;
line-height: 1.35;
text-align: center;
}
&lt;/style&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Installing third-party firmware is at your own risk and may affect your warranty. Record and securely store the TEA key before starting. There is no convenient one-click option for returning to the original firmware.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id="what-you-need"&gt;What you need
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;OBI Energy Tracker bridge and optical reader&lt;/li&gt;
&lt;li&gt;computer with Python 3, Bluetooth, and access to the bridge&amp;rsquo;s network&lt;/li&gt;
&lt;li&gt;TCP port 8883 available during setup&lt;/li&gt;
&lt;li&gt;valid heyOBI login to retrieve the device-specific TEA key&lt;/li&gt;
&lt;li&gt;local MQTT broker, such as Home Assistant&amp;rsquo;s Mosquitto add-on&lt;/li&gt;
&lt;li&gt;project files from &lt;a class="link" href="https://github.com/atc1441/OBI_Energy_Tracker_Local_Cloud" target="_blank" rel="noopener"
&gt;atc1441/OBI_Energy_Tracker_Local_Cloud&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you only want to see the readings in Home Assistant and do not mind using OBI&amp;rsquo;s cloud, the &lt;a class="link" href="https://github.com/mla157/hacs-obienergytracker-integration" target="_blank" rel="noopener"
&gt;HACS integration by mla157&lt;/a&gt; is the easier route. This guide deliberately uses the fully local open-firmware approach.&lt;/p&gt;
&lt;h2 id="how-the-local-data-path-works"&gt;How the local data path works
&lt;/h2&gt;&lt;p&gt;The optical reader collects OBIS values such as imported energy, exported energy, and current power from the meter. It sends them to the bridge over &lt;strong&gt;868 MHz LoRa&lt;/strong&gt;. The ESP32-C3-based bridge normally forwards those readings to the manufacturer&amp;rsquo;s cloud service.&lt;/p&gt;
&lt;p&gt;During the migration, a computer briefly takes over the role of that cloud. The bridge receives Wi-Fi credentials, certificates, and the temporary MQTTS server address over Bluetooth. It then downloads OpenOBI as a regular over-the-air update. This helper server is not needed afterward: OpenOBI publishes directly to your permanent MQTT broker.&lt;/p&gt;
&lt;h2 id="1-prepare-the-environment"&gt;1. Prepare the environment
&lt;/h2&gt;&lt;p&gt;Clone the project, open the &lt;code&gt;04-connect-your-own-cloud&lt;/code&gt; directory, and create a virtual Python environment. Then install the three required packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;span class="lnt"&gt;3
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python3 -m venv .venv
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;source&lt;/span&gt; .venv/bin/activate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;pip install cryptography bleak paho-mqtt
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Use a Bluetooth Low Energy scanner to find the bridge&amp;rsquo;s full name. It starts with &lt;code&gt;OBI-&lt;/code&gt; but is not printed on the enclosure.&lt;/p&gt;
&lt;h2 id="2-retrieve-the-tea-key"&gt;2. Retrieve the TEA key
&lt;/h2&gt;&lt;p&gt;In the &lt;code&gt;tools&lt;/code&gt; directory, run the helper and enter your heyOBI login and the bridge&amp;rsquo;s Bluetooth name when prompted:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; tools
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python fetch_tea_key.py
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The result is the device-specific, 32-character &lt;strong&gt;TEA key&lt;/strong&gt;. It authorizes Bluetooth configuration changes, so treat it like a device password and never publish it.&lt;/p&gt;
&lt;h2 id="3-generate-certificates-and-start-the-temporary-server"&gt;3. Generate certificates and start the temporary server
&lt;/h2&gt;&lt;p&gt;Generate the certificates using the local IP address of the computer that will host the temporary server. The bridge must be able to reach this address, and it should not change during the process.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python gen_certs.py --host &amp;lt;LOCAL-BROKER-IP&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The script creates certificates and &lt;code&gt;ble_config.json&lt;/code&gt; in the &lt;code&gt;pki&lt;/code&gt; directory. In a second terminal, start the included MQTTS server and leave it running:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python mqtts_server.py --host 0.0.0.0 --port &lt;span class="m"&gt;8883&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;This helper emulates only the cloud functions required for provisioning and OTA. It is &lt;strong&gt;not&lt;/strong&gt; a replacement for the permanent Mosquitto broker used later.&lt;/p&gt;
&lt;h2 id="4-move-the-bridge-over-bluetooth"&gt;4. Move the bridge over Bluetooth
&lt;/h2&gt;&lt;p&gt;Hold the bridge button for more than two seconds to enter Bluetooth setup mode. Then transfer the configuration, TEA key, and Wi-Fi credentials:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python ble_provision.py --config pki/ble_config.json --key &amp;lt;TEA-KEY&amp;gt; --unbind &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --ssid &amp;lt;WIFI-NAME&amp;gt; --password &amp;lt;WIFI-PASSWORD&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;&lt;code&gt;--unbind&lt;/code&gt; removes an existing association with the OBI account. The original firmware reliably handles Wi-Fi passwords only up to &lt;strong&gt;32 bytes&lt;/strong&gt;. If the bridge does not connect despite correct credentials, check the password length first.&lt;/p&gt;
&lt;p&gt;After provisioning, the original firmware searches for the optical reader. Hold the reader&amp;rsquo;s large orange button for more than ten seconds and select it in the terminal. You can skip this step when your only goal is the firmware update by adding &lt;code&gt;--no-pair-sensor&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;CONNECT&lt;/code&gt; in the server log confirms that the bridge reached the local computer. If an &lt;code&gt;EnergyTrackingSensor&lt;/code&gt; message with a real &lt;code&gt;energy&lt;/code&gt; value also appears, the reader and LoRa link are working as well.&lt;/p&gt;
&lt;h2 id="5-install-openobi-over-the-air"&gt;5. Install OpenOBI over the air
&lt;/h2&gt;&lt;p&gt;Download the current firmware image from the project&amp;rsquo;s &lt;a class="link" href="https://github.com/atc1441/OBI_Energy_Tracker_Local_Cloud/releases" target="_blank" rel="noopener"
&gt;release page&lt;/a&gt;. Only the file containing &lt;code&gt;obi_gateway_c3&lt;/code&gt; is intended for the original OBI bridge.&lt;/p&gt;
&lt;p&gt;Stop the temporary server and restart it with the path to the firmware image:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;span class="lnt"&gt;2
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;python mqtts_server.py --host 0.0.0.0 --port &lt;span class="m"&gt;8883&lt;/span&gt; &lt;span class="se"&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; --ota-firmware &amp;lt;PATH-TO-OBI_GATEWAY_C3-FIRMWARE&amp;gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The bridge downloads the image in blocks. Do not interrupt power or network access until it reaches 100 percent and reboots. OpenOBI is then running, and its local dashboard is available at the IP address assigned by your router.&lt;/p&gt;
&lt;h2 id="6-bind-the-reader-in-openobi"&gt;6. Bind the reader in OpenOBI
&lt;/h2&gt;&lt;p&gt;The reader initially appears dimmed and unbound in the dashboard. Select &lt;strong&gt;Bind to gateway&lt;/strong&gt; for that specific reader. OpenOBI does not require another button press on the reader.&lt;/p&gt;
&lt;p&gt;Once bound, the dashboard shows imported energy, exported energy, current power, battery voltage, and radio diagnostics such as RSSI and SNR. You can also choose the reporting interval: &lt;code&gt;Live&lt;/code&gt; provides fast updates, while longer intervals conserve the reader&amp;rsquo;s battery.&lt;/p&gt;
&lt;h2 id="7-connect-home-assistant-through-mqtt"&gt;7. Connect Home Assistant through MQTT
&lt;/h2&gt;&lt;p&gt;Under &lt;strong&gt;Settings &amp;gt; MQTT&lt;/strong&gt;, enter the address of your permanent MQTT broker. In a typical Home Assistant installation, this is the Mosquitto add-on. Plain MQTT usually uses port 1883 and MQTTS port 8883. The username and password belong to your own broker, not your heyOBI account.&lt;/p&gt;
&lt;p&gt;The base topic can remain &lt;code&gt;obi/gateway&lt;/code&gt;. Enable &lt;strong&gt;MQTT Discovery&lt;/strong&gt; and save the connection. The OpenOBI dashboard should then report a connected status.&lt;/p&gt;
&lt;p&gt;Home Assistant automatically creates two MQTT devices: the LoRa gateway and the optical meter reader. Their energy sensors have the correct units and device classes, so they can be used directly in the Energy dashboard and automations. No HACS package, YAML, or custom templates are required.&lt;/p&gt;
&lt;h2 id="troubleshooting"&gt;Troubleshooting
&lt;/h2&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The bridge is found over Bluetooth but cannot be configured:&lt;/strong&gt; Hold its button for more than two seconds immediately before running the command.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Wi-Fi connection:&lt;/strong&gt; Verify the SSID and password; the original firmware accepts no more than 32 bytes for the password.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No &lt;code&gt;CONNECT&lt;/code&gt; in the server log:&lt;/strong&gt; Check the local IP address, firewall, and reachability of port 8883.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wrong firmware image:&lt;/strong&gt; Use only an image containing &lt;code&gt;obi_gateway_c3&lt;/code&gt; for the original bridge.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reader remains unbound:&lt;/strong&gt; Bind your specific reader in the OpenOBI dashboard and check its radio values.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No devices in Home Assistant:&lt;/strong&gt; Verify the broker credentials, base topic, and MQTT Discovery setting.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="conclusion"&gt;Conclusion
&lt;/h2&gt;&lt;p&gt;After this one-time migration, the complete measurement path stays on your network: the reader transmits to the gateway, OpenOBI publishes to the local MQTT broker, and Home Assistant processes the values without a manufacturer cloud. The temporary server and heyOBI login are no longer needed.&lt;/p&gt;
&lt;p&gt;For a look at the original app and cloud experience, read my &lt;a class="link" href="https://smarthome-aber-sicher.de/en/obi-energy-tracker/" &gt;OBI Energy Tracker review&lt;/a&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Note: Links marked with &lt;em&gt;affiliate link&lt;/em&gt; are affiliate links. As a partner of Amazon and OBI (via the Awin network) I earn from qualifying purchases. This means I receive a small commission if you purchase through these links — at no extra cost to you. The revenue helps me run this blog and YouTube channel and keep creating content. Thank you for your support!&lt;/p&gt;&lt;span class="cite"&gt;&lt;span&gt;― &lt;/span&gt;&lt;span&gt;Joachim&lt;/span&gt;&lt;cite&gt;&lt;/cite&gt;&lt;/span&gt;&lt;/blockquote&gt;
&lt;p&gt;&lt;strong&gt;Disclosure:&lt;/strong&gt; I bought the second Energy Tracker used for this conversion myself. The following product link is an affiliate link. If you buy at the regular price, I receive a commission at no additional cost to you. The linked shop and product are intended for the German market.&lt;/p&gt;
&lt;p&gt;👉 &lt;a class="link" href="https://www.awin1.com/cread.php?awinmid=9326&amp;amp;awinaffid=2527487&amp;amp;ued=https%3A%2F%2Fwww.obi.de%2Fp%2F9685751%2Fobi-energy-tracker-smarter-stromzaehler-ausleser-mit-heyobi-app" target="_blank" rel="noopener"
&gt;View the OBI Energy Tracker at OBI&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>