GPS triggered auto open garage gate

Hey smart friends,

I’ve following toughts to auto open my garage gate:

I’ll upgrade my gate with a Shelly & Shelly Add-on with magnet contact.

I want to use my android phone to trigger my gps coordinates. The idea is, when I arrive home the garage gate should auto open.

To ensure that I’m arriving by car, HA should check my coordinates, if I’m near home and should also check that I’m connected by bluetooth with my car.

Unfortunately I haven’t Android Auto. Could you give me tips or ideas how to create this automation?

 - sensor:
    - name: "Person in car"
      unique_id: person_in_car
      state: >
        {% if "00:11:11:EA:58:F4 (BT)" in state_attr('sensor.sm_xxxx_bluetooth_connection', 'connected_paired_devices')  %}
          on
        {% else %}
          off
        {% endif %}

/

1 Like

Thanks a lot for support :pray:

Here are my solutions for coming home and leave home. I installed a Shlly with Add-On the magnetic switch showinh the state of the garage gate:

  1. First of all you have to configure alle persons in HA, which devices are for GPS tracking.

  2. Edit configuratin.yaml

Proximity integration

proximity:
home:
devices:
- name of person
tolerance: 50
unit_of_measurement: km #or miles, meters etc.

  1. YAML automation coming home
    alias: #what ever
    description: “”
    trigger:
  • platform: numeric_state
    entity_id: proximity.home
    below: 0.5
    condition:
  • condition: template
    value_template: >-
    {{ ‘FC:62:B9:1D:24:FB (BT DEVICE’ in
    state_attr(‘sensor.sm_phone_bluetooth_connection’,
    ‘connected_paired_devices’) }}
  • condition: state
    entity_id: binary_sensor.shellyplus1_80646fcb3f88_input_100_input
    state: “on” #gate closed
    action:
  • service: switch.turn_on
    target:
    entity_id: switch.shellyplus1_80646fcb3f88_switch_0
    data: {}
    mode: single
  1. YAML leaving home

alias: #Whatever
description: “”
trigger:

  • platform: numeric_state
    entity_id: proximity.home
    below: 0.5
    condition:
  • condition: template
    value_template: >-
    {{ ‘FC:62:B9:1D:24:FB (BT device)’ in
    state_attr(‘sensor.sm_phone_bluetooth_connection’,
    ‘connected_paired_devices’) }}
  • condition: state
    entity_id: binary_sensor.shellyplus1_80646fcb3f88_input_100_input
    state: “off” #gate open
    action:
  • service: switch.turn_on
    target:
    entity_id: switch.shellyplus1_80646fcb3f88_switch_0
    data: {}
    mode: single

I tried it and it worked. Just have to check the value for proximity.sensor. Do anyone knows how often it refreshs? Sesnors in companion app set to frequency always fast.