Config: Setting up the Xiaomi Mi Robot Vacuum in Home Assistant

I have a dog who sheds like crazy, and the only thing that keeps the dust bunnies from overrunning me is a robot vacuum. My aging Neato Botvac, after fulfilling several years of hard labor, ate it’s 3rd expensive replacement battery recently. This was obviously a great excuse to get a new one that works with Home Assistant.

I went with the Xiaomi Mi Robot.

After getting paired with the app, teaching the robot English, and sending it on it’s way around the house to do it’s thing, I realized that the process of getting it paired with Home Assistant was not going to be straightforward.

For anyone else who runs into trouble, here’s how I got it working.

Continue reading →

Favorite ESP8266 Internet of Things Projects

So many good uses for these chips, here are a few I’ve made and some I still intend to.

  1. ESP Easy – by far the easiest way to connect a bunch of cheap sensors to an esp8266. I have about 6 of these doing various things.
  2. Bed Occupancy Sensor – FSR sensor for pressure and a simple automation to determine bed occupancy
  3. WiFi Candle Using multiple WS2812 addressable LEDs to create a simple lamp that flickers like a candle.
  4. Notification Flag – Raise a flag based on a simple condition. Would be nice to combine in tandem with…
  5. Mailbox Sensor – Notify when mailbox is opened.
  6. DIY Milight Hub – I’ve been using this and it works great. Control as many cheap Chinese RGB bulbs as you want.
  7. Simple Water Alarm – If water shorts the wires, it wakes a sleeping esp8266 and sounds the alarm
  8. Door/Window Monitor – Along the same lines, a simple magnetic switch monitors the status of a window or door.
  9. Smart Power Strip – Retrofitting a power strip with 2 banks of controllable outlets, using 3D printed parts.
  10. Weather Station Display – Another super cool 3D printed project that plugs in and displays info on a small screen.

My favorite form factor of the esp8266 is the Wemos D1 Mini. Tiny, all the inputs you need, and there are many premade ‘shields’ for it so you can stack components.

 

Hardware: Odroid XU4 as Plex Media Server

The Odroid XU4 – like a Raspberry Pi, but better.

As part of my efforts to be cloud non-dependent, I have a NAS full of several terabytes of music, movies, and TV shows. Plex is of course everyone’s favorite software for solving this problem, as it essentially turns your hard drive full of files into a private Netflix capable of streaming and syncing to any device.

1080p and commercial free, sorry Anthony.

The problem is that streaming and syncing is a very CPU intensive task and requires a server of substantial processing power. Is the cheap Odroid XU4 single board computer up to it?

Continue reading →

Presence Detection Part 2: Improving Presence with Node-Red

In my previous post about presence detection, I showed how you can combine multiple device trackers into one highly accurate Bayesian sensor.

In Home Assistant, the binary_sensor.brad_presence that I created is either on or off. It would be a little nicer if it were a device_tracker entity instead that was either home or not home.

With Node-Red that’s easy enough, but what if we take it a step further and create our own custom device_tracker based on a different set of rules?

Continue reading →

The Open Source Smart Home: Getting Started with Home Assistant & Node-Red

Home Assistant is one of the most interesting open source projects I’ve ever come across. It interfaces with any device, platform, or service you can think of and allows you to perform actions based on the data you monitor. It has a great community and is under extremely active development. With a little creativity almost anything is possible with Home Assistant, and best of all it’s private and totally under your control.

After using Hass to control my smart home for the last year, I started to hit the limitations of it’s YAML-based configuration. Any automation that was even moderately complicated  required a lot of pieces spread out through the configuration files (see the sprawling “Creating an Alarm Clock” thread on the HA forums for an example). Doing simple things like if-then or a  loop required awkward workarounds. As my automations (and ambitions) increased in complexity, so did the time I spent  trying to figure out what was going on.

That’s when I discovered Node-Red, a visual programming tool developed by IBM. Node-Red is the perfect complement to Home Assistant, allowing for very complicated logic to be constructed visually through a simple “flow” interface. It integrates seamlessly with Home Assistant. Let’s set it up.

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 →

Hello world!

Hi I’m Brad and I like to tinker.

A year or two ago I decided I wanted to sharpen my technical skills, and also use more open source software in an effort to move away from depending on ‘the cloud’ and all that entails.

I bought a Raspberry Pi 3 Kit and pretty much haven’t stopped playing with it since. Since all of the things I’ve learned have been the result of the generous people who have written their own blogs, forums posts, or github issues sharing their solutions I decided it was time to document my own projects.