Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"When I get home" / "When I leave home" commands do not work #326

Open
gcampax opened this issue Apr 30, 2021 · 4 comments
Open

"When I get home" / "When I leave home" commands do not work #326

gcampax opened this issue Apr 30, 2021 · 4 comments
Assignees
Labels
bug P3 Nice to have, not working on it for now release: main Issues that affect devices in the "main" release

Comments

@gcampax
Copy link
Contributor

gcampax commented Apr 30, 2021

These commands are parsed (correctly) to monitor(@org.thingpedia.builtin.thingengine.builtin.get_gps()), location == $location.home.
But get_gps does not work at all in any currently supported Almond (current location is always Unknown or a fixed location configured by the user) so those commands have no effect.

I believe Home Assistant can leverage the Android companion app to get the user's precise location (as a person entity), so we could leverage that to inject the location through the right layers in Almond.

@gcampax gcampax added bug release: main Issues that affect devices in the "main" release labels Apr 30, 2021
@almakantara
Copy link
Contributor

Home Assistant approach it with this integration https://www.home-assistant.io/integrations/device_tracker/ so you don't need to use phone, also because if on your way to home, the gps could stop working far away (undegroung garage, then elevator), or otherwise you have to fence a wide area, and that will work also if you are "around" but not mainly "at home", with devices attached to wifi, or bt, is a lot more reliable for presence detection.

But oobviously with the "person" integration you can have also gps https://www.home-assistant.io/integrations/person/

So we can just check these integrations

@gcampax
Copy link
Contributor Author

gcampax commented Apr 30, 2021

Right. I think the approach to this is to extend get_gps with some "area : Enum(home,work,away,unknown)" field that would get updated behind the scene based on the device tracker. We cannot make up some Home-Assistant-specific class because location is an extremely general concept that needs to be handled as builtin in Genie to avoid all sort of NL confusion.

@gcampax
Copy link
Contributor Author

gcampax commented Apr 30, 2021

Anyway this is not going to be a simple change so I'm not putting this on the radar for 2.0 beta.

@almakantara
Copy link
Contributor

get_gps could be the general even in case HA is not user, while in HA it could be used "device_tracker", and "person" and just read from there, maybe even be extensions of get_gps

@nrser nrser added the P3 Nice to have, not working on it for now label Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P3 Nice to have, not working on it for now release: main Issues that affect devices in the "main" release
Projects
None yet
Development

No branches or pull requests

3 participants