forked from peter/volvo2mqtt
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1eb635592d | ||
|
|
c60ef48591 | ||
|
|
0544257126 | ||
|
|
4770846312 | ||
|
|
4896f8d00a | ||
|
|
0ece0ba04f |
+2
-2
@@ -11,7 +11,7 @@ COPY requirements.txt .
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# copy the content of the local src directory to the working directory
|
||||
COPY / .
|
||||
COPY /src .
|
||||
|
||||
# command to run on container start
|
||||
CMD [ "python", "-u", "/volvoAAOS2mqtt/src/main.py" ]
|
||||
CMD [ "python", "-u", "./main.py" ]
|
||||
|
||||
@@ -5,7 +5,8 @@ Maybe this component works also with other Volvo cars. Please try out the native
|
||||
|
||||
## Confirmed working with
|
||||
- Volvo XC40 BEV (2023)
|
||||
- V60 T8 PHEV (2023)
|
||||
- Volvo V60 T8 PHEV (2023)
|
||||
- Volvo C40 (2023)
|
||||
|
||||
Please let me know if your car works with this addon so I can expand the list!
|
||||
|
||||
@@ -25,7 +26,7 @@ Here is what every option means:
|
||||
| `mqtt` | `json` | **required** | Broker = Mqtt Broker IP / Username and Passwort are optional! |
|
||||
| `volvoData` | `json` | **required** | Username and password are REQUIRED. Car vin can be a single vin or a list of multiple vins like `["vin1", "vin2"]`. If no vin is provided, <b>ALL</b> of your vehicles will be used. Vccapi key is REQUIRED. Get your Vccapi key from [here](https://developer.volvocars.com/account/). |
|
||||
| `TZ` | `string` | | Container timezone eg "Europe/Berlin" |
|
||||
| `debug` | `string` | | Debug option (True/False) - optional! |
|
||||
| `debug` | `string` | | Debug option (true/false) - optional! |
|
||||
|
||||
If you like my work:
|
||||
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
VERSION = "v1.0.8"
|
||||
VERSION = "v1.0.10"
|
||||
|
||||
OAUTH_URL = "https://volvoid.eu.volvocars.com/as/token.oauth2"
|
||||
VEHICLES_URL = "https://api.volvocars.com/connected-vehicle/v1/vehicles"
|
||||
@@ -12,7 +12,7 @@ CAR_UNLOCK_URL = "https://api.volvocars.com/connected-vehicle/v2/vehicles/{0}/co
|
||||
RECHARGE_STATUS_URL = "https://api.volvocars.com/energy/v1/vehicles/{0}/recharge-status"
|
||||
|
||||
charging_system_states = {"CHARGING_SYSTEM_CHARGING": "Charging", "CHARGING_SYSTEM_IDLE": "Idle",
|
||||
"CHARGING_SYSTEM_FAULT": "Fault", "CHARGING_SYSTEM_UNSPECIFIED": "UNSPECIFIED"}
|
||||
"CHARGING_SYSTEM_FAULT": "Fault", "CHARGING_SYSTEM_UNSPECIFIED": "Unspecified"}
|
||||
|
||||
supported_sensors = [
|
||||
{"name": "Battery Charge Level", "id": "battery_charge_level", "unit": "%", "icon": "car-battery", "url": RECHARGE_STATUS_URL},
|
||||
|
||||
+1
-1
@@ -167,7 +167,7 @@ def parse_api_data(url, data, sensor_id=None):
|
||||
else:
|
||||
return ""
|
||||
elif sensor_id == "charging_system_status":
|
||||
if "charging_system_status" in data["data"]:
|
||||
if "chargingSystemStatus" in data["data"]:
|
||||
return charging_system_states[data["data"]["chargingSystemStatus"]["value"]]
|
||||
else:
|
||||
return ""
|
||||
|
||||
Reference in New Issue
Block a user