I am using MQTT with Zanzito for a long time now, very happy with it!
Thanks for the info.
I looked at this thread before and although I like the fact that it tracks all devices (and not just the wireless ones as my Unifi Controller does) I did not want to go through this complicated workaround - plus, itās yet another ācloudā solution.
QQ, though:
How long does it take for the device state to change to e.g. not_home in your UI as soon as youāre off your LAN/Wifi?
I know the FingBox has a setting where you can determine how quickly it considers you to be offline (āState change timeoutā) but how much does the sending and receiving of the email and recognition time add on top of that.
I believe, leave it to a connected wifi if I am home or not is simply not a good solution. If my phone e.g. restart e.g. because of an upgrade and I am off the wifi for a minute, then the lights would turn off in the house, because āI am not at homeā?
A presence detection I just posted above is much better. It can tell not just if you are home or away based on the location of your phone but even if you are getting close to home from somewhereā¦
I have a Samsung Galaxy S7 and Iām not under any threat to have this phone upgraded any time soon
I am not sure that I would consider fetching information from your email a ācloudā solution per se. Itās pretty much the same as getting your calendar information from Google. It looks a little more complicated on paper than it is to implement. I found it pretty easy to setup.
Response if very quick in my opinion. I have my delay in Fingbox for 3 minutes, as soon as this gets triggered I receive an email and within seconds it picks up the change. Works very well
Thanks - seems to be working quickly then, I am impressed.
Iād still take the liberty to consider a solution that relies on reading emails from a Google IMAP-server a cloud solution, though.
Although the interface is very clunky, I like Zanzito and use it for testing when I set up something new that relies on MQTT.
But I donāt need to / want to track anything else than home vs. not_home and I hate having ports open on my router with a vengeance - so Zanzito would not be my first choice.
So, it depends very much on what the OP wants to do with presence tracking (just home vs. not_home or more detailed info) and how comfortable they are with opening ports on their router.
@ptdalen Could you please share on github or pastebin also for the rest of the code.
input_select
input_boolean
sensor
And some automations built on that
Sure. Here is my repository
Thanks a million!!! Now im trying your solution
EDIT:
Oops, sorry, I didnāt realize it was an ancient post. The dangers of using the google now feed; sometimes it thinks you want/need to see old stuff, and you donāt even realize it before itās too late.
Just to add, and echo a bit, the best is likely many different ones.
Currently, Iām using a combination of:
- Life360 (all phones)
- Google maps (my phone)
- iOS device tracker (the iPhone users)
- Ping (all phones, but due to iOS device putting wifi to sleep, Iāve set it so ping can only determine that someone is home, a āawayā in a ping tracker does nothing)
I set them all up in an appdaemon app (heavily inspired by an app by arsaboo, but modified to suit my needs better). It prioritized sources, and updates the āmeta trackerā in a way that makes sense. And you can easily add more trackers, or change how you want a specific tracker to report/behave (like not having the Ping tracker be able to report someone as away).
However, it seems to me that the life360 is the most useful single component (and as luck would have it, the Life360 custom component becomes a home Assistant standard from next release)
Hi, Iām new on HA. I would track presence in my home only using wifi connection. We have all android phones. Ping is the best way to check phones connected to wifi? There are other ways?
Depends on what you have. You can use e.g. Netgear or openwrt if you have those types of routers (one or two other integrations exist as well, brand/OS-dependent).
But ping would be the more āgenericā, afaik.
I will say, though, even with Android, ping is not reliable enough as the only thing (for me). At least, Iād set a fairly long timeout (not detected for XX minutes before setting your status to āawayā) to avoid false negatives.
Try life360. Fantastic app on your phone and works like a flaw in HA
Yes, tried multiple as well.
Life360 is the best one I tried so far
Now presence detection is well supported in Home assistant android app.
Here t home we have android and iphone. nmaps does not work well for iphone because of the sleep. Have been testing the location tracking through the home assistant app. This has so far been working quite well for us once i got the size of the zones set right.
I use mulitple inputs depending what I want to achieve.
For my āat homeā status I check if my phone is connected to WiFi then my location state of life 360.
For my away I check if I have dropped off WiFi then Life360 is not home to chance state to away. Both of these two criteria need to be met to change state of occupancy. I can still reference WiFi and location data for other automations/zone conditions without much hassle. I can simply override it with the helper/boolean on the dashboard until the next change of both states. There is likely a flaw in there somewhere but Iāve been running it a while without any hiccups so far.
I use Life360 on its own and it works 100% flawlessly. Created a group with all the family members in it and when ANYONE in the group is home the groups state sets to home and when EVERYONE is out the group state changes to not_home. I then use the groups state as the condition or trigger in my automations. Works well for me
How can you set this up? Im connected to my HA with the app but besides my Name the status is still unkown? is there any good tutorial on how to use the app directly for presence detection?