Home Assistant

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.

Read More
Ramblings

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.”

Read More
VueJS

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.

Read More
Coronavirus

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.

Read More
Coronavirus

Some Thoughts On COVID-19

If you ask people over a certain age, they can always tell you where they were when they found out about 9/11.

I was a sophomore at Auburn, and my first class that day was at like 1pm, so I enjoyed the great collegiate tradition of sleeping in. Usually when I wake up the first thing I do is check my email. It’s still the first thing I do. That morning my inbox was full with messages on the fraternity mailing list, with things like “pray, a lot of people are dying today.” I turned on the TV just minutes before the first tower collapsed.

Stayed glued to the TV the rest of the day. News coverage was on every channel, even Discovery Channel. Class was cancelled. I went and filled up my car in case I needed to drive the 250 miles back home to Tennessee.

That evening I was in the SGA office in Foy Student Union folding thousands of little yellow ribbons for a very hastily organized memorial service on Samford lawn a few days later. We listened to President Bush’s speech on a small boombox in the office.

I feel like I have been living that day over and over again for the last two weeks.

Read More
Ramblings

Some Work From Home Tips For Your COVID-19 Isolation

I’ve been working from home occasionally for probably close to ten years now, and full-time for the last few months. Thanks to the COVID-19 pandemic, many more people are now getting to enjoy (I guess?) the privilege of working from their homes during the crisis.

If there is one thing that I hope comes out of this whole miserable period it is the understanding that there are a lot of people out there have jobs that really don’t need physical presence in an office building. And if they don’t need to be in an office, maybe they don’t need to live in an expensive city either. This could be the beginning of a whole new boom for small and mid-sized cities with affordable costs of living. Maybe you can afford a house after all! And maybe companies don’t need to lease out an expensive building in an expensive city, fill it to the brim with people in open floor plans or (even worse) hot-desking to do the work they need to do.

It’s an even bigger win for disabled and non-neurotypical people who often struggle to work in the modern knowledge workforce despite their skills. For people with autism, ADHD, and other related conditions, modern open offices or cubicles are a difficult work environment whereas the home environment may offer much more safety and control.

If this is your first time doing this, it may seem a bit odd, even naughty, to be working without commuting to an office building. With that in mind, I’ve put together a list of things I have observed over the years of working from home to help you get a feel for what this is like.

Read More
Home Assistant

Migrating from SmartThings to Home Assistant

I have been a SmartThings user for many years. The orginal reason was that, when we bought our current house in 2012, I wanted to turn the eave lights on at sunset and off a few hours later. After a short attempt to use Wifi-based Wemo switches, I settled on SmartThings and GE Z-Wave switches.

I was so happy with it that I started putting them in more places. I added Kwikset SmartCode keypad locks and door sensors. I added more switches, like to turn on the garage overhead lights when the doors opened. I added sensors to monitor the temperature in the closet where I keep my server. And for many years this setup worked great.

But over the last year, and especially since Samsung acquired SmartThings, I have become increasingly disillusioned with the SmartThings ecosystem. This last week, my disillusionment and frustration finally boiled over, and I migrated to a new platform.

So why did I abandon SmartThings?

Read More
PHP

Using Phinx Programmatically

Phinx is a really cool database migration package that allows you to write changes to your database as code. It keeps track of which changes have been applied and allows you the option of rolling back if you hit an issue.

All the documentation on Phinx describes a typical setup where you would run the phinx command to do your migrations. And that is all fine and good in most projects. But what happens if you are integrating Phinx into an existing project that already has a lot of the usual scaffolding in place?

Read More
Release Announcements

petfeedd 0.2.2 Released

petfeedd, the software for pet feeders, has a new release. 0.2.2 is a maintenance release that add support for new Raspberry Pi Hardware. There are no breaking changes in this release.

Read More
Python

Archiving A Yahoo Group

I’ve been on the Internet a long time, since the early to mid 1990s. And when you are on the Internet that long, you tend to leave a pretty long trail behind you. But over the years that trail gets overgrown as sites close, lists vanish, and machines crash. There is precious little left from those early years.

One thing that has persisted to this time, despite being pretty heavily neglected over the years, is Yahoo Groups. Those who remember the first dot-com boom may remember that Yahoo Groups was not originally Yahoo Groups. It was eGroups, which Yahoo bought and merged into their own sprawling empire. eGroups basically made it possible for anyone to set up a mailing list without needing access to a listserv service.

Well, it looks like the end has finally come for Yahoo Groups. Verizon, the new owner of the rotting corpse of Yahoo, has announced that all groups will disappear on December 14th. I was on tons of mailing lists during my early Internet years, and I would really like to archive and preserve those messages if I could. But how could I get them out of Yahoo?

Read More