OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,741
Reaction score
11,508
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
That is great! I have home bridge running on a Pi, but maybe I’ll spin another up with HA. I had a bunch of scripts setup through Apple shortcuts that now don’t work because of the changes Ford made.

My last one ran every night at 9, if I was at home, and told me if the car was locked, if it was plugged in, and if it was whether it was charging or done charging. It worked for 2 days and then then ford changed everything lol.
Rpi's are so hard to get right now it's stupid. They are just insanely priced for the ones that are out there. Additionally, because of the nature of how HA logs all sensor data you shouldn't ever use a SD card because they only last a year or so and then you've got a bricked system and a lot of lost work. I use a Rpi4 for my HA setup but I'm running it with an M2 SSD. They make enclosures that make it all happen. Here's the one I use.

But my point is that I've recently started using more and more the Minisforum machines and they are just as good, have 2 NICS and all standard ports for USB and Video. Based on the price they are worth it compared to the crazy stupid Rpi prices.
Sponsored

 

Gullwingdmc

Well-Known Member
First Name
Chip
Joined
May 15, 2021
Threads
77
Messages
2,742
Reaction score
3,757
Location
Boston, MA
Vehicles
2022 Mustang Mach E GT AWD ER - Grabber Blue
Country flag
Rpi's are so hard to get right now it's stupid. They are just insanely priced for the ones that are out there. Additionally, because of the nature of how HA logs all sensor data you shouldn't ever use a SD card because they only last a year or so and then you've got a bricked system and a lot of lost work. I use a Rpi4 for my HA setup but I'm running it with an M2 SSD. They make enclosures that make it all happen. Here's the one I use.

But my point is that I've recently started using more and more the Minisforum machines and they are just as good, have 2 NICS and all standard ports for USB and Video. Based on the price they are worth it compared to the crazy stupid Rpi prices.
Nice! Thanks for the tip. I’ll have to look into that machine. This will most likely be a vacation project, but now that me we have 2 MMEs in the house it will be worth the effort.
 

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
Use HA with Node-RED.
My most used automation is a button that:
  • Fires remote start to heat or cool the cabin
  • If parked at home, open garage and also unlock the car
I have now one button in HA, and that same function tied to the android quick action so I don't have to open HA.

My other automations for the car are tied to charging and the way electricity is priced in Norway. Generally cheaper at night, but that needs to be calculated. Additionally I must reduce charging amps if other things in the house use too much power or else I get an extra fee (if accumulated sustained usage for an entire hour is higher than x kWh). So there are a bunch of calculations based on SoC to reach my target as cheaply as possible.
 

Mach-Lee

Well-Known Member
First Name
Lee
Joined
Jul 16, 2021
Threads
208
Messages
7,918
Reaction score
15,928
Location
Wisconsin
Vehicles
2022 Mach-E Premium AWD
Occupation
Sci/Eng
Country flag
My other automations for the car are tied to charging and the way electricity is priced in Norway. Generally cheaper at night, but that needs to be calculated. Additionally I must reduce charging amps if other things in the house use too much power or else I get an extra fee (if accumulated sustained usage for an entire hour is higher than x kWh). So there are a bunch of calculations based on SoC to reach my target as cheaply as possible.
And how are you adjusting charging amps dynamically?
 

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
And how are you adjusting charging amps dynamically?
On the charger. 90% around here are from 2 brands which are cell/wifi connected with adjustable output. (for the pedantic: it signals the car to lower the load).
In Norway the mobile EVSE is illegal to use for everyday charging, only for ad-hoc emergency.
A dedicated circuit is required with a charger that is hardwired. The circuit has additional safety requirements as well.
 


macchiaz-o

Well-Known Member
First Name
Jonathan
Joined
Nov 25, 2019
Threads
169
Messages
8,176
Reaction score
15,338
Location
🔑 ]not/A/gr8'Place.2.store-mEyePassword[ 👀
Vehicles
MY21 J1 Premium RWD SR
Country flag
Rpi's are so hard to get right now it's stupid. They are just insanely priced for the ones that are out there. Additionally, because of the nature of how HA logs all sensor data you shouldn't ever use a SD card because they only last a year or so and then you've got a bricked system and a lot of lost work. I use a Rpi4 for my HA setup but I'm running it with an M2 SSD. They make enclosures that make it all happen. Here's the one I use.

But my point is that I've recently started using more and more the Minisforum machines and they are just as good, have 2 NICS and all standard ports for USB and Video. Based on the price they are worth it compared to the crazy stupid Rpi prices.
My experimental run at Home Assistant is on a Raspberry Pi 3 Model B that was otherwise just gonna continue sitting unused in a drawer. I'm running HA in a container (from image ghcr.io/home-assistant/home-assistant:stable) and that's been great so far. The only writable directory is HA's /config, which for me is less than 10 megabytes.

You shared some tasty hardware p0rn links though. Thanks for outright forcing me to spend money on things I absolutely don't need but now won't be able to live without. (Haven't actually purchased anything yet... but you've kicked open my wallet.)
 

swemme

Well-Known Member
Joined
Apr 25, 2021
Threads
8
Messages
65
Reaction score
37
Location
Sweden
Vehicles
Ford Mustang Mach-e
Country flag
Nice! Thanks for the tip. I’ll have to look into that machine. This will most likely be a vacation project, but now that me we have 2 MMEs in the house it will be worth the effort.
I’ve gone another way of using older laptops instead of Rpi’s. I feel the power is okay for the load and it has an internal battery backup. :) There is many out there laying around for a good price.
 

GoGoGadgetMachE

Well-Known Member
First Name
Michael
Joined
Jan 23, 2020
Threads
153
Messages
5,614
Reaction score
12,655
Location
Ohio
Vehicles
2021 Mach-E 1st Ed., 2022 Lightning Platinum
Occupation
Professional forum cheerleader and fanboy
Country flag
  • DCFC - Rouge Unplug!
I'm assuming this is "Rogue Unplug!" meaning "unplugged when it wasn't expected", versus "unplugged by someone with too much cheek makeup". 😉
 

Logal727

Well-Known Member
First Name
C
Joined
Aug 23, 2021
Threads
101
Messages
7,326
Reaction score
11,273
Location
Florida
Vehicles
‘21 Carbonized Gray Mustang Mach-E Premium AWD Ext
Country flag
I run Homebridge through HOOBS
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,741
Reaction score
11,508
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
Automatic Cabin Cooling / Heating

NOTE: As of this writing this will only trigger twice due to remote start limits. Working to see if we can enable "police" mode or modify remote start limits.

Here's an automation that can be modified for heating as well as cooling - or - just make 2 for both extremes. I'll be demonstrating the cooling since it's summer. This is something that routinely comes up on the forum as a requested feature from Ford. So here it 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.
  • Will cool the car for 15 minutes, turn off and if the temps are still high will continue to cool the car at 30 minute intervals.
  • Automatically locks the doors if they are unlocked
If you already did the Window down/rain alert then you don't have to do the configuration.yaml. If you haven't done that then do the first bit of code below.

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:

Adjust the number in the value template to your wishes. If you want to warm instead of cool you could change it to <= (temp) as a minimum temp and >= (temp) to kill the loop. If you would rather trigger this every hour instead of 30 minutes change the delay from 30 to 60.

YAML:
alias: MachE Automatic Cabin Cooling
description: ''
trigger:
  - platform: template
    value_template: >-
      {% if state_attr('sensor.openweather_api', 'current')["temp"] | int >= 105
      %}true{% endif %}
condition:
  - condition: device
    device_id: 12345
    domain: device_tracker
    entity_id: device_tracker.fordpass_tracker
    type: is_not_home
  - condition: device
    type: is_off
    device_id: 12345
    entity_id: switch.fordpass_ignition_switch
    domain: switch
action:
  - repeat:
      until:
        - condition: template
          value_template: >-
            {% if state_attr('sensor.openweather_api', 'current')["temp"] | int
            <= 105 %}true{% endif %}
      sequence:
        - type: turn_on
          device_id: 12345
          entity_id: switch.fordpass_ignition_switch
          domain: switch
        - service: notify.mobile_app_pixel_6_pro
          data:
            message: MachE Cabin Cooling Activated
            title: It's a bit Toasty!
            data:
              notification_icon: mdi:car-seat-cooler
              color: blue
        - delay:
            hours: 0
            minutes: 30
            seconds: 0
            milliseconds: 0
mode: single
Ford Mustang Mach-E Home Assistant Automations - Show them off!!! 1656870725170


Edit: This is an automation that I created without testing it in the wild. I considered doing things like stopping the loop for driving the vehicle but chose not to because then it couldn't be re-triggered if the temp remained above 105 (i.e. lunch break). However, in this case even if you're at home the vehicle will continue to cool if temps are over 105. What breaks the loop is the temp dropping below the threshold. There's so many variables in each individuals life that I'll leave it how it is and if you have questions on how to modify it let me know.
 
Last edited:

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
This is an automation that will trigger a turn on of the car every 15 minutes when "Dog Mode" is activated.
I need to re-test, but I thought remote start was limited to two times before you have to drive it? At least appeared to be last time I tried.
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,741
Reaction score
11,508
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
I need to re-test, but I thought remote start was limited to two times before you have to drive it? At least appeared to be last time I tried.
You are correct. The last two automations rely on continuous activation of remote start and I have not tested them fully and totally forgot about that limitation. I'm going to check to see if that can be overwritten with FORScan.
 

JohnFoxeSheets

Well-Known Member
First Name
John
Joined
Jan 29, 2022
Threads
21
Messages
2,475
Reaction score
3,429
Location
San Francisco
Website
johnfoxesheets.com
Vehicles
2022 Iced Blue Silver Mach E GT
Occupation
Retired Engineer
Country flag
Rpi's are so hard to get right now it's stupid. They are just insanely priced for the ones that are out there. Additionally, because of the nature of how HA logs all sensor data you shouldn't ever use a SD card because they only last a year or so and then you've got a bricked system and a lot of lost work. I use a Rpi4 for my HA setup but I'm running it with an M2 SSD. They make enclosures that make it all happen. Here's the one I use.

But my point is that I've recently started using more and more the Minisforum machines and they are just as good, have 2 NICS and all standard ports for USB and Video. Based on the price they are worth it compared to the crazy stupid Rpi prices.
I'm curious, do you run your IoT stuff on the same network as the rest of your home computers/phone? I segregate mine onto a separate WiFi SSID though it's running on the same Ubiqiti Unifi hardware... But I've not delved into HA (as of yet).
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,741
Reaction score
11,508
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
I'm curious, do you run your IoT stuff on the same network as the rest of your home computers/phone? I segregate mine onto a separate WiFi SSID though it's running on the same Ubiqiti Unifi hardware... But I've not delved into HA (as of yet).
Yes, but more than just an SSID. The actual network name is meaningless in security. I have all IOT devices on a separate vlan and isolated from anything remotely important. I actually have 4 different vlans and 2 completely different physical networks. I even have two different WAN connections. I'm not a fan of Unifi products but I'll stop there otherwise I know this thread will delve into the dark abyss.
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,741
Reaction score
11,508
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
Door - Frunk - Trunk Ajar

Here's an automation that can be used to alert you if a door, the frunk or the trunk are ajar for over 12 minutes. Also good for that random trunk opening issue that many people have.

It's fairly simple, but in testing this one there was something that really stood out as a problem. When a door is closed it's not always communicated to the mothership. So, the issue I had was that it was triggering falsely. If the doors lock then it works fine, but when left unlocked it doesn't.

So, what I've done is I look to see if the doors are open for 5 minutes. Then I trigger the vehicles communication system to report back it's status to the mothership. This can take about 5 minutes for the round trip, so I wait 7 minutes to be on the safe side. Then we validate the refresh was received within the last 10 minutes and proceed with the notification if that condition is met.

In order to validate the the time we have to adjust our local time to match the returned time. To do this you need to take the timestamp and modify that value to "remove" your local time zone. In my case it's 7 hours. 7 hours in seconds is 25200. Therefore, you must modify that value in the code below to your correct value in seconds, otherwise it will never work.

YAML:
alias: MachE Door Ajar Notification
description: ''
trigger:
  - platform: state
    entity_id:
      - sensor.fordpass_doorstatus
    to: Open
    for:
      hours: 0
      minutes: 5
      seconds: 0
condition:
  - condition: device
    type: is_off
    device_id: 12345
    entity_id: switch.fordpass_ignition_switch
    domain: switch
action:
  - service: fordpass.refresh_status
    data: {}
  - delay:
      hours: 0
      minutes: 7
      seconds: 0
      milliseconds: 0
  - if:
      - condition: template
        value_template: >-
          {{ (as_timestamp(now()) + 25200) <
          as_timestamp(states('sensor.fordpass_lastRefresh')) + 600 }}
      - condition: state
        entity_id: sensor.fordpass_doorstatus
        state: Open
    then:
      - service: notify.mobile_app_pixel_6_pro
        data:
          title: MachE Door Left Ajar
          message: Check the car doors - Door ajar for 12 minutes!
          data:
            notification_icon: mdi:car-door
            color: red
    else:
      - stop: Door assumed closed
mode: single
Ford Mustang Mach-E Home Assistant Automations - Show them off!!! 1656973186515


Note: If you really wanted to get fancy you could change the title or description of the alert to the actual door that's ajar by using the attributes in the sensor. I figured that wasn't necessary since all I care is that there's a door ajar.
Sponsored

 
Last edited:
 




Top