Hacker News new | ask | show | jobs
by adyus 2394 days ago
Any discussion of Home Assistant should start with the founder's vision, which I found very clear: https://www.home-assistant.io/blog/2016/01/19/perfect-home-a...

The purpose of Home Assistant is to first observe all data flowing through your house, by connecting all existing sensors, switches, gateways and anything else that has a digital pulse.

The second step is control, having centralized access through a web or mobile app to all moving parts of a home.

However, the power of HA comes from the third step: automation. The best interface is the one you can forget exists.

I've been running HA for over two years. Aside from being lazy about upgrading to newer versions and adjusting to breaking changes, it's been working great and has spoiled me and my wife. We now expect every house we visit to automatically unlock before we reach the door, for the lights to turn on (and gradually off) automatically as we move through rooms, and for our phones to notify us when the best time to open a window would be, to naturally cool during the summer. It's great to have cold light during the day and warm, lower level light as the evening progresses.

Together with the Python environment provided by appdaemon, there's almost no limits to what you can do, provided you instrument your house with sensors and switches as best as you can.

6 comments

I just wanted to saythat I totally agree with part:

> However, the power of HA comes from the third step: automation. The best interface is the one you can forget exists.

I have the interface just for my carers and PAs et cetera, almost all of my interactions with the house are done via voice or other scripts triggered by various things. I would post a picture of my dashboard but it is horrendously messy contain hundreds things!

I'm curious how you setup "automatically unlock before we reach the door"
Motion sensor on patio. When it detects motion, check if your phone joined the network in the last minute and that a few minutes ago you were not in the gps area of your house. Send command to unlock the lock. Send a push notification that it unlocked so you know if it triggered on accident (incredibly unlikely when using motion + gps + wifi).

The motion sensor isn't strictly necessary, you can use the phone joining the network as a trigger. It's just an extra filter to ensure there are no accidental unlocks. It will also prevent unlocks if you come home, park, and then leave without attempting to enter.

That's how I would do it, all easily doable in home assistant.

Id want another authentication level like fingerprint in the action so if I drop my phone its not still a key. I like the general plan, but two levels of identification if possible.
It's just as secure as keys as it is though. If you drop your physical keys they still work as keys and also can't be revoked.
More secure than keys—you can't remote-wipe keys. (And, presuming the network requires a password, remote-wiping the phone would make it not join the network any more.)
Re-keying the locks is kind of like remote wiping all the keys at once. Certainly not as fine grained, but will work in a pinch.
You could also edit the home automation script or block the phone on the router if remote wipe isn't an option.
kevinsundar below is entirely correct, that's how I have mine set up as well. However, instead of network detection, there are multiple GPS-based device tracker methods for proximity.
Configure a task to unlock your connected lock when your network detects your phone joins the network via wifi
Hooking into your phone getting on wifi is one way.
> for the lights to turn on (and gradually off) automatically as we move through rooms

How are you doing this? Is it built in motion sensing in the lights, or some other solution?

I use a Z-Wave 6-in-1 multisensor from Aeotec in each room, strategically placed in the corners so as to cover only motion in a single room. That takes care of motion sensing, temperature, humidity and luminosity (not used for automation, purely informative). The other two are UV and vibration sensors that are not as useful.

Setting a short motion detector rearm time lets me start a decay timer for the light that just turned on. If no motion is detected again, it starts lowering the intensity gradually over 10 minutes and finally turning the light off. I added a button in HA to override this and keep the light on when needed.

I ditched HA automation as it is very limited if you want something more fancy (or less lines to type). I moved teh AppDaemon (https://appdaemon.readthedocs.io/en/latest/) and use HA mostly for managing teh decvices and keepipng state (and MQTT for messaging).

If someone can program basic Pythin it is really, really worthwile to try it out.

What have you found to be the best sensor or switch option for presence detection regarding lights turning on/off?
I use Aeotec Z-Wave Multisensors permanently connected to USB power (they can also run on battery). However, any PIR motion sensor would work, such as the cheap models from Xiaomi (but there's the extra cost of battery changes).
Thank you!
What do you use to tell you when the best time to open a window is? Sounds super useful.
A Hall sensor on each window (aka open/close sensor), plus temperature sensors in each room and one placed outside.

When the window is closed, but the outside temperature is lower that inside, it sends a notification to open the window. The opposite happens when the outside temperature exceeds the one inside, unless the window is already closed.

This is all written in Python via appdaemon since it's easier than defining the same automation via the UI (although that's also doable nowadays).

Temperatures inside and outside the window, I suppose.