Closed paulw11 closed 2 years ago
@paulw11 - this issue is being automatically closed because it does not follow either the feature request or bug report issue template. The issue templates have been designed to help in the troubleshooting (or feature request) process. Please use them and populate it as completely as possible to streamline troubleshooting or feature request discussions.
Don't worry about the automated response. I'll look into this.
Yeah, I'm not sure what I did to trigger the 402 state. It could have been because I restarted Homebridge a few times in a short period, or something else. I'll try and provide more information if I can reproduce it reliably
I have the 402 error again now. I don't have auto refresh enabled. The refresh rate is set at 180, but as I understand it with auto refresh false that shouldn't do anything.
I still don't know what triggers the 402 state, but I found out how to clear it - If I use the FordPass app on my phone and update my vehicle status then it clears the 402 and starts returning the full status. In theory the app and Homebridge will be using different JWTs, so I presume that my IP address is somehow being blacklisted but using the app clears that.
This issue is stale because it has been open 14 days with no activity. Remove stale label or comment or this will be closed in 3 days
Fixed in #187
It seems that in some cases frequent requests against Ford's servers result in a 402 response - Payment required. It seems that a rate-limiting threshold is being exceeded.
Once the 402 status is returned, homebridge-fordpass continues to make requests attempting to get vehicle status updates, continuing the problem. This state persisted for days for me.
I was able to restore operation by disabling the FordPass plug in for about an hour (I actually just changed my username so that authentication failed). This restored correct operation.
Perhaps some sort of exponential back off could be implemented such that if a 402 response is received, no further server requests are made for a time. This will result in temporarily stale date in Homebridge, but hopefully operation will eventually resume. This is preferable to the current case where the 402 state is never cleared.