Open Palmke opened 2 years ago
Hi, and sorry for the late response. This looks cool. I just happen to have very little time at the moment. If you want to try, you can create a PR for this. Otherwise I might look into it at some point in the future.
@Palmke How did you find these endpoints? I'm interested in extending this module with support for electric vehicles, but I don't know where to extract the endpoints from.
Hi Frederik, what I did was pull the Android APK from the web (apkmirror.com or so) and then decompiled it in Android Studio.
I think - it was a while ago - I looked for strings like /v1/
, like the ones we can find in this repo already.
I found that Ford kindly annotated the endpoints in the app so you can then easily find all other endpoints by searching for that endpoint.
So this is without any body data for pushing data to Ford (charging schedule and such). I was looking if other endpoints existed :)
Thank you - that works. Did you try any of the post endpoints with body data? Sending JSON doesn't seem to work.
EDIT: Never mind, I got it working. I'll try to wrap some of the useful endpoints.
Cool, good to hear you have got it working. The guard mode feature might be one I'm interested in... In the past I got false alerts so I stopped using it. Maybe it's better now :-)
PS. Does that other repository on GitHub not have those missing features? The one repo that got linked in an issue here regarding the new authentication method?
Just bought a FordPass enabled EV and thought about doing this myself. Thanks @Palmke for doing some of the work already!
It would be nice to compile a list of all known endpoints from the Android app. This'll be my first TODO once I get a chance to sit down and start hacking.
Hi, I found several commands that could be added to this module so it provides more features.
Software update status (no auth required): https://www.servicescache.ford.com/api/Sync/v2/getInstallPackages?locale=[LOCALE]&vinCode=[VIN]&appType=sync https://www.servicescache.ford.com/api/Sync/v2/getInstallPackages?locale=[LOCALE]&vinCode=[VIN]&appType=map You can skip the second call (for map) when the first one responds with
"mapInstalled":"No"
Capabilities:
https://api.mps.ford.com/api/capability/v1/vehicles/{vin}
Availability of the features below is subject to the flags result from the call above. This also goes for the already implemented (UN)LOCK and START/STOP features.The Guard Mode stuff seems to be not working. I always get 404. I believe this is the renamed SecuriAlert feature (which was Guard Mode at first) enableGuardMode:
PUT - v1/{vin}/session
disableGuardMode:
DELETE - v1/{vin}/session
getGuardModeStatus:
GET - v1/{vin}/session
Zone Lighting: https://www.youtube.com/watch?v=SI2BzcTso50 activateZoneLighting
PUT - /api/vehicles/{vin}/zonelightingactivation/
deactivateZoneLighting:DELETE - /api/vehicles/{vin}/zonelightingactivation/
getZoneLightingRequestStatus:GET - /api/vehicles/{vin}/zonelightingactivation/{commandId}/
getZoneRequestStatus:GET - /api/vehicles/{vin}/zonelighting/{commandId}/
issueCabinUnlockCommand:DELETE - vehicles/{vin}/unlockcabin
issueCargoUnlockCommand:DELETE - vehicles/{vin}/unlockcargo/
issueLightsAndHornCommand:
PUT - vehicles/{vin}/panic/{paniconduration}
getLightsAndHornCommandStatus:GET - vehicles/v2/{vin}/panic/{commandId}
Can also look into features like (I have no context about these):