Leaving home wall switch - Here is my idea

That would be great if we had a reliable way to measure position.
My phone position wanders hundreds of meters when it’s inside and relying on cell tower triangulation.

How would you reliably detect position? I don’t want to turn wifi and data connection off on my phone during the night.

For detecting being home I thought iBeacons would be the solution. I put half a dozen tiny USB ibeacons with the same UUID around the house plugged into cheap USB chargers. Unfortunately the iOS app hasn’t quite got the iBeacon zone enter/exit thing worked out yet. They’re back in storage waiting for future developments.

I just use device tracking (in my case with ios) like that and zone like that
and i use automation with trigger on enter/exit zone.

There is some unknow things about how ios manage the geoloc, but its work good for me.

/!\ you need to use the last beta version of home assistant for ios

if you use android, you can use app like owntracks and mqtt i think.

You are one of the very few.

since i have installed beta version of home assistant for ios, i have no more problem.

but there is always the alternative of owntracks even on ios.

i have not test other possibilities because this one is the more easy to set up, and for me is working.
And because there is something i didn’t understand with other possibilities but ??? see here

I will second the use of iOS. I have two phones working with the iOS app and two more with bluetooth presence (not BLE). All work flawlessly to determine home or away. The bluetooth may work for android devices, but I have not tested with them.

1 Like

I second the bluetooth reliability. I had more horizontal coverage that I needed to provide so I installed a couple pi-Ws with HA and bluetooth to feed the data back to a central HA instance over mqtt.

All these solutions are quite cool, but I think it does make sense to have a button switch too, especially for the ‘walking away’ function. Else I will be depending on something that might turn off or loose connectivity and the system will think I left.

Do you have a suggestion based on this?

Are you UK based? It is just that I have one of these Sonoff wall switches upstairs and it needs a neutral wire. Most UK homes (older than say 10 years) do not have that in the lighting. As mine is installed upstairs it wasn’t such a pain to install the neutral wire as I could get to the loft etc, though downstairs may be a bit more challenging.

FWIW, they are excellent and look really good.

If you are outside the UK ignore me :slight_smile:

Luxembourg. Relatively new apartment. Thanks for the hint anyway.

1 Like

I am not sure I am getting all your use-cases, though there is one thing that works reliably for me: When the door opens and “nobody is at home” input_boolean is true then an automation switches “nobody is at home” input_boolean to false (and this in turn triggers other automations). And I use cheap Xiaomi door sensor to get door open and close actions.

This is to cover the “returning home” functionality. That’s easier. Many ways to reliably detect if someone is home. I’m talking about a reliable way to tell if noone is home.

Hi! I am using ble keychain with room-assistant installed on rpi3 located near to the entrance and bunch of automation based on presence detectors in the rooms. When we go out we take keys with us and family group becomes not_home status. Works quite reliable almost two years for me. For emergency and maintenance tasks there is zigbee button which turns off all home/away automation, turns away cameras and marks us home.
For visual identification I use wall mounted tablet with fully kiosk browser - it lights up when seeing or hearing someone. Here in lovelace picture entity card turning color from b/w when family member arriving.
Hope this (or part of it) might help:)

interesting.
how did you do the bluetooth presence detection ?
with iBeacon in hass and specific hardware for bluetooth ? or other ?

We always have bluetooth enabled on our phones. I just use the basic bluetooth tracker and the basic bluetooth capability of the pi. Our house is not huge, but it is two floors plus a basement and my pi is centrally located, so it seems to cover things pretty well.

device_tracker:
        - platform: bluetooth_tracker

This will start populating the known_devices.yaml file with devices as they are discovered. You can edit/manage this file to change the icons, and tracking status, etc.

iphone1:
  hide_if_away: false
  mac: BT_FC:12:34:56:78:90
  name: Me
  picture: /local/snowman.png
  track: true

Why wifi is a drawback?? I use wifi for everything that is possible

I’m using wifi presence detection via my router (ddwrt) for my self and my wife - it works flawlessly for the last few months since i set it up.
With this, I can automatically shut off heating etc. when nobody is home.

Somehow I consider WiFi slow and energy consuming compared to zwave band zigbee. I might be wrong.

Energy consuming perhaps but that I will take. Slow, not my setup. And a solid network that zwave never come close to. For me it has never been a question. I trust my system to just work and keep me secure. Thats why a Pi has never been an option. The cost if I compare to a “pro” system is minimal. I will say that I use mqtt as much as possible to speed things up.