When paho-mqtt < 2.0 is installed (e.g. in cached Docker layers),
mqtt.CallbackAPIVersion does not exist, causing an immediate crash on
startup with:
AttributeError: module 'paho.mqtt.client' has no attribute 'CallbackAPIVersion'
Add try/except fallback so the addon works with both paho-mqtt 1.x and
2.x, eliminating the crash and allowing the addon to start correctly.
Co-authored-by: Barry Jarman <bazza@Barrys-Mac-mini.local>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Volvo's PingFederate auth API now requires a POST request for the
continueAuthentication step after OTP verification. Using GET returns
the same OTP_VERIFIED state in a loop, never progressing to COMPLETED,
which causes a KeyError on 'authorizeResponse'.
Changing auth_session.get() to auth_session.post() with an empty JSON
body causes the API to return COMPLETED with the expected authorizeResponse.