Second: I'm probably missing something, but:
Therefore, I would at least need to start a process
that would understand my intent to leave
How did you solve the "intent" issue? It looks like your solution simply detects when your phone stops responding to pings, and then unlocks the doors when it resumes.This doesn't seem like it would distinguish between "going for a run", "going on a car trip", "turning the phone off for 10 minutes and then back on again, but never leaving the house," etc.
I suppose one (fun, overkill, probably) solution would be if the phone's sensors could be queried. Once the phone "returns", your home network could query the phone and ask it if you've been exercising or not, based on your heartrate/motion since the phone was last seen by the network.
> I wrapped everything up in a small Flask app to serve a simple HTML form on a Raspberry Pi. Clicking Submit launches the start_process function as a background process:
Clicking submit is establishing intent. Once intent is established, then it uses the timeout to detect when they've gone, and, later, their return.
> installing MyQ W-Fi connected garage doors
Haha you were already light-years ahead of me before you even started. I typically slide my key into a little pocket and pray it doesn't fall out. I think using events from your router is a great idea. I have recently been playing around with events you can send from routers and it has really opened up my mind to whole new avenues of creativity.
[0] https://community.fortinet.com/t5/FortiGate/Technical-Tip-Us...
my little pocket has a zipper to prevent things from falling out.
My current favorite automation is to turn off my lights when I go to sleep by plugging my phone in to charge. The basic logic is:
* IF it's 1AM OR I transition from Away to Home OR My mobile starts charging CONDITIONAL My location is AWAY OR the time is between 21:00 and 03:00 THEN Turn my office, kitchen and bedroom lights off *
It's a bit complex to get your head around, but the basic idea is, my lights turn off at 1 AM, or I leave the house, or my phone starts charging after 9 PM. This allows me to go to bed early (I'm a night owl) by just charging my phone. It wont trigger in the day based on the conditional.
I combine those and a few other things into a hybrid Boolean sensor called “sleep conditions”
At any point in time the “sleep conditions” sensor is calculated as “true” or “false” - ie. does it look like I’m likely to be going to sleep.
So when my phone is placed on charge AND sleep conditions = true, my automation goes into sleep mode triggering lights off, setting wake up alarm etc
It seems trivial, but simply putting your phone on a wireless charger at night and having everything react automatically is quite gratifying!
A better tried-and-tested real world solution that covers all scenarios is a simple key safe.
While I understand the tinkering here for fun, the author did ignored the actual problem of the drained battery completely?
Unlocking the screen caused the battery to drop immediately - it still had network connectivity prior to that.
That was quite possibly one of the most satisfying projects I've done.
I've now since moved and don't have an attached garage anymore, so this is now sitting in a box in my basement. :(
Next thing will be auto-provisioning the Pi so I can just flash my image to the SD card and plug it in.
For bonus points he could then rig up a speaker to sing 'welcome home' as well...
For even more bonus points, anyone coming up the driveway that isn't him could be greeted by Barking-Dogs.mp3
---
[1] Or whatever that magic thing is that NCIS use every week.
I'm pretty sure a high res camera means you don't need "enhance, zoom in, enhance"
But I don't think it solves the problem that prompted it :P if your phone dies on your run, it won't connect to your network and the Flask app won't capture the packets needed. Still, making this hands off is a great step from needing to open an app.
https://www.gossamergear.com/products/the-crotch-pot?variant...
EDIT: Or do you need to go press a button on a webpage before going out for a run to make this work? The last part seems to suggest so.
You also have to be careful to get one that suits your threat model, a key custody safe designed to be installed in a semi-secure part of a building may not be resistant enough when mounted on the exterior with street access - many are only designed to resist covert tampering and are not that strong against a determined attacker with an angle grinder or similar overt attack.
[1] something like this: https://www.safeguardsafes.com.au/product/cmi-class-b-key-cu... - includes a very nice Kaba X-10 lock that is kinetically powered so you don't have to worry about wiring it to mains power or changing batteries.
I've had a network connected soundbar bring down my home internet. My lights were set to re-enter the state they were in when they were last on, no way to turn those on without factory resetting them all and pairing all my devices again. My smart assistants were on a hair trigger, if anything tripped their wake word they would start a cacophony of complaints about not being able to connect to wifi and demands to be reset.
I'll give my smarthome crap one thing though, it's genuinely educational,
My IoT light switches made the mental model of 'lightswitch on the door' to 'lightswitch were i need it'.
It also allows you to actually have a light atmosphere which enhances how you use light. This is a stark contrast to a friend of mine who sits in a very bright and uncomfortable room.
Using Alexa or Google for lights, timer and reminder also gave me insight on how much different/more natural a voice interface is and were we might be with this technology in a few years.
That would certainly be a plus. I have at least one missing lightswitch in my kitchen, and adding it would be rather complicated. Still it seems like overkill to invest in IoT to solve the issue of my lightswitch being 1,5m from where I'd want it to be.
The whole "light atmosphere" is something I already have, I just have to go around and turn on the lamps manually. As for the Alexa, Google Assistent or even Siri integration... I trust none of the company behind those technologies enough that I'd allow them to have a microphone in my home, constantly listening. It is beyond creepy.
Maybe I'm having a brain fart, but I don't see how his solution has accomplished this.
Frankly it'd be way easier for the phone to use its GPS and accelerometer to decide he's on a run and just open the door when it reconnects to the wifi.
Frankly, if he wanted to do something with GPS on his phone, timing anything to the reconnection of WiFi is just worse than sending a signal to a public facing web server when he crosses a geofence.
I wonder if this will continue to work, as some phones (I believe all iPhones by default now, for instance) cycle MAC addresses.
Not to say this project isn't cool and fun.
Likely any of those would be more robust.
Knowing I had left for a run was key to knowing when I had returned from a run, rather than a trip in the car for example.
From what I see he's assuming a run starts after the phone doesn't respond to ping requests for 5 minutes. How does that imply a run over a car trip?Also thanks for pymyq. Neat home automation library.
I mean, it's cool, and quite likely an improvement over the previous thing, but I predict there'll be a follow-up article within the year :)
Although it's weird that he can carry around a huge phone but not a house key.
This isn't posted in NY Times. He's not advocating everyone should go out and do this because of how much better it's made his life. He's not even claiming that it's necessarily better than putting a keypad on his garage. He just hacked together something cool and we should applaud people trying these kinds of things.
Sadly this is the modus operandi for most HN comments these days; it's easier to nitpick details about something fun/interesting that a person did than it is to actually _do_ something fun/interesting & have the guts to (gasp!) post about it online for all to see.
As for the original article, I'm a runner so it was of interest. My living situation is nothing like OPs tho, so probably not for me.
My phone is too bulky, I have a spare home key. I just… take the key with me.
I installed a keypad lock on my last home and that was great but the batteries died once and only had enough juice to lock me out.
I really like projects like this but for some reason this one seems silly… hopefully it was at least fun to do