Dielee / volvo2mqtt

Home Assistant addon for connecting AAOS Volvos
MIT License
143 stars 30 forks source link

/data/options.json doesn't get loaded #89

Closed mkrijtenberg closed 1 year ago

mkrijtenberg commented 1 year ago

Hi,

I've noticed you use Dynaconf to load settings, and it's possible to read from a json file: /data/options.json I have mounted a volume to /data and added an options.json file, but I have the impression it doesn't get loaded.

I'd like to load the settings from a json file, because it's easier to maintain :)

Dielee commented 1 year ago

Please share me your data.json file and your docker mount.

mkrijtenberg commented 1 year ago

Sorry for the late response, I was struck down with the flu. Anyway, I run the docker image on my NAS and use Portainer to configure everything:

image

And this is the contents from the options.json (not data.json):

{
    "updateInterval": 60,
    "babelLocale": "nl",
    "TZ": "Europe/Amsterdam",
    "mqtt": {
        "broker": "192.168.******",
        "port": 1883,
        "username": "mqttuser",
        "password": "********"
    },
    "volvoData": {
        "username": "*******@*****.com",
        "password": "*********",
        "vin": "",
        "vccapikey": [
            "*****************",
            "*****************",
            "*****************"
        ],
        "odometerMultiplier": "1",
        "averageSpeedDivider": "1",
        "averageFuelConsumptionMultiplier": "1"
    }
}
mkrijtenberg commented 1 year ago

AH! I've changed the filename to data.json, which resulted in a different error. This made me recheck the logs, and it did read my options.json, but the mqtt host was not reachable (different issue).

So you can close this issue. Sorry for the trouble!