<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="../assets/xml/rss.xsl" media="all"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Aigarius Blog (Posts about debian)</title><link>http://aigarius.com/</link><description></description><atom:link href="http://aigarius.com/categories/debian.xml" rel="self" type="application/rss+xml"></atom:link><language>en</language><copyright>Contents © 2025 &lt;a href="mailto:aigarius@gmail.com"&gt;Aigars Mahinovs&lt;/a&gt; </copyright><lastBuildDate>Mon, 04 Aug 2025 20:45:24 GMT</lastBuildDate><generator>Nikola (getnikola.com)</generator><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>Snapshot mirroring in Debian (and Ubuntu)</title><link>http://aigarius.com/blog/2025/08/04/snapshot-mirrors/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;h2&gt;Snapshot mirroring in Debian (and Ubuntu)&lt;/h2&gt;
&lt;p&gt;The use of snapshots has been routine in both &lt;a href="http://snapshot.debian.org"&gt;Debian&lt;/a&gt; and &lt;a href="http://snapshot.ubuntu.com"&gt;Ubuntu&lt;/a&gt; for several years now—or more than 15 years for Debian, to be precise. Snapshots have become not only very reliable, but also an increasingly important part of the Debian package archive.&lt;/p&gt;
&lt;p&gt;This week, I encountered a problem at work that could be perfectly solved by correctly using the Snapshot service. However, while trying to figure it out, I ran into some shortcomings in the documentation. Until the docs are updated, I am publishing this blog post to make this information easier to find.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problem 1:&lt;/strong&gt; Ensure fully reproducible creation of Docker containers with the &lt;em&gt;exact&lt;/em&gt; same packages installed, even &lt;em&gt;years&lt;/em&gt; after the original images were generated.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution 1:&lt;/strong&gt; Pin &lt;em&gt;everything&lt;/em&gt;! Use a pinned source image in the &lt;code&gt;FROM&lt;/code&gt; statement, such as &lt;code&gt;debian:trixie-20250721-slim&lt;/code&gt;, and also pin the APT package sources to the "same" date - "20250722".&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Hint:&lt;/em&gt; The APT packages need to be &lt;em&gt;newer&lt;/em&gt; than the Docker image base. If the APT packages are a bit newer, that's not a problem, as APT can upgrade packages without issues. However, if your Docker image has a newer package than your APT package sources, you will have a &lt;em&gt;big&lt;/em&gt; problem. For example, if you have "libbearssl0" version 0.6-2 installed in the Docker image, but your package sources only have the older version 0.6-1, you will fail when trying to install the "libbearssl-dev" package. This is because you only have version 0.6-1 of the "-dev" package available, which hard-depends on &lt;em&gt;exactly&lt;/em&gt; version 0.6-1 of "libbearssl0", and APT will refuse to downgrade an already installed package to satisfy that dependency.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Problem 2:&lt;/strong&gt; You are using a &lt;em&gt;lot&lt;/em&gt; of images in a &lt;em&gt;lot&lt;/em&gt; of executions and building tens of thousands of images per day. It would be a bad idea to put all this load on public Debian servers. Using local sources is also faster and adds extra security.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution 2:&lt;/strong&gt; Use local (transparently caching) mirrors for both the Docker Hub repository and the APT package source.&lt;/p&gt;
&lt;p&gt;At this point, I ran into another issue—I could not easily figure out how to specify a local mirror for the &lt;em&gt;snapshot&lt;/em&gt; part of the archive service.&lt;/p&gt;
&lt;p&gt;First of all, snapshot support in both Ubuntu and Debian accepts both syntaxes described in the Debian and Ubuntu documentation above. The documentation on both sites presents different approaches and syntax examples, but both work.&lt;/p&gt;
&lt;p&gt;The best approach nowadays is to use the "deb822" sources syntax. Remove /etc/apt/sources.list (if it still exists), delete all contents of the /etc/apt/sources.list.d directory, and instead create this file at /etc/apt/sources.list.d/debian.sources:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;Types: deb
URIs: https://common.mirror-proxy.local/ftp.debian.org/debian/
Suites: trixie
Components: main non-free-firmware non-free contrib
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
Snapshot: 20250722
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Hint: This assumes you have a mirror service running at common.mirror-proxy.local that proxies requests (with caching) to whitelisted domains, based on the name of the first folder in the path.&lt;/p&gt;
&lt;p&gt;If you now run &lt;code&gt;sudo apt update --print-uris&lt;/code&gt;, you will see that your configuration accesses your mirror, but does not actually use the snapshot.&lt;/p&gt;
&lt;p&gt;Next, add the following to /etc/apt/apt.conf.d/80snapshots:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;APT::Snapshot "20250722";
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That should work, right? Let's try &lt;code&gt;sudo apt update --print-uris&lt;/code&gt; again. I've got good news and bad news! The good news is that we are now actually using the snapshot we specified (twice). The bad news is that we are completely ignoring the mirror and going directly to snapshots.debian.org instead.&lt;/p&gt;
&lt;p&gt;Finding the right information was a bit of a challenge, but after a few tries, this worked: to specify a custom local mirror of the Debian (or Ubuntu) snapshot service, simply add the following line to the same file, /etc/apt/apt.conf.d/80snapshots:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;Acquire::Snapshots::URI::Override::Origin::debian "https://common.mirror-proxy.local/snapshot.debian.org/archive/debian/@SNAPSHOTID@/";
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;Now, if you check again with &lt;code&gt;sudo apt update --print-uris&lt;/code&gt;, you will see that the requests go to your mirror &lt;em&gt;and&lt;/em&gt; include the specified snapshot identifier. Success!&lt;/p&gt;
&lt;p&gt;Now you can install any packages you want, and everything will be completely local and fully reproducible, even years later!&lt;/p&gt;</description><category>blog</category><category>debian</category><category>Debian-planet</category><category>photo</category><category>travel</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2025/08/04/snapshot-mirrors/</guid><pubDate>Mon, 04 Aug 2025 18:00:00 GMT</pubDate></item><item><title>Debconf 25 photos</title><link>http://aigarius.com/blog/2025/08/03/debconf25-photos/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;h2&gt;Debconf 25 photos&lt;/h2&gt;
&lt;p&gt;&lt;a href="https://debconf25.debconf.org/"&gt;Debconf 25&lt;/a&gt; came to the end in Brest, France this year a couple weeks ago.&lt;/p&gt;
&lt;p&gt;This has been a very different and unusually interesting Debconf. For me it was for two, related reasons: for one the conference
was close enough in Western Europe that I could simply drive there with a car (which reminds me that I should make a blog post
about the BMW i5, before I am done with it at the end of this year) and for the other - the conference is close enough to Western
Europe that many other Debian developers could join this year who have not been seen at the event for many years. Being able to arrive early, decompress and spend extra time looking around the place made the event itself even more enjoyable than usual.&lt;/p&gt;
&lt;p&gt;The French cuisine, especially in its Breton expression, has been a very welcome treat. Even if there were some rough patches
with the food selection, amount, or waiting, it was still a great experience.&lt;/p&gt;
&lt;p&gt;I specifically want to say a big thank you to the
organisers for everything, but &lt;em&gt;very explicitly&lt;/em&gt; for planning all the talk/BOF rooms in the same building and almost on the same
floor. It saved me a lot of footwork, but also for other participants the short walks between the talks made it possible to always
have a few minutes to talk to people or grab a croissant before running to the next talk.&lt;/p&gt;
&lt;p&gt;IMHO we should come back to a tradition of organising Debconf in Europe every 2-3 years. This maximises one of the main goals of
Debconf - bringing as many Debian Developers as possible together in one physical location. This works best when the location is
actually close to large concentrations of existing developers. In other years, the other goal of Debconf can then take priority -
recruiting new developers in new locations. However, these goals &lt;em&gt;could&lt;/em&gt; both be achieved at the same time - there are plenty of
locations in Europe and even in Western Europe that still have good potential for attracting new developers. Especially if we focus
on organising the event on the campuses of some larger technically-oriented universities.&lt;/p&gt;
&lt;p&gt;This year was also very productive for me—a lot of conversations with various people about all kinds of topics, especially technical packaging questions. It has been a long time since the very basic foundations of Debian packaging work have been so fundamentally refactored and modernized as in the past year. Tag2upload has become a catalyst for git-based packaging and for automated workflows via Salsa, and all of that feeds back into focusing on a few best-supported packaging workflows. There is still a bit of a documentation gap
of a new contributor getting to these modern packaging workflows from the point where the New Maintainers Guide stops.&lt;/p&gt;
&lt;p&gt;In any case, next year Debconf will be happening in Santa Fe, Argentina. And the year after that it is all still open and in
a close &lt;a href="https://meetings-archive.debian.net/pub/debian-meetings/2025/DebConf25/debconf25-203-debconf-27-in-your-city.av1.webm"&gt;competition&lt;/a&gt;
between Japan, Spain, Portugal, Brazil and .. El Salvador? Personally, I would love to travel to Japan (again), but Spain or
Portugal would also be great locations to meet more European developers again.&lt;/p&gt;
&lt;p&gt;As for Santa Fe ... it is quite likely that I will not be able to make it there next year, for (planned) health reasons. I guess
I should also write a new blog post about what it means to be a Debconf Photographer, so that someone else could do this as well,
and also reduce the "bus factor" along the way.&lt;/p&gt;
&lt;p&gt;But before that - here is the main group photo from this year:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf25/-/blob/main/photos/aigarius/group/debconf25_group.jpg?ref_type=heads"&gt;&lt;img alt="DebConf 25 Group photo" src="https://salsa.debian.org/debconf-team/public/share/debconf25/-/raw/main/photos/aigarius/group/debconf25_group_tiny.jpg?inline=false"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also see it on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://photos.app.goo.gl/iV2JAGcWT2pzePqP7"&gt;Google Photos&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can also enjoy the rest of the photos:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf25/-/tree/main/photos/aigarius/sel?ref_type=heads"&gt;on git-lfs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://photos.app.goo.gl/zF1romToBgXpHKr77"&gt;on Google Photos&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Additionally, check out photos from other people on GIT LFS and consider adding your own photos there as well.&lt;/p&gt;
&lt;p&gt;Other places I have updated with up-to-date information are these wiki pages:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://wiki.debian.org/DebConf/GroupPhotoAll"&gt;All Debconf Group Photos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://wiki.debian.org/DebConf/25/Photos"&gt;All photos from Debconf25&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If you took part in the &lt;a href="https://wiki.debian.org/AndySimpkins/DC_PlayingCards2025"&gt;playing cards event&lt;/a&gt;, then check your
photo in &lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf25/-/tree/main/photos/aigarius/cards?ref_type=heads"&gt;this folder&lt;/a&gt;
and link to your favourite from your line in the playing card wiki&lt;/p&gt;</description><category>blog</category><category>debian</category><category>Debian-planet</category><category>photo</category><category>travel</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2025/08/03/debconf25-photos/</guid><pubDate>Sun, 03 Aug 2025 15:00:00 GMT</pubDate></item><item><title>Debconf 24 photos</title><link>http://aigarius.com/blog/2024/08/02/debconf24-photos/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;&lt;a href="https://debconf24.debconf.org/"&gt;Debconf 24&lt;/a&gt; is coming to a close in Busan, South Korea this year.&lt;/p&gt;
&lt;p&gt;I thought that last year in India was hot. This year somehow managed to beat that. With 35C and high
humidity the 55 km that I managed to walk between the two conference buildings have really put the
pressure on. Thankfully the air conditioning in the talk rooms has been great and fresh water has been
plentiful. And the korean food has been excellent and very energetic.&lt;/p&gt;
&lt;p&gt;Today I will share with you the main group photo:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://salsa.debian.org/debconf-team/public/share/debconf24/-/raw/main/photos/aigarius/group/debconf24_group.jpg?inline=false" alt="DebConf 24 Group photo" width="1064" height="734"&gt;&lt;/p&gt;
&lt;p&gt;You can also see it in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://photos.google.com/share/AF1QipNWCTYCaSDyKioIJR1eolSpSF1RnPg55P61-ue_BV6A3ZGjitqXn2lQAhMEnsFrdQ/photo/AF1QipP7ljh6rqfuiaMY8_RCtecY1oQFaE_TMUIkNNE3?key=a3BNZG5OaW82Q2tKSzVCY3R5ZHlWTFlOUTczN2dR"&gt;on Google Photos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf24/-/blob/main/photos/aigarius/group/debconf24_group.jpg"&gt;on git-lfs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The rest of my photos from the event will be published next week. That will give me a bit more time to process
them correctly and also give all of you a chance to see these pictures with fresh eyes and stir up new memories from
the event.&lt;/p&gt;</description><category>blog</category><category>debian</category><category>Debian-planet</category><category>photo</category><category>travel</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2024/08/02/debconf24-photos/</guid><pubDate>Fri, 02 Aug 2024 09:00:00 GMT</pubDate></item><item><title>Debconf 23 photos all</title><link>http://aigarius.com/blog/2023/10/02/debconf23-photos/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;Two weeks have passed since &lt;a href="https://debconf23.debconf.org/"&gt;Debconf 23&lt;/a&gt; came to a close in Kochi, Kerala, India this year.&lt;/p&gt;
&lt;p&gt;In keeping with the more relaxed nature of Debconf in India, the rest of my photos from the event were to
be published about two weeks from the end of the event. That will give me a bit more time to process them
correctly and also give all of you a chance to see these pictures with fresh eyes and stir up new
memories from the event.&lt;/p&gt;
&lt;p&gt;In the end we are looking at 653 photos and one video. Several different group photos, including a return
of the pool group photo that was missing from the event since Mexico in 2006! This year was the first for
a new camera (Canon R7) and I am quite happy with the results, even if I still need to learn a lot about
this new beast. Also the gradual improvements of panorama stiching software (Hugin) ment that this year
I did not need to manually correct any face-melt events on any of the group photos. So that is cool!&lt;/p&gt;
&lt;p&gt;&lt;img src="https://salsa.debian.org/debconf-team/public/share/debconf23/-/raw/main/photos/aigarius/IMG_3884_debian.jpg?inline=false" alt="DebConf 23 pool Group photo" width="1064" height="709"&gt;&lt;/p&gt;
&lt;p&gt;You can find all my photos on:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://photos.app.goo.gl/UW6zPQLNctsmkFHM9"&gt;Google Photos album&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf23/-/tree/main/photos/aigarius"&gt;Debconf23 git-lfs share&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Also, don't forget to explore the rest of the Git LFS share content - there are very many great photos
by others this year as well!&lt;/p&gt;</description><category>blog</category><category>debian</category><category>Debian-planet</category><category>photo</category><category>travel</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2023/10/02/debconf23-photos/</guid><pubDate>Mon, 02 Oct 2023 08:00:00 GMT</pubDate></item><item><title>Debconf 23 photos</title><link>http://aigarius.com/blog/2023/09/17/debconf23-photos/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;&lt;a href="https://debconf23.debconf.org/"&gt;Debconf 23&lt;/a&gt; is coming to a close in Kochi, Kerala, India this year.&lt;/p&gt;
&lt;p&gt;And it has been my pleasure to again be here and take lots of pictures of the
event and of the surroundings. In total I took 1852 photos and walked just over 50 km between the
two venue buildings and all the rooms where action happened.&lt;/p&gt;
&lt;p&gt;Today I will share with you the main group photo:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://salsa.debian.org/debconf-team/public/share/debconf23/-/raw/main/photos/aigarius/group/debconf23_group.jpg?inline=false" alt="DebConf 23 Group photo" width="1064" height="497"&gt;&lt;/p&gt;
&lt;p&gt;You can also see it in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://photos.app.goo.gl/H3jegjtk7ckRYxvP9"&gt;on Google Photos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf23/-/blob/main/photos/aigarius/group/debconf23_group.jpg"&gt;on git-lfs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In keeping with the more relaxed nature of Debconf in India, the rest of my photos from the event will
be published in about two weeks from now. That will give me a bit more time to process them correctly
and also give all of you a chance to see these pictures with fresh eyes and stir up new memories from
the event.&lt;/p&gt;</description><category>blog</category><category>debian</category><category>Debian-planet</category><category>photo</category><category>travel</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2023/09/17/debconf23-photos/</guid><pubDate>Sun, 17 Sep 2023 12:00:00 GMT</pubDate></item><item><title>Smart Shelly with Home Assistant</title><link>http://aigarius.com/blog/2023/04/13/smart-shelly-with-ha/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;I am looking to improve my smart home installation as I plan to move to a new appartment. I already 
have a well functioning &lt;a href="https://www.home-assistant.io/"&gt;Home Assistant&lt;/a&gt; installation with a ton of
automations (like lights that automatically come on when light level outside drops, that dim when 
it is time to go to sleep, robot vaccum that runs when everyone is away and also automation that lets
us know when CO2 levels are too high and we should ventilate). We have colorful smart lights that can
be dimmed or can change colors as the mood strikes.&lt;/p&gt;
&lt;p&gt;However, one big problem that my setup
currently has is that physical light switches on the walls can not be used to control the lights (as 
in - if the wall switch turns the light off, there is no way to turn it back on via Home Assistant)
and if the Home Assistant goes down (which does sometimes happen, usually when I am away for a longer 
time) then it is really hard to control the lights without it.&lt;/p&gt;
&lt;p&gt;So I've been searching for a holy grail: combination of smart (or smartified) light switches on the walls
and smart light bulbs (with colors and dimming) that works with automations when Home Assistant is online
&lt;em&gt;and&lt;/em&gt; also just works directly to power lights on and off when Home Assistant is offline.&lt;/p&gt;
&lt;p&gt;And I think I have found a solution that will be acceptable for me. The solution involves taking a normal
dumb light installation, putting in smart light bulbs (any that Home Assistant can manage) and then wiring
in a &lt;a href="https://www.shelly.cloud/en-de/products/product-overview/shelly-plus-1"&gt;Shelly&lt;/a&gt; next to an existing
dumb wall switch. For design consistency sake it would be good if the wall switch is of impulse type (so only
connecting the connectors when the button is being pressed, like a doorbell button), but the setup should also
work for normal toggle wall switches with minimal changes. Some settings on the Shelly and a custom 
&lt;a href="https://shelly-api-docs.shelly.cloud/gen2/Scripts/Tutorial"&gt;Shelly script&lt;/a&gt; will take care of offline functionality.
Note: Gen1 Shelly devices do not have scripting capabilities, you need a Gen2 device to do this, like the linked
Shelly Plus.&lt;/p&gt;
&lt;p&gt;So first I created a test setup to validate my design. I took an old extension cable with a damaged wire, cut 
out the damaged part and split up the wiring to make my test setup. It was really convinient to use the right
tools - a simple &lt;a href="https://www.amazon.de/-/en/dp/B0017MRD7I"&gt;cable stripper&lt;/a&gt;, a 
precise &lt;a href="https://www.amazon.de/-/en/dp/B002BDNL4Q"&gt;wire stripper&lt;/a&gt; and 
&lt;a href="https://www.amazon.de/-/en/dp/B00JB3U9CG"&gt;best wire connectors&lt;/a&gt;. Using the right tools it was really easy, fast
and also safe to just pull insulation from the cable, split up the wires, clean off &lt;em&gt;exactly&lt;/em&gt; 10mm off the end 
of each wire and push them into the Wago connectors to connect them together.&lt;/p&gt;
&lt;p&gt;The &lt;a href="http://aigarius.com/blog/2023/04/13/smart-shelly-with-ha/shelly_test.jpg"&gt;completed test setup&lt;/a&gt; is a bit janky, but it works and is electrically safe (at least 
for testing purposes). The wiring is pretty clear from &lt;a href="https://kb.shelly.cloud/knowledge-base/shelly-plus-1"&gt;Shelly documentation&lt;/a&gt; (which is also just printed on the 
front of the device itself). The only point of clarification is that on the output side the Shelly is a &lt;em&gt;relay&lt;/em&gt;
and not a power provider, which means that when connecting Shelly to the wires going towards your lights it is 
&lt;em&gt;not&lt;/em&gt; enough to just wire Shelly output one to lights live wire and Shelly output zero to lights neutral wire.
Instead you need to connect you input neutral wire directly to your lights neutral (same as input ground) and
then wire the input live wire &lt;em&gt;trough&lt;/em&gt; the Shelly output contacts (so input live to Shelly output zero and Shelly
output one to lights live wire). Except if you but a Shelly Plus 1PM, which has to measure power consumption and
thus &lt;em&gt;has to&lt;/em&gt; pass the whole device current trough itself to properly measure it.&lt;/p&gt;
&lt;p&gt;When that is done, tested and plugged in you can use &lt;a href="https://www.shelly.cloud/en-de/shelly-smart-control"&gt;Shelly app&lt;/a&gt;
to connect to your new Shelly device and make it join your WiFi network (or you can just use a laptop or a phone 
to joint to the Shelly ad-hoc WiFi network and configure it via its &lt;a href="https://kb.shelly.cloud/knowledge-base/shelly-plus-1-web-interface-guide"&gt;build-in web UI&lt;/a&gt;). When the Shelly is in your network you can continue to configure via
the Web UI and Home Assistant.&lt;/p&gt;
&lt;p&gt;Add the Shelly to your Home Assistant installation (it will automatically detect a new Shelly device and promt to
enable Shelly integration once the device shows up in the local WiFi network). Add an automation to toggle the light
state of the connected smart bulb(s) (Service: Light toggle) when "First button button down" event triggers on 
the Shelly. This will be the way the light state is going to be controlled normally. It can also be useful to add an 
automation that runs on Home Assistant start-up to ask all Shelly devices to turn outputs to on, so that after 
recovery of Home Assistant after an outage you can &lt;/p&gt;
&lt;p&gt;In the Shelly web UI (after updating firmware, as usual) you'd want to &lt;em&gt;disconnect&lt;/em&gt; output from input, set input 
type to button (assuming you have an impulse button input, like I do) and configure the output to be powered on
by default when power comes back. And then you'll want to add &lt;a href="https://gist.github.com/aigarius/4d89a025fa72e0e890efe6736b7670ca"&gt;this script&lt;/a&gt; to your Shelly. You will want to adjust the URL to your Home Assistant instance there. This
script monitors if the Home Assistant is alive or not and if the Home Assistant is not alive, then take the matters
into its own hands and power off and on the lights directly.&lt;/p&gt;
&lt;p&gt;I am sure there are many ways this can be improved and tweaked. I like the flexibility this approach gives - I can
cleanly program behaviour in Home Assistant and also directly on the Shelly switches (without even having to flash
any custom firmware). This particular way is also quite scalable - if I have 10 Shelly switches in my home I can have
exactly the same script and settings on all of them - the link between the switch and the light(s) is done via 
physical wiring and via automation settings in Home Assistant. The Shelly does not have to know what smart lights (or
other devices) are connected to it and how they are supposed to be controlled.&lt;/p&gt;
&lt;p&gt;If you are using MQTT with Home Assistant, then Shelly can also speak directly to MQTT instead and the online check
becomes much more trivial because the &lt;a href="https://shelly-api-docs.shelly.cloud/gen2/Scripts/ShellyScriptLanguageFeatures#mqtt-support"&gt;MQTT object&lt;/a&gt;
in the Shelly Script API has isConnected property.&lt;/p&gt;</description><category>debian</category><category>Debian-planet</category><category>hardware</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2023/04/13/smart-shelly-with-ha/</guid><pubDate>Thu, 13 Apr 2023 11:30:50 GMT</pubDate></item><item><title>Securing your blog - fast and easy</title><link>http://aigarius.com/blog/2022/10/20/securing-your-blog-fast-and-easy/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;After the last couple of posts a few people asked me why my blog site is still HTTP-only? Why did I not
secure my page and contribute my little bit to normalizing encrypted traffic on the Internet and all
that good jazz?&lt;/p&gt;
&lt;p&gt;And the answer was - I was lazy and thought that it was complicated.&lt;/p&gt;
&lt;p&gt;I could not have been more wrong :D However the key here is &lt;em&gt;not&lt;/em&gt; to follow the &lt;em&gt;official&lt;/em&gt; guides.
In fact doing things the &lt;em&gt;Debian way&lt;/em&gt; turned out to be far simpler and straight forward.&lt;/p&gt;
&lt;p&gt;If you want to get a free SSL certificate and setup your site correctly, you will likely eventually
get to &lt;a href="https://certbot.eff.org/instructions"&gt;this page&lt;/a&gt; and it will then you instrct you to install
snap and pull a snap package of certbot. Well, no. I will not be doing that, thank you very much.
I have a perfectly functional Debian packaing system right here and I do not want to pollute my system
with multiple package managers and updaters. No snap, no flatpack. I am fine with Docker because those
are containers, they are &lt;em&gt;not&lt;/em&gt; in my system, they run in separated systems above my system.&lt;/p&gt;
&lt;p&gt;Turns out all of that was way more complicated than necessary, anyway.&lt;/p&gt;
&lt;p&gt;Debian Buster contains a perfectly functional package of certbot and it is fully integrated too!&lt;/p&gt;
&lt;p&gt;All I had at the start was my domain configured on HTTP in nginx.&lt;/p&gt;
&lt;p&gt;All I did was:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;# apt install certbot python3-certbot-nginx
# certbot run
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;It asked me a few questions about me, which domain to work on (of the configured nginx domains that it 
automatically found) and then just automagically got the certificates, deployed them and configured nginx 
to enable HTTPS using those new certificates. As an extra it also asked me if I wanted to redirect all 
HTTP traffic to HTTPS and that was it. I was done. No extra steps, no config files edited, no complex 
command lines and no extra package managers installed on my system.&lt;/p&gt;
&lt;p&gt;10/10 would recommend!&lt;/p&gt;
&lt;p&gt;Edit: it looks like the certbot handled the "aigarius.com" domain perfectly, &lt;em&gt;but&lt;/em&gt; missed the redirects 
from "www.aigarius.com", so I'd have to fix those up manually by just copying the directive that certbot
added to nginx config file for "aigarius.com" and editing the domain name.&lt;/p&gt;</description><category>blog</category><category>debian</category><category>Debian-planet</category><category>software</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2022/10/20/securing-your-blog-fast-and-easy/</guid><pubDate>Thu, 20 Oct 2022 20:04:50 GMT</pubDate></item><item><title>Ryzen 7000 amdgpu boot hang</title><link>http://aigarius.com/blog/2022/10/16/ryzen-7000-amdgpu/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;So you decided to build a brand new system using all the latest and coolest tech, so you buy a Ryzen 7000 series
Zen 4 CPU, like the Ryzen 7700X that I picked, with a new mother board and DDR5 memory and all that jazz. But for
now, you don't yet have a fitting GPU for that system (as the new ones will only come out in November), so you are
booting a Debian system using the new build-in video card of the new CPUs (Zen 4 generation has a simple AMD GPU
build-in into every CPU now - great stuff for debugging and mostly-headless systems) and you get ... nothing on 
the screen. Hmm. You boot into the rescue mode and the kernel message stop after:&lt;/p&gt;
&lt;div class="code"&gt;&lt;pre class="code literal-block"&gt;&lt;span class="nv"&gt;Oct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;:&lt;span class="mi"&gt;31&lt;/span&gt;:&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;home&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;kernel&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;.&lt;span class="mi"&gt;128328&lt;/span&gt;]&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;amdgpu&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Ignoring&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;ACPI&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CRAT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;on&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="nv"&gt;APU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;system&lt;/span&gt;
&lt;span class="nv"&gt;Oct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;:&lt;span class="mi"&gt;31&lt;/span&gt;:&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;home&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;kernel&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;.&lt;span class="mi"&gt;128329&lt;/span&gt;]&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;amdgpu&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Virtual&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CRAT&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;table&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;created&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CPU&lt;/span&gt;
&lt;span class="nv"&gt;Oct&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;13&lt;/span&gt;:&lt;span class="mi"&gt;31&lt;/span&gt;:&lt;span class="mi"&gt;25&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;home&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;kernel&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;[&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="mi"&gt;4&lt;/span&gt;.&lt;span class="mi"&gt;128332&lt;/span&gt;]&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;amdgpu&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Topology&lt;/span&gt;:&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;Add&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;CPU&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;node&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;That looks bad, right?&lt;/p&gt;
&lt;p&gt;Well, if you either ssh into the machine or reboot with &lt;code&gt;module_blacklist=amdgpu&lt;/code&gt; in the kernel command line you will 
find in &lt;code&gt;/var/log/kern.log.1&lt;/code&gt; those messages and also the following messages that will clarify the situation a bit:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Oct 16 13:31:25 home kernel: [    4.129352] amdgpu 0000:10:00.0: firmware: failed to load amdgpu/psp_13_0_5_toc.bin (-2)
Oct 16 13:31:25 home kernel: [    4.129354] firmware_class: See https://wiki.debian.org/Firmware for information about missing firmware
Oct 16 13:31:25 home kernel: [    4.129358] amdgpu 0000:10:00.0: firmware: failed to load amdgpu/psp_13_0_5_toc.bin (-2)
Oct 16 13:31:25 home kernel: [    4.129359] amdgpu 0000:10:00.0: Direct firmware load for amdgpu/psp_13_0_5_toc.bin failed with error -2
Oct 16 13:31:25 home kernel: [    4.129360] amdgpu 0000:10:00.0: amdgpu: fail to request/validate toc microcode
Oct 16 13:31:25 home kernel: [    4.129361] [drm:psp_sw_init [amdgpu]] *ERROR* Failed to load psp firmware!
Oct 16 13:31:25 home kernel: [    4.129432] [drm:amdgpu_device_init.cold [amdgpu]] *ERROR* sw_init of IP block &amp;lt;psp&amp;gt; failed -2
Oct 16 13:31:25 home kernel: [    4.129525] amdgpu 0000:10:00.0: amdgpu: amdgpu_device_ip_init failed
Oct 16 13:31:25 home kernel: [    4.129526] amdgpu 0000:10:00.0: amdgpu: Fatal error during GPU init
Oct 16 13:31:25 home kernel: [    4.129527] amdgpu 0000:10:00.0: amdgpu: amdgpu: finishing device.
Oct 16 13:31:25 home kernel: [    4.129633] amdgpu: probe of 0000:10:00.0 failed with error -2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So what you need is to get a new set of &lt;a href="https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"&gt;Linux Kernel Firmware blobs&lt;/a&gt; and upack that in &lt;code&gt;/lib/firmware&lt;/code&gt;. 
The tarball from 2022-10-12 worked well for me.&lt;/p&gt;
&lt;p&gt;After that you also need to re-create the initramfs with &lt;code&gt;update-initramfs -k all -c&lt;/code&gt; to include the new firmware. 
Having kernel version 5.18 or newer is also required for stable Zen 4 support. It might be that a fresh Mesa version
is also of importance, but as I am running sid on this machine I can only say that Mesa 22.2.1 that is in sid works fine.&lt;/p&gt;</description><category>debian</category><category>Debian-planet</category><category>hardware</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2022/10/16/ryzen-7000-amdgpu/</guid><pubDate>Sun, 16 Oct 2022 14:15:13 GMT</pubDate></item><item><title>Debconf 22 photos</title><link>http://aigarius.com/blog/2022/07/22/debconf22-photos/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;Finally after a long break, the in-person Debconf is a thing again, this time
&lt;a href="https://debconf22.debconf.org/"&gt;Debconf 22&lt;/a&gt; is happening in Prizren, Kosovo.&lt;/p&gt;
&lt;p&gt;And it has been my pleasure to again be here and take lots of pictures of the
event and of the surroundings.&lt;/p&gt;
&lt;p&gt;The photos can be found in &lt;a href="https://photos.app.goo.gl/TWc6rz1NCDQQAUuPA"&gt;this Google Photo shared album&lt;/a&gt; and also on
&lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf22/-/tree/main/photos/aigarius_photos"&gt;this git-lfs share&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;But the main photographic delight, as always is the DebConf 22 Group Photo.
And here it is!!!&lt;/p&gt;
&lt;p&gt;&lt;img src="https://salsa.debian.org/debconf-team/public/share/debconf22/-/raw/main/photos/aigarius_photos/debconf23_group_photo_small.jpg?inline=false" alt="DebConf 22 Group photo small" width="1064" height="898"&gt;&lt;/p&gt;
&lt;p&gt;You can also see it in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://photos.app.goo.gl/pvi2T9KmcxzD2PGQ9"&gt;on Google Photos&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf22/-/blob/main/photos/aigarius_photos/debconf23_group_photo.jpg"&gt;on git-lfs&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</description><category>blog</category><category>debian</category><category>Debian-planet</category><category>photo</category><category>travel</category><category>Ubuntu.lv-planet</category><guid>http://aigarius.com/blog/2022/07/22/debconf22-photos/</guid><pubDate>Fri, 22 Jul 2022 13:54:13 GMT</pubDate></item><item><title>Debconf 19 photos</title><link>http://aigarius.com/blog/2019/07/23/debconf-19-photos/</link><dc:creator>Aigars Mahinovs</dc:creator><description>&lt;p&gt;The main feed for my photos from Debconf 19 in Curitiba, Brazil is currently in my &lt;a href="https://photos.app.goo.gl/ga1RmpCuTQVEem5e6"&gt;GPhoto&lt;/a&gt; album. I will later also sync it to Debconf git share.&lt;/p&gt;
&lt;p&gt;The first batch is up, but now the hardest part comes - the group photo will be happening a bit later today :)&lt;/p&gt;
&lt;p&gt;Update: the group photo is ready! The smaller version is in the GPhoto album, but full version is linked from &lt;a href="https://wiki.debian.org/DebConf/19/Photos"&gt;DebConf/19/Photos&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Update 2: The day trip phtos are up and also the photos are in &lt;a href="https://salsa.debian.org/debconf-team/public/share/debconf19/tree/master/photos/aigarius/"&gt;Debconf Git LFS share&lt;/a&gt;.&lt;/p&gt;</description><category>debian</category><category>Debian-planet</category><category>event</category><category>photo</category><category>travel</category><guid>http://aigarius.com/blog/2019/07/23/debconf-19-photos/</guid><pubDate>Tue, 23 Jul 2019 17:07:42 GMT</pubDate></item></channel></rss>