mirror of
https://github.com/Dielee/volvo2mqtt.git
synced 2026-08-13 03:09:52 +02:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
75013509f4 | ||
|
|
1d8132d93a | ||
|
|
fc529f313f | ||
|
|
3f36368773 |
@@ -1,5 +1,22 @@
|
|||||||
|
## v1.10.3
|
||||||
|
### 🐛 Bug Fixes:
|
||||||
|
|
||||||
|
- Add more info logging for credential refresh process
|
||||||
|
- Fix bug if app needs to be re-authenticated with OTP while runtime
|
||||||
|
|
||||||
|
## v1.10.2
|
||||||
|
### 🐛 Bug Fixes:
|
||||||
|
|
||||||
|
- Remove unused multiplier options #239
|
||||||
|
|
||||||
|
## v1.10.1
|
||||||
|
### 🚀 Features:
|
||||||
|
|
||||||
|
- Optimize logging for vcc-api-key check #238
|
||||||
|
|
||||||
## v1.10.0
|
## v1.10.0
|
||||||
### 🚀 Features:
|
### 🚀 Features:
|
||||||
|
|
||||||
- Remove unused multiplier options
|
- Remove unused multiplier options
|
||||||
|
|
||||||
### 🐛 Bug Fixes:
|
### 🐛 Bug Fixes:
|
||||||
|
|||||||
+1
-4
@@ -1,6 +1,6 @@
|
|||||||
name: "Volvo2Mqtt"
|
name: "Volvo2Mqtt"
|
||||||
description: "Volvo AAOS MQTT bridge"
|
description: "Volvo AAOS MQTT bridge"
|
||||||
version: "1.10.0"
|
version: "1.10.3"
|
||||||
slug: "volvo2mqtt"
|
slug: "volvo2mqtt"
|
||||||
init: false
|
init: false
|
||||||
url: "https://github.com/Dielee/volvo2mqtt"
|
url: "https://github.com/Dielee/volvo2mqtt"
|
||||||
@@ -27,9 +27,6 @@ options:
|
|||||||
vin: ""
|
vin: ""
|
||||||
vccapikey:
|
vccapikey:
|
||||||
- null
|
- null
|
||||||
odometerMultiplier: 1
|
|
||||||
averageSpeedDivider: 1
|
|
||||||
averageFuelConsumptionMultiplier: 1
|
|
||||||
schema:
|
schema:
|
||||||
updateInterval: int(60,)
|
updateInterval: int(60,)
|
||||||
babelLocale: str
|
babelLocale: str
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
from config import settings
|
from config import settings
|
||||||
|
|
||||||
VERSION = "v1.10.0"
|
VERSION = "v1.10.3"
|
||||||
|
|
||||||
OAUTH_TOKEN_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
|
OAUTH_TOKEN_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
|
||||||
OAUTH_AUTH_URL = "https://volvoid.eu.volvocars.com/as/authorization.oauth2"
|
OAUTH_AUTH_URL = "https://volvoid.eu.volvocars.com/as/authorization.oauth2"
|
||||||
|
|||||||
+12
-2
@@ -162,6 +162,7 @@ def send_otp(auth_session, data):
|
|||||||
|
|
||||||
auth = auth_session.post(next_url, data=json.dumps(body))
|
auth = auth_session.post(next_url, data=json.dumps(body))
|
||||||
if auth.status_code == 200:
|
if auth.status_code == 200:
|
||||||
|
mqtt.otp_code = None
|
||||||
return auth.json()
|
return auth.json()
|
||||||
else:
|
else:
|
||||||
message = auth.json()
|
message = auth.json()
|
||||||
@@ -198,6 +199,7 @@ def refresh_auth():
|
|||||||
token_expires_at = datetime.now(util.TZ) + timedelta(seconds=(data["expires_in"] - 30))
|
token_expires_at = datetime.now(util.TZ) + timedelta(seconds=(data["expires_in"] - 30))
|
||||||
refresh_token = data["refresh_token"]
|
refresh_token = data["refresh_token"]
|
||||||
else:
|
else:
|
||||||
|
logging.warning("Refreshing credentials failed!: " + str(auth.status_code) + " Message: " + auth.text)
|
||||||
authorize(renew_tokenfile=True)
|
authorize(renew_tokenfile=True)
|
||||||
|
|
||||||
|
|
||||||
@@ -311,9 +313,17 @@ def check_vcc_api_key(test_key, extended_until=None):
|
|||||||
logging.warning("VCCAPIKEY " + test_key + " is extended and will be reusable at: "
|
logging.warning("VCCAPIKEY " + test_key + " is extended and will be reusable at: "
|
||||||
+ format_datetime(extended_until, format="medium", locale=settings["babelLocale"]))
|
+ format_datetime(extended_until, format="medium", locale=settings["babelLocale"]))
|
||||||
else:
|
else:
|
||||||
logging.warning("VCCAPIKEY " + test_key + " isn't working! " + data["error"]["message"])
|
if "error" in data:
|
||||||
|
logging.warning("VCCAPIKEY " + test_key + " isn't working! " + data["error"]["message"])
|
||||||
|
else:
|
||||||
|
logging.warning("VCCAPIKEY " + test_key + " isn't working! Statuscode " + str(response.status_code) +
|
||||||
|
" Message: " + response.text)
|
||||||
else:
|
else:
|
||||||
logging.warning("VCCAPIKEY " + test_key + " isn't working! " + data["error"]["message"])
|
if "error" in data:
|
||||||
|
logging.warning("VCCAPIKEY " + test_key + " isn't working! " + data["error"]["message"])
|
||||||
|
else:
|
||||||
|
logging.warning("VCCAPIKEY " + test_key + " isn't working! Statuscode " + str(response.status_code) +
|
||||||
|
" Message: " + response.text)
|
||||||
return True, extended_until
|
return True, extended_until
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user