Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos
MIT License
125 stars 25 forks source link

(Synology) Docker Images stops and won't start anymore #163

Closed martin072 closed 5 months ago

martin072 commented 5 months ago

Describe the bug (Synology) volvo2mqtt Docker images stops running

To Reproduce:
restart the docker container, after 1 - 2 minutes it stops.

Version info:
dielee/volvo2mqtt: latest (docker image)

Logs:
Unable to retrieve the logs, as the docker image won't start. No further loging available. If there are other means to get the logging out of the docker container, please let me know how (i did enable the DEBUG flag

Dielee commented 5 months ago

If you are not able to provide logs, I can't help you.

martin072 commented 5 months ago

Yes as mentioned. I assume the logs are in the container. So if it doesn't start I can't enter it. If you know any other to retrieve the logs then let me know

Dielee commented 5 months ago

This is not a volvo2mqtt issue. If the container don't start, you have to look inside the syno logs.

martin072 commented 5 months ago

Thanks, but running on a dead end, there are no logs I can find in synology, or in Docker. Only thing that pops-up is the following notification. There are no logs anywhere to be found unfortunately.

Screenshot 2024-01-20 at 15 30 04 Screenshot 2024-01-20 at 15 32 14

One error I received before was the following:

Start container volvo2mqtt failed: {"message":"failed to initialize logging driver: database is locked"}.

A tip I found was to copy the container and remove the old one. That worked, but this time there are no Logs as you can see.

I will close the issue as you say it is not related.

martin072 commented 5 months ago

Managed to get some loging, see below

<!DOCTYPE html>

volvo2mqtt

datestreamcontent
2024-01-20T14:44:06.991933343ZstdoutKeyError: 'CHARGING_SYSTEM_DONE'
2024-01-20T14:44:06.991865529Zstdout    charging_system_state = charging_system_states[data["chargingSystemStatus"]["value"]]
2024-01-20T14:44:06.991820741Zstdout  File "/volvoAAOS2mqtt/volvo.py", line 315, in parse_api_data
2024-01-20T14:44:06.991758770Zstdout    return parse_api_data(data, sensor_id)
2024-01-20T14:44:06.991713039Zstdout  File "/volvoAAOS2mqtt/volvo.py", line 264, in api_call
2024-01-20T14:44:06.991665011Zstdout    state = api_call(entity["url"], "GET", vin, entity["id"])
2024-01-20T14:44:06.991618368Zstdout  File "/volvoAAOS2mqtt/volvo.py", line 159, in check_supported_endpoints
2024-01-20T14:44:06.991578240Zstdout    check_supported_endpoints()
2024-01-20T14:44:06.991532969Zstdout  File "/volvoAAOS2mqtt/volvo.py", line 52, in authorize
2024-01-20T14:44:06.991492434Zstdout    authorize()
2024-01-20T14:44:06.991440454Zstdout  File "/volvoAAOS2mqtt/./main.py", line 13, in <module>
2024-01-20T14:44:06.991354136ZstdoutTraceback (most recent call last):
2024-01-20T14:44:06.991315371Zstdout}
2024-01-20T14:44:06.991274284Zstdout  }
2024-01-20T14:44:06.991236099Zstdout    }
2024-01-20T14:44:06.991156932Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.991115973Zstdout      "value" : "CHARGING_SYSTEM_DONE",
2024-01-20T14:44:06.991077212Zstdout    "chargingSystemStatus" : {
2024-01-20T14:44:06.991041201Zstdout    },
2024-01-20T14:44:06.991000083Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.990956949Zstdout      "value" : "CONNECTION_STATUS_UNSPECIFIED",
2024-01-20T14:44:06.990914510Zstdout    "chargingConnectionStatus" : {
2024-01-20T14:44:06.990877999Zstdout    },
2024-01-20T14:44:06.990837172Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.990796193Zstdout      "unit" : "minutes",
2024-01-20T14:44:06.990757073Zstdout      "value" : "0",
2024-01-20T14:44:06.990718554Zstdout    "estimatedChargingTime" : {
2024-01-20T14:44:06.990679810Zstdout    },
2024-01-20T14:44:06.990638961Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.990599467Zstdout      "unit" : "kilometers",
2024-01-20T14:44:06.990560823Zstdout      "value" : "71",
2024-01-20T14:44:06.990522198Zstdout    "electricRange" : {
2024-01-20T14:44:06.990485514Zstdout    },
2024-01-20T14:44:06.990443411Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.990404324Zstdout      "unit" : "percentage",
2024-01-20T14:44:06.990363235Zstdout      "value" : "100.0",
2024-01-20T14:44:06.990323849Zstdout    "batteryChargeLevel" : {
2024-01-20T14:44:06.990283033Zstdout  "data" : {
2024-01-20T14:44:06.990241063Zstdout  "operationId" : "b2f6d3d6-de15-46bc-a1aa-efa8aac9327c",
2024-01-20T14:44:06.990200066Zstdout  "status" : 200,
2024-01-20T14:44:06.990151283ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: {
2024-01-20T14:44:06.990101630ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: Response status code: 200
2024-01-20T14:44:06.990049657ZstdoutJan 20 15:44:04 volvo2mqtt [1] - INFO: Success! Electric Range is supported by your vehicle.
2024-01-20T14:44:06.990012789Zstdout}
2024-01-20T14:44:06.989976432Zstdout  }
2024-01-20T14:44:06.989940342Zstdout    }
2024-01-20T14:44:06.989899995Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.989859826Zstdout      "value" : "CHARGING_SYSTEM_DONE",
2024-01-20T14:44:06.989819084Zstdout    "chargingSystemStatus" : {
2024-01-20T14:44:06.989781018Zstdout    },
2024-01-20T14:44:06.989740248Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.989698579Zstdout      "value" : "CONNECTION_STATUS_UNSPECIFIED",
2024-01-20T14:44:06.989659118Zstdout    "chargingConnectionStatus" : {
2024-01-20T14:44:06.989616313Zstdout    },
2024-01-20T14:44:06.989575519Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.989533370Zstdout      "unit" : "minutes",
2024-01-20T14:44:06.989493790Zstdout      "value" : "0",
2024-01-20T14:44:06.989454967Zstdout    "estimatedChargingTime" : {
2024-01-20T14:44:06.989418534Zstdout    },
2024-01-20T14:44:06.989375488Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.989335818Zstdout      "unit" : "kilometers",
2024-01-20T14:44:06.989296329Zstdout      "value" : "71",
2024-01-20T14:44:06.989257578Zstdout    "electricRange" : {
2024-01-20T14:44:06.989219193Zstdout    },
2024-01-20T14:44:06.989154233Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.989113739Zstdout      "unit" : "percentage",
2024-01-20T14:44:06.989067869Zstdout      "value" : "100.0",
2024-01-20T14:44:06.988960087Zstdout    "batteryChargeLevel" : {
2024-01-20T14:44:06.988900117Zstdout  "data" : {
2024-01-20T14:44:06.988855091Zstdout  "operationId" : "b2f6d3d6-de15-46bc-a1aa-efa8aac9327c",
2024-01-20T14:44:06.988815741Zstdout  "status" : 200,
2024-01-20T14:44:06.988774568ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: {
2024-01-20T14:44:06.988729364ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: Response status code: 200
2024-01-20T14:44:06.988673916ZstdoutJan 20 15:44:04 volvo2mqtt [1] - INFO: Success! Battery Charge Level is supported by your vehicle.
2024-01-20T14:44:06.988637820Zstdout}
2024-01-20T14:44:06.988601687Zstdout  }
2024-01-20T14:44:06.988564884Zstdout    }
2024-01-20T14:44:06.988524137Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.988479477Zstdout      "value" : "CHARGING_SYSTEM_DONE",
2024-01-20T14:44:06.988426422Zstdout    "chargingSystemStatus" : {
2024-01-20T14:44:06.988389485Zstdout    },
2024-01-20T14:44:06.988346396Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.988268158Zstdout      "value" : "CONNECTION_STATUS_UNSPECIFIED",
2024-01-20T14:44:06.988225804Zstdout    "chargingConnectionStatus" : {
2024-01-20T14:44:06.988157037Zstdout    },
2024-01-20T14:44:06.988106641Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.988065997Zstdout      "unit" : "minutes",
2024-01-20T14:44:06.988023812Zstdout      "value" : "0",
2024-01-20T14:44:06.987983728Zstdout    "estimatedChargingTime" : {
2024-01-20T14:44:06.987946029Zstdout    },
2024-01-20T14:44:06.987899474Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.987858419Zstdout      "unit" : "kilometers",
2024-01-20T14:44:06.987817484Zstdout      "value" : "71",
2024-01-20T14:44:06.987777367Zstdout    "electricRange" : {
2024-01-20T14:44:06.987740074Zstdout    },
2024-01-20T14:44:06.987694082Zstdout      "timestamp" : "2024-01-20T06:36:48Z"
2024-01-20T14:44:06.987651405Zstdout      "unit" : "percentage",
2024-01-20T14:44:06.987605749Zstdout      "value" : "100.0",
2024-01-20T14:44:06.987564536Zstdout    "batteryChargeLevel" : {
2024-01-20T14:44:06.987523246Zstdout  "data" : {
2024-01-20T14:44:06.987469150Zstdout  "operationId" : "b2f6d3d6-de15-46bc-a1aa-efa8aac9327c",
2024-01-20T14:44:06.987427916Zstdout  "status" : 200,
2024-01-20T14:44:06.987383171ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: {
2024-01-20T14:44:06.987261468ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: Response status code: 200
2024-01-20T14:44:04.393937992ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: https://api.volvocars.com:443 "GET /energy/v1/vehicles/*********************/recharge-status HTTP/1.1" 200 737
2024-01-20T14:44:04.341829959ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: Starting GET call against https://api.volvocars.com/energy/v1/vehicles/{0}/recharge-status
2024-01-20T14:44:04.341335337ZstdoutJan 20 15:44:04 volvo2mqtt [1] - INFO: Vin: ['*********************'] found!
2024-01-20T14:44:04.339990088ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: https://api.volvocars.com:443 "GET /connected-vehicle/v1/vehicles HTTP/1.1" 200 207
2024-01-20T14:44:04.136720662ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: Starting new HTTPS connection (1): api.volvocars.com:443
2024-01-20T14:44:04.131682108ZstdoutJan 20 15:44:04 volvo2mqtt [1] - DEBUG: https://volvoid.eu.volvocars.com:443 "POST /as/token.oauth2 HTTP/1.1" 200 None
2024-01-20T14:44:03.822959128ZstdoutJan 20 15:44:03 volvo2mqtt [1] - DEBUG: Starting new HTTPS connection (1): volvoid.eu.volvocars.com:443
2024-01-20T14:44:03.396161165ZstdoutJan 20 15:44:03 volvo2mqtt [1] - INFO: Starting volvo2mqtt version v1.7.5
Dielee commented 5 months ago

You are using v1.7.5, this is a very old version... Please update to v1.8.23! Everything will work with the current release ;)

martin072 commented 5 months ago

Ok, thank. So how do I get it to update the docker container? When using the script as supplied, with volvo2mqtt:latest it still loads 1.7.5

-- Edit -- Manually installed the latest version. Should do it. will close the issue