Location Aware Notification Lights with Node-Red and IFTTT

I am in the habit of going on cooking sprees while listening to music… loudly. I only share one wall with a neighbor here in the loft, and that neighbor is very tolerant. On a Sunday afternoon, with multiple dishes going at a time, my most used smart home feature is “Alexa, set a meatball timer for 25 minutes”. Having Alexa keep track of all my timers is really helpful when my hands are full. The problem is that I rarely hear the timer, and have burned a few things not paying attention.

Using IFTTT, Node-Red, and Home Assistant I can blink the lights in the room when the Alexa timer goes off – even if I wander off to a different room.

Continue reading →

More Nodes for Home Automation: state-machine, actionflows, dashboard, statistics

I’m keeping a running list of useful nodes I’ve found for home automation. Here’s a couple of more I came across recently in the Node-Red library.

  • dashboard – Create an entirely custom, live dashboard. Amazing!
  • statistics – Some useful statistical functions, based on Simple Statistics
  • state-machine – Manage a state machine with your own parameters
  • actionflows – This one seems extremely promising. Package flows as reusable functions that can be looped, prioritized, and benchmarked.

I think making a dashboard is my next project, which I will certainly document here on the blog.

I am wondering if state-machine could be used to manage the state of a finicky IR controlled fan I have. I was never able to find a way to do this in Home Assistant accurately. Since Node-Red can do more complicated logic, it could monitor my fan related sensors and output in the format for the MQTT Fan component. Interesting!

Useful Sensor: Cardinal Wind Direction for Home Assistant

At a glance – gustier than usual this morning.

As someone who cycles to work most days, I keep a pretty close eye on the weather. One thing I like to know is which way the wind is blowing – a strong headwind means I should maybe opt for the road bike, not the cruiser. Home Assistant has a ton of weather platforms – and the Dark Sky one that I prefer tracks wind direction. The only problem is it returns the direction in degrees, which is meaningless to me.

See below for a template sensor that will convert degrees to a human-readable cardinal direction.

Continue reading →

Useful Sensor: Bayesian Sleep Detection in Home Assistant

Sleep is not something I can directly observe in my smart home (at least not until I build that DIY bed sensor). It would be nice to know though – then the alarm could be set, doors locked, thermostat set, music volume slowly dimmed, and internet bandwidth reprioritized automatically when it’s time for bed. We spend a lot of time sleeping in our homes, so it makes sense to be able to detect it.

Using Home Assistant’s Bayesian binary sensor it’s possible to guess pretty accurately when everyone’s tucked away. See below for example YAML and explanation.

Continue reading →

Useful Sensor: Motion Last Seen & Meta Motion Sensor

You know what’s great about motion sensors? They are very, very cheap to build yourself. All it takes is an esp8266 module like the Wemos D1 Mini, some PIR sensors, and the ESP Easy firmware and you can have a bunch up and running in a few minutes. I haven’t DIYed a battery powered one yet, but there are plenty of great Z-Wave ones available.

Once you have a couple of motion sensors in your smart home, you can have Home Assistant track the last place it saw motion. This is a useful bit of info – useful as a condition for your automations, or as an input for a bayesian binary sensor. See below for YAML to create a meta-motion sensor with a history.

Continue reading →

Big List of Useful Home Automation Nodes for Node-Red

An ongoing list of nodes I have found useful for constructing home automation flows. I have not included device platform nodes, as all state tracking and actions are performed in Home Assistant.

Continue reading →

Presence Detection Part 1: Home Assistant & Bayesian Probability

One of the most useful things to track for home automation is whether anyone is home or not. If you want the lights to turn off when no one is home, the vacuum robot to run when you’re at work, or the heat to come on before you arrive home on a cold night you need to reliably be able to tell if the house is occupied.

How can we track the state of something that is not directly observable? We can’t plug ourselves directly into the internet (…yet). After trying several approaches to monitoring presence, I’ve come up with a method that is very near 100% reliable.

Continue reading →