Notes from my latest Home Assistant puttering.
1d 6h ago by piefed.zip/u/SwingingTheLamp in homeassistantLittle did I know when I found a HomeKit lightbulb in the clearance bin at my grocery store for $3 what it would lead to. Here I am, though, adding to and re-jiggering my smart home set up. It's nothing earth-shattering, but it was fun, and I thought I'd share what I found out in case it's news to other folks. It started when I bought a handful of new Sonoff devices...
Mainly, I ordered the MINI-ZB2GS to install in the front hall. I have a 2-gang switch box there, with switches controlling the porch light outside, and the ceiling fixture inside. These are slick, little devices that fit in a standard electrical box, and convert your existing mechanical switches into smart switches. I ran into a head-scratcher, though, when I flipped the switch to test the porch light, and it cycled on and off several times before remaining off. I thought that it had to do with an interaction with the motion-sensor on the light itself, but as it turned out, it's because the MINI-ZB2GS supports momentary push-buttons, as well as switches. While tucking the unit into the box, I must have inadvertently pushed the button to put it in momentary-push mode. I just had to remove the face plate, and carefully push the button to cycle the mode back to 'switch'.
I took the opportunity to upgrade from a ZBDongle-E to a ZBDongle Max. This is what turned into the really enjoyable part! The ZBDongle Max can operate as Zigbee coordinator over USB, ethernet, or WiFi (though not recommended). I mounted it in a convenient location where it has good connectivity to the rest of the Zigbee network, and ran a cable to my PoE switch. Home Assistant picked it up right away, it was just a few clicks to add it to ZHA, and a few more clicks to migrate the network to this new coordinator. I realized that with the HA server physically de-coupled from the Zigbee coordinator, it doesn't need to be located in the living room any more. It could live anywhere that has a network jack. Since HAOS is running in a virtual machine, I could even temporarily migrate the VM to other hosts (like my desktop machine), while moving the usual host out of the living room. (Also, this dongle allegedly supports firmware that can do Zigbee and Thread simultaneously. I haven't tried it, since I don't have any Thread devices yet.)
The ZBDongle Max has WiFi AP functionality for up to 8 devices. It's limited to devices that connect outbound, because it won't route incoming connections, nor forward mDNS announcements. That's perfect, though, for connecting the ratgdo, since it connects to HA with MQTT! That decouples the garage door from my main WiFi AP. I have a few RGB LED light strip controllers that use WiFi, but the Magic Home integration discovers them with mDNS. If only there were some way to have them connect outbound, instead. And, as it turns out, there's OpenBeken firmware. These are BL602 devices, which can be flashed over-the-air, so I did that. Now, they connect to HA via MQTT, too, so they can get off my main AP, too. OpenBeken supports MQTT discovery for HA, so it was a snap to connect them. There used to be a noticeable delay when operating them with the Magic Home integration, but now they are lightning-quick. I can push the button on the remote, and it sends a Zigbee message to the coordinator, which forwards it to HA over the LAN, which triggers an automation, then HA sends a message back over the LAN to the ZBDongle Max, which sends it to the LED strip via WiFi. And it all seems to happen instantaneously.
Just for fun, I also added a CAM Slim Gen2 to my order. I was disappointed to later notice that Sonoff doesn't list Home Assistant compatibility for it; you're meant to use the eWeLink app. BUT, there's thingino to the rescue! It's a BusyBox-based firmware which you can flash the camera with, and then add it to Home Assistant using the ONVIF integration. Supposedly, you can use the two-way audio via a WebRTC integration, but I haven't set that up yet.
Perhaps the most mundane thing (to me) was adding the open/closed sensor to my freezer door. Sometimes, it doesn't seal all the way when closed. By very carefully locating the sensor and the magnet, HA now knows whether the freezer is closed all the way, and quick 'n dirty automation alerts me when it's not, using a voice announcement on the smart speaker.
In the process, I also discovered the UPnP functionality of both my router and switch, and the HA UPnP integration. It was a good day.