Compare commits

...
3 Commits
4 changed files with 26 additions and 7 deletions
+15
View File
@@ -1,3 +1,18 @@
## v1.8.6
### 🚀 Features:
- Add option to use multiple docker containers (with different logins) #93
## v1.8.5
### 🚀 Features:
- Allow phone number as username #91
## v1.8.4
### 🚀 Features:
- Optimize Addon configuration #90
## v1.8.3
### 🚀 Features:
+6 -5
View File
@@ -1,6 +1,6 @@
name: "Volvo2Mqtt"
description: "Volvo AAOS MQTT bridge"
version: "1.8.3"
version: "1.8.6"
slug: "volvo2mqtt"
init: false
url: "https://github.com/Dielee/volvo2mqtt"
@@ -24,14 +24,15 @@ options:
username: null
password: null
vin: ""
vccapikey: null
vccapikey:
- null
odometerMultiplier: 1
averageSpeedDivider: 1
averageFuelConsumptionMultiplier: 1
schema:
updateInterval: int(60,)
babelLocale: str
TZ: str
TZ: match(^.+/.+$)
debug: bool
mqtt:
broker: str
@@ -39,11 +40,11 @@ schema:
username: str?
password: str?
volvoData:
username: str
username: match(^([\w+\.]+@([\w-]+\.)+[\w-]{2,4})|(\+\d{5,20})$)
password: str
vin: str?
vccapikey:
- str
- match(^\b\w{32}\b$)
odometerMultiplier: int(1,)
averageSpeedDivider: int(1,)
averageFuelConsumptionMultiplier: int(1,)
+1 -1
View File
@@ -1,6 +1,6 @@
from config import settings
VERSION = "v1.8.3"
VERSION = "v1.8.6"
OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles"
+4 -1
View File
@@ -4,6 +4,7 @@ import paho.mqtt.client as mqtt
import json
import volvo
import util
import os
from threading import Thread, Timer
from datetime import datetime
from babel.dates import format_datetime
@@ -23,7 +24,9 @@ active_schedules = {}
def connect():
client = mqtt.Client("volvoAAOS2mqtt")
client = mqtt.Client("volvoAAOS2mqtt") if os.environ.get("IS_HA_ADDON") \
else mqtt.Client("volvoAAOS2mqtt_" + settings.volvoData["username"])
client.will_set(availability_topic, "offline", 0, False)
if settings["mqtt"]["username"] and settings["mqtt"]["password"]:
client.username_pw_set(settings["mqtt"]["username"], settings["mqtt"]["password"])