<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ivan Šarić on Medium]]></title>
        <description><![CDATA[Stories by Ivan Šarić on Medium]]></description>
        <link>https://medium.com/@isaric?source=rss-3c99bce42e67------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*T8UoAMsYR40EDYtFWd8UCA.jpeg</url>
            <title>Stories by Ivan Šarić on Medium</title>
            <link>https://medium.com/@isaric?source=rss-3c99bce42e67------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:13:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@isaric/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[On Marketing Systems]]></title>
            <link>https://medium.com/@isaric/on-marketing-systems-5ea3985b8f65?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/5ea3985b8f65</guid>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Wed, 30 Sep 2026 10:48:38 GMT</pubDate>
            <atom:updated>2026-09-30T10:48:38.103Z</atom:updated>
            <content:encoded><![CDATA[<p>A couple of years ago I was working in an e-commerce specialized development agency. While I was there my boss assigned me a new client that needed a systems integrator. The client wanted to connect their webshop with the new cloud marketing systems for which they had payed a hefty licencing fee.</p><h3>Integrating with a complex system</h3><p>I took lead on this mini-project. It encompassed all of the layers of an e-commerce clustered monolith. I added a new JavaScript library on the frontend to capture customer actions. Of course, I needed to customize the library so that it could work properly with the client’s setup. The frontend code dispatched all captured events to the backend. The same code would tag each user with an id. Based on this id , we could attribute each event to a particlar user or session.</p><h3>Typically Tracked User Actions</h3><ul><li>Searches</li><li>Page Views</li><li>Category Views</li><li>All cart operations — addition, removal, bulk and single</li><li>All order operations — payment, cancellation, refund, return, delivery</li></ul><p>Next, I amended the out-of-the-box backend Java code which received and processed events from the frontend. Thankfully. functional programming had arrived to Java since version 8. Indeed, such a programming style proved very useful in writing pipeline code for processing events. Besides improved readability, I was able to formulate a solution more easily. Finally, the code validated the events and enriched them with data. Then it would batch them and ship them off to the marketing system.</p><h3>Enter machine learning</h3><p>The frontend event stream fueled machine learning models on the marketing systems side. The information includes things like items searched, browsed and purchased. Users automatically cluster along multiple dimensions. The cluster assignments feed back into the e-commerce system. We tailored the content according to each users cluster assignment. Each group (cluster) of users could see different content. Finally, email campaigns are also targeted per group. Thus, they increase the likelihood of the users getting relevant content-</p><p>The marketing systems receive other data streams at the same time. Daily data dumps over FTP contained product and pricing data. Combined with user clustering, the storefront displayed product recommendation components. These components would yield recommendations based on the ranking algorithm that was configured for that component. Be sure to check the list below for a summary of all the system inputs and outputs. In addition, there is a second list below that one that details the user actions that are tracked on the storefront.</p><h3>Marketing systems inputs and outputs</h3><p>Input streams</p><ul><li>User Actions over REST</li><li>Product Data over FTP</li><li>Price Data over FTP</li><li>Category Data over FTP</li></ul><p>Resulting features</p><ul><li>User clustering</li><li>Product Recommendations</li><li>E-mail customization</li><li>CMS customization</li></ul><h3>Takeaways</h3><p>The whole experience left a double impact on me. On the one hand it is easy to see how such systems can benefit e-commerce. Driving sales becomes easier and more rational. The user receives less spam and more useful information. It’s a game changer and adoption is guaranteed to be widespread. On the other hand, it raises significant questions regarding users’ data and privacy. This is no longer an issue just of the EU and GDPR. Other big players — countries, trading blocks — are also looking into privacy and data management legislation.</p><p>The political forces behind such legislation are considerable. No wonder, it’s easy to understand why customers could get uneasy regarding these features. With proper discussion and as practice takes shape, the downsides will be reigned in. However, it can still be a cause of headaches for developers and operations. They need to be able to produce and delete all of the users data at request.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5ea3985b8f65" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I let an agent rewrite my training calendar. The interesting part was deciding what it couldn’t do.]]></title>
            <link>https://medium.com/@isaric/i-let-an-agent-rewrite-my-training-calendar-the-interesting-part-was-deciding-what-it-couldnt-do-9709cab03c4e?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/9709cab03c4e</guid>
            <category><![CDATA[google-gemini]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[agents]]></category>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Sat, 29 Aug 2026 17:45:50 GMT</pubDate>
            <atom:updated>2026-08-29T17:45:50.532Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Building Cadence: deterministic conflict detection, an LLM confined to choosing, and why that makes recovery from a bad model answer structural rather than hopeful.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d5uINjY6d-Yn4C3w_xp4xw.png" /></figure><p>I train for running, but I want one plan that covers running, strength and cycling together — not three plans that ignore each other. Nothing did that, so at Path Variable we built OmniCoach: a training platform that plans the whole week across all three, reads your recovery each morning, and pushes the workouts to Garmin.</p><p>It has the blind spot every training platform has. It knows everything about your body and nothing about your life. It has never seen your calendar.</p><p>So every week I did the same reconciliation by hand. A Saturday flight appears, the long run has to move, and you guess whether to shorten it or drop it — and whether moving it wrecks the Tuesday session it now sits beside.</p><p>That’s a scheduling problem with real constraints, and it recurs weekly. It is exactly the shape of thing you’d want an agent for. What I actually wanted to know was whether I’d trust one to write to my real calendar, unsupervised.</p><p>Cadence is what I built to answer that. This post is about the one design decision everything else fell out of.</p><h3>THE TEMPTATION</h3><p>The obvious build is: give the model the week, give it the calendar, give it a tool that writes to Garmin, and let it sort things out. Modern models are good at this kind of puzzle. You’d have something demoable in an afternoon.</p><p>I’ve watched enough of those demos fail on the second run to know what happens. The model does something reasonable four times and something baffling the fifth, and because the reasoning and the authority live in the same place, you have no way to tell which kind of run you just had until you look at the calendar.</p><p>The failure isn’t that the model is unreliable. It’s that there’s no seam — no point where an independent check can say “that answer is wrong” without being another model answer.</p><h3>THE SPLIT</h3><p>Cadence separates two questions that feel like one:</p><p>What is wrong with this week? — always answered in plain Python.</p><p>Which of the valid fixes should we apply? — answered by Gemini 3.5 Flash.</p><p>The first is a constraint problem with a right answer. Seven interference rules: lower-body strength needs a clear day before a hard run; a run and heavy legs on one day blunt each other; consecutive hard days only when readiness supports them; calendar commitments are fixed and sessions flex around them, and so on. Those aren’t judgement calls. They’re conditions you can evaluate.</p><p>The second genuinely is a judgement call. If Saturday’s long run has to move, it could go to Friday, or Sunday, or shrink in place, or become an easy ride. Several of those are defensible. Picking the one a tired athlete would actually prefer — and explaining it in a sentence they’ll believe — is the thing a model is good at and a rule is not.</p><p>So the model never detects anything, and it never invents an option. It is handed a set of resolutions that already pass the rules, and it chooses among them.</p><h3>WHY THIS MAKES RECOVERY STRUCTURAL</h3><p>Here’s the part that matters, and it isn’t the architecture diagram. It’s what happens when the model is wrong.</p><p>Because detection is deterministic, the same scoring function that found the conflict can be run again on the model’s proposed week. If the proposal doesn’t score better than the deterministic fallback, it is refused, and the fallback is applied instead.</p><p>That is a real gate, not a prompt asking the model to double-check itself. The check doesn’t share the model’s failure modes because it isn’t a model.</p><p>In production it fires. Of Cadence’s first ten unattended runs, four rejected Gemini’s proposal because it didn’t improve the week. Nobody was watching. The deterministic resolution went out instead, and the refusal was written to a public ledger with a reason.</p><p>I want to be precise about what that number means. It doesn’t mean the model is bad — Gemini’s accepted answers are better than the deterministic fallback, which is why it’s in the loop at all. It means a 40% intervention rate is what “safe by construction” actually looks like from the inside, and that a system without the gate would have shipped those four to a real calendar.</p><p>There’s a second gate of the same shape one tier down. A deterministic classifier reads Garmin workout names against the vocabulary coaches actually use — threshold, recovery, deadlift — and is right about nearly everything. For names it can’t place it returns MODERATE, which is the safe answer rather than a good one. Gemma is asked about exactly those cases and nothing else. A reply outside {EASY, MODERATE, HARD} is discarded. Any failure — no credential, a timeout, a malformed reply — returns the deterministic answer unchanged. The system that runs without that tier is the system that runs with it, minus some accuracy on unusual names.</p><p>Same principle, one level down: rules decide what is true; models are asked only where the rules have nothing to say.</p><h3>WHAT IT BOUGHT ME</h3><p>The reasoning core has no dependencies. The domain/ package imports nothing outside the Python standard library — no SDK, no HTTP client, no credentials. It is a pure function from a week to a list of conflicts.</p><p>Which means the entire test suite — 357 tests — runs in three seconds with no network and no API key. Every rule is tested at both edges. That isn’t discipline on my part; it’s what falls out when the interesting logic doesn’t need a model to execute.</p><p>Failures are legible. Every pass writes to a ledger: which rule fired, what changed, the rationale, whether the write landed. When something looks wrong, the question “what did it think it was doing” has an answer that isn’t archaeology through logs.</p><p>It can refuse to act. A session already underway or in the past is never modified, even when a rule says it should be — the guard fires before the write and records that it did. An agent that writes to a real calendar needs a category for “I know what’s wrong and I’m not going to touch it”, and that category is much easier to build when the decision is code.</p><h3>WHAT IT COST</h3><p>Honesty demands the other column.</p><p>The rules are work. Seven of them, each needing both edges tested, each encoding something a coach knows implicitly. A model would have “known” most of this on day one, badly, with no way to tell which parts.</p><p>The rules are also blind spots. Cadence currently can’t see training that has already happened, which means R1 cannot see the squats it exists to protect against. That’s filed as an open issue, not hidden. A model-first design would have had a vague opinion about it; the rule-first design has a precise gap.</p><p>And the subtle logic is still subtle. The write-back path took nine review rounds. More than once the defect was the previous round’s fix — a parameter threaded through but never connected at the call site, twice. Determinism makes bugs findable. It doesn’t make them absent.</p><h3>THE SHAPE OF IT</h3><p>Cloud Scheduler — 08:00 daily, OIDC, nobody asks it</p><p>→ Cloud Run (private)</p><p>1 · detect seven rules, plain Python</p><p>2 · resolve Gemini chooses between valid options</p><p>3 · two gates applicable? safer? else rules win</p><p>4 · write back all-or-nothing, idempotent per week</p><p>→ Google Calendar read-only, no write path</p><p>→ OmniCoach API mTLS + bearer, and onward to Garmin</p><p>→ Firestore decision ledger + idempotency watermark</p><p>Cadence never touches Garmin directly. It calls OmniCoach’s REST API over mutual TLS with a client certificate, and OmniCoach owns the Garmin integration. The scheduled agent is IAM-protected and not publicly reachable; the only public surface is a read-only sandbox that holds no credential capable of reaching a calendar. The write path there isn’t disabled — it’s absent.</p><h3>DOES IT WORK</h3><p>It has run unattended every morning since 23 August. Ten recorded passes, four with writes applied to a real Garmin account, writes_planned == writes_applied every time, zero write errors.</p><p>The one I’d point at: a Saturday flight to Madrid, 09:00–11:30, against a two-hour long run scheduled the same day. Cadence moved the run to Friday and said why — “Moving this long run to Friday avoids your flight commitment and fits the day’s training budget.” Sunday was excluded automatically, because 2.5 hours of riding plus two hours of running breaches the day budget.</p><p>I didn’t ask it to. That’s the whole point.</p><p>Try it: the decision ledger is public at</p><p><a href="https://cadence-demo-1003232797607.europe-west1.run.app/">https://cadence-demo-1003232797607.europe-west1.run.app</a></p><p>— every pass, every rule that fired, every rationale. No account needed.</p><p>Demo video: <a href="https://youtu.be/LPB-xYOLJGo?si=PFC-FLSO26qv8MLO">https://youtu.be/LPB-xYOLJGo?si=PFC-FLSO26qv8MLO</a></p><p>I built Cadence, and wrote this post, for the purposes of entering the All Things Agentic Hackathon. It’s a Path Variable project, and it integrates with OmniCoach, our existing training platform, as an external API client.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9709cab03c4e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I made a simple, cheap NVR with BASH and FFMPEG]]></title>
            <link>https://medium.com/@isaric/i-made-a-simple-cheap-nvr-with-bash-and-ffmpeg-b05ade3c4a76?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/b05ade3c4a76</guid>
            <category><![CDATA[nvr]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[ffmpeg]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[home-security-cameras]]></category>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Fri, 28 Aug 2026 12:47:24 GMT</pubDate>
            <atom:updated>2026-08-28T12:47:24.917Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XGsBqfCIEphrhhcc-69bKA.png" /></figure><p>I started studying IP cameras and surveillance as a survival skill a few years ago. My family has some nice homes that we want to protect. The houses are far apart from each other. I also wanted to see the different environments and climates so that I could get that feeling of being there. Why not take a look at the beach while you are stuck in the gloomy capital city? To tie all this together I decided to design my own NVR.</p><p>NVR stands for Network Video Recorder. It is a system that has one basic function. Of course, It records video from network-enabled cameras which it has access to. Next, it should also receive motion events from those cameras that have motion detection capability. As I wrote previously in <a href="https://web.archive.org/web/20250808141822/https://blog.path-variable.com/go-posix-time-and-onvif-cam-poll/">my post on my open source work</a>, the ONVIF standard ensures an easy way to access such services on the camera.</p><h3>FFMPEG and Linux Bash</h3><p>At the time I had already started exploring the Raspberry PI single-board-computer. It is a perfect platform for such a system. My own Rapsberry Pi 4Bs run Ubuntu Server. Obviously, I need a library to do the actual recording and transformation of the video. <a href="https://web.archive.org/web/20250808141822/https://github.com/FFmpeg/FFmpeg">FFMPEG</a> is the most used and celebrated video recording library in existence. The <a href="https://web.archive.org/web/20250808141822/https://en.wikipedia.org/wiki/Bash_(Unix_shell)">bash scripting language</a> would be the glue that ties all of this together. Finally, in order to guarantee durability and proper scheduling, I used <a href="https://web.archive.org/web/20250808141822/https://en.wikipedia.org/wiki/Systemd">systemd</a>.</p><p>The elegance of FFMPEG is that it provides enconding and connection capabilities. In fact, the broad range of features guarantees that it can cover all your video needs. If you do not wish to use the command-line, there are multiple frontends and interfaces written for it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/0*Eo4MG_ktvTrQykYa" /></figure><h3>A watchdog to help me record</h3><p>The diagram above shows the calling order. Crontab scheduling was used to reset the service once per day to help with stability. The service was responsible for keeping the connection with the camera open and restarting in case of server reboot. FFMPEG has a nasty bug. It does not return a proper exit code if a connection with a camera hangs. As a result, I was forced to implement a watchdog service. The watchdog concept in systemd is a tool for monitoring processes that do not report their own failure reliably. In this case, a watchdog script would check if the video files was growing as expected and restart accordingly.</p><p>There was quite a bit of fidling to get the watchdog script right. The trick is in identifing the proper <a href="https://web.archive.org/web/20250808141822/https://en.wikipedia.org/wiki/Process_identifier">process id</a> which spawns the video file. There are some nested processes in a running systemd service with each their own PID. After some trial and error I was able to guess the order. You can find an example in the repository listed in the final paragraph below. I cannot guarantee it will work for you. It depends on the choices you make in writing your scripts.</p><h3>Some problems to watch out for</h3><p>There are several issues that I noticed during conceptualization and later in production. One is preserving timestamps and frame synchronization in case of restarts (ex. connection failure). There are two ways for handling this. One is to use an appendable video format like TS. It is not compact and will impact your storage. Another is to record in very small chunks. For example, make a new video file every minute or 30 seconds. Both of these choices require post-processing to produce a smooth single file video and preserve storage capacity. In the first case, I need to remux the file to a format with better compression. In the second case, I need to concatenate the small chunks into one usable video.</p><p>I have tried both implementations on various locations. The first was easier to implement. It meant that at the end of the day, the server load was increased as the remux operations ran. The second case included a lot more scripting. However, it proved a good solution for remote locations with limited storage. I could upload the small chunks to a remote backup location and do post-processing there. Concatenation as such is not a resource intensive operation.</p><p>To conclude, my system is still in operation and has helped ensure the safety of my home(s) on multiple occurrences. I have presented a previous version of the system during a tech talk last year. You can find the link to the presentation <a href="https://web.archive.org/web/20250808141822/https://bit.ly/3neYprx">here</a>. There is also a <a href="https://web.archive.org/web/20250808141822/https://github.com/isaric/recording-scripts">GitHub repository</a> with sample scripts to help you get started. I hope this was an interesting read for you. Until next time, stay safe!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b05ade3c4a76" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[An Overview Of The Architecture Of My Engineering Blog]]></title>
            <link>https://medium.com/@isaric/an-overview-of-the-architecture-of-my-engineering-blog-0250e7047df4?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/0250e7047df4</guid>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Sun, 10 May 2026 12:58:57 GMT</pubDate>
            <atom:updated>2026-05-10T12:58:57.773Z</atom:updated>
            <content:encoded><![CDATA[<p>In this post I will introduce the architecture of the Engineering blog. As most of you will notice, the blog is powered by WordPress. It’s an on-premise solution that is currently served from two Raspberry Pi 4B computers. The system is exposed to the public internet through a tunnel to a lightweight VPS hosted in Germany.</p><h3>The architecture of a clustered monolith system</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/0*emKe5zxRuMJkInWq" /></figure><p>The architecture of the system is best described as a clustered monolith. An nginx server load balances two nodes. In addition, that server is also the reverse proxy for the whole cluster. Finally, the system uses MariaDB to persist all its data and backs it up regularly.</p><p>Of course, WordPress also serves static files and needs a place to store it’s PHP code. The admin node writes all changes to the database and file volumes. Rsync syncs all the changes from the admin nodes volume to the secondary node. For example, this ensures that a new plugin install will propagate across the cluster. Finally, a local process backs up the volumes.</p><p>Each node runs inside a docker container. The container uses Apache as the web server to expose WordPress. The reverse proxy blocks access to the admin interface from the public internet. This provides an additional layer of security. An attacker needs to be inside the VPN in order to access the admin interface.</p><h3>Planned improvements</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/0*WjcPXEndyPU9xIG_" /></figure><p>One of the bottlenecks in scaling such a system is the SQL database. While MariaDB offers replication mechanisms, they are not easy to configure. In addition, there is a risk of corrupting data when switching a new node to master status. While my site doesn’t have yet have that level of traffic, it’s good to plan ahead.</p><p>I have deployed my Raspberry Pi computers to three separate locations. My plan is to have a WordPress instance at each one. Therefore, a local database replica will reduce network latency. Each node will query a local copy of the main database. Reads happen more often that writes in a typical WordPress blog. The only exception are user comments. Finally, the geographically distributed nodes ensure some basic disaster protection.</p><h4>Two approaches to local database replicas</h4><p>Here are two approaches to SQL replication for WordPress that I have researched. One often mentioned is <a href="https://web.archive.org/web/20250422004229/http://www.gluster.org/">GlusterFS</a>. It is a distributed file system that ensures a local synced copy of the database files at every location. Such a solution is an example of master-master replication. GlusterFS takes care of ensuring the consistency of the data in all nodes.</p><p>Another approach is to use a <a href="https://web.archive.org/web/20250422004229/https://wordpress.org/plugins/hyperdb/">WordPress plugin</a> that sends reads and writes to separate databases. In that case, normal master-worker replication is sufficient. Writes happen on the remote master database. Given that the read/write ratio is heavily in favor of reads, performance is not compromised. In such a scenario, the read replicas DNS name would be overridden on each node so that it points to local. If I used a container orchestration system like Kubernetes, it would handle this requirements.</p><h3>Conclusion</h3><p>I hope I was able to give the reader a basic overview of the current and planned architecture of this blog. It is a topic I will revisit regularly. My objective is to raise responsiveness and durability while keeping costs low as possible. In combination with the unusual choice of server hardware, it should provide an interesting read. Please leave comments and suggestions below. I look forward to an interesting discussion.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0250e7047df4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Keep Myself Healthy And Happy]]></title>
            <link>https://medium.com/@isaric/how-i-keep-myself-healthy-and-happy-fe948de2ca3a?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe948de2ca3a</guid>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Sun, 10 May 2026 12:58:15 GMT</pubDate>
            <atom:updated>2026-05-10T12:58:15.248Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>I spoke about a topic called <a href="https://web.archive.org/web/20250322234144/https://blog.path-variable.com/developer-health/">“Developer Health”</a> a while ago. This post is an update. I will detail my exercise routine and the supplements I take. Making consistent healthy choices is enough to make you stand out among your colleagues. It also makes for a more enjoyable life.</p><h3>In the long run</h3><p>I had a little fun with the subtitle. Long-distance running is my favorite sports activity. 5k, 10k and the occasional half-marathon is what I enjoy doing. I have yet to run a full marathon. This is mostly about logistics. And that is what I like about running long-distance. You have to plan — equipment, nutrition, weather, location, rest, recovery. All of these things need to be considered for you to successfully complete your goal run.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/711/0*oGt_GSws7nlWyiiG" /></figure><p>There is a lot of research on why aerobic activities are good for you. Pain tolerance, good mood, appetite control are just some of the things that come to my mind. It’s also an outdoor activity which means you get exposure to natural sunlight. You can also look up the concept of <a href="https://web.archive.org/web/20250322234144/https://en.wikipedia.org/wiki/Autophagy">autophagy</a> although any type of regular exercise should promote this process.</p><p>The downside is that long runs can be draining if you also have a life and a family. I try to reconcile these two spheres of my life with supplements and by managing my energy throughout the day. The supplements I take include vitamins, whey, casein and collagen proteins and additional amino acids. I also use some ingredients which would fall in the category of “<a href="https://web.archive.org/web/20250322234144/https://en.wikipedia.org/wiki/Nootropic">nootropics</a>“.</p><h3>Some numbers to clear things up</h3><p>When I say I like to run, here is what I mean in terms of numbers. I ran 750 km in the last year. For the last two months I have run about a 100 km each month. My best year in the last three years was around 1200 km. The decrease is due to a couple of factors. I became a father. I also decided to focus more on building strength and physical therapy to avoid injuries. My business started to get more work.</p><p>In order to keep up this tempo I use a lot of vitamins and supplements. In terms of budget this comes out at around 250 euros per month for everything included. Below is a list of all the things I use.</p><h3>My supplements</h3><h4>Vitamins and minerals</h4><ul><li>Vitamin A — Retinyl Palmitate / Retinol Acetate</li><li>Vitamin B — the whole complex</li><li>Vitamin C</li><li>Vitamin D3 — spray form and with collagen</li><li>Vitamin E</li><li>Vitamin K</li><li>Iron Chelate</li><li>Magneisum — Bysglcinate. Citrate, Malate</li><li>Potassium Citrate</li><li>Sodium Chloride — table salt and Sodium Bicarbonate</li><li>Copper Bysglicinate</li><li>Chrome Picolinate</li><li>Boron</li><li>Zinc Picolinate</li></ul><h4>Proteins and amino acids</h4><ul><li>Whey Isolate</li><li>Micellar Casein</li><li>Collagen</li><li>Taurine</li><li>Glycine</li><li>L-glutamine</li><li>Glutamine Peptides</li><li>Beta-alanin</li><li>Creatine Monohydrate</li><li>BCAA</li><li>L-tryptophan</li><li>L-carnosine</li><li>L-serine</li><li>D-asparagine acid</li></ul><h3>Super Foods</h3><ul><li>Wheat Grass</li><li>Barley</li><li>Spirulina</li><li>Chlorella</li><li>Maca</li><li>Rhodiola Rosea</li></ul><h4>Nootropics and other</h4><ul><li>L-theanine</li><li>Acetyl L-Carnitine</li><li>Ashwaganda</li><li>Caffeine</li><li>Coffee</li><li>Coco Powder</li><li>Choline Bitartrate</li><li>DMAE</li><li>Phosphatidylcholine</li><li>Glucuronolactone</li><li>Melatonine — when working late</li></ul><h3>Some useful links</h3><ul><li><a href="https://web.archive.org/web/20250322234144/https://hubermanlab.com/">The Huberman Lab Podcast</a></li><li><a href="https://web.archive.org/web/20250322234144/https://peterattiamd.com/">Peter Attia</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe948de2ca3a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[My Five Home Automation Improvements By Value]]></title>
            <link>https://medium.com/@isaric/my-five-home-automation-improvements-by-value-3d1eaa03202e?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d1eaa03202e</guid>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 09:58:10 GMT</pubDate>
            <atom:updated>2026-02-23T09:58:10.848Z</atom:updated>
            <content:encoded><![CDATA[<p>I began looking into home automation about a year and a half ago. I was going to do some upgrades to my apartment. Naturally, it seemed like a good time to make it a little smarter. Here are the things I installed then which I still use today.</p><h3>1. Smart Lighting With Zigbee</h3><p>Fine control over lighting is important for every day health and comfort. It’s not just about the brightness level. The color temperature plays an important role in our functioning. It can help people feel better in winter time when there is less natural sunlight. In addition, I can modify it to a softer glow in the evening to help us prepare for sleep. Different rooms in our home will also benefit from different lighting color. To expand, <a href="https://web.archive.org/web/20251017063743/https://www.softlights.org/chapter-11-color-temperature/">here</a> is a nice text with some graphs. Finally, the Zigbee protocol is fully open and allows me to pair devices from different manufacturers using the same Zigbee dongle attached to my Raspbery Pi.</p><h3>2. Heating control with Zigbee</h3><p>My home has uses a gas powered boiler and radiators to provide heating. It used to be controlled with an analog thermostat that I would set manually. Nowadays, it’s another Zigbee device. To explain, It’s not just about remote control. It’s also about the ability to program your own heating schedule however you want it. As the system is connected to OpenHAB I can write any type of automation code I want. It can be triggered by occupancy or time of day, for example. As a bonus, Zigbee provides good security and reliability. It uses a protected frequency inside EU teritory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/0*UE9E49elwTBxguNa" /></figure><h3>3. Zigbee based senors of all sorts</h3><p>Whether it’s temperature, humidity, air quality or motion, you can find a cheap Zigbee-based solution. In combination with a system like OpenHAB or Grafana, I can visualize and reviewed the data through time. In addition, I can set up alerts if something goes wrong with the living conditions in my home. Moreover, I can optimize for cost over the long term and keep my family healthy without breaking the bank. Finally, my wife and I have resolved many arguments amicably by looking at a chart and identifying the cause of our frustration.</p><h3>4. Cameras and tablets</h3><p>Did you know how cheap WiFi capable IP cameras are today? They can go as low as 30 $ USD. I use them for multiple purposes in my home. For example, I have some on the outside for security and so I can see if my guests arriving. One is a baby monitor. Another I use to have better VOIP calls with my parents. At the same time I can prepare lunch and have a nice conversation with them. The same is true about tablets. If you don’t need a graphic design workhorse, you can find something under 200 $ USD to hang on the wall. I use mine for VOIP, as a way to talk to Google Assistant and as an OpenHAB console.</p><h3>5. OpenHAB and Raspberry Pi to bring it all together</h3><p>As I’ve mentioned above, I use <a href="https://web.archive.org/web/20251017063743/https://www.openhab.org/">OpenHAB</a> as a platform to integrate all of these components. It’s hosted on one of my Raspberry Pi servers about which I am writing in <a href="https://web.archive.org/web/20251017063743/https://blog.path-variable.com/make-your-own-data-center-with-the-raspberry-pi-pt-1/">my series on the DIY data center</a>. OpenHAB is open-source and free. Much like WordPress, it has a vibrant community of developers that provide new functionality. OpenHAB is a control center and dashboard for my smart home. It has a scripting engine which I use to ingest data from sensors and toggle appliances. In addition, I plan to connect it to external services like Google Assistant, Finally, it will graph data from any sensors conected to it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d1eaa03202e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Boot Ubuntu Server on the Raspberry Pi]]></title>
            <link>https://medium.com/@isaric/how-to-boot-ubuntu-server-on-the-raspberry-pi-b59a8bbf76b3?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/b59a8bbf76b3</guid>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Mon, 23 Feb 2026 09:58:03 GMT</pubDate>
            <atom:updated>2026-02-23T09:58:03.307Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/446/1*YhJqil_qnGW11OVfnEJ9AQ.png" /></figure><h3>Introduction</h3><p>In the previous post we kicked off this series as a DIY home data center project. This second post deals with installing an Operating System on the two Raspberry Pi. If we take a look at our shopping list from Part 1, we see two USB hard disk drives listed. I will attach each drive to a Raspberry Pi. They will host the OS and our server content. Remember, the same setup serves this very blog.</p><p>For setting up USB boot I will detail bash commands for a Linux system. You can also use Mac or Windows GUI tools to setup the Raspberry Pi. Macs can also run bash commands but there may be subtle differences in the way they function.</p><p>This post covers installing Ubuntu Server versions 20.04 and 22.04. The first part of the post deals with 20.04. This is because of a bug in that version that prevents the user from fully abandoning the SD card. It is still necessary to use it in order to serve the system partition.</p><h3>Booting from USB — version 20.04</h3><p>In the first step I will flash an SD card with an arm64 arch OS. You can use the <a href="https://web.archive.org/web/20250808144431/https://www.raspberrypi.com/news/raspberry-pi-imager-imaging-utility/">Raspi Imager</a> to accomplish the same thing over a GUI. It runs on Linux, Mac and Windows. Since the servers do not have a GUI, I opt to install Ubuntu Server 20.04. Every release version where the major number is divisible by two is a long-term release. Beware, if you use version 20.04, it has a bug in it that requires you to keep the SD card even when booting from USB.</p><p>Other choices offered that can serve our intended purpose include Raspbian. Raspbian is also a Debian-based distribution like Ubuntu. However, it comes packaged with some handy tools for interacting with the Raspberry Pi firmware. Don’t worry, all of these packages can be installed on Ubuntu via apt-get.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b59a8bbf76b3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Wireguard: A simple, powerful VPN for my Raspberry Pis]]></title>
            <link>https://medium.com/@isaric/wireguard-a-simple-powerful-vpn-for-my-raspberry-pis-79389a2b2cf4?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/79389a2b2cf4</guid>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[vpn]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[wireguard]]></category>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Sat, 21 Feb 2026 07:52:55 GMT</pubDate>
            <atom:updated>2026-02-21T07:52:55.025Z</atom:updated>
            <content:encoded><![CDATA[<p>This post talks about Virtual Private Networks. It is a common feature of cloud networking. I currently use <a href="https://web.archive.org/web/20250808133809/https://www.wireguard.com/">Wireguard</a>. It serves to connect all my Raspberry Pi machines together and with my public entry point in the cloud. In addition, I have machines scattered across multiple locations. This way I can connect securely to those locations and administer other systems there. I will briefly discuss <a href="https://web.archive.org/web/20250808133809/https://openvpn.net/">OpenVPN</a> as another FOSS alternative.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/690/1*zQAm3PBcgZwXsEs4mH4luA.png" /></figure><h3>Why Wireguard?</h3><p>Wireguard quickly won out as my choice for a VPN solution. It offers great performance on low end hardware. Second, it’s reasonably simple to set up. On the other hand, it offers only one layer of security — public/ private key cryptography bolstered by an optional pre-shared key.</p><p>Because I am the sole operator of my cloud, this is acceptable. If this was a larger company, having LDAP or Active Directory integration would make life simpler for an administrator. For example, they could add and revoke new users from a central place. Of course, There are products that extend Wireguard’s capabilities. However, there is a trade-off either in performance or control or both.</p><h4>Thank god for scripts and FOSS</h4><p>One of the easiest ways to install Wireguard is by using a nice script. Thankfully, there are many scripts on GitHub that were made public by their authors. I choose <a href="https://web.archive.org/web/20250808133809/https://github.com/angristan/wireguard-install">this one</a>. It has reasonable defaults preselected and a nice menu to walk the user through setting up Wireguard. Please support the author if you find the script useful.</p><p><strong>This post is part of a series</strong></p><p><a href="https://web.archive.org/web/20250808133809/https://blog.path-variable.com/how-to-make-your-own-raspberry-pi-data-center/">How To Make Your Own Raspberry Pi Data Center</a></p><p><a href="https://web.archive.org/web/20250808133809/https://blog.path-variable.com/make-your-own-data-center-with-the-raspberry-pi-pt-2/">How To Boot Ubuntu Server On The Raspberry Pi</a></p><p><a href="https://web.archive.org/web/20250808133809/Wireguard:%20A%20simple,%20powerful%20VPN%20for%20my%20Raspberry%20Pis">Wireguard: A simple, powerful VPN for my Raspberry Pis</a></p><p>Once the script finishes, Wireguard is installed on the server. You will also get a configuration file for a Wireguard client. If you don’t use IPv6 networking I recommend you remove all IPv6 addresses from the configuration files. It can cause your connection to fail. I also add the option “Persistent Keepalive = 25” on all clients so that the connections don’t timeout. To add additional clients you can run the script again.</p><h3>OpenVPN — a more advanced FOSS alternative</h3><p>OpenVPN is an open source product that has been around for a long time. It has been tested in production and security patches are constantly being released. The performance overhead is larger and the setup is slightly more tricky than Wireguard. However, even the free offering of OpenVPN has numerous plugins that add additional security layers and other features. Once your organisation grows to a certain size, it’s a natural choice for the next step. Also, if this happens, you will probably be able to afford some more expensive servers.</p><p>Until next time, I hope you had an interesting read.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79389a2b2cf4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Portainer: A great web interface for my lab]]></title>
            <link>https://medium.com/@isaric/portainer-a-great-web-interface-for-my-lab-52c5e70cf2d1?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/52c5e70cf2d1</guid>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[portainer]]></category>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Sat, 21 Feb 2026 07:50:58 GMT</pubDate>
            <atom:updated>2026-02-21T07:50:58.547Z</atom:updated>
            <content:encoded><![CDATA[<h3>Why Portainer? Works with Docker, Docker Swarm, Kubernetes</h3><p>My setup consists of four <a href="https://web.archive.org/web/20250808142747/https://blog.path-variable.com/how-to-make-your-own-raspberry-pi-data-center/">Raspberry Pis</a> scattered across three locations and a Cloud VM that ties them together in a <a href="https://web.archive.org/web/20250808142747/https://blog.path-variable.com/wireguard-a-simple-powerful-vpn-for-my-raspberry-pis/">Wireguard network</a>. Besides a few exceptions like MySQL, I run applications using Docker. Unfortunately, I am not a Docker master. Thankfully. <a href="https://web.archive.org/web/20250808142747/https://www.portainer.io/">Portainer</a> turned out to be a tool that would tie all of this together. In fact, it deepened my knowledge of Docker by helping me learn through an intuitive UI.</p><p>Portainer describes itself as a container management platform. It ties in to Docker sockets or Kubernetes Control Planes and brings them together in a smooth and polished user interface. In addition, the installation process is easy. After installing the Portainer UI, you can either install Portainer nodes on each of your cloud nodes or expose their container systems in another way. The UI will offer wizards that explain each of the options in an understandable way.</p><p>There are two basic variants of Portainer — CE and BE. CE or community edition is the open source, free version. It lacks some more advanced features. You can use the Business Edition under a free license on up to three nodes. It used to be five until it was cut down a short while ago. I managed to get mine before. 🙂</p><h3>Easy to secure</h3><p>One of the features that I enjoyed most was the ease with which you can connect Portiner with an OAuth provider. I use Google Workspace for my small LLC. Sure enough, there was another wizard available in the settings pages for linking with Google. This made me feel better about exposing the Portainer UI to the public internet. My workspace account is secured with 2FA and my android phone would throw out a dozen notifications in case any suspicious login activity got through. Basically, I outsourced my identity management to Google.</p><p>You can also activate automatic user provisioning. This makes onboarding new users easier as it removes the need to manually create an account on Portainer for them. As soon as a new teammate is given their google credentials, they can access Portainer as a regular user. Manual configuration is only needed in case they need admin privileges.</p><h3>Creating stacks made easy</h3><p>The graphical user interface provided through the browser makes it easy to compose software stacks and try out new stuff. Portainer integrates smoothly with the main Docker registry and can suggest interesting applications to test out. As such, it provides a great boost to my small cloud lab. I can easily gain hands on experience that helps me stand out as a contractor. In fact, I can plan out and raise a complex distributed system and see some of the pros and cons it can offer first hand.</p><p>One feature I have noticed Portainer offers that I want to try as soon as possible is the Kubernetes Cluster setup wizard. Portainer offers a visual tool for installing <a href="https://web.archive.org/web/20250808142747/https://microk8s.io/">microk8s</a> across your cluster and connecting them together. Afterwards, it plugs into the admin interface as it would with any other Kubernetes or Docker setup. One of the themes in this blog is crafting a small Pi-based “data center”. Such a feature would go a long way towards simplifying the process.</p><h3>Conclusion: A very polished admin interface</h3><p>In the end Portainer offers a single place from which you can administer your cloud. The experience is very smooth. The team behind it seems very UX (or DX) driven. The long list of wizards available for handling otherwise complex tasks makes it very friendly for beginners. Some features I have not covered that deserve at least a passing mention:</p><ul><li>Container Terminal Access</li><li>Node system administration — if enabled</li></ul><p>All in all, you should give it a test ride and see for yourselves.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=52c5e70cf2d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Make Your Own Zigbee Hub]]></title>
            <link>https://medium.com/@isaric/how-to-make-your-own-zigbee-hub-0b15bb485aea?source=rss-3c99bce42e67------2</link>
            <guid isPermaLink="false">https://medium.com/p/0b15bb485aea</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[zigbee]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[zigbee2mqtt]]></category>
            <dc:creator><![CDATA[Ivan Šarić]]></dc:creator>
            <pubDate>Wed, 31 Dec 2025 12:58:40 GMT</pubDate>
            <atom:updated>2025-12-31T12:58:40.358Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/874/1*twqKlp3TdbN0DA6FNKDqRg.png" /></figure><h3>The Zigbee standard</h3><blockquote>Zigbee is a low-power <a href="https://en.wikipedia.org/wiki/Wireless_mesh_network">wireless mesh network</a> standard targeted at battery-powered devices in wireless control and monitoring applications. Zigbee delivers low-latency communication. Zigbee chips are typically integrated with radios and with <a href="https://en.wikipedia.org/wiki/Microcontroller">microcontrollers</a>.</blockquote><blockquote><a href="https://en.wikipedia.org/wiki/Zigbee">Wikipedia</a></blockquote><p>I first learned about Zigbee when I decided to make my apartment in Zagreb smart. After an initial consultation with a professional in the field, I had my sights set on <a href="https://en.wikipedia.org/wiki/Z-Wave">Z-wave</a>. It turned out that Z-wave was not an open standard. Furthermore, the licence fee manufacturers had to pay was reflected in the final price of the product. In contrast, Zigbee is a fully open, free alternative. Finally, the low barrier to entry results in a rich and vibrant market that offered all types of smart devices.</p><p>In order to communicate with and coordinate Zigbee devices,the user needs a hub. This is a device with a Zigbee transceiver that also interfaces with the end user through some other interface, Most often this will be through a WiFi connection with the manufacturers cloud. On the other end, the user will have a mobile application from the manufacturer with which to control the Zigbee devices.</p><h3>Why make your own Zigbee hub?</h3><p>Zigbee is an open standard. However, a hub built by a certain manufacturer will almost always only be capable of connecting with devices from that same manufacturer. This is due to the limitation of the software on that hub. In essence, the manufacturer does not want to put in any additional effort. They also do not want to assume the risk of allowing other devices to interact with their ecosystem. With an open-source Zigbee hub you can connect devices from any number of different manufacturers.</p><p>The hub itself will connect to a home automation control server like OpenHab or Home Assistant. There the user creates triggers or scripts to orchestrate his or her smart home. To make my own hub, I chose to use the <a href="https://www.raspberrypi.com/products/raspberry-pi-zero-2-w/">Raspberry Pi Zero 2 W</a> single board computer and a <a href="https://neutrinomobile.hr/sonoff-zigbee-cc2531-usb-dongle.html">CC2531 USB Zigbee dongle</a>. The Pi Zero 2 comes with a 64 arch CPU and runs the lightweight Raspbian Linux distribution without a GUI.</p><h3>Use Zigbee2mqtt and Mosquitto</h3><p>In order for the Zigbee dongle to communicate with its devices and the home automation software, I use two open source projects. <a href="https://www.zigbee2mqtt.io/">Zigbee2mqtt</a> is a project written with Node.js that has drivers for the Zigbee dongle. It use a <a href="https://mosquitto.org/">Mosquitto</a> server to publish information about the Zigbee devices and relay commands to them.</p><blockquote><strong>MQTT</strong> (originally an <a href="https://en.wikipedia.org/wiki/Acronym">initialism</a> of <strong>MQ Telemetry Transport</strong><a href="https://en.wikipedia.org/wiki/MQTT#cite_note-4">[a]</a>) is a lightweight, <a href="https://en.wikipedia.org/wiki/Publish%E2%80%93subscribe_pattern">publish-subscribe</a>, <a href="https://en.wikipedia.org/wiki/Machine_to_machine">machine to machine</a> network <a href="https://en.wikipedia.org/wiki/Communication_protocol">protocol</a> for <a href="https://en.wikipedia.org/wiki/Message_queue">message queue</a>/<a href="https://en.wikipedia.org/wiki/Message_queuing_service">message queuing service</a>. It is designed for connections with remote locations that have devices with resource constraints or limited network <a href="https://en.wikipedia.org/wiki/Bandwidth_(computing)">bandwidth</a>. It must run over a transport protocol that provides ordered, <a href="https://en.wikipedia.org/wiki/Lossless_compression">lossless</a>, bi-directional connections — typically, <a href="https://en.wikipedia.org/wiki/TCP/IP">TCP/IP</a>.<a href="https://en.wikipedia.org/wiki/MQTT#cite_note-mqtt5_spec-1">[1]</a> It is an open <a href="https://en.wikipedia.org/wiki/OASIS_(organization)">OASIS</a> standard and an <a href="https://en.wikipedia.org/wiki/International_Organization_for_Standardization">ISO</a> recommendation (ISO/IEC 20922).</blockquote><blockquote><a href="https://en.wikipedia.org/wiki/MQTT">Wikipedia</a></blockquote><h3>Flashing the Zero 2</h3><p>The Pi Zero 2 uses an SD card like other computers from the series. I decided to use the same Imager program I used for flashing the Raspberry Pi 4B in my <a href="https://blog.path-variable.com/how-to-make-your-own-raspberry-pi-data-center/">series on home data centers</a>. Instead of Ubuntu Server, I chose the 64-bit Raspbian Light distribution. In addition, I used the advanced configuration options to set my own default user, copy my SSH public key and block password authentication to the server. I also set the WiFi SSID and password for connection. This way the Zero 2 is already connected and its security hardened when it comes online.</p><p>Mosquitto come packaged with the Raspbian apt-get package manager. Simply run the command and the program will be installed. The situation with zigbee2mqtt is a little more complex. The standard recommendation from the project developer is to use a docker image. Since the Zero 2 has very low-end hardware specs, I did not want to even attempt a Docker installation. Thankfully, the project website offers instruction for compiling the application from source. Simply follow the steps. The Zero 2 is capable of running all the compilation dependencies.</p><h3>Configure for remote access</h3><p>As a final note, the Mosquitto server needs to be configured to allow access from the external network. Please check the project documentation. I needed to add a single line to a configuration file. After that my OpenHab instance could connect to Mosquitto and perform pub/sub operations.</p><p><em>Originally published at </em><a href="https://blog.path-variable.com/how-to-make-your-own-zigbee-hub/"><em>https://blog.path-variable.com/how-to-make-your-own-zigbee-hub/</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0b15bb485aea" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>