Tyldum

Well-Known Member
Joined
Sep 25, 2020
Threads
1
Messages
356
Reaction score
373
Location
Norway
Vehicles
Mustang Mach E First Edition
Country flag
The update interval from the car to the cloud seems really low. Like today it seems like a door was open for 5 hours before being closed.
It was closed all along, but didn't report status until scheduled charging started.

I assume this is also why the FordPass app doesn't show current status for anything just buttons.

I would think firing off events when a door is opened or closed would be possible without draining the batteries or consuming valuable bandwidth... But Ford ought to know best.

Edit: overlooked your forced refresh for a sec. Which underlines my point... It also underlines the fact that it's late here in Norway and I need to sleep as I overlooked 50% of the post. Nice automations, keep it up.
Sponsored

 
Last edited:
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,506
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
The update interval from the car to the cloud seems really low. Like today it seems like a door was open for 5 hours before being closed.
It was closed all along, but didn't report status until scheduled charging started.

I assume this is also why the FordPass app doesn't show current status for anything just buttons.

I would think firing off events when a door is opened or closed would be possible without draining the batteries or consuming valuable bandwidth... But Ford ought to know best.

Edit: overlooked your forced refresh for a sec. Which underlines my point...
Yeah, I've done a lot of testing with different parameters and how the car reports back to the mothership. Unlocks always send data back. While charging it sends data back every 5 minutes and when starting and stopping the car it sends data back. All of those are religiously happening.

Door open and close events get reported only sometime. Normally because there's an associated lock event with it. However in the case of a door ajar, there's no lock event and therefore it doesn't report.

This is why, as you realized after, I force the refresh from the car to get the "real" door status. In my experience the refresh round trip is almost always 5 minutes.

As for battery drain, a singular refresh won't hurt anything. At one point I actually queried the car for a refresh every 5 minutes all day long. The car didn't like that very much. I got multiple battery drain notifications, but the HVB does charge up the LVB so it's not the end of the world.
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,506
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
Firmware Update in Progress

Super easy alert that will notify you if you get an update. I have no way to test this, but it should work!

YAML:
alias: MachE Firmware Update In Progress
description: ''
trigger:
  - platform: state
    entity_id:
      - sensor.fordpass_firmwareupginprogress
    to: 'True'
condition: []
action:
  - service: notify.mobile_app_pixel_6_pro
    data:
      message: Your MachE Just Started an Update!
      title: Power-Up Coming Down
      data:
        notification_icon: mdi:car-wireless
        color: blue
mode: single
Ford Mustang Mach-E Home Assistant Automations - Show them off!!! 1656986831382
 

fokkerlit

Well-Known Member
First Name
Rob
Joined
Aug 9, 2021
Threads
5
Messages
65
Reaction score
58
Location
Massachusetts
Vehicles
2021 Mach-e
Country flag
Thanks for these! I didn't know about the HA intregration and was going to start poking around the API, so this saved me a lot of time. Got everything setup yesterday and now I'll never forget to plug my car in before bed.
 

SashaLondon

Well-Known Member
First Name
Sasha
Joined
Sep 11, 2020
Threads
32
Messages
1,384
Reaction score
1,493
Location
London
Vehicles
MME AWD SR
Country flag
Firmware Update in Progress

Super easy alert that will notify you if you get an update. I have no way to test this, but it should work!

YAML:
alias: MachE Firmware Update In Progress
description: ''
trigger:
  - platform: state
    entity_id:
      - sensor.fordpass_firmwareupginprogress
    to: 'True'
condition: []
action:
  - service: notify.mobile_app_pixel_6_pro
    data:
      message: Your MachE Just Started an Update!
      title: Power-Up Coming Down
      data:
        notification_icon: mdi:car-wireless
        color: blue
mode: single
Ford Mustang Mach-E Home Assistant Automations - Show them off!!! 1656986831382
I also made something like this however it didn't notify me when I had 2 updates. Has anyone had success with it?
 


OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,506
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
I also made something like this however it didn't notify me when I had 2 updates. Has anyone had success with it?
Because updates are so far and few in between I don't think we have a lot of data on how the car reports back during that time. I'll be on the lookout for any signs the next one I get.
 

MonorailGold

Well-Known Member
First Name
Jamie
Joined
Dec 29, 2021
Threads
6
Messages
109
Reaction score
52
Location
Northern Virginia
Vehicles
2015 Fusion Hybrid. 2022 MME CR1 on order
Country flag
Following. I’ll take delivery of my MME this fall and IoT / home automation is on my radar.
 

ziptbm

Well-Known Member
Joined
Jan 12, 2022
Threads
9
Messages
130
Reaction score
60
Location
Michigan
Vehicles
'22 MME GT & '22 F150 Lightning Lariat ER
Country flag
Firmware Update in Progress

Super easy alert that will notify you if you get an update. I have no way to test this, but it should work!

YAML:
alias: MachE Firmware Update In Progress
description: ''
trigger:
  - platform: state
    entity_id:
      - sensor.fordpass_firmwareupginprogress
    to: 'True'
condition: []
action:
  - service: notify.mobile_app_pixel_6_pro
    data:
      message: Your MachE Just Started an Update!
      title: Power-Up Coming Down
      data:
        notification_icon: mdi:car-wireless
        color: blue
mode: single
Ford Mustang Mach-E Home Assistant Automations - Show them off!!! 1656986831382
This is great!

For those with iOS, you can also insert a line under the second "data:" with the following to have the push notification take you directly to the FordPass app.


url: fordapp://
 

ziptbm

Well-Known Member
Joined
Jan 12, 2022
Threads
9
Messages
130
Reaction score
60
Location
Michigan
Vehicles
'22 MME GT & '22 F150 Lightning Lariat ER
Country flag
When I got my first Mach-E, I didn't have a "smart" EVSE, so I would constantly find the car charging outside of preferred hours. To help during that time, I created a series of alerts to let me know and then quick access to FordPass so I can stop charging.

Now that I've placed a Z-Wave switch in front of the "dumb" EVSE, I've retired those automated alerts, but I described them in this thread. Let me know if anyone would like to see how I had them set up and I'll see if I can pull them from an old backup.
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,506
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
This is great!

For those with iOS, you can also insert a line under the second "data:" with the following to have the push notification take you directly to the FordPass app.


url: fordapp://
This is also true for Android and you could substitute the Ford app for your evse app or any other app in any of these automations with notifications.
 

dmur726

Active Member
Joined
May 29, 2021
Threads
3
Messages
25
Reaction score
2
Location
CA
Vehicles
‘21 Job 2 Premium Mach-e AWD ER
Country flag
Window Left Down - Rain Forecasted

Here's an automation alerting you to rain in the forecast if your windows are down/cracked. This integration is a bit more complicated because you have to query the weather service for the actual location of the car. Using the "home" location might not be where the car is.

Here's some of the key takeaways:
  • Dynamically determines where the car is and queries the weather every 10 minutes for that location.
  • Will not trigger while the car is at home. If you don't have a garage then maybe you should disable that.
First you have to get an API key from Open Weather Map. It's completely free and easy.

Next you have to add the API call with dynamic location to your configuration.yaml file:

YAML:
# For the Weather at Vehicle Location (current only)
sensor:
  - platform: rest
    resource_template: >
      {% set lat = state_attr('device_tracker.fordpass_tracker', 'latitude') | float(0) %}
      {% set lon = state_attr('device_tracker.fordpass_tracker', 'longitude') | float(0) %}
      {{ 'https://api.openweathermap.org/data/2.5/onecall?lat={}&lon={}&units=imperial&appid=yourapikeyhere'.format(lat, lon) }}
    json_attributes:
      - current
    name: openweather_api
    value_template: '{% if value_json[0] is defined %}{{ value_json[0].name }}{% endif %}'
    headers:
      Accept: 'application/json'
    scan_interval: 600
Next you need to restart HA

And here's the automation:

Note: I just have rain listed because I'm in a rain only area. If you have other types of weather that you might want to look out for then duplicate the value template and include any of the below options (first letter is caps). The automation will trigger on any "true" event.

Rain
Snow
Thunderstorm
Drizzle

If you wanted to get even more detailed you could change "main" below to "description" and then use any number of the hundreds of specific weather events like "light rain".

YAML:
alias: MachE Window Left Down - Rain Forecasted
description: ''
trigger:
  - platform: template
    value_template: >-
      {% if state_attr('sensor.openweather_api', 'current')["weather"][0]["main"] == "Rain" %}true{% endif %}
condition:
  - condition: device
    device_id: 12345
    domain: device_tracker
    entity_id: device_tracker.fordpass_tracker
    type: is_not_home
  - condition: state
    entity_id: sensor.fordpass_windowposition
    state: Open
action:
  - service: notify.mobile_app_pixel_6_pro
    data:
      title: Don't Flood the Car!
      message: Weather forecast shows rain.  Close the windows!
      data:
        notification_icon: mdi:weather-pouring
        color: red
mode: single
Ford Mustang Mach-E Home Assistant Automations - Show them off!!! 1656986831382
This may be a stupid question, but why didn't you just add an automation that closes the windows, and maybe then notify that the windows were closed because of potential rain?
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,506
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
This may be a stupid question, but why didn't you just add an automation that closes the windows, and maybe then notify that the windows were closed because of potential rain?
Not at all stupid ... because I can only remotely Lock/Unlock and trigger the car to start through the API. The only way you can remotely control the windows is via Bluetooth.

Even in the FordPass app, you can't control windows out of bluetooth range.
 

mdpmdp

Well-Known Member
Joined
Oct 2, 2021
Threads
1
Messages
524
Reaction score
527
Location
Arizona
Vehicles
'22 Premium RWD SR Grabber Blue
Country flag
Might not be explicitly the right place to post this, but since you all have experience, I figured I'd ask here. I got the FP integration set up and I can see all the sensors/attributes and can report on them. I noticed that the status is updating every 15 minutes currently (on the charger), that appears to be system-defined - can it be changed? I see I can call the fordpass.refresh_status service but I presume that's if you want to poll more often and not less often.

I see that there's concern with frequent refreshes draining the battery, and I thought I saw potential issues with polling FP too often and getting locked out. If so, is 15 minutes sufficient for both scenarios?
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,506
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
Might not be explicitly the right place to post this, but since you all have experience, I figured I'd ask here. I got the FP integration set up and I can see all the sensors/attributes and can report on them. I noticed that the status is updating every 15 minutes currently (on the charger), that appears to be system-defined - can it be changed? I see I can call the fordpass.refresh_status service but I presume that's if you want to poll more often and not less often.

I see that there's concern with frequent refreshes draining the battery, and I thought I saw potential issues with polling FP too often and getting locked out. If so, is 15 minutes sufficient for both scenarios?
The 15 minute poll is just to Ford servers to get the latest data on the car. So whatever the car last reported to the servers is obtained. This has no impact on the battery as it's not coming from the car, nor requesting a refresh from the car. The service in HA to refresh the data actually sends a query to the car to request a full refresh.

I have testing an automation querying the service every 5 minutes and I'm able to drain the battery in less than 12 hours to the point where the HVB has to top it off and I get the battery drain notification.
Sponsored

 
 




Top