News for hackers. Stuff that matters.
Re:Open-Source Home Automation by adyus on Friday November 29, 2019 @02:05PM (#21666142)
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.

Re:Open-Source Home Automation by escapologybb on Friday November 29, 2019 @04:46PM (#21666985)
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!

Re:Open-Source Home Automation by ethanpil on Friday November 29, 2019 @02:23PM (#21666226)
I'm curious how you setup "automatically unlock before we reach the door"
Re:Open-Source Home Automation by kevinsundar on Friday November 29, 2019 @02:38PM (#21666325)
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.

Re:Open-Source Home Automation by LegitShady on Friday November 29, 2019 @03:31PM (#21666655)
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.
Re:Open-Source Home Automation by jdnenej on Friday November 29, 2019 @04:26PM (#21666884)
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.
Re:Open-Source Home Automation by derefr on Friday November 29, 2019 @06:04PM (#21667324)
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:Open-Source Home Automation by __david__ on Friday November 29, 2019 @11:55PM (#21668612)
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.
Re:Open-Source Home Automation by greenhatman on Friday November 29, 2019 @06:52PM (#21667504)
You could also edit the home automation script or block the phone on the router if remote wipe isn't an option.
Re:Open-Source Home Automation by adyus on Friday November 29, 2019 @03:37PM (#21666683)
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.
Re:Open-Source Home Automation by moondev on Friday November 29, 2019 @02:39PM (#21666335)
Configure a task to unlock your connected lock when your network detects your phone joins the network via wifi
Re:Open-Source Home Automation by BubRoss on Friday November 29, 2019 @02:38PM (#21666323)
Hooking into your phone getting on wifi is one way.
Re:Open-Source Home Automation by kingbirdy on Friday November 29, 2019 @07:40PM (#21667720)
> 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?

Re:Open-Source Home Automation by adyus on Saturday November 30, 2019 @02:51AM (#21669041)
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.

Re:Open-Source Home Automation by BrandoElFollito on Saturday November 30, 2019 @02:48PM (#21671818)
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.

Re:Open-Source Home Automation by cobri on Friday November 29, 2019 @07:42PM (#21667734)
What have you found to be the best sensor or switch option for presence detection regarding lights turning on/off?
Re:Open-Source Home Automation by adyus on Saturday November 30, 2019 @02:53AM (#21669046)
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).
Re:Open-Source Home Automation by cobri on Saturday November 30, 2019 @10:36AM (#21670379)
Thank you!
Re:Open-Source Home Automation by freid on Saturday November 30, 2019 @10:27AM (#21670347)
What do you use to tell you when the best time to open a window is? Sounds super useful.
Re:Open-Source Home Automation by adyus on Saturday November 30, 2019 @04:15PM (#21672181)
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).

Re:Open-Source Home Automation by drewp on Sunday December 01, 2019 @02:23AM (#21674323)
Temperatures inside and outside the window, I suppose.