erdelynet.com - Technicalhttps://erdelynet.com/2022-12-22T13:35:00-05:00My Favorite Smart Home Automations2022-12-22T13:35:00-05:002022-12-22T13:35:00-05:00Mike Erdelytag:erdelynet.com,2022-12-22:/technical/favorite-automations.html<p><img alt="Home Assistant" class="left" src="https://erdelynet.com/images/home_assistant.png"/>
As I wrote in <a href="https://erdelynet.com/technical/my-story.html">my Home Automation Story post</a>,
I use Home Assistant to automate my Smart Home.</p>
<p>I've done the usual things like installing smart light switches and outlets and
have certain lights come on and go off at set times. The easy stuff.</p>
<p>But I have a few automations that I'm really happy with and proud of.</p>
<p>Better still, it has a high AF (Approval Factor) from my wife.</p>
<p><img alt="Home Assistant" src="https://erdelynet.com/images/home_assistant.png" class="left" />
As I wrote in <a href="https://erdelynet.com/technical/my-story.html">my Home Automation Story post</a>,
I use Home Assistant to automate my Smart Home.</p>
<p>I've done the usual things like installing smart light switches and outlets and
have certain lights come on and go off at set times. The easy stuff.</p>
<p>But I have a few automations that I'm really happy with and proud of.</p>
<p>Better still, it has a high AF (Approval Factor) from my wife.</p>
<hr />
<h1>Shower Humidity</h1>
<p>Many times when taking a shower, the hot water causes the humidity in the
bathroom to rise. This can, of course, fog up the mirror and make the room
stuffy. One easy fix is to turn on the fan before taking a shower. But if the
humidity is still high when I'm done in the bathroom, I will sometimes leave
the fan on and go about my day. However, wouldn't it be nice if the fan would
turn on AND off automatically?</p>
<p>Now, when the humidity in the bathroom goes above a certain level, the fan
turns on automatically. Then, once the humidity goes back down, the fan
turns off.</p>
<p><img alt="Humidity Control" src="https://erdelynet.com/images/fan-automation-controls.png"
class="center popup" /></p>
<h2>Hardware:</h2>
<ul>
<li>Aqara Zigbee Temperature and Humidity Sensor (WSDCGQ11LM) in one bathroom</li>
<li>Sonoff Zigbee Mini Indoor Temperature and Humidity Sensor (SNZB-02) in another</li>
</ul>
<h2>Automations:</h2>
<ul>
<li>Hall Bath Humidity - Fan On: Turns the fan on when the humidity goes above
the chosen level</li>
<li>Hall Bath Humidity - Fan Off: Turns the fan off when the humidity goes below
the chosen level</li>
<li>Master Bath Humidity - Fan On: Turns the fan on when the humidity goes above
the chosen level</li>
<li>Master Bath Humidity - Fan Off: Turns the fan off when the humidity goes below
the chosen level</li>
</ul>
<hr />
<h1>Washer/Dryer Notifications</h1>
<p>How many times have you left wet clothes in the washer. Or you've forgotten
about the clothes in the dryer only to have to "toss them" so they're less
wrinkly?</p>
<p>Using two different devices, I measure the amount of power the washer and
dryer are using. After they've been running, when the washer or dryer go
below the amount of energy used when in use, we get notifications on our phones
and Google Home tells us that the washer or dryer is done.</p>
<h2>Hardware:</h2>
<ul>
<li>TOPGREENER Smart Wi-Fi Outlet with USB (TGWF215U2AM): Since our washer uses
standard 120 volts, this outlet works. It provides energy usage reporting for
the smart outlet (the top outlet is always on and does not report usage -- we
do not use that outlet for anything). This outlet also includes two USB plugs,
one of which is used to power the devices for the dryer.</li>
<li>Wemos D1 Mini: small ESP8266 computer running
<a href="https://github.com/arendst/Tasmota">Tasmota</a> to read the dryer's
energy usage and send it to MQTT where Home Assistant can access it.</li>
<li><a href="https://amzn.to/2XDcnoX">Split Core Current Transformer</a> to read
the current being generated by the dryer that the D1 Mini can read.</li>
<li>A small plastic box to contain the D1 Mini that is attached to the dryer with
double-sided tape.</li>
<li>A USB cable to power the D1 Mini, which is plugged into the washer's outlet.</li>
</ul>
<h2>Directions</h2>
<ul>
<li>I followed DigiBlur's excellent
<a href="https://digiblur.com/2019/04/18/diy-smart-laundry-electric-dryer-voice-notifications">post</a>
and <a href="https://youtu.be/1tqJkw5f0iA">video</a> about setting this up.
a Wemos D1 Mini + a </li>
</ul>
<h2>Home Assistant Helpers</h2>
<ul>
<li>A "Washer Is Running" Toggle</li>
<li>A "Dryer Is Running" Toggle</li>
</ul>
<h2>Automations</h2>
<ul>
<li>Washer Started - When the "Outlet ENERGY Power" used by the washer goes above
2 for more than 5 minutes, the "Washer Is Running" toggle is turned on. This
indicates that the washer is actually running.</li>
<li>Washer Stopped - When the "Outlet ENERGY Power" used by the washer goes below
3 for more than 3 minutes AND the "Washer Is Running" toggle is on, the
"Washer Is Running" toggle is turned off and we get the announcements that
the washer is done.</li>
<li>Dryer Started - When the "ANALOG CTEnergy Power" used by the dryer's CT Clamp
goes above 750 for more than 2 minutes, the "Dryer Is Running" toggle is
turned on. This indicates that the dryer is actually running.</li>
<li>Washer Stopped - When the "ANALOG CTEnergy Power" used by the dryer's CT Calmp
goes below 500 for more than 1 minute AND the "Dryer Is Running" toggle is on,
the "Dryer Is Running" toggle is turned off and we get the announcements that
the dryer is done.</li>
</ul>
<h2>Comments</h2>
<p>I had to play with the energy and CTEnergy values were. For some cycles of the
washer, it goes below 3 for a minute or two. So the "3 minutes" threshold is
to prevent false notifications during those cycles.</p>
<hr />
<h1>Gate and Shed Notifications</h1>
<p>We have a fenced in back yard. Each side of the house has a gate. Occasionally
a meter reader will come to take a reading from our gas meter in the back and
will not properly shut the gate. Then our dog gets out because we didn't know
that the meter reader was here at all nor that they didn't properly close the
gate.</p>
<p>I installed door contact sensors on each gate.</p>
<p>Additionally, we have a shed that is attached to, but outside of our house.
Weirdly, the electrical panel is in this shed. So we have to go OUTSIDE to
deal with any circuit breaker problems. Because of this, we want to know if
the shed is ever opened. Inside the shed, I have a smart light that we used
to have to turn on with our phones or tell Google to do it.</p>
<p>I used door contact sensors to notify us when the shed is opened AND to
automtically turn on the Shed light when the doors are opened (and off when
they are closed).</p>
<h2>Hardware</h2>
<ul>
<li>3 THIRDREALITY Zigbee Contact Sensors (3RDS17BZ)</li>
<li>Airand Utility LED Shop Light Fixture 2FT 4FT with Plug</li>
<li>AICLIV SOP03US 3 Port Wi-Fi Outdoor Strip running Tasmota</li>
</ul>
<h2>Automations</h2>
<ul>
<li>When either gate contact sensor is open, we get a notification on our phones
and Google announces that the particular gate has been opened. We get
similar notifications when the gate is closed.</li>
<li>The shed contact sensor works the same way, but it ALSO turns the light on
when the shed door is opened and turns the light off when the shed door is
closed.</li>
</ul>
<h2>Summary</h2>
<p>This gives us piece of mind when the gates have been inadvertantly left open or
knowing that we will get notified if someone tries to open our shed.</p>
<hr />Plex Client Configuration2022-01-17T22:28:00-05:002022-01-17T22:28:00-05:00Mike Erdelytag:erdelynet.com,2022-01-17:/technical/plex_client.html<p>Out of the box, Plex Media Clients are misconfigured to but an undue
burden on the Plex Server.</p>
<p>This guide will help you configure your client properly including: Apple IOS,
Android, Xbox, Playstation, Amazon Fire, Rokul and smart TVs.</p>
<p>Out of the box, Plex Media Clients are misconfigured to but an undue
burden on the Plex Server.</p>
<p>This guide will help you configure your client properly including: Apple IOS,
Android, Xbox, Playstation, Amazon Fire, Rokul and smart TVs.</p>
<p><img alt="Plex" src="https://erdelynet.com/images/plex_logo.png" class="right nopopup" /></p>
<h1>The Basics</h1>
<ol>
<li>Go to Remote streaming quality</li>
<li>Change setting to Maximum (may need to click "Show All" first)</li>
<li>If there is an option available, enable Allow Direct Play</li>
<li>If there is an option available, enable Allow Direct Stream</li>
</ol>
<h1>Infographics for directions for configuring your device</h1>
<figure>
<img alt="Mobile" src="https://erdelynet.com/images/plex_mobile.jpg" />
<figcaption>Mobile Devices</figcaption>
</figure>
<figure>
<img alt="TVs" src="https://erdelynet.com/images/plex_tvos.jpg" />
<figcaption>Smart TVs</figcaption>
</figure>
<figure>
<img alt="Streaming Devices" src="https://erdelynet.com/images/plex_stream.jpg" />
<figcaption>Streaming Devices</figcaption>
</figure>
<figure>
<img alt="Web Browser" src="https://erdelynet.com/images/plex_web.jpg" />
<figcaption>Web Browser</figcaption>
</figure>
<p>If you have any questions, please don't hesitate to
<a href="mailto:mike@erdelynet.com">email me</a>.</p>
<p>Graphics courtesy of <a href="https://www.reddit.com/user/Endawmyke/">u/Endawmyke</a> on
<a href="https://www.reddit.com/r/PleX/comments/mora8f/i_made_a_how_to_direct_play_1_page_guide_you_can/">Reddit</a>.</p>My dot Files2021-11-27T18:40:00-05:002022-12-22T13:24:00-05:00Mike Erdelytag:erdelynet.com,2021-11-27:/technical/my-dotfiles.html<p>So that I can share how I've configured several of my applications and systems
on my laptop, I've created a new GitHub project for
<a href="https://github.com/merdely/dotfiles">my dotfiles</a>.</p>
<p>Hope you can use them to find a different way to accomplish your goals or, even
better, you find a bug or have a
<a href="mailto:mike@erdelynet.com">suggestion for me</a>.</p>
<p>So that I can share how I've configured several of my applications and systems
on my laptop, I've created a new GitHub project for
<a href="https://github.com/merdely/dotfiles">my dotfiles</a>.</p>
<p>Hope you can use them to find a different way to accomplish your goals or, even
better, you find a bug or have a
<a href="mailto:mike@erdelynet.com">suggestion for me</a>.</p>
<h1>What are dotfiles?</h1>
<p>"dotfiles" are generally files that being with a period in the filename. By
starting a filename with a period character, they are hidden by default from
many graphical file managers and the
<a href="https://man.archlinux.org/man/ls.1">ls(1)</a> command. With ls specifically, you
can list "dotfiles" by running <code>ls -a</code> or <code>ls -al</code>.</p>
<p>Many programs use "dotfiles" to store configuration information in a user's
home directory. Files can be stored in the root of the home directory or
under a ".config" directory in the user's home directory
(e.g. "~/.vimrc" and "~/.config/qtile/config.py").</p>
<h1>What files have I published?</h1>
<p>I have shared most of the files necessary for me to get my shell working
the way I want along with files used for configuring things like:</p>
<ul>
<li><a href="https://github.com/merdely/dotfiles/blob/main/.config/qtile/config.py">Qtile</a>
-- My Window Manager</li>
<li><a href="https://github.com/merdely/dotfiles/blob/main/.config/alacritty/local.yml">Alacritty</a>
-- My terminal application</li>
<li><a href="https://github.com/merdely/dotfiles/blob/main/.xbindkeysrc">xbindkeys</a>
-- My hot-key program</li>
<li><a href="https://github.com/merdely/dotfiles/blob/main/.vimrc">Vim</a> - My editor</li>
</ul>
<p>And some of the important shell config files:</p>
<ul>
<li><a href="https://github.com/merdely/dotfiles/blob/main/.bashrc">.bashrc</a>
-- The main Bash user config file</li>
<li><a href="https://github.com/merdely/dotfiles/blob/main/.merdely.profile">.merdely.profile</a>
-- My customizations for Bash (and ksh on OpenBSD)</li>
<li><a href="https://github.com/merdely/dotfiles/blob/main/.xprofile">.xprofile</a>
-- My X startup script</li>
</ul>
<p>The project also contains some
<a href="https://github.com/merdely/dotfiles/tree/main/bin">useful scripts</a> for Qtile,
adjusting brightness, and a terminal launcher.</p>Why I Chose Home Assistant OS2021-11-26T17:52:00-05:002021-11-26T17:52:00-05:00Mike Erdelytag:erdelynet.com,2021-11-26:/technical/home-assistant-flavor.html<p><img alt="Home Assistant Installation" class="left nopopup" src="https://erdelynet.com/images/home_assistant_installation.png"/>
For setting up <a href="https://erdelynet.com/technical/my-story.html">Home Assistant</a>, there
are <a href="https://www.home-assistant.io/installation/">several choices</a>:
Home Assistant OS, Home Assistant Container, Home Assistant Supervised, and
Home Assistant Core.</p>
<p>I chose Home Assistant OS for a few reasons.</p>
<p><img alt="Home Assistant Installation" src="https://erdelynet.com/images/home_assistant_installation.png"
class="left nopopup" />
For setting up <a href="https://erdelynet.com/technical/my-story.html">Home Assistant</a>, there
are <a href="https://www.home-assistant.io/installation/">several choices</a>:
Home Assistant OS, Home Assistant Container, Home Assistant Supervised, and
Home Assistant Core.</p>
<p>I chose Home Assistant OS for a few reasons.</p>
<div style="clear: left;"></div>
<h1>First Choice</h1>
<h2>Home Assistant Container</h2>
<p>For those that know me, you'd probably be surprised that I went with Home
Assistant OS. I'm a tinkerer and like to have full control over my systems.</p>
<p>I originally did install Home Assistant Container. It's great: you install
the container (I used Docker Compose) and then for the additional services
you'd install (like Add-Ons in Home Assistant OS), you install those yourself
as separate Docker containers.</p>
<p>This was right down my ally.</p>
<h1>Other Options</h1>
<h2>Home Assistant Supervised</h2>
<p>I did play around with Home Assistant Supervised for a while. It's similar
to Home Assistant OS except that instead of using their OS image, you build
your own Operating System (using their supported OS: Debian Buster).</p>
<p>Pretty much everyone that supports Home Assistant (like on their Discord)
recommends not using this method as it's prone to breakage and difficult if
you are not an expert with Linux, Networking, Home Assistant, and Docker.</p>
<h2>Home Assistant Core</h2>
<p>With this method, you're running the bare Home Assistant Python code in a
Virtual Environment (venv). This never seemed appealing to me.</p>
<h1>The Change</h1>
<p>One day I was thinking about how Holly (my wife) might manage this stuff if
something were to happen to me. And I thought about how difficult it would
be for something who isn't a Linux admin and doesn't know Docker to manage the
Container Installation.</p>
<p>So, to make sure that she could continue to use Home Assistant and pretty much
manage it herself, I decide to switch from the Home Assistant Container install
to Home Assistant OS.</p>
<h2>Procedure</h2>
<p>After installing Home Assistant OS on my server, I copied over the /config
directory (including the dot files like .storage) from my container install
into the /config directory on the new server.</p>
<p>Then it was a matter of installing the Add-Ons for each of the other services
I used: Assistant Relay, MariaDB, Mosquitto Broker, Studio Code Server,
TasmoBackup, Unifi Network Application, Vaultwarden, and Zigbee2MQTT. In some
cases, it was as easy as copying over a config file from my old server to the
new one. In other cases, I had to use my old configuration to go through the
Configuration panel and manually enter the information to set up the Add-On.
All in all, it took me about a day (probably just a couple hours) to get
completely set up on the new server.</p>
<h1>Conclusion</h1>
<p>Every once in a while, I wish I had the flexibility of the Container install
method. But I sleep well at night knowing that if something were to happen
to me, Holly would be able to figure out how to manage Home Assistant and keep
it up to date.</p>Password Management with Bitwarden2021-11-26T17:28:00-05:002021-11-26T17:28:00-05:00Mike Erdelytag:erdelynet.com,2021-11-26:/technical/bitwarden.html<p>In a past life, I managed both Lastpass and 1Password. Neither of them were
something I wanted to use personally, so I was looking for something better.</p>
<p>In the mean time, I was using <a href="https://keepassxc.org">KeePassXC</a> stored in
Google Drive. And Holly and I also had a shared Keepass file stored in a shared
directory so we could share passwords between us.</p>
<p>But then I learned about <a href="https://www.bitwarden.com">Bitwarden</a>.</p>
<p>In a past life, I managed both Lastpass and 1Password. Neither of them were
something I wanted to use personally, so I was looking for something better.</p>
<p>In the mean time, I was using <a href="https://keepassxc.org">KeePassXC</a> stored in
Google Drive. And Holly and I also had a shared Keepass file stored in a shared
directory so we could share passwords between us.</p>
<p>But then I learned about <a href="https://www.bitwarden.com">Bitwarden</a>.</p>
<p><img alt="Bitwarden" src="https://erdelynet.com/images/bitwarden.png" class="right nopopup" /></p>
<h1>Server Setup</h1>
<p>As you've probably read, I use
<a href="https://erdelynet.com/technical/my-story.html">Home Assistant</a>. One of
Home Assistant's available Add-Ons is
<a href="https://github.com/dani-garcia/vaultwarden">Vaultwarden</a>: the open source,
unofficial Bitwarden server.</p>
<h1>External Access</h1>
<p>When I'm outside of my house, I have to
<a href="https://erdelynet.com/technical/wireguard.html">VPN into my house</a> in order to sync with my
Bitwarden server, but that is so convenient from my laptop or my phone.</p>
<h1>Client Setup</h1>
<h2>Computer</h2>
<p>On any computer with a Chrome-based or Firefox-based browser, installing the
Bitwarden Add-On is simple. Then, when you're using your browser and go to
a site that is saved in Bitwarden, it's easy to click the Bitwarden icon and
click the item for the site and the username and password are automatically
filled in.</p>
<p>Because I'm not using the <a href="https://bitwarden.com">Bitwarden</a> service, when I
set up a client, I have to click the gear icon and enter in the URL for my
personal Vaultwarden server. Then I just log in normally.</p>
<h2>Phone</h2>
<p>There are Bitwarden clients for Android and iPhone. Once installed, when I
go to a website and need to enter credentials, I see an option to use
Bitwarden. I tap it, am prompted to use my fingerprint, and can then choose
which item in Bitwarden to use for authentication.</p>
<h2>Qutebrowser</h2>
<p><a href="https://erdelynet.com/technical/qutebrowser.html">Qutebrowser</a> does not support Chrome Add-ons
so I had to get creative for using Bitwarden with Qutebrowser. Much like
<a href="https://erdelynet.com/technical/linkding.html">the solution I came up with for bookmarks</a>,
I found a solution I liked using Rofi:
<a href="https://github.com/mattydebie/bitwarden-rofi">bitwarden-rofi</a>.</p>
<p><img alt="bitwarden-rofi" src="https://erdelynet.com/images/bitwarden-rofi.png" class="center nopopup" /></p>
<h3>My Workflow</h3>
<p>When I visit a site that requires a username/password, I make sure that I'm in
INSERT mode in Qutebrowser, then I press Alt+Shift+b to bring up
bitwarden-rofi. I enter in my Bitwarden Master Password and then type in some
text to search for the site and then press Alt+1 to have the username and
password automatically entered into the page.</p>
<h3>My Fork</h3>
<p>I've since
<a href="https://github.com/merdely/bitwarden-rofi">forked my own version</a> because
there was a <a href="https://github.com/mattydebie/bitwarden-rofi/pull/71/commits/984ff191deab7eb740d4e6b25b1ace1186f10e8c">change to how Rofi works</a>
that @mattdebie hasn't incorporated into their code. Then I had the idea to
<a href="https://github.com/mattydebie/bitwarden-rofi/pull/76">allow copying the URI</a>,
so I incorporated that into my fork and submitted a Pull Request. Finally, I
saw a really nice Pull Request that <a href="https://github.com/mattydebie/bitwarden-rofi/commit/bd3aa2261c9b6453faefd73dd4829ffbb73c0b41">automatically copies the TOTP code when
the Password is written</a>
(that's the 2FA code) that I added to my fork too.</p>Wireguard: Home VPN Server2021-11-26T17:00:00-05:002021-11-26T17:00:00-05:00Mike Erdelytag:erdelynet.com,2021-11-26:/technical/wireguard.html<p>I used to use OpenVPN as a means to connect to my internal network from outside
of my house. It worked really well, but managing its configs was a little bit
of a hassle and, frankly, OpenVPN is old news (/s). I wanted to play with a
new toy.</p>
<p>So I looked into <a href="https://www.wireguard.com">Wireguard</a>.</p>
<p>I used to use OpenVPN as a means to connect to my internal network from outside
of my house. It worked really well, but managing its configs was a little bit
of a hassle and, frankly, OpenVPN is old news (/s). I wanted to play with a
new toy.</p>
<p>So I looked into <a href="https://www.wireguard.com">Wireguard</a>.</p>
<p><img alt="Wireguard" src="https://erdelynet.com/images/wireguard.png" class="right nopopup" /></p>
<h1>Server Config</h1>
<p>Since I use
<a href="https://erdelynet.com/technical/my-story.html">Home Assistant</a> and it has Add-Ons
available available, I decided to use its Wireguard Add-On.</p>
<p>I had a couple of choices: Try to install an unsupported Wireguard
implementation on my pfSense router, install Wireguard on another system, or
use the Home Assistant Add-On. The last option seemed the easiest to manage,
so that's what I went with.</p>
<p>My thought process here was:</p>
<ul>
<li>I'm already running Home Assistant</li>
<li>Home Assistant and its services are the main resources I want to access
when I'm not at home.</li>
<li>The Add-On in Home Assistant is dead-simple to set up and manage.</li>
</ul>
<p>The great thing about Wireguard, like OpenVPN, is that there are clients for
everything: Linux, ChromeOS (via Android), Android Phones, Mac, Windows, and,
should the need ever arise, iPhone.</p>
<h1>Client Config</h1>
<p><img alt="Wireguard Config" src="https://erdelynet.com/images/wireguard-config.png"
class="left nopopup" />Its really easy to manage. I simply go into Home
Assistant -> Supervisor -> Wireguard -> Configuration and add a section similar
to the screenshot (left).</p>
<h1>Android Client Setup (and Probably iPhone too)</h1>
<p>Then I go into <strong>Studio Code Server</strong>, browse to the 'wireguard' folder and
find my new profile. There's a qrcode.png file that I can scan inside the
Wireguard app on my phone. That automatically adds the profile to my phone.</p>
<p>The connection to the Wireguard service is extremely quick and I don't notice
any overhead on my phone.</p>
<h1>Linux Client Setup</h1>
<p>On Linux, setting up a connection is done in a couple of ways. For either,
I install the wireguard-tools package (using pacman on Arch).</p>
<h2>Running a Command from a Terminal</h2>
<p>First I download the 'client.conf' file from <strong>Studio Code Server</strong> to my
laptop. I copy it to /etc/wireguard/wg0.conf.</p>
<p>Then, when I want to connect to the VPN, I run: <code>sudo wg-quick up wg0</code>
To disconnect: <code>sudo wg-quick down wg0</code></p>
<p>To make it simple, I made some shell aliases (bash):</p>
<div class="highlight"><pre><span></span><code>alias vpndown='sudo wg-quick down wg0'
alias vpnup='sudo wg-quick up wg0'
</code></pre></div>
<p>Then I can simply run <code>vpnup</code> and <code>vpndown</code>.</p>Centralized Bookmarks with Linkding2021-11-25T00:15:00-05:002021-11-25T00:15:00-05:00Mike Erdelytag:erdelynet.com,2021-11-25:/technical/linkding.html<p>As I mentioned in my <a href="https://erdelynet.com/technical/qutebrowser.html">Qutebrowser</a> article,
my browser doesn't have the ability to share bookmarks with my other browsers.
I run Chrome on my phone and Chrome on my Chromebook. And I have a second
Linux laptop that also runs Qutebrowser.</p>
<p>I needed a solution to share bookmarks between them. And I settled on
Linkding.</p>
<p>As I mentioned in my <a href="https://erdelynet.com/technical/qutebrowser.html">Qutebrowser</a> article,
my browser doesn't have the ability to share bookmarks with my other browsers.
I run Chrome on my phone and Chrome on my Chromebook. And I have a second
Linux laptop that also runs Qutebrowser.</p>
<p>I needed a solution to share bookmarks between them. And I settled on
Linkding.</p>
<h1>My Search</h1>
<p>I looked through <a href="https://www.reddit.com/r/selfhost">Reddit r/selfhost</a> and
scoured the web looking at different self-hosted bookmark services I could
run at home.</p>
<p>Honestly, there aren't too many of them that are good, free, easy to manage,
and have a lot of features. I settled on
<a href="https://github.com/sissbruecker/linkding">Linkding</a> (despite its name) but,
to be honest, I didn't really use it much. I imported all of my bookmarks
from Chrome into it, but I didn't find myself using it much.</p>
<h1>Chrome</h1>
<p>Chrome has its own bookmark manager and it shares amongst other Chrome
browsers you log into.</p>
<p>Up until recently, I didn't know about a Linkding extension for adding
bookmarks, so I'm currently giving that a whirl.</p>
<h1>Qutebrowser</h1>
<p>Qutebrowser doesn't have plugins. Plus, it has its own Quickmarks system
that integrates well inside the browser, but doesn't sync anywhere. I may
be able to script something to share Quickmarks between my Linux systems --
we'll see.</p>
<h1>Rofi</h1>
<p>Recently I started thinking more and more about what I can do with
<a href="https://github.com/davatorium/rofi/">Rofi</a>. Rofi is a drop in replacement
for <a href="https://tools.suckless.org/dmenu/">dmenu</a> that has a few more features
and looks nicer (and doesn't require recompiling to change a configuration
option).</p>
<p>So I wrote <a href="https://github.com/merdely/rofi-linkding">rofi-linkding</a> to use
Rofi to present a list of bookmarks that is searchable and will open in
your default browser (using xdg-open).</p>
<p><img alt="rofi-linkding" src="https://erdelynet.com/images/rofi-linkding.png" class="center nopopup" /></p>
<p>When viewing the bookmarks list in rofi-linkding, by default the links are
listed by Title. Pressing Alt+2 will show the tags. Alt+3 will show the URLs.
Alt+4 will show the titles, tags, and URLs.</p>
<p>At the "Bookmark:" prompt, you can search through any of the text (titles,
tags, URLs) that are showing below. So to just search the tags, you can press
Alt+2 and then search through the tags.</p>
<h1>Qutebrowser keybinding</h1>
<p>Now that I have a way to launch links from Linkding, I needed an easy way
to save them too.</p>
<p>In Qutebrowser, I typed:</p>
<div class="highlight"><pre><span></span><code>:bind <Ctrl+m> open -t https://my.linkding.server/bookmarks/new?url={url}&auto_close=true
</code></pre></div>
<p>This lets me press Ctrl+m to add a bookmark of the current page I'm viewing.
Qutebrowser opens the Linkding new bookmark page in a new tab where I can
enter the Title, Description, and Tags fields (though it attempts to
automatically fill Title and Description from the website, if it can. After
saving the bookmark, Linkding's page let's me know it's OK to close the tab.</p>
<h1>Conclusion</h1>
<p>Linkding, rofi-linkding, and Qutebrowser's keybindings to Linkding's new
bookmark page makes using and sharing bookmarks bearable.</p>Qutebrowser2021-11-24T23:13:00-05:002021-11-24T23:13:00-05:00Mike Erdelytag:erdelynet.com,2021-11-24:/technical/qutebrowser.html<p>These days, it's more important than ever to find a good web browser: one
that's easy to use, has the functionality you want, and, most importantly,
is reasonably secure. It's also a good idea to consider the privacy features
the browser has too.</p>
<p>Too many of the popular browsers have privacy issues (Chrome sharing info
with Google, Edge sharing info with Microsoft, Brave sharing info with...).</p>
<p>Additionally, with my keyboard-driven window manager on my system
(<a href="https://erdelynet.com/technical/qtile.html">Qtile</a>), I wanted a keyboard driven browser too.</p>
<p>Enter Qutebrowser.</p>
<p>These days, it's more important than ever to find a good web browser: one
that's easy to use, has the functionality you want, and, most importantly,
is reasonably secure. It's also a good idea to consider the privacy features
the browser has too.</p>
<p>Too many of the popular browsers have privacy issues (Chrome sharing info
with Google, Edge sharing info with Microsoft, Brave sharing info with...).</p>
<p>Additionally, with my keyboard-driven window manager on my system
(<a href="https://erdelynet.com/technical/qtile.html">Qtile</a>), I wanted a keyboard driven browser too.</p>
<p>Enter Qutebrowser.</p>
<h1>Google</h1>
<p>I'd used Chrome and Chromium for a long time. I figured that Google probably
already knows everything about me given that I host my email on Gmail, I have
Google speakers in my house, and I have a Google tracking device in my pocket.
So what's the difference if I use Chrome or something else?</p>
<h1>Firefox</h1>
<p>I haven't been much of a Firefox fan since Chrome first came out. Firefox was
supposed to be the "lite, fast" version of Mozilla's Browser years ago, but
it too succumbed to bloat. And the way the company has been run recently, I
haven't really wanted to use their products.</p>
<h1>Tiling Window Manager and the Keyboard</h1>
<p>As I mentioned, I've been using Qtile, a keyboard-driven, tiling window
manager. And it was always weird for me to be able to do most of everything
on my computer with the keyboard only to have to reach for the mouse to use
one of my most-used apps (the browser).</p>
<p>There are plugins for both Chrome-based and Firefox-based browsers that allow
for keyboard driven browsing (I used Vimperator back in the day), but they're
all janky.</p>
<hr>
<h1>Qutebrowser</h1>
<p>Qutebrowser doesn't use Vim-navigation as a plugin -- it was designed for it.
The "Qute" part of the name comes from the Qt toolkit used to build its
interface. The browser engine uses Chrome's engine, so it works with what
Chrome works with.</p>
<p>Qutebrowser's interface is pretty sparse: a small tab bar at the top and a
status line at the bottom. The keyboard shortcuts are largely inspired by
the Vim text editor ('o' opens a URL, 'O' opens a URL in a new tab, 'wo' opens
a URL in a new window).</p>
<p>It takes some getting used to, but once you do, it's extremely flexible to use.
If I'm primarily using my keyboard, flipping back and forth between my terminal
and my browser, Qutebrowser works great. And if I'm taking a break and
leisurely browsing with my mouse, the scroll wheel works too.</p>
<p>How do you "click" with the keyboard? Well, you use hints. When I'm viewing a
web page, I can press 'f' and all of the visible links get a one, two, or
three (depending on the number of links) code to press. When I press those
keys, the browser does the thing (navigates to the link, enters the field,
presses the button, ...).</p>
<h1>Biggest Issues with Qutebrowser</h1>
<h2>Plugins</h2>
<p>Even though Qutebrowser uses Chrome's engine, it does not use Chrome's
extensions. So you can't install things like the Bitwarden (password manager)
browser extension. That can make entering your passwords into websites a bit
difficult. But there are solutions. I'm using
<a href="https://github.com/mattydebie/bitwarden-rofi">Bitwarden Rofi Menu</a> as an
interface to Bitwarden. When I go to a website that requires me to enter
my username/password, I press the keyboard combination (Alt+Shift+b) and
Bitwarden Rofi Menu prompts me for my Bitwarden passphrase, then I type to
search for the password entry I need and press Alt+1 to have the username
and password automatically typed into the browser window. Once you get used
to it, it flows really nicely (all with the keyboard).</p>
<h2>Bookmarks</h2>
<p>There is no sense of sharing bookmarks between browsers.</p>
<h2>Fields</h2>
<p>The absolute hardest thing to get used to with Qutebrowser is the modes. Just
like with the Vim editor, Qutebrowser has different modes.</p>
<h3>Normal mode</h3>
<p>This is regular browsing. The keys on the keyboard don't type things, they
perform actions. Like 'f' brings up hints, 'o' opens a URL, 'd' closes a tab,
'm' adds a quickmark bookmark, and so on.</p>
<h3>Hint mode</h3>
<p>After pressing 'f', links have a key code overlaid above them that can be
typed to interact with that link/object. So the keys on the keyboard interact
with the objects on the page.</p>
<h3>Insert mode</h3>
<p>This is the mode when you type into a field (like sending a message in Gmail or
responding to a chat message).</p>
<p>When you're in Insert mode, the status bar turns green and it clearly says
"Insert mode" at the bottom.</p>
<h3>Frustration</h3>
<p>The frustration comes when you click in an input field on a web page and
Qutebrowser doesn't automatically switch you to Insert mode. Then you start
typing, but instead of typing words to in reply to your friend's email, you're
typing in Qutebrowser commands (like closing all of your tabs, quitting the
application, creating quickmarks, etc).</p>
<p>This happens to me less and less, but it's really jarring when it happens. I
just noticed tonight that I do have a few quickmarks I don't remember creating
(so I must have been typing commands when I meant to be replying to an email
and created a quickmark on the page I was on -- probably before I accidentally
closed it with the 'd' key).</p>
<h1>Conclusion</h1>
<p>Overall, I love Qutebrowser. I'm generally frustrated when I have to use a
traditional browser on a Chromebook or my phone.</p>
<p>I've been able to do some minor customizations that I'm going to write some
articles about in the future.</p>Applying style to ssh-askpass2021-11-22T19:13:00-05:002021-11-22T19:13:00-05:00Mike Erdelytag:erdelynet.com,2021-11-22:/technical/ssh-ask-pass-style.html<p>ssh-askpass(1) is a graphical program that prompts the user for their SSH Key
passphrase and passes it to the ssh-add(1) command.</p>
<p>Out of the box, ssh-askpass is pretty ugly, but I feel like I've managed to
make it look dark, modern, and good.</p>
<p>ssh-askpass(1) is a graphical program that prompts the user for their SSH Key
passphrase and passes it to the ssh-add(1) command.</p>
<p>Out of the box, ssh-askpass is pretty ugly, but I feel like I've managed to
make it look dark, modern, and good.</p>
<h1>A screenshot</h1>
<p>This is how my ssh-askpass window looks:</p>
<p><img alt="ssh-askpass" src="https://erdelynet.com/images/ssh-askpass.png" class="center nopopup" /></p>
<h1>The code</h1>
<div class="highlight"><pre><span></span><code><span class="n">SshAskpass</span><span class="o">*</span><span class="n">Dialog</span><span class="p">.</span><span class="nl">font:</span><span class="w"> </span><span class="o">-</span><span class="n">adobe</span><span class="o">-</span><span class="n">helvetica</span><span class="o">-</span><span class="n">bold</span><span class="o">-</span><span class="n">r</span><span class="o">-</span><span class="n">normal</span><span class="o">-*-*-</span><span class="mh">120</span><span class="o">-*-*-*-*-</span><span class="n">iso8859</span><span class="o">-</span><span class="mh">1</span>
<span class="n">SshAskpass</span><span class="o">*</span><span class="n">Dialog</span><span class="p">.</span><span class="nl">label:</span><span class="w"> </span><span class="n">Please</span><span class="w"> </span><span class="n">enter</span><span class="w"> </span><span class="n">your</span><span class="w"> </span><span class="n">authentication</span><span class="w"> </span><span class="nl">passphrase:</span>
<span class="n">SshAskpass</span><span class="o">*</span><span class="n">Dialog</span><span class="p">.</span><span class="nl">title:</span>
<span class="n">SshAskpass</span><span class="o">*</span><span class="nl">background:</span><span class="w"> </span><span class="p">#</span><span class="mh">000000</span>
<span class="n">SshAskpass</span><span class="o">*</span><span class="nl">foreground:</span><span class="w"> </span><span class="p">#</span><span class="n">cccccc</span>
<span class="n">SshAskpass</span><span class="p">.</span><span class="n">Button</span><span class="o">*</span><span class="nl">background:</span><span class="w"> </span><span class="p">#</span><span class="mh">000000</span>
<span class="n">SshAskpass</span><span class="p">.</span><span class="n">Button</span><span class="o">*</span><span class="nl">foreground:</span><span class="w"> </span><span class="p">#</span><span class="n">cccccc</span>
</code></pre></div>
<p>The above code goes in your ${HOME}/.Xresources file.</p>
<p>On Arch Linux, make sure you have the xorg-xrdb package installed.</p>
<p>I have a line in my ${HOME}/.xprofile that reads:</p>
<div class="highlight"><pre><span></span><code>[ -r $HOME/.Xresources ] && xrdb -merge -I$HOME $HOME/.Xresources
</code></pre></div>
<p>Stuff like this isn't super important, but when you're typing your SSH
key passphrase 20 times a day, it's nice when you like the look of the dialog
box.</p>Qtile Window Manager2021-11-22T17:29:00-05:002021-11-27T18:31:00-05:00Mike Erdelytag:erdelynet.com,2021-11-22:/technical/qtile.html<p><img alt="Arch Linux" class="right nopopup" src="https://erdelynet.com/images/qtile.png"/>
For most people, their window manager is something they probably don't think
much about. Consider all of the Windows and Mac users out there. They may
or may not think about the fact that they appreciate how using Windows is
different from using a Mac, but they may not be able to explain exactly why
(Though over the past few years, it feels like Mac and Windows interfaces are
slowing becoming very similar).</p>
<p>But on Linux, there is a lot of choice of window managers: from KDE & Gnome
(similar to the traditional Windows/Mac interfaces) to tiling window managers
like DWM, Xmonad, and Qtile.</p>
<p><img alt="Arch Linux" src="https://erdelynet.com/images/qtile.png" class="right nopopup" />
For most people, their window manager is something they probably don't think
much about. Consider all of the Windows and Mac users out there. They may
or may not think about the fact that they appreciate how using Windows is
different from using a Mac, but they may not be able to explain exactly why
(Though over the past few years, it feels like Mac and Windows interfaces are
slowing becoming very similar).</p>
<p>But on Linux, there is a lot of choice of window managers: from KDE & Gnome
(similar to the traditional Windows/Mac interfaces) to tiling window managers
like DWM, Xmonad, and Qtile.</p>
<h1>Tiling Window Managers</h1>
<p>Years ago, when I was running OpenBSD on my Thinkpad T42, I used DWM, Spectrwm,
and CWM on my laptop. I loved them. I loved the ability to control just about
every aspect of my desktop environment with the keyboard. But as I stated in
<a href="https://erdelynet.com/technical/arch-linux.html">my post about using Arch Linux</a>, I eventually
stopped using OpenBSD on my laptop because it was mostly too sluggish when
surfing the web. And now I can't use it because of my NVIDIA GPU.</p>
<h1>Gnome</h1>
<p>Probably like many new Linux Desktop users, I started with a distribution that
comes with Gnome (Ubuntu or Fedora). Gnome is fine. There's nothing special
to it. I particularly liked Fedora's implementation, which is plain vanilla
Gnome. I used it for a while (maybe a year) before getting bored.</p>
<h1>KDE</h1>
<p>A looooooooong time ago (in the 90s or 2000s), I played around with KDE along
with Gnome. Back in those days, neither desktop was very good and felt very
Linux-y. I've seen screenshots of KDE/Plasma and am really impressed. It's a
very nice looking Windows-like desktop. I think if I weren't using a tiling
window manager, I may have switched from Gnome to KDE/Plasma.</p>
<h1>XFCE</h1>
<p>As far as traditional stacking window managers go, XFCE is my favorite. I used
that for several months (maybe six or more) before realizing what I really
wanted was a tiling window manager.</p>
<p>I really like how minimalistic XFCE can be. It's highly configurable and I
thoroughly enjoyed using it -- especially on my Arch install.</p>
<p>But what I really wanted was a tiling window manager.</p>
<h1>DWM</h1>
<p>I'd used DWM before. I really liked it. It's simple. It works. But it's hard to
configure. Out of the box, DWM does not come with many features. Any features
you want to add, must be compiled in using patches. Some, in my opinion, should
be included in base DWM (like center, color-emoji, ipc, restartsig, steam,
systray, and warp).</p>
<p>I had my DWM config set up and patched the way I liked it, but I really
started to worry about what would happen when DWM got updated. I did not like
the idea of having to re-apply all of the patches to make everything work
again.</p>
<p>Stein Gunnar Bakkeby has created <a href="https://github.com/bakkeby/dwm-flexipatch">dwm-flexipatch</a>
which highly simplifies patching DWM, but I still had concerns about upgrade time.</p>
<h1>Xmonad</h1>
<p>I tried to give Xmonad a try, but I just can't (and don't want to) learn
Haskell.</p>
<h1>Others</h1>
<p>I gave bspwm, awesomewm, herbstluftwm, i3, and a couple others a try, but
ultimately was left unsatisfied.</p>
<hr>
<h1>Qtile</h1>
<p>Finally, I tried Qtile.</p>
<h2>Groups</h2>
<p>It's great. It really is. The biggest issue I had to overcome was how it
handles its groups (workspaces) across multiple monitors. With DWM and two
monitors, you get a set of tags (like groups) on each monitor. You can move
windows from one monitor to the other, but Monitor 1 Tag 1 is not the same as
Monitor 2 Tag 2.</p>
<p>With Qtile, you get a set of groups (I am using 1-9, 0, -, and = for a total of
12 groups). That's it. Whether you have one, two, or ten monitors, you have
that finite number of groups. Don't get me wrong, you can have virtually as
many groups as your keyboard can handle. At one time I had both the number row
and the next row of keys for groups (so "1"-"=" and "q"-"o" -- leaving "p" for
something else). But I have since simplified to "1"-"=".</p>
<p>Let's say Group "1" is selected on Montor 1. And Group "-" is selected on
Monitor 2. While Monitor 1 is selected, if I try to switch to Group "-",
it swaps with Monitor 2 so Monitor 1 would have "-" and Monitor 2 would now
have "1". It's a big jarring at first, but you eventually get used to it.</p>
<h2>Workflow</h2>
<h3>DWM</h3>
<p>Using DWM, let's say I am using Monitor 1 Tag "1" for my terminal,
Monitor 2 Tag "2" for my browser, and Monitor 2 Tag "3" for the Youtube Desktop
App. Then, while I'm watching a video on Youtube, I see something that I want
to do a search on with my browser without stopping my view of the video.</p>
<p>I would need to switch Monitor 1 from Tag 1 to a tag with nothing in it. Then
I would switch to Monitor 2 and move the Youtube window over to Monitor 1,
which means that it changes from Monitor 2 to Monitor 1 (interrupting my view
slightly). Then I could change Monitor 2 to Tag 2 where my browser is. But then
going back to my terminal would require moving Youtube back to Monitor 2 and
so on.</p>
<h3>Qtile</h3>
<p>With window managers that share Groups/Tags/Workspaces like Qtile and Xmonad,
the above scenario plays out much more nicely. Terminal in Group 1. Browser in
Group 2. Youtube in Group 3. Monitor 1 has Group 1 selected and Monitor 2 has
Group 3 selected. When I want to go to my browser while keeping the video going
I simply make sure Monitor 1 is selected and change from Group 1 to Group 2.</p>
<p>My main work mode is: Monitor 1 has Group 1 (my terminal) selected and
Monitor 2 has Group 2 (my browser) selected. But having the flexibility of
having any Group on any monitor is SO great.</p>
<h2>Configuration</h2>
<p>Qtile is written in Python and uses Python for its configuration file. I'm not
super excited about a program using a programming language for a
configuration file, but at least its a relatively easy to understand language
that I already know [Xmonad, what were you thinking? ;-)].</p>
<p><img alt="Arch Linux" src="https://erdelynet.com/images/qtile-cfg-1.png"
class="center nopopup" /></p>
<p>As with many things, I try to stay pretty close to the stock way of using
something, but I have made several changes to Qtile's default configuration.
You can view my
<a href="https://github.com/merdely/dotfiles/blob/main/.config/qtile/config.py">configuration file</a>
on GitHub.</p>
<h2>The Bar</h2>
<p>Qtile has a bar that can be on top or bottom. The bar consists of widgets that
can do anything from: display the Qtile Groups; display the current application
title; show the volume, disk space, weather, battery info, available package
updates; date/time; ... The bar can also have a "SysTray" which includes the
little applet icons some applications use.</p>
<p><img alt="Arch Linux" src="https://erdelynet.com/images/qtile-bar-1.png"
class="center nopopup" /></p>
<p>The bar is highly customizable, can be on top or bottom (or maybe both?). And
you can have the same or different bars on different monitors (though the
SysTray needs to be on a single monitor.</p>
<p><img alt="Arch Linux" src="https://erdelynet.com/images/qtile-bar-2.png"
class="center nopopup" /></p>
<h1>Conclusion</h1>
<p>I'm extremely happy with Qtile. I've been running it now for about six months.
A couple of times I ran into problems (which I'll write up soon) which caused
me to look and test at other window managers (like Herbstluftwm), but with
some focused effort, I was able to solve those problems (Steam windows and
cursor warp across two monitors are two that particularly bothered me).</p>
<p>If you like tiling window managers, I highly recommend giving Qtile a try. I
was also worried Qtile would be slow given that Python is not the fastest
language out there, but I have been very happy with its performance.</p>I use Arch, BTW2021-11-21T12:47:00-05:002022-12-22T13:24:00-05:00Mike Erdelytag:erdelynet.com,2021-11-21:/technical/arch-linux.html<p>I have not used Windows as my primary Operating System for many years (since
around 2003). Sure, I've had to run Windows on a work laptop here and there,
but for anything personal, I've been non-Windows. I used a Mac for a while and
as a Unix-based OS, MacOS is pretty nice. Not exactly what I like, but I much
prefer it to Windows.</p>
<p>I have not used Windows as my primary Operating System for many years (since
around 2003). Sure, I've had to run Windows on a work laptop here and there,
but for anything personal, I've been non-Windows. I used a Mac for a while and
as a Unix-based OS, MacOS is pretty nice. Not exactly what I like, but I much
prefer it to Windows.</p>
<h1>Desktop Unix/Linux History</h1>
<p><img alt="Arch Linux" src="https://erdelynet.com/images/archlinux.png" class="right nopopup" /></p>
<h2>MacOS</h2>
<p>For a few years, I ran MacOS on my computer. For the most part it satisfied
my needs: a terminal and a browser. But I wanted to run something that more
resembled the OS I was running on my servers.</p>
<h2>OpenBSD</h2>
<p>In my heart, I'm an <a href="https://www.openbsd.org">OpenBSD</a> guy. But my experiences
running OpenBSD on my desktop have not been the best. Don't get me wrong, I get
everything working, but I'm generally unsatisfied with the performance.</p>
<p>So a few years ago, after running OpenBSD on my laptop for a couple years, I
decided to try running Linux and, like with OpenBSD, everything "just worked"
and the performance was outstanding. I was hooked.</p>
<h2>Ubuntu</h2>
<p>Like a lot of people, I started with Ubuntu. But Ubuntu is... um... too much.
I guess that's the best way to describe it. While Ubuntu is... um... fine, I
wanted something simpler. I guess I wanted something that I had more control
over.</p>
<h2>New Laptop</h2>
<p>Some time during my use of Ubuntu, I bought a new laptop:
<a href="https://erdelynet.com/technical/my-laptop.html">MSI GT76 Titan DT</a></p>
<p>One of the sore points with this laptop is the GPU: NVIDIA</p>
<p>No more OpenBSD on my laptop. I doubt I'll buy another laptop with an NVIDIA
card in it, but when I described the kind of laptop I wanted, this one is it.</p>
<p>The computer has a lot of storage. 3 512 GB NVME drives and 1 1 TB SSD drive.</p>
<p>The 1 TB SSD has Windows 10 on it. I hardly EVER boot into Windows. It's there
solely for gaming. But with the improvements with Steam and Proton on Linux, I
only boot into Windows every month or so to update it.</p>
<p>That leaves 1.5 TB for Linux</p>
<h2>Fedora</h2>
<p>In the past, I had used a lot of Red Hat-based distributions starting with
Red Hat in the 90s. I've used RHEL, CentOS, and Fedora in the past, so I
decided to give Fedora a spin. I started with regular Fedora (with Gnome) and
was pretty happy for a while. It felt more standard. More simple. I felt like I
had more control. But then that feeling crept in. That Fedora installed more
than I needed. That Gnome is too bloated.</p>
<p>So I tried Fedora Spin with XFCE. And I was much happier. XFCE is more minimal
than Gnome. But there had to be something better.</p>
<hr>
<h1>Arch Linux</h1>
<p>I had heard of Arch Linux before. It has a reputation. So I read up on it and
from what I read, it seemed more like OpenBSD than any other Linux distribution
that I've tried. So I thought I'd give it a go.</p>
<h2>Installation</h2>
<p>The installation is done in the console. You manually run the commands to
partition your disk, bootstrap the installation, install the boot loader,
and do the initial customization (including creating users, setting passwords).</p>
<p>It was great. I felt at home. This is what I like.</p>
<p>And, even better, (almost) nothing gets installed that you don't install
yourself. I mean, of course dependencies get installed, but the dependencies
are reasonable. The whole reason I looked into OpenBSD in the first place
was because I was frustrated with Linux's "kitchen sink" approach to
everything.</p>
<h2>Configuration</h2>
<h3>Disks</h3>
<p>As mentioned above, the 1 TB SSD is configured with Windows.</p>
<p>The 3 512 GB NVME SSD drives are configured in a RAID0 (no redundancy) BTRFS
volume. I have subvolumes for /, /usr, /var, /var/lib/docker,
/var/lib/libvirt/images, /srv, /opt, /tmp, and /home. Many of these subvolumes
are just to make snapshotting easier. I broke out /usr from / so that when I
take a snapshot of the / (@) subvolume, it's basically only /root and /etc.</p>
<h3>Arch</h3>
<ul>
<li>Kernel: Zen</li>
<li>Shell: bash</li>
<li>Display Manager: lightdm</li>
<li>Window Manager: qtile</li>
<li>Terminal: Alacritty</li>
<li>Terminal Multiplexor: tmux</li>
<li>Browser: Qutebrowser</li>
<li>Screenshots: Flameshot</li>
<li>Password Manager: Bitwarden</li>
<li>Note taking: Joplin</li>
<li>AUR Helper: paru</li>
</ul>
<p>I plan to go into depth further on some of these things in future posts.</p>My Desktop/Laptop2021-11-20T13:23:00-05:002021-11-20T13:23:00-05:00Mike Erdelytag:erdelynet.com,2021-11-20:/technical/my-laptop.html<p>I went a few years without a computer at my desk at home. I lived off a laptop
and never sat at my desk with a proper keyboard, mouse, and monitor setup. But
as I started working from home more, I felt like I wanted a nice, comfortable
setup in our office, so I started looking for a computer for my desk.</p>
<p>I settled on a huge, powerful gaming laptop: an MSI GT76 Titan DT</p>
<p>I went a few years without a computer at my desk at home. I lived off a laptop
and never sat at my desk with a proper keyboard, mouse, and monitor setup. But
as I started working from home more, I felt like I wanted a nice, comfortable
setup in our office, so I started looking for a computer for my desk.</p>
<p>I settled on a huge, powerful gaming laptop: an MSI GT76 Titan DT</p>
<p><img alt="My Desk" src="https://erdelynet.com/images/mydesk.png" class="left popup" /></p>
<h1>My Computer</h1>
<p>MSI GT76 Titan DT Specs -- this thing is a beast:</p>
<ul>
<li>Intel Core i7-9700K (desktop class processor)</li>
<li>NVIDIA GeForce RTX 2070 w/ 8 GB GDDR6</li>
<li>32 GB RAM</li>
<li>3 x 512 GB NVME SSD</li>
<li>1TB SSD</li>
<li>17" 144 Hz Screen</li>
</ul>
<p>I wanted to have a desktop class machine, but I didn't want to be locked down
to my desk if I really wanted to. But it's heavy - over 9 pounds.</p>
<p>The laptop mostly lives with the lid closed while sitting on a
<a href="https://www.amazon.com/gp/product/B08RXJD3W3">laptop stand</a>. But I did take
it with me on my most recent vacation so that I could play some games if
I wanted to. I was able to run an HDMI cable from my laptop to the TV and play
on the TV from my laptop.</p>
<h1>Screens</h1>
<p>I have two 27" Dell Monitors connected to the MSI USB-C Dock. This <em>could</em>
allow me to have THREE screens, including the laptop screen, but I have
the laptop screen the <em>same-as</em> the left monitor.</p>
<h1>Keyboard/Mouse</h1>
<p>I am using a Logitech G915 Keyboard and a G502 mouse. I love the way the
keyboard keys sound and feel and the mouse is just awesome. I have the USB
dongles plugged right into my laptop (next to the USB-C dock cable) so that if
I need to restart the dock for whatever reason, I still have access to my
keyboard and mouse.</p>
<h1>Conclusion</h1>
<p>I really love this laptop. It's huge. And I do sometimes wish I had bought
a desktop computer so that I could add multiple GPUs, etc. But that hasn't
come up too often and I'm very happy.</p>Withings Sleep Tracking Mat with Home Assistant2021-10-17T16:53:00-04:002021-10-17T16:53:00-04:00Mike Erdelytag:erdelynet.com,2021-10-17:/technical/withings-sleep-sensor.html<h1>Background</h1>
<p>I have really been wanting to get bed occupancy working with Home Assistant for a while.
I have some lights around the house that are triggered by motion detectors. Especially
for the one in the bedroom, I thought it would be nice if I could disable the
motion-activated light whenever someone is in bed.</p>
<h1>Background</h1>
<p>I have really been wanting to get bed occupancy working with Home Assistant for a while.
I have some lights around the house that are triggered by motion detectors. Especially
for the one in the bedroom, I thought it would be nice if I could disable the
motion-activated light whenever someone is in bed.</p>
<p><img alt="Withings Sleep Tracking Mat"
src="https://erdelynet.com/images/withings_sleep_mat.png" class="right nopopup" /></p>
<p>Additionally, I thought it would be a good idea to disable some other triggers if both
of us are in bed (like motion sensors elsewhere in the house that the cat would set off)
or disabling turning on the bathroom fan automatically (due to humidity) if someone is
sleeping.</p>
<h1>Research</h1>
<p>There are a lot of solutions for for doing this:</p>
<ul>
<li><a href="https://selfhostedhome.com/diy-bed-presence-detection-home-assistant/">Using load sensors under the bed</a></li>
<li>Not good for us as our bed is on wheels</li>
<li><a href="https://medium.com/@qz_li/smart-bed-7de9ad55276e">Using aluminum-foil to measure pressure</a></li>
<li>I was concerned about the sturdiness of the aluminum foil</li>
<li><a href="https://www.openhardware.io/view/632/Bed-occupancy-detector">Measuring pressure with FSRs</a></li>
<li>I was concerned about the integrity of the solder connections to the FSR strips</li>
<li><a href="https://www.reddit.com/r/homeassistant/comments/khla5g/sleep2mqtt_my_diy_sleep_number_bed_occupancy/">Measuring air pressure with Sleep Number Bed</a></li>
<li>I am going to try to set this one up</li>
<li>Using a <a href="https://www.withings.com/us/en/sleep">Withings Sleep Tracking Mat</a></li>
</ul>
<h1>Buying the Mats</h1>
<p>I bought a pair of the Withings Mats from Amazon for \$179.99. A bit pricey, but
I thought the automations would be fantastic and ultimately worth it.</p>
<p>They came in a few days and were easy to set up. I slid them under the mattress
width-wise at about chest level when lying down. I used the Withings Health Mate
app that I already had on my phone for our Smart Scale to pair the mats.</p>
<p>After about 10 minutes, the Mats were paired and synced with my Withings Account
and the Health Mate app.</p>
<h1>Initial Problems</h1>
<p>Then I set up the
<a href="https://www.home-assistant.io/integrations/withings/">Withings integration</a>
in Home Assistant.
For the life of me, I could not get this to work at all with Home Assistant.
I was just not seeing any data from the Withings site from my scale or my
sleep mats. I assumed it was a problem with the Withings site because I
saw a bunch of postings in the
<a href="https://community.home-assistant.io">Home Assistant forums</a>.</p>
<p>Then I happened to look at the account info on my phone and realized that I
had set up the Dev account with MY email account and not the shared email
account I used for the Health Mate app.</p>
<p>So I set up another Dev account per the Home Assistant instructions and
re-did the integrations in Home Assistant. Then I started seeing data from
my scale. But the In Bed detection still showed Unavailable.</p>
<h1>Paying Closer Attention to the Directions</h1>
<p>I reread <a href="https://www.home-assistant.io/integrations/withings/">the documentation</a>
and saw that setting "use_webhook: true" in Home Assistant for the Withings
integration was "also required to populate the in_bed sensor".</p>
<p>So, I turned on "use_webhook" and re-added the integration in Home Assistant.
Still no luck.</p>
<h1>Light Bulb Moment</h1>
<p>I scouring the
<a href="https://community.home-assistant.io">Home Assistant Community</a> and issues on
Github, I saw some people mention issues with the webhook and Withings trying
to connect to a private IP address or hostname. And the light bulb went off!</p>
<p>I looked at my Home Assistant settings (Configuration -> General -> External
URL) and noticed that the URL was set to my hold URL before I started using
the <a href="https://www.nabucasa.com/">Home Assistant Nabu Casa</a> product. I then
went into Configuration -> Home Assistant Cloud and copied my Nabu Casa
URL and pasted it into the External URL setting under General.</p>
<p>I restart Home Assistant and added the Integration again and still nothing.</p>
<p>I also went into the Home Assistant Cloud settings and click the enable
slider for each webook (my and my wife's profiles).</p>
<p>But at this time, my wife was already in bed. I had not gotten in bed yet
so I was anxious to see if by getting in bed and causing a change to the
presence sensor, the data at Withings might update and Home Assistant
might see the change. And it did! Almost immediately!</p>
<p>Sure enough, after Holly got out of bed in the morning, her status changed
to "Clear" from "Unavailable".</p>
<p>Now both of our sensors work in Home Assistant. And the sleep score seems
somewhat accurate, so I'll continue using the Sleep Tracking Mats to track
my sleep patterns and snoring even if I ultimately go with a different
bed presence detection sensor like one of the alternatives I mentioned above.</p>
<h1>Conclusion</h1>
<p>I hope this helps anyone else struggling.</p>
<p>The TL;DR:</p>
<ul>
<li>Use the right email address for the Dev account</li>
<li>Make sure the External URL is correct (either your external URL or your
Nabu Casa URL)</li>
<li>Set "use_webhook: true" in the Withings integration section of your
YAML config.</li>
<li>Enable the webhook under the Home Assistant Cloud section of the
Home Assistant GUI Configuration</li>
</ul>Local Control2021-10-05T12:35:00-04:002021-10-05T12:35:00-04:00Mike Erdelytag:erdelynet.com,2021-10-05:/technical/local-control.html<h2>To quote <a href="https://www.digiblur.com">DigiBlur</a>, "Get your shit out of the cloud!"</h2>
<h1>The Issues</h1>
<p>Many Smart Home devices use "The Cloud" and a Smart App on your phone
to manage them. However, what happens when the cloud provider decides
to shut down their service, breaking all of your devices like
<a href="https://www.techhive.com/article/3337249/lowes-will-shut-down-its-iris-by-lowes-smart-home-platform.html">Lowes did with its Iris product</a>
in 2019.</p>
<h2>To quote <a href="https://www.digiblur.com">DigiBlur</a>, "Get your shit out of the cloud!"</h2>
<h1>The Issues</h1>
<p>Many Smart Home devices use "The Cloud" and a Smart App on your phone
to manage them. However, what happens when the cloud provider decides
to shut down their service, breaking all of your devices like
<a href="https://www.techhive.com/article/3337249/lowes-will-shut-down-its-iris-by-lowes-smart-home-platform.html">Lowes did with its Iris product</a>
in 2019.</p>
<p>I've had two issues with "The Cloud" breaking my smart devices:</p>
<ul>
<li>
<p>Google Nest changed the integration method to get to their
thermostats and I could no longer control my thermostat reliably
from Home Assistant. After setting up their new API (which cost
an additional one-time \$5 fee to access), it would <em>work</em>, but
I saw a lot of failure messages in my logs.</p>
</li>
<li>
<p>Chamberlain MyQ is constantly changing their API breaking
connectivity from systems like Home Assistant. Then, MyQ just
stopped working for many people even using their MyQ app. I just
looked at the MyQ app on my phone and my Garage Door has been
offline for <em>6 MONTHS</em>!</p>
</li>
</ul>
<p>While this one didn't affect my devices, it scared me into switching
from Kasa devices</p>
<ul>
<li>TP Link/Kasa <a href="https://community.tp-link.com/en/home/forum/topic/237614">updated firmware on some devices</a>
causing local control to stop working (and breaking Home Assistant).
The software update disabled local polling, which is how Home Assistant
connects to these devices to get status and send commands. When this
happened, I blocked Internet access for all of my smart devices that
don't require Internet access.</li>
</ul>
<h1>The Solution</h1>
<p>The solution to this problem is to use devices that don't use the cloud
or in some cases, ALSO have a local API.</p>
<h2>Tasmota</h2>
<p><img alt="Tasmota" src="https://erdelynet.com/images/tasmota.png" class="right nopopup" /></p>
<p>I switched out all of my light switches and most of my outlets from Kasa
to Tuya devices (mostly TreatLife). Then I flashed them with
<a href="https://tasmota.github.io/docs">Tasmota</a>. I used a lot of
<a href="https://www.youtube.com/c/digiblurDIY">Digiblur's Videos</a> to learn
how to <a href="https://www.digiblur.com/2020/07/free-your-smart-devices-from-cloud.html">flash Tasmota</a>.</p>
<p>Devices running Tasmota:</p>
<ul>
<li>A TreatLife dimmer</li>
<li>Two Treatlife Fan/Light controllers</li>
<li>Several TreatLife and other branded wall outlets</li>
<li>Several power strips and outdoor outlets</li>
<li>Several home-made IR receiver and senders</li>
<li>A current monitor for my stove/oven & my dryer</li>
<li>My garage door opener<ul>
<li>Bye, bye MyQ</li>
</ul>
</li>
<li>LED lights around my deck</li>
<li>A home-made button to control lights on my desk</li>
</ul>
<h2>ZigBee</h2>
<p><img alt="Zigbee" src="https://erdelynet.com/images/zigbee.png" class="right nopopup" /></p>
<p>Using <a href="https://slae.sh/projects/cc2652/">Slaesh's CR2652RB</a> USB
Zigbee Coordinator for Zigbee2MQTT, I have Zigbee several devices
set up:</p>
<ul>
<li>Motion sensors</li>
<li>Multisensors (Temperature/Humidity/Pressure)</li>
<li>Door/Window sensors</li>
<li>Water Leak Sensors</li>
<li>A button to turn on/off lights that don't have a switch (shed/flood)</li>
<li>Several smart plugs (which act as routers extending the Zigbee network)</li>
</ul>
<h2>Venstar Thermostat</h2>
<p>I switched out my Nest Thermostat with a Venstar T7900 thermostat. Yes,
The Venstar does have a cloud for programming its schedule, but the
programming is done in the cloud, but the program is then downloaded
to the thermostat itself.</p>
<p>Additionally, this device has a published local API. So Home Assistant
can talk directly to and control the thermostat.</p>
<h1>Tasmota Issues</h1>
<p>One problem that Tasmota has right now is that many devices are
seemingly moving away from the ESP chips that have been flashable
to this point to WB3S and WB8P chips, which are not flashable.</p>
<p>These new chips are cheaper and include Bluetooth, but that is leaving
Home Assistant users wanting local devices in the lurch.</p>
<h1>Conclusion</h1>
<p>Having local control of your devices is very important so you're not held
hostage by companies like Phillips Hue when the decide to retire their
Hue Bridge V1.</p>My Story with Home Automation and Home Assistant2021-09-04T11:08:00-04:002021-09-04T11:08:00-04:00Mike Erdelytag:erdelynet.com,2021-09-04:/technical/my-story.html<p><img alt="Home Assistant" class="left nopopup" src="https://erdelynet.com/images/home_assistant.png"/></p>
<h1>Background</h1>
<p>So, my Home Automation journey starts like may others: I bought one smart plug.</p>
<p>Some of the wiring decisions made while building my house make no sense. In
my family room, the light switch controlled an outlet in the very back of
the room. But that wasn't a good place for the lamp for the room. The lamp
needed to be way across the room where there is no switch-controlled-outlet.</p>
<p>I bought a Wemo Mini Smart Plug 3-pack. I removed the long-ass extension
cable I had running along the wall (and across a doorway) from the lamp to the
switched-outlet. Then we could turn on the lamp with, "Hey Google, turn on the
lamp." And it was glorious!</p>
<p><img alt="Home Assistant" src="https://erdelynet.com/images/home_assistant.png" class="left nopopup" /></p>
<h1>Background</h1>
<p>So, my Home Automation journey starts like may others: I bought one smart plug.</p>
<p>Some of the wiring decisions made while building my house make no sense. In
my family room, the light switch controlled an outlet in the very back of
the room. But that wasn't a good place for the lamp for the room. The lamp
needed to be way across the room where there is no switch-controlled-outlet.</p>
<p>I bought a Wemo Mini Smart Plug 3-pack. I removed the long-ass extension
cable I had running along the wall (and across a doorway) from the lamp to the
switched-outlet. Then we could turn on the lamp with, "Hey Google, turn on the
lamp." And it was glorious!</p>
<p>The next thing we realized was that we could control our Google Chromecast with
our Google Home and use it to turn the TV on and off. Another big win!</p>
<h1>Epiphany</h1>
<p>One day, I could not remember what I had called the Chromecast. I yelled, "Hey Google,
turn on the Family Room TV." Nope. "Hey Google, turn on the Downstairs TV." Nope.
And, out of frustration, "Hey Google, turn on the God Damn TV!" Obviously that didn't work.
But, why not? We don't have kids. And then it hit me, I should name the Chromecast:
God Damn TV!</p>
<p>I swear, it never gets old: "Hey Google, turn on the God Damn TV." "OK, turning on
the God Damn TV."</p>
<h1>A Modest Start</h1>
<p>During the lock down in 2020, my wife and I decided to paint our family room. As we
were wrapping things up, we noticed that the old switch/outlet covers didn't look right
any more. And I thought that I should replace the switches and outlets too with more
modern hardware.</p>
<p>AND I CAN MAKE IT SMART!</p>
<p>So I ended up buying a bunch of TP Link Kasa light switches and outlets. At one point,
I had replaced all of the light switches and several outlets with Kasa devices. Then
I wanted to start doing some automation. The Kasa Smart App allowed for scheduling lights,
so I scheduled a couple lights to come on automatically. Additionally, I have a pair
of lights on the back of my house that are individually controlled and I wanted them to
work as a pair: either switch would turn both lights on or off. The Kasa app allowed me
to do that. But the Kasa app had a limitation of only 3 automations like that.</p>
<h1>Research</h1>
<p>I started looking into what options I had to be able to do more automations: IFTTT, Home
Assistant, Google Assistant, Amazon Alexa, and OpenHAB. There are others, but I didn't
look into any of them:</p>
<ul>
<li>IFTTT sucks because it's super slow and they only allow three applets for free.</li>
<li>I tried OpenHAB and I couldn't wrap my head around it.</li>
<li>Back then, Google Assistant didn't have all of the features it does even now.</li>
<li>I don't own any Amazon Alexa devices.</li>
<li>Then I tried Home Assistant</li>
</ul>
<h1>Home Assistant</h1>
<p>I had a Raspberry Pi 4b lying around so I installed Home Assistant on it. I believe it
was around Home Assistant version 0.117.x time frame (November 2020).</p>
<p>I fell in love. I set up my switches and outlets. Set up some automations and had
things working great in no time.</p>
<h1>Progress</h1>
<p>I will document some of the cool things I've done in Home Assistant, but here are a
few things:</p>
<h2>Hardware:</h2>
<ul>
<li>Migrated from Docker-based HA install on RPI4 to Home Assistant OS running in a VM
in QEMU on Debian Server on an i5 Intel NUC.<ul>
<li>I felt like Home Assistant OS is easier for someone non-technical (like my wife)
to manage should something happen to me.</li>
</ul>
</li>
<li>Bought Home Assistant Blue to migrate HAOS to from the VM<ul>
<li>Compared to running in a VM on the NUC, the HA Blue is slow!</li>
</ul>
</li>
<li>Bought a Dell Optiplex 3040 i5 desktop to run HAOS on.<ul>
<li>Slightly slower than the i5 NUC, but MUCH faster than the Blue.</li>
</ul>
</li>
</ul>
<h2>Protocols:</h2>
<ul>
<li>Wifi/Cloud: I started with Wemo devices (controlled by Google Assistant). They were not
reliable.</li>
<li>Wifi/Cloud/Local-polling: I bought a bunch of TP Link Kasa devices, but had some problems with them
to be documented later.</li>
<li>Wifi/Tasmota(Local): I bought a TreatLife (Tuya) Fan/Light controller for two of my fans,
loaded them up with Tasmota, and LOVE them.</li>
<li>Wifi/Tasmota(Local): Replaced all Wemo and Kasa devices with Treatlife (or similar)
devices and loaded them with Tasmota.</li>
<li>Zigbee: I bought a bunch of Zigbee devices like buttons, door/window, temperature, water leak,
and motion sensors.</li>
<li>Wifi/Tasmota(local): I built a few Wemos D1 Mini Tasmota devices for infrared remotes,
infrared receivers, buttons, and current monitors.</li>
</ul>
<h2>Zigbee</h2>
<ul>
<li>I started with a Conbee II stick running deCONZ</li>
<li>I bought a Sonoff Zigbee Wifi Bridge and loaded with Tasmota to use ZHA in Home Assistant</li>
<li>I settled on a Slaesh CR2652RB Zigbee stick for Zigbee2MQTT<ul>
<li>This is the solution I'm using now and am very happy with it</li>
</ul>
</li>
</ul>
<h1>Conclusion</h1>
<p>I will continue to document my Home Automation journey hoping it will inspire others.</p>