Brandawg93 / homebridge-fordpass

Control your Ford vehicle in HomeKit using Homebridge.
GNU General Public License v3.0
62 stars 15 forks source link

[Bug]: Status failed with error: ERR_BAD_REQUEST #230

Closed julienpmorand closed 11 months ago

julienpmorand commented 12 months ago

Describe the bug

Everything was working fine when all of a sudden the plugin stopped working. I wasn't able to lock/unlock/remote start the car any more. In the debug console, it seems to be able to find the vehicle description, but returns the bad request after it tries to Configure the car to refresh every 60 minutes. Nothing was changed in the configuration. It just stopped working all of a sudden.

Debug Output

[10/10/2023, 8:46:22 PM] [homebridge-fordpass] Loaded homebridge-fordpass v1.8.3 child bridge successfully
[10/10/2023, 8:46:26 PM] [homebridge-fordpass] Found vehicles : [
  {
    "VIN": "<REDACTED>",
    "nickName": "Escape PHEV",
    "tcuEnabled": true,
    "isASDN": false,
    "showEVBatteryLevel": true,
    "showFuelLevel": true,
    "cabinCargoDoubleUnlock": "False",
    "lastMileNavigated": true,
    "alarmFunctionality": "False",
    "asBuiltCountry": "CAN",
    "year": 2022,
    "heatedSteeringWheel": false,
    "numberOfLightingZones": "0",
    "cabinCargoUnlock": "False",
    "activationType": "HMI",
    "transmissionIndicator": "A",
    "bodyCompletionState": "Unknown",
    "plugAndChargeToggleOnStatus": false,
    "warrantyStartDate": "2022-11-09",
    "recallCount": 0,
    "model": "Escape",
    "zoneUnlock": "False",
    "fuelLevelApplink": false,
    "proPowerZones": "0",
    "oilLifeApplink": false,
    "usageBasedInsuranceLevel": "Enhanced",
    "healthDataViaApplink": false,
    "rearCargoArea": "Power",
    "blackLabelTrim": false,
    "doubleLocking": "False",
    "driverHeatedSeat": "None",
    "usageBasedInsurance": "Available",
    "nonRecallCount": 0,
    "otaSettingsScheduler": false,
    "proPowerApplink": false,
    "remoteClimateControl": false,
    "sendNavigationToCar": true,
    "sdn": "TMC",
    "displayRecommendedTirePressure": true,
    "vehicleImage": "https://api.mps.ford.com/api/imageservice/v1/data?key=<REDACTED>-4-thumbnail",
    "numberOfTires": "Four",
    "remoteParkAssistLevel": "None",
    "engineType": "PHEV",
    "frontCargoArea": "None",
    "lockStatus": "Inferred",
    "make": "Ford",
    "displaySmartCharging": "No Data",
    "productType": "C",
    "grossVehicleWeightRatingPounds": 0,
    "paintDescription": "ATLAS BLUE/ARTISAN BLUE",
    "modemDeactivated": "None",
    "proPowerWattage": "None",
    "onboardScaleSmartHitch": "None",
    "vehicleImageLabel": "2022 Ford Escape",
    "status": {
      "cache-control": "max-age=<REDACTED>",
      "last_modified": "Sat, 19 Aug 2023 05:08:17 GMT",
      "statusCode": "207"
    }
  }
]
[10/10/2023, 8:46:26 PM] [homebridge-fordpass] Configuring Escape PHEV to refresh every 60 minutes.
[10/10/2023, 8:46:26 PM] [homebridge-fordpass] Status failed with error: ERR_BAD_REQUEST

Steps to reproduce

Restart Homebridge, the log will keep returning the same bad request

Device Type

Ubuntu 20.04, but running Homebridge in Docker

iOS Version

17.0.3

Bug Persistence

Consistently

Last Working Version

used to work on 17.0.3, it just stopped today

maximuswallis commented 12 months ago

Same here. Only noticed it very recently.

julienpmorand commented 12 months ago

Same here. Only noticed it very recently.

Glad I'm not the only one, thanks! Also I forgot to mention that when you try a command, the fordpass plugin will log a ton of bad requests

Screenshot 2023-10-10 at 9 00 44 PM
LeFumiste commented 12 months ago

The same as you with my account 😅

tonesto7 commented 12 months ago

Ford changed the API https://github.com/itchannel/fordpass-ha/issues/303

The new API is hosted by autonomic and has much more detail

BatMahn commented 11 months ago

Just bumping for awareness. Same issue here.

HomeAssistant has made some progress.. but I couldn't get reliable starting. Also tying it into Homekit kinda sucks (IMO). So, fingers crossed for an update here.

(to the developer.. no rush man.. appreciate everything you've done so far)

Brandawg93 commented 11 months ago

I'm hoping to have time to look at it this weekend. I always have personal issues that I have to overcome for testing this plugin 😅. My car is parked in a garage with no cell service so I have to go find a spot on the street. If I get a chance, I'll leave it somewhere for a few days.

Brandawg93 commented 11 months ago

Ok. Latest test version is live (v1.9.0-test.0). Please check it out and let me know if you find any bugs!

There is still much to be done since this is practically a rewrite, but I'm getting some sleep for tonight. 💤 More to come!

BatMahn commented 11 months ago

So far.. seems that locking and starting are working (at least for me anyways).

Cheers.

Edit: 1-2 minutes after locking, it "unlocks" again. I don't think it's actually physically unlocking.. just telling Homekit it did.

Brandawg93 commented 11 months ago

Yep. Lock status wasn't working. I've published v1.9.0-test.1 that fixes it. I will need someone with a EV to verify that this version is working for them (e.g. charging status and charging plug status) as I don't have an EV.

I've made the debug logs print out the vehicle metrics so anyone with an EV can copy it here (with vin and others redacted).

julienpmorand commented 11 months ago

Can confirm the occupancy is detected when the car is charging, will confirm in the next few hours to validate it detects when it's done charging. Thanks for the hard work!

julienpmorand commented 11 months ago

As for the log, maybe I could send it your way via email? It's too long for a Github comment. I have a PHEV, not an EV

Brandawg93 commented 11 months ago

@julienpmorand Sure. brandawg93@proton.me

julienpmorand commented 11 months ago

Can now report that both occupancy triggers work like they used to, thanks!

Brandawg93 commented 11 months ago

Thanks for confirming! v1.9.0 is now live for everyone. If anyone has any other issues, feel free to submit another issue.

LeFumiste commented 10 months ago

image