Turning my Wi-Fi on and off at the front door

I like to turn off my Wi-Fi access point when I’m out. Sure, I could leave it on 24/7; I just don’t want to.

A while ago I rigged things up so that the Wi-Fi is usable from the bottom of the garden. That’s really great but it does mean that the AP is way up high on the second floor. To do it by hand, I have to climb two flights of stairs and flick a power switch.

I had a RPi 3B+ just lying around, so I did a little research then bought myself a RaZberry 2 Z-Wave controller, a Fibaro power socket, a Fibaro button and a Philio temperature and humidity sensor for a bit of extra fun. They all arrived a couple of weeks ago and I downloaded a copy of Hass.io. (Or should I say Home Assistant?!)

I am really pleased I started out small like this. The HA documentation is great, actually, but - shall we say? - takes some getting used to. Getting my set-up to work would have been next to impossible without Google’s links into this forum as well.

Getting the RPi to talk to the RaZberry board was a little tricky. The docs (here and here) say too little and too much. As a newbie, figuring out where /boot/config.txt is was OK but not exactly trivial. Perceiving that all the systemctl, modemmanager and raspi-config stuff was irrelevant I put down to my many years of experience as a professional programmer.

I added my device nodes to the Z-Wave network alright, but then I had some reading to do. (RTFM is a bit of a speciality of mine.)

Why doesn’t HA seem to know the real state of my power socket? Ah! Nobody implements the Hail command class because Lutron used to hold a patent for that. I roll my eyes and turn on polling for that entity.

Why are all my YAML configuration files empty when the docs tell me that’s where all the action is? Come to think of it, where is my configuration stored then? Okay, I know about that now though I’m still not sure if just using the UI for configuration is considered Best Practice. Opinion is divided, it appears.

Why won’t my button seem to do anything? Well, I couldn’t use the UI to fix that. I had to stop the Z-Wave network, edit my zwcfg xml file (default content from the Open Z-Wave project, I think) and add the extra line to fix its COMMAND_CLASS_CENTRAL_SCENE. I still had to figure out how to use it in an automation. What’s the right entity name to use in the trigger? What entity_data is required and how do I know what that is? Thank you this forum!

And it works. When I leave the house, I can hit the button next to the front door and the socket upstairs turns off the power to my Access Point. When I get home, I can press the button again to turn it back on. Then I can fire up a browser and see what the temperature and humidity have been doing over time. Very cool.

Now to sit back and ponder what else I might use this stuff for.