TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Event-driven access to my home after a run

114 pointsby rwestergrenover 3 years ago

35 comments

JohnBootyover 3 years ago
First: Cool project!<p>Second: I&#x27;m probably missing something, but:<p><pre><code> Therefore, I would at least need to start a process that would understand my intent to leave </code></pre> How did you solve the &quot;intent&quot; issue? It looks like your solution simply detects when your phone stops responding to pings, and then unlocks the doors when it resumes.<p>This doesn&#x27;t seem like it would distinguish between &quot;going for a run&quot;, &quot;going on a car trip&quot;, &quot;turning the phone off for 10 minutes and then back on again, but never leaving the house,&quot; etc.<p>I suppose one (fun, overkill, probably) solution would be if the phone&#x27;s sensors could be queried. Once the phone &quot;returns&quot;, your home network could query the phone and ask it if you&#x27;ve been exercising or not, based on your heartrate&#x2F;motion since the phone was last seen by the network.
评论 #30288172 未加载
jacobrussellover 3 years ago
This is awesome! I love reading about projects like this. Always gets me thinking about how I can do little things like this for my life workflows.<p>&gt; installing MyQ W-Fi connected garage doors<p>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&#x27;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.
评论 #30285902 未加载
评论 #30285938 未加载
francis-ioover 3 years ago
Home Assistant has home zones. You can trigger events based on being home, away, or the trigger between both states.<p>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:<p>* IF it&#x27;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 *<p>It&#x27;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&#x27;m a night owl) by just charging my phone. It wont trigger in the day based on the conditional.
评论 #30287635 未加载
评论 #30287474 未加载
bmilleareover 3 years ago
Automating such a narrow edge-case seems totally pointless. A much more likely scenario is that your battery dies while you&#x27;re out, in which case you&#x27;re still screwed.<p>A better tried-and-tested real world solution that covers all scenarios is a simple key safe.
评论 #30285481 未加载
评论 #30285996 未加载
mbreeseover 3 years ago
I setup something similar years ago for my garage. Instead of looking for my phone though, I wanted a way to open the garage quickly without using the keypad. My kids were small and my hands were normally full. However, I did have an RFID ID card from $work in my back pocket. So, I placed an RFID reader at butt height. If it detected my ID (or my wife&#x27;s, or keyfobs, etc...) it would trigger a relay to simulate pushing the button inside my garage to open the door. It was all controlled by an Arduino.<p>That was quite possibly one of the most satisfying projects I&#x27;ve done.<p>I&#x27;ve now since moved and don&#x27;t have an attached garage anymore, so this is now sitting in a box in my basement. :(
ludstonover 3 years ago
Seems to be a lot of nitpicking and judging here for what is a cute little project that made this guy happy enough that he wanted to share it.
dbtcover 3 years ago
I put a single house key in my shorts pocket. Been running for years and haven&#x27;t had an issue with this yet.
评论 #30290667 未加载
therustydevover 3 years ago
Still does not fix the initial issue of your phone going off before getting back home..
评论 #30284719 未加载
Jaruzelover 3 years ago
I think that although his approach works, the smarter thing would be to fix a hi-definition camera pointing at his driveway entrance, and use OpenCV&#x2F;ML&#x2F;AI[1] to detect that it&#x27;s him approaching the house and automatically open the garage door.<p>For bonus points he could then rig up a speaker to sing &#x27;welcome home&#x27; as well...<p>For even more bonus points, anyone coming up the driveway that isn&#x27;t him could be greeted by Barking-Dogs.mp3<p>---<p>[1] Or whatever that magic thing is that NCIS use every week.
评论 #30289836 未加载
jonsullyover 3 years ago
OP, FWIW I think there&#x27;s a trigger available in iOS Shortcuts that kicks off if you join a particular network. You could probably use that trigger + a web request and achieve your &#x27;event driven&#x27; desire just FYI :)
dansoover 3 years ago
Love this writeup, though I have to admit I&#x27;m slightly disappointed. From the headline I had expected to read how the author rigged his home security system to keep the doors locked. And to only unlock after his phone&#x2F;fitbit logs him as completing his distance goal for the day.
avh02over 3 years ago
My solution was just stopping my keys from jingling and poking me while running, I put my keys in a rigid key holder&#x2F;organizer thing like a Swiss knife for keys
评论 #30286683 未加载
评论 #30285500 未加载
otachackover 3 years ago
This is a fun project, nice job putting it together! I tried to do a similar thing with an app and my home made security system, but I didn&#x27;t refine it enough to be reliable.<p>But I don&#x27;t think it solves the problem that prompted it :P if your phone dies on your run, it won&#x27;t connect to your network and the Flask app won&#x27;t capture the packets needed. Still, making this hands off is a great step from needing to open an app.
markstosover 3 years ago
Just keep your phone warm in a Crotch Pot while you run and you&#x27;ll be fine.<p><a href="https:&#x2F;&#x2F;www.gossamergear.com&#x2F;products&#x2F;the-crotch-pot?variant=30497157388" rel="nofollow">https:&#x2F;&#x2F;www.gossamergear.com&#x2F;products&#x2F;the-crotch-pot?variant...</a>
naavisover 3 years ago
So if you turn off your phone for 5 minutes while staying at home and turn it on again, does your garage door open?<p>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.
mrweaselover 3 years ago
My feelings about these kinds of projects are a bit mixed. I certainly understand why, writing code that controls something in the real world is so much fun. However I actively avoid any kind of smart device in my home, beyond my vacuum cleaner. Having a computer control lighting, heating or access to my home is out of the question, I simply don&#x27;t want to deal with it. I trust keys, switches and knobs.
评论 #30284827 未加载
评论 #30284913 未加载
评论 #30285289 未加载
评论 #30285410 未加载
causiover 3 years ago
<i>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.</i><p>Maybe I&#x27;m having a brain fart, but I don&#x27;t see how his solution has accomplished this.<p>Frankly it&#x27;d be way easier for the phone to use its GPS and accelerometer to decide he&#x27;s on a run and just open the door when it reconnects to the wifi.
评论 #30289745 未加载
hallway_monitorover 3 years ago
Very cool (not cold) solution! I would like to set up a similar system, which should be possible - I&#x27;ve recently bought a hubitat hub (highly recommended at $100) which uses groovy for scripting, and uses an installed app on my phone with geofencing to detect presence.
umviover 3 years ago
I&#x27;m a runner who has also gotten locked out, and my solution was to install a keypad deadbolt on my front door ($100 at Home Depot). Never had a problem since.
评论 #30290591 未加载
评论 #30289870 未加载
quantumwokeover 3 years ago
I like this because even though relatively niche, it&#x27;s more substantial than merely turning the lights on and off when entering the house.
RcouF1uZ4gsCover 3 years ago
There are now locks for your front door that can be opened using a numeric code or a fingerprint or even an nfc fob.<p>Likely any of those would be more robust.
评论 #30288727 未加载
mbrameldover 3 years ago
Did I miss where he tells how he did this part?<p><pre><code> 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. </code></pre> From what I see he&#x27;s assuming a run starts after the phone doesn&#x27;t respond to ping requests for 5 minutes. How does that imply a run over a car trip?
electrondoodover 3 years ago
Super cool project, but if someone captures and spoofs his phone&#x27;s MAC address.... they can open his garage door.
评论 #30289395 未加载
yummypaintover 3 years ago
I like this idea in principle and think it could be turned into a great alternative to a hide-a-key, or used to let a pet in though a small door. A typical garage door spring is rated to last 10k cycles, make of that what you will.
renewiltordover 3 years ago
Highly entertaining. I totally understand the problem of the phone shutting down in extreme temperatures. I have to say I&#x27;m pretty impressed that you&#x27;re running in those temps, though.<p>Also thanks for pymyq. Neat home automation library.
groby_bover 3 years ago
So... root cause: Phone ran out of battery. Solution: Does not address root cause at all.<p>I mean, it&#x27;s cool, and quite likely an improvement over the previous thing, but I predict there&#x27;ll be a follow-up article within the year :)
francisofasciiover 3 years ago
This is very clever and useful. I wonder if this could be done with a GPS watch rather than the phone. AFAIK, GPS watches typically send out Bluetooth signals but probably don&#x27;t connect to Wi-Fi.
mr_sturdover 3 years ago
I tried to use Ping in home assistant for basic &quot;is home&quot; presence detection. It wasn&#x27;t very reliable since the phones&#x27; wi-fi connections would drop in prolonged sleep states.
notacowardover 3 years ago
For extra fun, you could set up some speakers and have them start playing some appropriate piece of music as you approach. Some sort of triumphal march, perhaps?
Faaakover 3 years ago
I had the same idea but it didn&#x27;t really work with my phone because the phone sadly took 50s+ to connect to my wifi network :(
Accacinover 3 years ago
As a personal project, this is incredibly cool.<p>Although it&#x27;s weird that he can carry around a huge phone but not a house key.
billyjobobover 3 years ago
So to get into his home we just need to clone the MAC address that he constantly broadcasts everywhere?
评论 #30289506 未加载
haihaibyeover 3 years ago
I use a safety pin to hold my key in my pocket.
bin_bashover 3 years ago
I&#x27;m really disappointed by all the comments here. OP showed a clever way he gets his garage door to open when he gets home from a run. It&#x27;s an interesting look into home automation from scratch and exactly the kind of content I come to HN for.<p>This isn&#x27;t posted in NY Times. He&#x27;s not advocating everyone should go out and do this because of how much better it&#x27;s made his life. He&#x27;s not even claiming that it&#x27;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.
评论 #30286915 未加载
评论 #30289305 未加载
评论 #30289878 未加载
code_runnerover 3 years ago
I run 5 days a week. I run with a group ~3 minutes from home, but for years ran from my front door.<p>My phone is too bulky, I have a spare home key. I just… take the key with me.<p>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.<p>I really like projects like this but for some reason this one seems silly… hopefully it was at least fun to do
评论 #30286909 未加载