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

feat: add support for using teslamate geofences #12

Merged
merged 4 commits into from
Jul 18, 2023
Merged

Conversation

brchri
Copy link
Owner

@brchri brchri commented Jul 17, 2023

Allows using Geofences defined in TeslaMate rather than manually specifying a lat/long center point with radii. Some observations regarding this method:

  • Geo does not update as frequently as lat/long in MQTT, so there is quite a delay in actually triggering the garage action
    • Presumably this is because the Geofence isn't calculated in realtime with every lat/long update like Tesla-YouQ does, but this is an assumption
  • TeslaMate doesn't seem to have any logic for distinction between overlapping geofences. For example, with 2 geofences that have the same center point but different radii, TeslaMate exhibits unpredictable behavior with which geofence gets ascribed to the location
    • This limitation means this method should really only be used for a single geofence, meaning open and close events cannot be defined separately
      • This PR will still support having separate geo's but is at the mercy of the data it receives from TeslaMate; if this is ever fixed, then Tesla-YouQ will already support it, but in the meantime, users should stick to a single geofence
  • This method requires defining a DEFAULT_GEOFENCE environment variable for TeslaMate (such as not_home), as some string must be published to the MQTT broker to trigger an event.
    • See this PR in TeslaMate for more info

@brchri brchri merged commit 86205f8 into main Jul 18, 2023
2 checks passed
@brchri brchri deleted the support-tm-geofences branch July 18, 2023 03:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant