Rob Peck Observations on technology, leadership and life.

petfeedd With Multiple Servos

I’ve had several people write me recently and ask about how to use petfeedd with multiple servos. It’s actually now my most common feature request, so I will definitely be sure that that is added in the rewrite that I am currently working on.

In the meantime, you can run multiple instances of petfeedd using Docker, each pointed to a different servo. I would be sure to offset each servo by a few seconds to be sure you don’t have any voltage drop issues with the Raspberry Pi.

Remotely Controlling a DeLonghi Oil Radiator using Home Assistant, ESPHome and ESP32

So here we are in October. COVID-19 is still with us and I am still working from home. Meanwhile, summer has quickly changed to autumn. The leaves are falling as are the temperatures. My house was the model home for our neighborhood, and what would have been the garage was finished in and used as a sales office. So when we bought the house, I was like, perfect, a perfect spot for an office!

But the problem is that, because it was a garage, it’s not connected to the house’s HVAC system. In the summer there is a mini-split that keeps the whole area cool. But it’s kind of loud. However, I do have some of these DeLonghi Oil Radiators to use in the winter which provide abundant, silent heat without using very much power. But the downside is that they take awhile to warm up.

Wouldn’t it be cool if I could have them turn on an hour early and “pre-warm” the office? Well, to get the obvious part out of the way, yes, there is timer functionality, but that is not nearly as cool as tying it into the rest of my smart home. But it has a remote. What if I could find a way to use Home Assistant to send IR commands to the heater?

Turns out you can!

Proxying CUPS IPP using nginx

So I have this older Dell laser printer, a B1160w. It was released back in 2012, but it is a totally fine home printer for when I occasionally need to print something and it still works great after all these years, so I see no compelling reason to buy a new one.

But there’s a problem: macOS support. Namely, no drivers have been released for macOS since 2017. Starting with Catalina, Apple started requiring code signing for executables, and the official Dell driver has an executable in it that refuses to execute because it isn’t signed. And despite my best efforts, short of turning off Gatekeeper entirely, I was not able to get it to work.

But the printer itself is fine; there is absolutely no reason to create additional electronic waste purely for software reasons. But thanks to open-source software, we have another options: CUPS.

Creating a Safe Kids Network with pfSense, Unifi and NextDNS

Well, here we are five months later and COVID-19 is still a thing. And like many parents we are facing the need to continue our daughter’s education at home. Our local school district has stated that all learning will be conducted online for at least the first nine weeks. And even if they allow for students to return, we will probably opt to keep her at home for awhile longer until things are more stable.

Now, our daughter is seven and will be turning eight in a couple months. So she’s at that age where she’s old enough to do some things independently. But, as most of us know, the Internet is not a safe place for a seven year old and we as parents need to exercise some level of control over the things they can access. And while the best solution is a set of eyes, we obviously can’t be everywhere at all times. So this is the solution I came up with.

Making Native WebDAV Actually Work on nginx with Finder and Explorer

So my long march away from Apache has been coming to an end, and I am finally migrating some of the more esoteric parts of my Apache setup to nginx. I have a side domain that I use to share files with some friends and, for ease of use, I have configured it with WebDAV so that they can simply mount it using Finder or Explorer, just like a shared drive.

The problem? nginx’s WebDAV support … sucks.

First, the ngx_http_dav_module module is not included in most distributions from the package managers. Even the ones that are, it’s usually pretty out of date. And, perhaps worst of all, it is a partial implementation of WebDAV. It doesn’t support some of the things (PROPFIND, OPTIONS, LOCK, and UNLOCK) that are needed to work with modern clients.

So what can we do?

Securing Home Assistant Alexa Integration

One of the big missing pieces from my conversion to Home Assistant was Amazon Alexa integration. It wasn’t something we used a lot, but it was a nice to have. Especially for walking out a room and saying “Alexa, turn off the living room lights.”

I had been putting it off a bit because the setup instructions are rather complex. But this weekend I found myself with a couple free hours and decided to work through it. It actually wasn’t as difficult as I expected it to be, but it is definitely not the type of thing a beginner or someone who does not have some programming and sysadmin background could accomplish.

But in working through it, there was one thing that was an immediate red flag for me: the need to expose your Home Assistant installation to the Internet. It makes sense that you would need to do this - the Amazon mothership needs to send data to you to take an action after all. But exposing my entire home automation system to the Internet seems like a really, really bad idea.

So in doing this, rather than expose port 443 on my router to the Internet and open my entire home to a Shodan attack, I decided to try something a bit different.

We Want To Build!

Yesterday, Marc Andreessen, one of the more influential Silicon Valley investors, dropped an essay on the Andreessen-Horowitz blog called It’s Time To Build. I read it with a sense of bemusement because, like most things that come out of wealthy elites, and especially wealthy coastal elites (and especially wealthy Silicon Valley elites), it is filled with the myopia that can only come from spending far too much time in a bubble disconnected from what’s going on in the rest of the world.

In short, the main thesis of his essay is that we’ve stopped building “things,” which, in this context is housing and medical devices but can more broadly be interpreted as a loss of civilizational inertia, because we stopped “wanting them.”

Using Vue Single-File Components Inside Shadow DOM

Let’s say you’re building a tiny little Vue app. Not a full-on single page app, but something very tiny that will need to be embedded into other pages. Like a fully interactive widget that can do a wide variety of things, but will need to be self-contained so as not to interfere the rest of the page.

Traditionally, in the past, we did this with a wide variety of approaches. Going back to the 90s, we use Java Applets (remember those?) and Active-X controls (ugh). We used Flash too (double ugh). Lately the preferred approach has been iframes, and while this is still a perfectly valid approach, it has it’s own set of problems.

But now, we also have Shadow DOM which provides us another approach to building richly interactive widgets that are (mostly) contained from interfering with the styling of the surrounding page and, crucially, doesn’t allow the surrounding page to interfere with the widget!

And, yes, Vue can totally be used inside a shadow tree. It just take a bit of setup work.

Mourning

There was a great article that was recently posted by the Harvard Business Review that I think bears some very important consideration by everyone.

Stress is easy to identify, and we are all certainly stressed. The predictability of our daily lives has been interrupted. Many of us have lost jobs, faced furloughs or pay cuts. Our kids are home from school. We’re worried about our families catching this disease, and ourselves as well. We’re all stuck together in this purgatory of waiting for this crisis to play itself out with no idea of what kind of world waits for us on the other side. We know that this will end - all pandemics eventually do - but we’re going to emerge from our shelters into a changed world.

My wife and I have spent the last couple of weekends cleaning out closets. It kind of feels like rearranging the deck chairs on the Titanic at times, but it also keeps my mind occupied for the most part and keeps it from going into pretty dark places. And hey, my closet is now the cleanest it’s been since we moved. But every so often my mind ends up going there anyways.

Such as from seeing a pile of T-shirts.