itchannel / fordpass-ha Goto Github PK
View Code? Open in Web Editor NEWFordpass integration for Home Assistant
Fordpass integration for Home Assistant
Attributes for all 4 windows show "Fully_closed_position" but entity state shows "Open"
DriverWindowPosition Fully_closed_position
PassWindowPosition Fully_closed_position
RearDriverWindowPos Fully_closed_position
RearPassWindowPos Fully_closed_position
Please refer to my JSON ouput found here #52 (comment)
Hi
I've been looking around but can't see if anyone else asked:
Is it possible to have values with decimals, eg battery status, I don't know if the value from ford is rounded already?
Thanks for this integration, it's awesome!
Thanks very much for your work.
Can you please add an option to allow for imperial units for fuel and mileage?
Hi,
what would be a good refresh cycle to not drain the battery?
Hello!
First of all, thank you for this integration. I CANNOT wait to get it working. I have been looking for something like this since I started with HA in April.
I have a '17 Ford Fusion and I am trying to get this integration setup.
Installed via HACS and configured via Integrations but I am getting the errors below.
For the username/PW I confirmed they were correct by signing into Ford's site
For the VIN I copied and pasted directly from the Ford site where I have my car registered.
Could this be because I do not have the "connected" features? I have the Ford Pass app and I can still view mileage, etc.
LOG:
Config entry for fordpass not ready yet. Retrying in 5 seconds 4:17:26 PM – config_entries.py (WARNING) - message first occurred at 4:07:56 PM and shows up 11 times Error fetching fordpass data: Error communicating with FordPass for VINNUMBER 4:17:26 PM – FordPass (ERROR) - message first occurred at 4:07:56 PM and shows up 11 times Error communicating with FordPass for VINNUMBER 4:17:26 PM – FordPass (WARNING) - message first occurred at 4:07:56 PM and shows up 11 times 'vehiclestatus' 4:17:26 PM – FordPass (WARNING) - message first occurred at 4:07:56 PM and shows up 11 times
Ive got a issue after updating to the lates version..
Can u check Skype ?
Is there a way to add 15 minutes to the starter timer?
Not sure if its the same in all markets, but here in Canada, all starters are the same,
Runs for 15 minutes. Can be started or extended once more before requiring key in ignition.
The fordpass android app has a button to extend the remote start by 15 minutes. The app will let you use it once before requiring the key to turn in the ignition.
Here in northern Canada, its DAMN cold. We need the full 30 minutes to warm up.
How can this be achieved? Button? Timer? Slider? Service Call? Automation?
When you select the UoM "metric". You should also see the tire pressure in kilopascal. Kilopascal is the standard metric unit for pressure.
The api sends the pressure data allready in kilopascal so you don't have to convert them when metric is selected.
Need to work out optimal scan interval to prevent battery drain and API soft ban
I have all the expected entities available with the exception of the odometer.
Hey There,
Great Integration, The only issue i'm having right now is that the last refresh rate time stamp is horribly off.
fordpass_lastRefresh - 01-17-2021 12:52:58
my Current time is -01-17-2021 06:57:23
So it looks like my time zone for the refresh is off by 6 hours.
Hi @itchannel, sorry for the roundabout way of reaching out. I couldn't find anywhere how I could just drop you a quick note. I'm REALLY excited about this integration, and wanted to offer myself to help with testing, or documentation. I am an enterprise IT marketing strategist by trade, but a geek by night. My programming capabilities are minimal, but anything else I can do to support. I always knew this integration was possible, and I'm so excited to be able to tell HA that I'm about to go out, and (in the future), have it warm the car, etc. so that when I get in, I can just go!
Thanks for creating this. Please just tell me what I can do!
Noticing a few Ford Expedition-specific data points missing from this awesome component; specifically TPMS is of interest... Dumping my debug output for future reference.
{'vin': 'XXXXX', 'lockStatus': {'value': 'LOCKED', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'alarm': {'value': 'SET', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'PrmtAlarmEvent': {'value': 'Null', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'odometer': {'value': 57303.0, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'fuel': {'fuelLevel': 65.543688, 'distanceToEmpty': 498.7, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'gps': {'latitude': 'xx.xxxx', 'longitude': '-xx.xxxx', 'gpsState': 'UNSHIFTED', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'remoteStart': {'remoteStartDuration': 0, 'remoteStartTime': 0, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'remoteStartStatus': {'value': 0, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'battery': {'batteryHealth': {'value': 'STATUS_GOOD', 'timestamp': '10-18-2020 14:59:29'}, 'batteryStatusActual': {'value': 12, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}}, 'oil': {'oilLife': 'STATUS_GOOD', 'oilLifeActual': 54, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'tirePressure': {'value': 'STATUS_GOOD', 'timestamp': '12-03-2020 20:11:46'}, 'authorization': 'AUTHORIZED', 'TPMS': {'tirePressureByLocation': {'value': 1, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'tirePressureSystemStatus': {'value': 'Systm_Activ_Composite_Stat', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'dualRearWheel': {'value': 0, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'leftFrontTireStatus': {'value': 'Normal', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'leftFrontTirePressure': {'value': '251', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'rightFrontTireStatus': {'value': 'Normal', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'rightFrontTirePressure': {'value': '251', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'outerLeftRearTireStatus': {'value': 'Normal', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'outerLeftRearTirePressure': {'value': '244', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'outerRightRearTireStatus': {'value': 'Normal', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'outerRightRearTirePressure': {'value': '239', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'innerLeftRearTireStatus': {'value': 'Not_Supported', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'innerLeftRearTirePressure': None, 'innerRightRearTireStatus': {'value': 'Not_Supported', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'innerRightRearTirePressure': None, 'recommendedFrontTirePressure': {'value': 39, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'recommendedRearTirePressure': {'value': 39, 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}}, 'firmwareUpgInProgress': {'value': False, 'timestamp': '05-09-2020 17:46:48'}, 'deepSleepInProgress': {'value': False, 'timestamp': '11-13-2020 23:14:04'}, 'ccsSettings': {'timestamp': '09-19-2018 14:06:35', 'location': -1, 'vehicleConnectivity': -1, 'vehicleData': -1, 'drivingCharacteristics': -1, 'contacts': -1}, 'lastRefresh': '12-03-2020 20:11:46', 'lastModifiedDate': '12-03-2020 20:11:48', 'serverTime': '12-03-2020 21:49:32', 'batteryFillLevel': None, 'elVehDTE': None, 'hybridModeStatus': None, 'chargingStatus': None, 'plugStatus': None, 'chargeStartTime': None, 'chargeEndTime': None, 'preCondStatusDsply': None, 'chargerPowertype': None, 'batteryPerfStatus': None, 'outandAbout': {'value': 'PwPckOffTqNotAvailable', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'batteryChargeStatus': None, 'dcFastChargeData': None, 'windowPosition': {'driverWindowPosition': {'value': 'Fully_closed_position', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'passWindowPosition': {'value': 'Fully_closed_position', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'rearDriverWindowPos': {'value': 'Fully_closed_position', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'rearPassWindowPos': {'value': 'Fully_closed_position', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}}, 'doorStatus': {'rightRearDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'leftRearDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'driverDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'passengerDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'hoodDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'tailgateDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'innerTailgateDoor': {'value': 'Closed', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}}, 'ignitionStatus': {'value': 'Off', 'status': 'CURRENT', 'timestamp': '12-03-2020 20:11:48'}, 'batteryTracLowChargeThreshold': None, 'battTracLoSocDDsply': None, 'dieselSystemStatus': None}
I have a 2019 Ford Fusion Titanium Hybrid / Energi and was excited to try this integration. When setting it up via the config flow I get a success dialog so it appears to authorize fine initially, but then fails to connect or create any entities.
My car is in the FordPass app (though I've always used MyFordMobile app before). And after looking at the readme for this integration, I checked my car and it does appear to have an onboard modem, so I think I meet the criteria?
Any ideas on why it might not be working? Thanks.
Hi,
I figured, that the device_tracker.fordpass_tracker refreshes every 5 minutes.
Is there a posibility to change that interval?
I want to automate the garage door. And waiting 5 mins in front of it is not the solution ;)
Thanks a lot.
Can u support china fordpass, which is loged with phone number and passwd.
Status check is not working correctly. All doors showing Closed but main Status is open
if (value["value"] != "Closed") or (value["value"] != "Invalid"):
return "Open"
return "Closed"```
Good afternoon, no entities or devices appear. In log I get this:
Logger: custom_components.fordpass
Source: helpers / update_coordinator.py: 166
Integration: FordPass (documentation, issues)
First occurred: 18:17:35 (20 occurrences)
Last logged: 18:30:59
Error fetching fordpass data: Error communicating with FordPass for XXXXXXXXXXXXX
I try to install this add-on in my HA system (information below) but I obtain this error: "Invalid Add-on repository!"
version | 2020.12.1 |
---|---|
installation_type | Home Assistant OS |
dev | false |
hassio | true |
docker | true |
virtualenv | false |
python_version | 3.8.6 |
os_name | Linux |
os_version | 5.4.79-v7l |
arch | armv7l |
timezone | Europe/Rome |
GitHub API | ok |
---|---|
Github API Calls Remaining | 4972 |
Installed Version | 1.9.0 |
Stage | running |
Available Repositories | 702 |
Installed Repositories | 4 |
logged_in | false |
---|---|
can_reach_cert_server | ok |
can_reach_cloud_auth | ok |
can_reach_cloud | ok |
host_os | Home Assistant OS 5.9 |
---|---|
update_channel | stable |
supervisor_version | 2020.12.7 |
docker_version | 19.03.13 |
disk_total | 57.8 GB |
disk_used | 4.4 GB |
healthy | true |
supported | true |
board | rpi4 |
supervisor_api | ok |
version_api | ok |
installed_addons | Spotify Connect (0.8.2), File editor (5.2.0), Duck DNS (1.12.4), SSH & Web Terminal (7.8.0), Check Home Assistant configuration (3.6.0), Mosquitto broker (5.1), WireGuard (0.4.0), JupyterLab Lite (0.3.1), Node-RED (7.2.11), Home Assistant Google Drive Backup (0.102.0) |
dashboards | 1 |
---|---|
mode | storage |
views | 1 |
resources | 0 |
I just realized that despite Configuration | Integration showing me I have 2 cars, I actually have no devices or entities. I saw these entries in home-assistant.log:
2020-11-22 13:00:16 WARNING (MainThread) [custom_components.fordpass] 'vehiclestatus'
2020-11-22 13:00:16 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for 1XX2Y3ZZ4ABC56789
2020-11-22 13:00:16 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for 1XX2Y3ZZ4ABC56789
2020-11-22 13:00:16 WARNING (MainThread) [homeassistant.config_entries] Config entry for fordpass not ready yet. Retrying in 5 seconds
I also restarted HA (several times), and each time, I waited for a while before making a determination on whether the integration worked or failed.
To triple check, I also ssh'd into HA, and I did a ping of google.com and ford.com to make sure the Internet is working or not. But so far, no luck.
For reference:
Will add a service call to delete all tokens
Need to import .fordpass not fordpass
Hi.
Im using your awesome work, thank u!
But i only se 12v battery status.
Is it possible that u can add this to the next update ?
Really great great job!
Thank u..
The entity seems to bounce between unlocked and unavailable , never showing a locked state
If you want, I can contribute some advanced CI to your repository in a PR. Let me know if you want that.
if possible add lock device entity for door locks
lock.VEHICLE_door_lock
Hi,
After 1.0.6 was running smoothly with "EU App-ID" I just updated to 1.0.7* an now receive the following errors in the log.
2020-11-29 14:22:45 INFO (SyncWorker_21) [root] No token, or has expired, requesting new token
2020-11-29 14:22:45 INFO (SyncWorker_21) [root] Token is valid, continuing
2020-11-29 14:22:46 WARNING (MainThread) [custom_components.fordpass] 401 Client Error: Unauthorized for url: https://usapi.cv.ford.com/api/vehicles/v4/WF0PXXG........../status?lrdt=01-01-1970+00%3A00%3A00
2020-11-29 14:22:46 WARNING (MainThread) [custom_components.fordpass] Error communicating with FordPass for WF0PXXG..........
2020-11-29 14:22:46 ERROR (MainThread) [custom_components.fordpass] Error fetching fordpass data: Error communicating with FordPass for WF0PXXG.........
2020-11-29 14:22:46 WARNING (MainThread) [homeassistant.config_entries] Config entry for fordpass not ready yet. Retrying in 80 seconds
Rolling back to 1.0.6 with manually set User-Agent and App-Id** everything is back online.
*Completly removed intergration and custom component and performed restarts between tests. Used region EU on setup.
**User-Agent: fordpass-eu/314 CFNetwork/1206 Darwin/20.1.0
application-id: 1E8C7794-FF5F-49BC-9596-A1E0C86C5B19
Hi ,
Great integration.
I am testing it and found that when the car is turned off, the fuel level drops to a negative number.
Initially is thought it was because the sensors became unavailable, but after calling the fordpass.refresh_status or refreshing via the ford app the status remains like that.
After the car is started it show a correct value.
My card reports windows Open, but on focus all windows report Fully closed
Loving the integration thx for all your hard work
I installed the FordPass integration from HACS and then from the HA integrations. Logged in and filled in my VIN. Yet it doesn't create any devices or entities. 24h has passed now, no errors, but also no entities.
Doesn't it work for my car then perhaps? (Ford Focus 2018 model)
The app on my phone works perfectly.
Coming in the next update:
The integration was working but since reinstalling HA I can't get integration to work. Below is the log entry.
Logger: custom_components.fordpass
Source: helpers/update_coordinator.py:166
Integration: FordPass (documentation, issues)
First occurred: 4:35:31 PM (1 occurrences)
Last logged: 4:35:31 PM
Error fetching fordpass data: Error communicating with FordPass for 1*********KFB86523
Im still learning myself, but i think
Fordpass_gps should be a device_tracker not sensor.
this will allow it to be set as a "tracking device" for "people", and the status should show as a location, rather than "unshifted".... ( I assume)
EDIT
dont change. ADD. no reason cant have both.
Ford Door Lock
mdi:car-door-lock
Ford Window Position
mdi:car-door
Ford Starter
mdi:key-star
Ford Ignition Status
mdi:key
Ford Last Update
mdi:clock
Ford Odometer
mdi:gauge
Ford Doors
mdi:car-door
Ford Fuel Level
mdi:fuel
Ford Oil Life
mdi:oil
Ford Battery
mdi:car-battery
Ford Tire Pressure
mdi:car-tire-alert
Ford Alarm
mdi:bell
Ford Tracker
mdi:radar
Ford GPS
mdi:radar
Here you go, have fun 🙈
"windowPosition": {
"driverWindowPosition": {
"value": "Fully_Closed",
"status": "CURRENT",
"timestamp": "11-01-2020 12:00:00"
},
"passWindowPosition": {
"value": "Fully_Closed",
"status": "CURRENT",
"timestamp": "11-01-2020 12:00:00"
},
"rearDriverWindowPos": {
"value": "Fully_Closed",
"status": "CURRENT",
"timestamp": "11-01-2020 12:00:00"
},
"rearPassWindowPos": {
"value": "Fully_Closed",
"status": "CURRENT",
"timestamp": "11-01-2020 12:00:00"
}
}
Component becomes unavailable after several hours. Opening the app on the phone and refreshing the vehicle fixes this for a few hours but it comes back. [VIN Redacted]
'vehiclestatus'
500 Server Error: Internal Server Error for url: https://usapi.cv.ford.com/api/vehicles/v4/1F***********8/status?lrdt=01-01-1970+00%3A00%3A00
Logger: custom_components.fordpass-ha
Source: custom_components/fordpass-ha/init.py:110
Integration: fordpass-ha
First occurred: November 18, 2020, 12:08:10 PM (509 occurrences)
Last logged: November 20, 2020, 10:04:55 PM
Error communicating with FordPass for 1F***********8
When im running at 1.0.6 everything is working fine.
Logger: custom_components.fordpass
Source: custom_components/fordpass/init.py:140
Integration: FordPass (documentation, issues)
First occurred: 9.23.22 (246 occurrences)
Last logged: 15.01.31
401 Client Error:
501 server error:
Iv'e tried the guide but 107 dosent work for my EU ford.
When i try to login with mij fordpass credentials and VIN number i instantly get the message that the authentication is invalid.
Fordpass is working with these credentials on my phone.
Could it be that the integration can't handle special characters in the password?
HA 2020.12.0
Here is my stack:
version: 0.118.5
installation_type: Home Assistant Core
dev: false
hassio: false
docker: false
virtualenv: true
python_version: 3.8.5
os_name: Linux
os_version: 4.15.0-128-generic
arch: x86_64
timezone: America/Chicago
I am seeing the following error on versions 1.0.9 and 1.10, if I revert to 1.0.8 the issue goes away.
2020-12-13 07:14:24 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/opt/homeassistant/3.8.5/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 119, in _handle_refresh_interval
await self.async_refresh()
File "/opt/homeassistant/3.8.5/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 193, in async_refresh
update_callback()
File "/opt/homeassistant/3.8.5/lib/python3.8/site-packages/homeassistant/helpers/update_coordinator.py", line 245, in _handle_coordinator_update
self.async_write_ha_state()
File "/opt/homeassistant/3.8.5/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 296, in async_write_ha_state
self._async_write_ha_state()
File "/opt/homeassistant/3.8.5/lib/python3.8/site-packages/homeassistant/helpers/entity.py", line 323, in _async_write_ha_state
attr.update(self.device_state_attributes or {})
File "/opt/homeassistant/config/custom_components/fordpass/sensor.py", line 214, in device_state_attributes
return self.get_value("attribute")
File "/opt/homeassistant/config/custom_components/fordpass/sensor.py", line 125, in get_value
float(
ValueError: could not convert string to float: ''
I have not dug into the issue yet, but I'm happy to help debug.
Thanks and love what you have done - much needed!
Hi!
Can you make the sensor for fuel round the numbers?
Now it reports 5 digits.
Maybe also add a sensor for mileage left seperate?
Underlying python library has an issue where the API rejects after a set length of time. Loading and closing the official ford app seems to get the API working again so must be some token or API check missing. Will need to intercept the mobile app to check
Hi All. Was just wondering what people think is a suitable interval to poll the car for updates. The current version has the functionality to poll the car and request updates however I have disabled it in the HA integration due to it constantly waking the car up.
I could set it to poll every hour or potentially only when a person arrives or leaves the house to get an update?
Please let me know your thoughts, I'm currently running tests on my car to see how often I can poll my car without experiencing battery drain.
Every so many minutes i get the following 3 error messages in the logging:
401 Client Error: Unauthorized for url: https://usapi.cv.ford.com/api/vehicles/v4/VIN/status?lrdt=01-01-1970+00%3A00%3A00
Error communicating with FordPass for VIN
Error fetching fordpass data: Error communicating with FordPass for VIN
clearing the tokens dit not help.
Running version 1.12 and ha 2020.12.0
Current version: 1.12
2019 Ford Edge ST
DriverWindowPosition
Fully_Closed
PassWindowPosition
Fully_Closed
RearDriverWindowPos
Undefined
RearPassWindowPos
Undefined
Just coming back to playing with the integration. One thing I immediately noticed was that when I go to Configuration | Home Assistant Cloud | Alexa | Managed Entities, the following shows up:
In the photos above, I've actually marked these to be removed from being exposed to Alexa. (I haven't looked at Google Home/Assistant, but I imagine it'll be the same). To me, to have the ability to start and unlock a car once it is integrated can be unsafe and insecure. Not sure if it is possible to default not to expose, but thought it is worth bringing up.
b
Installs, and works perfectly. However after an hour or so all item become unavailable. Calling the refresh service does not bring them back. Removing the device and re adding works.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.