Would you want this widget?


  • Total voters
    142

Gullwingdmc

Well-Known Member
First Name
Chip
Joined
May 15, 2021
Threads
77
Messages
2,739
Reaction score
3,746
Location
Boston, MA
Vehicles
2022 Mustang Mach E GT AWD ER - Grabber Blue
Country flag
My husband is an iOS dev and he was playing around with making an iOS widget similar to this, but unfortunately iOS does not let you execute an exiting from a widget without first opening the associated app. So he would have to make an app to execute the commands. An unfortunate limitation of iOS.
Sponsored

 
OP
OP
DevSecOps

DevSecOps

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

Gullwingdmc

Well-Known Member
First Name
Chip
Joined
May 15, 2021
Threads
77
Messages
2,739
Reaction score
3,746
Location
Boston, MA
Vehicles
2022 Mustang Mach E GT AWD ER - Grabber Blue
Country flag

TruWrecks

Well-Known Member
First Name
Doug
Joined
Jun 3, 2021
Threads
22
Messages
860
Reaction score
917
Location
Oregon
Vehicles
Mach-E Star White Premium AWD Ext (Ghost Stallion)
Occupation
Retired
Country flag

m7h8n7pg

New Member
First Name
Fu
Joined
Feb 3, 2022
Threads
0
Messages
1
Reaction score
0
Location
USA
Vehicles
2004 Chevy Monte Carlo SS, 2022 Mustang Mach-E bas
I'm absolutely amazed that the data is available to be able make this. It's really awesome
 


BobMac57

New Member
First Name
Bob
Joined
Feb 21, 2022
Threads
0
Messages
2
Reaction score
0
Location
North Carolina
Vehicles
2021 Ford F-150 Platinum
@DevSecOps, I've been looking for an Android Widget when I found this in my search. Awesome job and this brings me to why I joined the site, can this be applied to a F-150 with a graphic change instead of the Mustang?
 
Last edited:
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,499
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
@DevSecOps, I've been looking for an Android Widget when I found this in my search. Awesome job and this brings me to why I joined the site, can this be applied to a F-150 with a graphic change instead of the Mustang?
Of course. Just to let you know there's also a less complex Android widget but you are at the mercy of the developer with that one.

With my version it's more complex, but with complexity comes customizability. Anything can be changed by whoever uses it.

As you can see in the below screen shot you can just change out the images:

Ford Mustang Mach-E [Guide] Android MME Widget [More Complex] Screenshot_20220221-082512
 

BobMac57

New Member
First Name
Bob
Joined
Feb 21, 2022
Threads
0
Messages
2
Reaction score
0
Location
North Carolina
Vehicles
2021 Ford F-150 Platinum
Of course. Just to let you know there's also a less complex Android widget but you are at the mercy of the developer with that one.

With my version it's more complex, but with complexity comes customizability. Anything can be changed by whoever uses it.

As you can see in the below screen shot you can just change out the images:

Ford Mustang Mach-E [Guide] Android MME Widget [More Complex] Screenshot_20220221-082512
I am a developer so that helps, thanks for the quick reply...
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,499
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
I am a developer so that helps, thanks for the quick reply...
Let me know if you need any help with it and if you implement it I would love to see how it came out.

Best of luck!
 

sockmeister

Well-Known Member
Joined
Sep 24, 2020
Threads
6
Messages
1,879
Reaction score
2,992
Location
Pennsylvania
Vehicles
2021 Mustang Mach-E4x
Occupation
SW Engineer
Country flag
Okay, so I've kept quiet on my little project over here regarding an Android Widget that I've been in the process of developing.

If you are looking for something that is easier check out this post here by @kennelh : https://www.macheforum.com/site/threads/android-widget-for-mach-e.13563/. I believe that the biggest difference is look/feel and the fact that my widget has buttons that command the car to do things just like within FP.

IMPORTANT: Due to the complexity of the widget it's not going to be available for everyone. I wanted something that was very functional and informative and to accomplish that I used a number of different things including listeners for event changes, pushing notifications from the listeners to the phone, the phone intercepting these events and then performing queries of the data which populates the widget. I also wanted something that I can style infinite ways and this gives me, and anyone else, that ability. Once setup you can customize it easily in the GUI to however you'd like.

So to go along with this there's a poll. I want to see if there's interest out there for some of the more technically inclined folks for me to publish a "how to" on this. Edit: guide was posted below.

ON TO THE WIDGET:

All of the data is in real time.
  • If a door, window, trunk or frunk is open the app will alert as shown below in the area where said object is open.
  • If the tire pressure falls below the limit the circles will turn red.
  • When the car is turned on the power button changes to blue. This button also serves as a remote start.
  • If the alarm is set, it turns green, of alarm is sounding it turns red.
  • When doors are locked it turns red. This button also serves as a door lock/unlock button
  • The FP Icon opens FordPass
  • The ChargePoint Icon opens ChargePoint
  • The charge button is grey for unplugged, white for plugged in, blue for charging.
  • Touching the Mach-E logo will force a refresh of HA from Ford, which will in turn update the widget if changes are available.
Examples:
Unlocked vehicle, passenger window open, not charging, not on
Ford Mustang Mach-E [Guide] Android MME Widget [More Complex] Screenshot_20220221-082512


Charger plugged in (not actively charging, frunk open, tailgate open, passenger door open, all windows closed.
Ford Mustang Mach-E [Guide] Android MME Widget [More Complex] Screenshot_20220221-082512


Additional Images Here

Requirements:
  • HA - WAN accessible
  • HACS w/FP (free)
  • Android - Tasker (free)
  • Android - AutoRemote - Part of Tasker AutoApps (free)
  • Android - KWGT (free)
---------------------------------- THE GUIDE ----------------------------------------

If you already have HA with FP installed the total time to complete the below steps should be about 30-45 minutes. So it's not that hard since I've given all of the imports with the majority of the work.

Step #1:

Prerequisites -
  • Make sure that you have Home Assistant with a WAN accessible URL. Your phone will need to connect to HA.
  • Make sure you have installed and setup FordPass in HA. (link)
Step #2:
  1. On your Android phone download Tasker and AutoApps-AutoRemote
  2. Open AutoRemote and go to the URL provided.
  3. Inside of the website type "Re" (without quotes) in the message box.
  4. A blue box will appear with a url to send the message directly. Copy this url.
  5. Open HA and edit the configuration.yaml file
  6. Past the following replacing the url with that of the coppied above:
Code:
rest_command:
  autoremote_refresh:
    url: "https://autoremotejoaomgcd.appspot.com/..............
  1. Restart HA
  2. Go back into AutoRemote and go to the settings (bottom left) and then alerts and disable the toast notifications otherwise every time there's an update pushed it will toast. If you want to leave it on for testing purposes feel free, but eventually you'll want to turn it off.
Step #3:

Create a Helper in HA. Give it the name: "KWGT Refresh - Android MME Widget"

Create the following two automations in HA:
YAML:
alias: KWGT MME Boolean
description: ''
trigger:
  - platform: state
    entity_id: >-
      lock.fordpass_doorlock, sensor.fordpass_elveh,
      sensor.fordpass_tirepressure
condition: []
action:
  - service: input_boolean.toggle
    target:
      entity_id: input_boolean.kwgt_refresh_android_mme_widget
mode: single
Add as many entities to the above code as you want to monitor for changes. When the states change for the above entities it will trigger a refresh on the phone. You can add as many or little as you want.

YAML:
alias: KWGT MME Rest Command
description: ''
trigger:
  - platform: state
    entity_id: automation.kwgt_mme_boolean
condition: []
action:
  - service: rest_command.autoremote_refresh
mode: parallel
max: 10
NOTE: The FordPass HA integration automatically subscribes to events from the mother ship and "should" be updated every time there's a vehicle change. If you want to force a refresh you can do this by triggering fordpass.refresh_status on a timed interval. By allowing HA to handle this the load on the phone is minimized. You can still trigger the message notification to the phone on the changed states as you wish, which won't change the refresh status on the phone (so long as you don't pick the refresh timestamp as the trigger). It should be noted that this command queries the vehicle to report. This means that battery is used. I am testing the impact of this right now, but use caution.
Below is a simple automation example that runs every 30 minutes:

YAML:
alias: 'Refresh FP * 5 '
description: ''
trigger:
  - platform: time_pattern
    minutes: /30
condition: []
action:
  - service: fordpass.refresh_status
mode: single
WARNING: In testing with short intervals the vehicle is kept awake which causes LVB discharge. Use the above command/script with caution. It is not required for the widget.

Step #4:

First of all, go the the “Long-Lived Access Tokens” section at the bottom of the Profile page of your Home Assistant. This page can be accessed by clicking on your name, at the bottom of the main menu

Create a new token, and keep the token value somewhere for the next step. We are done with HA at this point.

In the VARS tab of Tasker, create 2 new variables:
  • HA_ADDR is the address of your home-assistant instance
    Add the port if there is one, and no trailing slash
  • HA_TOKEN is the token you created above
Import the below service and template into Tasker:
Just click on the following links with your mobile device and follow the instructions
Step #5:
Import the following into Tasker. These are the refresh, start, stop and lock, unlock commands:
Once you have these in place you should be able to test the commands by running them. This will verify that all the previous steps have been done correctly. With the exception of the intercept of the "Re" message, which we will get to later.

Step #6:
Prerequisite - KWGT must be installed on your phone already

Import the below into Tasker. There's 58 tasks in here that are used to query HA and push those results into KWGT. There's also a couple tasks that normalize date and times for active charging calculations.
After the above is imported go to Profiles and create a new profile.
  1. Chose Event as the type of profile
  2. In the filter line at the bottom type "auto" and select autoremote
  3. Click on the pencil icon to configure
  4. Click on Message Filter and enter "Re" without the quotations
  5. Click OK
  6. Check the box for Exact Message
  7. Click back twice and Select "MME Status"
  8. Go into the MME Status Task and click on the run (play) button in the bottom left.
You are done setting up Tasker!

Step #7:
  1. Unzip the attached file.
  2. Create a 4x4 Widget using KWGT and resize the widget to be a square that takes the top half of the screen. NOTE: I have not tested this on different size devices. I am using a 5x5 app grid which isn't standard. But everything can be configured for your device.
  3. Click on the widget to go into the settings. Import the below file that was extracted from the zip.
  4. Profit
Explanation:

For anyone who just blindly followed my directions here's what we did in review:
  • We first created a boolean to trigger an event in Home Assistant
  • We then created an automation to monitor changes to the MME via the integration with FordPass
  • We then created a rest command that could be executed in HA
  • Then we created an automation to execute the rest command should the boolean be triggered by the automation used to monitor the status of the vehicle.
  • We created a token and configured Tasker to be able to query and execute commands on our HA instance
  • Moving on we told the phone to look for any message inbound that was simply "Re"
  • We created a profile to execute a task when this message is received
  • The task has 25 queries for data from HA and 25 pushes of received data to KWGT
  • We created 4 executable actions to control the car
  • In KWGT you really did nothing, but I spent hours coding the colors to change, text to change, buttons to appear and disappear and created the custom layout in Photoshop.
KWGT Modifications:

You should be able to look around and see how I coded things to work. Anywhere you see a little calculator icon is where there's custom code controlling the behavior of that object. Most of the time this is in the colors and visibility of layers.

Buttons to control actionable events are created as layers. Thus, for example, if the vehicle is locked then display the locked icon with a button action of unlock. In this example the layer is only present if the conditions are met. This allows the button to be able to switch between lock and unlock since lock actions in HA don't have toggle properties. Same goes for remote start.

There's other areas where I changed words because the returned results are not so pretty. You can easily modify all of this as you wish.

For the battery gradient, it goes from green > 50%, Orange > 30% and Red below that. If you go into the color calculator you'll see the formula I used for that, you can change those ratios or colors as you wish.

Have fun!

To Do:
  • Add high tire PSI warning (currently only reports low)
  • Add global alert icon for any issue
  • Add FordPass message count as icon badge count
  • Fix charging status indicator by evaluating current time against start and end times
  • Provide different background images with solid car and possibly various vector images to be used for door open events.
  • Change blue color used for ignition status and charging to mach e blue
  • Oops, forgot the rear windows
  • Manual refresh by touching MachE logo
  • Add circular fill to all green/red vehicle circles
Maybe To-Do (things I could care less about):
  • Add location of vehicle??
  • Add HVB battery status??
  • Add remote start remaining duration??
  • Add tracker location??
*** @dsuyang @PaaK_Android , I might be a little impartial, but I prefer my version aesthetically over the the other two versions ***

I somehow never saw this, and wanted to say of course I'll try it.

It's funny, I'm also working on an app at the moment, and I just today got my account disabled by Ford for, presumably, too many suspicious API queries.
This seems to be a 5-day process to get it unlocked, which is annoying. Just a warning to be careful with the number of queries ?

P.S. I don't have HomeAssistant, BUT, I do have openHAB which I use for just about everything. I suppose it can work there with some effort.
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,499
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
I somehow never saw this, and wanted to say of course I'll try it.

It's funny, I'm also working on an app at the moment, and I just today got my account disabled by Ford for, presumably, too many suspicious API queries.
This seems to be a 5-day process to get it unlocked, which is annoying. Just a warning to be careful with the number of queries ?

P.S. I don't have HomeAssistant, BUT, I do have openHAB which I use for just about everything. I suppose it can work there with some effort.
I've never used openHAB, but as long as you can pull the data from Ford, then create an automation to trigger the tasker url when the Ford refresh changes and lastly your instance can be accessed and queried remotely then it should work. The Android part of it remains mostly the same.

Good job on getting banned ?
 

sockmeister

Well-Known Member
Joined
Sep 24, 2020
Threads
6
Messages
1,879
Reaction score
2,992
Location
Pennsylvania
Vehicles
2021 Mustang Mach-E4x
Occupation
SW Engineer
Country flag
I've never used openHAB, but as long as you can pull the data from Ford, then create an automation to trigger the tasker url when the Ford refresh changes and lastly your instance can be accessed and queried remotely then it should work. The Android part of it remains mostly the same.

Good job on getting banned ?
Lol. Yep, that should all be doable. It's a matter of me dedicating time to setting it up, which might happen since I'm semi-banned from FordPass ?
 

sockmeister

Well-Known Member
Joined
Sep 24, 2020
Threads
6
Messages
1,879
Reaction score
2,992
Location
Pennsylvania
Vehicles
2021 Mustang Mach-E4x
Occupation
SW Engineer
Country flag
Sorry to hijack the thread, but I'm just giving an update that I haven't really made any progress on either my app, or yours, since I'm still banned, and Ford apparently has so far not encountered this. Or at least the people working on my issue don't know what to do.

Though every time they call, they seem to like to ask me to change my password again or try uninstalling the app. (Hint: It's not gonna work. My account is locked internally).

Some advice to everyone working on apps: Don't get banned. ? . I'm actually still not sure what I did to "trigger" what I'm assuming was probably an automatic account lock for malicious activity.
 
OP
OP
DevSecOps

DevSecOps

Well-Known Member
First Name
Todd
Joined
Sep 22, 2021
Threads
69
Messages
4,740
Reaction score
11,499
Location
Sacramento, CA
Vehicles
'21 Audi SQ5 / '23 Rivian R1T / '23 M3P
Occupation
CISO
Country flag
Just a quick update. I don't think anyone used this method of the plugin since I gave my graphical assets to @kennelh to improve upon his "easy" (for the end user) version of the widget.

But in the case that anyone did use this widget, the FP integration from HACS stopped working yesterday because the API flow was changed for auth. In order to get it working again you need to do the following:
  1. Disable the FP integration in Settings -> Devices & Services
  2. Go into HACS
  3. Go to Integrations
  4. Click on the menu for Fordpass
  5. Click re-download
  6. Toggle "show beta versions"
  7. Change to version 1.32 Beta
  8. Download
  9. Restart
  10. Re-enable the FP integration
Tire pressure monitoring appears to be broken in the beta reporting 9505 PSI each tire.

If anyone does have this installed and uses Chargepoint I've made a lot of tweaks to reflect all Chargepoint home data in the widget including charging status, power delivered and cost of active charging session. Let me know if you're interested.
 

mkhuffman

Well-Known Member
First Name
Mike
Joined
Nov 19, 2020
Threads
24
Messages
6,068
Reaction score
8,014
Location
Virginia
Vehicles
2021 MME GT, Jeep GC-L, VW Jetta
Country flag
Just a quick update. I don't think anyone used this method of the plugin since I gave my graphical assets to @kennelh to improve upon his "easy" (for the end user) version of the widget.

But in the case that anyone did use this widget, the FP integration from HACS stopped working yesterday because the API flow was changed for auth. In order to get it working again you need to do the following:
  1. Disable the FP integration in Settings -> Devices & Services
  2. Go into HACS
  3. Go to Integrations
  4. Click on the menu for Fordpass
  5. Click re-download
  6. Toggle "show beta versions"
  7. Change to version 1.32 Beta
  8. Download
  9. Restart
  10. Re-enable the FP integration
Tire pressure monitoring appears to be broken in the beta reporting 9505 PSI each tire.

If anyone does have this installed and uses Chargepoint I've made a lot of tweaks to reflect all Chargepoint home data in the widget including charging status, power delivered and cost of active charging session. Let me know if you're interested.
I am wondering if it is possible to use what you did to create something similar in my Hubitat environment. It would be really cool to put my SOCD and charging status on one of my Hubitat dashboards.
Sponsored

 
 




Top