If you’ve ever set up DNS forwarding on a Ubiquiti EdgeRouter and have your own internal authoritative DNS servers, then you may have noticed that it doesn’t quite work right. If you look up the hostname of your router via the EdgeRouter, you’ll always get back an address of


The Problem

EdgeOS makes use of dnsmasq for its DNS server needs. For the most part this works well and is very flexible. It allows you to set up a cached DNS forwarder and do all sorts of nifty DNS routing. Unfortunately, the default options are a little wonky.

By default, dnsmasq will read /etc/hosts and use what it finds there to answer DNS queries. While this may be good for some scenarios, it’s terrible in others. For example, the edgerouter adds default hosts entries for the router itself, that look like this:

Due to the dnsmasq options, it picks these up and will always answer queries for the router’s hostname with an unreachable loopback IP address.

Because there’s no place like…

The Fix

Dealing with this is thankfully simple. Just turn one option on, and you’re set:

This sets the –no-hosts option on dnsmasq, which prevents it from reading /etc/hosts at all. Now your DNS forwarder will completely ignore anything it finds in there and simply forward the request to your configured DNS servers. It’s also worth noting that the DHCP/DNS integration works through a different mechanism, so that will still work just fine if you choose to use it.

The other suggestions I’ve seen involve setting interface parameters to force a static DNS mapping, but this has the advantage of forwarding the DNS request to your actual nameservers.

Hopefully this will help someone out there. It’s been annoying me for a few days now as I set up my folks’ network…

Code verbosity is one of those topics that everyone has an opinion on — and mine will probably differ from yours. One of my particular quirks is that I like my code to fit in 80 columns wherever possible (or 132 on some codebases). It’s just one of those things.

The C++11 enum class concept, as nice as it is, can increase the verbosity of your code. It’s a fine balance to get the right level, and in large switch statements for example, enum class values can get very annoying.

Enter the C++11 version of the using statement, and you can clean this up fairly easily…

Building a Workshop

January 8, 2019

I love my home, but the floorplan is a bit odd. It’s a popular thing in the region: they like to put a room or two adjacent to the front door, neither of which have doors of their own. These rooms seem solely for show rather than function.

I’m not into functionless decor, so I’ve been scratching my head — and staring at a pair of empty rooms — for two years now.

My garage isn’t air conditioned (that’s important in Texas!), and neither is the shed, and I really want a workshop.

I have empty, functionless space that isn’t separated from the rest of the house.

Time to get creative…

Resolutions: 2019

January 1, 2019

My Christmas was a general mess. It was supposed to be the first year I got to host it for the family, but then my 18-month-old nephew got sick and ended up in the hospital (don’t worry, he’s doing much better!). Everything fell through, and chaos abounded.

And now it’s New Year’s Eve, and I’m sitting around writing a blog post. Go me.

Good riddance, 2018.

I have an older iMac in my kitchen with a keyboard that’s on its last legs. Some of the keys don’t even work anymore, and it’s an exercise in frustration to use. This evening I tried to plug in an older aluminum keyboard, and it didn’t work. The caps lock key wouldn’t even light up.

You’ll never believe the fix for this keyboard!

(See? You too can write clickbait headlines!)

…or maybe a couple hundred, I would be interested in making a bid for the Lowe’s IRIS home automation business.

It’s sad to see that Lowe’s is exiting the arena; while I wasn’t interested in a cloud-based system, the fact that a major DIY retailer was getting involved in this space struck me as a hopeful sign of things to come.

I just hope this isn’t an indication of the health of the entire market…

So Much For That Plan…

November 17, 2018


Amazingly enough, I’m still alive.


Built on a similar platform as the HS-WD100+, the HS-WD200+ is a Z-Wave Dimmer that once more earns the “best in class” designation. It offers all the features of the 100+, but with additional enhancements, such as the addition of four extra scene activation triggers (quadruple- and quintuple-tap). The most important new feature, however, is the presence of seven individually-addressable RGB status indicators.

2018 already? WTF?!

January 1, 2018

At some point while I clearly wasn’t looking, 2017 managed to escape. Now I’m stuck in 2018, and I have no clue how it happened.

My attention span really is that bad.

The Z-Wave interface I’m working on is an inherently asynchronous beast. Callbacks abound, and the use of lambda functions makes that much easier to deal with. This fact led me to select C++11 as the language standard for the project.

And then I added automatic memory management with std::shared_ptr<>, and it all fell apart.

Why, you ask?

So there I was, all gung-ho to make some serious progress. I was going to do a bunch of reseach on Z-Wave; I was gonna write a nice little bit of software to replace OpenHAB; and I was gonna blog about it. It was gonna be great!

I was truly in the Zone.

And then my boss quit, and it all went to hell in a handbasket.

openHAB is a Java-based platform (developed in parallel with Eclipse Smarthome, on which it is based) that provides interface, control, and automation functionality for your home. It supports many devices and networks through “bindings”, including Z-Wave. A rules engine provides for automation, and several user interfaces are available.

Since HomeAssistant doesn’t support the scene control features of the HS-WD100+, I decided to give openHAB 2 a shot.

It works reliably once configured.

Until you get to that point, it’s a hot mess…

The HS-WS100+ or HS-WD100+ HomeSeer switches both support multi-way configurations. This will not work with standard three-way switches, however; instead, you need the HS-WA100+.

Note that this switch is not a Z-Wave device, does not directly control a load, and will not work without one of the aforementioned HomeSeer switches. If you’re looking for just a remote Z-Wave switch without load control, you should look elsewhere.

From Stack to Rack

April 8, 2017

I wasn’t sure what I was going to do with my small collection of servers when I moved into the house, so they ended up stacked on a folding table. While it was functional, it certainly wasn’t the prettiest thing in the world. Plus there was the mess of power strips and cables…

After procrastinating for months, I finally got around to doing something about that this weekend.

HS-WS100+ Switch

The HomeSeer HS-WS100+ is a best-in-class Z-Wave wall switch. It uses a mechanical relay, which means you can switch almost any load within reason. It even supports three-way operation with the HS-WA100+ companion switch.

And like the HomeSeer dimmer, it includes additional scene control functionality, making this a very versatile addition to your home automation system.

Denny - the mind behind

Hard as it is to believe, today marks’s first birthday. One year ago today I finally got around to putting my new blog together. My goal was to post often, and talk about fun things.

I only managed about a post and a half per month. This is post #20.

What went wrong?

I’ve been waiting for weeks now for HomeSeer to get their excellent Z-Wave dimmers and companion switches back in stock. They finally did earlier this week, and my wallet is feeling the pain…

Shipping was prompt; I ordered them on Tuesday with standard ground shipping, and — to my shock — they arrived this afternoon. Now my weekend is utterly doomed…

Sensative Strips are thin devices that you can install on a door or window to detect the open or closed state. They’re small, they’re functional, and amazingly enough, they speak Z-Wave. Install one on the frame of your door, and you have a nice little sensor without having to run wires.

I got mine from a seller on Amazon.

They’re also fiddly little things, at least when pairing with OpenHAB…

If you can’t get your hands on a HomeSeer HS-WD100+, the GE 12724 is a nice alternative. It doesn’t have a visual indication of the dim level, and it doesn’t support multi-tap scene control, but it’s comparable in most other ways.

So long as you can get beyond the crappy status reporting, that is…

Need I say more?

I’m mainly looking at OpenHAB for support of the advanced functionality in the HomeSeer HS-WD100+ in-wall dimmers. Specifically, they have multi-tap functionality supporting four commands in addition to the generic On/Off function. For example, my pool light switch is out by the shed; wouldn’t be nice if I could just double-tap the switch at the back door instead?

Here’s one way of making it work in OpenHAB 2…

I’m in the process of evaluating alternative solutions to the Wink (I really want the Central Scene functionality for the HomeSeer Switches!). After a brief foray into HomeAssistant (which doesn’t support it either), I decided to try OpenHAB 2. It’s early in that process, but so far it looks promising.

Unfortunately, ESXi has an issue or three with USB passthrough support.

The HomeSeer HS-WD100+ In-Wall Dimmer is widely recognized as one of the best Z-Wave dimmers currently available. It has the functionality one would expect of a dimmer, plus additional scene control abilities via double- and triple-tap operations on either the top or bottom paddle. Pairing is simple, but advanced features may not be available with some hubs.

The Leviton DZR15 outlet provides a convenient method of controlling loads without having a separate module cluttering things up. This unit installs in place of a standard wall outlet and provides two sockets: one switched, and one unswitched.

The unit is very easy to pair with most home automation hubs.

The Leviton DZS-15 is a Z-Wave switch designed for on/off control of 15 Amp 120VAC loads. It supports a wide range of loads, and supports 3-Way operation with the addition of a remote companion switch. Pairing with the Wink (and presumably other hubs) is simple.