tillsteinbach / VWsFriend

VW WeConnect visualization and control
MIT License
251 stars 21 forks source link

No trips are recorded... #363

Closed dazzzl closed 2 years ago

dazzzl commented 2 years ago

Since July, no trips are recorded. Now, my ID.3 has software 3.0 and parking positions are recorded for charging. But there are no trips in the database.

Yesterday, the trip started with:

2022-11-15T20:12:52+0100:info:trip_agent:Vehicle XX started a trip 2022-11-15T20:12:52+0100:info:state_agent:Vehicle XX went online ... 2022-11-15T20:42:53+0100:info:trip_agent:Previously started trip for XX was invalid. Deleting it now.

I think this has something to do with the time. Grafana is always display for some values the wrong time now 1 hour ahead.. at summer time 2 hours ahead, e.g., for last data from car/server. This was always the case but since the recorded values in the database were correct, I ignored it.

I installed it without docker....

Thanks!

tillsteinbach commented 2 years ago

Hmmm, ok. First: After the car got updated with Software 3.0 it is important that you restart VWsFriend once. That way it finds out that it has a new capability for the parking position to record trips.

Regarding the wrong time: This might be a timezone problem. Is your server running with UTC-time?

dazzzl commented 2 years ago

I restarted the VWfriends, yes. I had to restarted it again, because the where some server problems at the VW side. There were no updates from the server.

Could be that my server is running at UTC-time... how can I check this? With date, I have:

Mi 16. Nov 11:58:39 CET 2022

which is the correct local time

tillsteinbach commented 2 years ago

hmmm, maybe we have to dig a bit deeper. Which fields do you see wrong?

aimsire commented 2 years ago

I have a similar issue, although I do not get a log that a trip was even started. The car went online (which I see in the log), I drove to a location and only the way back was recorded as a trip. Car is running on 3.0 and vwsfriend was only installed after 3.0 was installed on the car.

tillsteinbach commented 2 years ago

hmmm, I'm desperately waiting for my 3.0 update to be able to debug.

aimsire commented 2 years ago

I could try debugging, if you give me a few pointers where you would start looking.

tillsteinbach commented 2 years ago

you could install weconnect-cli (https://github.com/tillsteinbach/WeConnect-cli) and give the output of: weconnect-cli -vv --no-cache get / --format json one time when parked and one time with ignition on. I'm in particular interested how "parkingPosition" looks like.

Please take care to anonymise private data

dazzzl commented 2 years ago

One point is:

Last update from Server 2022-11-16 20:39:52

this is one hour in the future

and also, if I switch on the online phases, or climatiziation phases in the graphs, they are shifted.

dazzzl commented 2 years ago
{
    "vehicles": {
        "XX": {
            "vin": "XX",
            "role": "PRIMARY_USER",
            "enrollmentStatus": "COMPLETED",
            "userRoleStatus": "ENABLED",
            "model": "ID.3",
            "devicePlatform": "WCAR",
            "nickname": "Volkswagen ID3",
            "brandCode": "V",
            "capabilities": {
                "webApp": {
                    "id": "webApp",
                    "expirationDate": "2052-11-12T23:59:59+00:00"
                },
                "automation": {
                    "id": "automation",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "batteryColdWarning": {
                    "id": "batteryColdWarning",
                    "expirationDate": "2052-11-12T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "batterySupport": {
                    "id": "batterySupport"
                },
                "charging": {
                    "id": "charging",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "chargingProfiles": {
                    "id": "chargingProfiles",
                    "expirationDate": "2024-11-14T23:59:59+00:00"
                },
                "chargingStations": {
                    "id": "chargingStations",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "climatisation": {
                    "id": "climatisation",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "climatisationTimers": {
                    "id": "climatisationTimers",
                    "expirationDate": "2024-11-14T23:59:59+00:00"
                },
                "dealerAppointment": {
                    "id": "dealerAppointment",
                    "expirationDate": "2052-11-12T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "destinations": {
                    "id": "destinations",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "fuelStatus": {
                    "id": "fuelStatus",
                    "expirationDate": "2024-11-14T23:59:59+00:00"
                },
                "ignition": {
                    "id": "ignition",
                    "expirationDate": "2024-11-14T23:59:59+00:00"
                },
                "mapUpdate": {
                    "id": "mapUpdate",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "measurements": {
                    "id": "measurements",
                    "expirationDate": "2052-11-12T23:59:59+00:00"
                },
                "onlineSpeech": {
                    "id": "onlineSpeech",
                    "status": [
                        1003,
                        1004
                    ],
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "parkingBrake": {
                    "id": "parkingBrake",
                    "expirationDate": "2052-11-12T23:59:59+00:00"
                },
                "parkingInformation": {
                    "id": "parkingInformation",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "parkingPosition": {
                    "id": "parkingPosition",
                    "expirationDate": "2052-11-12T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "personalizationOnline": {
                    "id": "personalizationOnline",
                    "expirationDate": "2052-11-12T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "poiSearch": {
                    "id": "poiSearch",
                    "expirationDate": "2025-11-12T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "readiness": {
                    "id": "readiness"
                },
                "routing": {
                    "id": "routing",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "state": {
                    "id": "state",
                    "expirationDate": "2052-11-12T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "trafficInformation": {
                    "id": "trafficInformation",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                },
                "vehicleLights": {
                    "id": "vehicleLights",
                    "expirationDate": "2052-11-12T23:59:59+00:00"
                },
                "vehicleWakeUpTrigger": {
                    "id": "vehicleWakeUpTrigger",
                    "expirationDate": "2052-11-12T23:59:59+00:00"
                },
                "webRadio": {
                    "id": "webRadio",
                    "expirationDate": "2024-11-14T23:59:59+00:00",
                    "userDisablingAllowed": true
                }
            },
            "images": {},
            "tags": [],
            "coUsers": {
                "0": {
                    "id": "ac0f35cd-8dfd-4403-a229-a09bfe9a9934",
                    "role": "GUEST_USER",
                    "roleReseted": false,
                    "enrollmentStatus": "COMPLETED"
                }
            },
            "domains": {
                "access": {
                    "accessStatus": {
                        "overallStatus": "safe",
                        "doorLockStatus": "locked",
                        "doors": {
                            "bonnet": {
                                "lockState": "unknown lock state",
                                "openState": "closed"
                            },
                            "trunk": {
                                "lockState": "locked",
                                "openState": "closed"
                            },
                            "rearRight": {
                                "lockState": "locked",
                                "openState": "closed"
                            },
                            "rearLeft": {
                                "lockState": "locked",
                                "openState": "closed"
                            },
                            "frontRight": {
                                "lockState": "locked",
                                "openState": "closed"
                            },
                            "frontLeft": {
                                "lockState": "locked",
                                "openState": "closed"
                            }
                        },
                        "windows": {
                            "sunRoof": {
                                "openState": "unsupported"
                            },
                            "roofCover": {
                                "openState": "unsupported"
                            },
                            "sunRoofRear": {
                                "openState": "unsupported"
                            },
                            "frontLeft": {
                                "openState": "closed"
                            },
                            "frontRight": {
                                "openState": "closed"
                            },
                            "rearLeft": {
                                "openState": "closed"
                            },
                            "rearRight": {
                                "openState": "closed"
                            }
                        },
                        "carCapturedTimestamp": "2022-11-16T07:56:41+00:00"
                    }
                },
                "automation": {
                    "climatisationTimer": {
                        "timers": {
                            "1": {
                                "singleTimer": {
                                    "startDateTime": "1999-12-31T23:00:00+00:00"
                                }
                            },
                            "2": {
                                "singleTimer": {
                                    "startDateTime": "1999-12-31T23:00:00+00:00"
                                }
                            }
                        },
                        "timeInCar": "2022-11-16T08:56:20+01:00",
                        "carCapturedTimestamp": "2022-11-16T07:56:20+00:00"
                    },
                    "chargingProfiles": {
                        "profiles": {
                            "1": {
                                "id": 1,
                                "name": "Daheim",
                                "maxChargingCurrent": "reduced",
                                "minSOC_pct": 40,
                                "targetSOC_pct": 80,
                                "options": {
                                    "autoUnlockPlugWhenCharged": "off"
                                },
                                "timers": {
                                    "1": {
                                        "enabled": false,
                                        "climatisation": false,
                                        "recurringTimer": {
                                            "startTime": "1900-01-01T06:00:00+00:00",
                                            "recurringOn": {
                                                "mondays": true,
                                                "tuesdays": true,
                                                "wednesdays": true,
                                                "thursdays": true,
                                                "fridays": true,
                                                "saturdays": false,
                                                "sundays": false
                                            }
                                        }
                                    },
                                    "2": {
                                        "enabled": false,
                                        "climatisation": false,
                                        "recurringTimer": {
                                            "startTime": "1900-01-01T08:00:00+00:00",
                                            "recurringOn": {
                                                "mondays": false,
                                                "tuesdays": false,
                                                "wednesdays": false,
                                                "thursdays": false,
                                                "fridays": false,
                                                "saturdays": true,
                                                "sundays": true
                                            }
                                        }
                                    },
                                    "3": {
                                        "enabled": false,
                                        "climatisation": false,
                                        "recurringTimer": {
                                            "startTime": "1900-01-01T06:00:00+00:00",
                                            "recurringOn": {
                                                "mondays": true,
                                                "tuesdays": true,
                                                "wednesdays": true,
                                                "thursdays": true,
                                                "fridays": true,
                                                "saturdays": true,
                                                "sundays": true
                                            }
                                        }
                                    }
                                },
                                "preferredChargingTimes": {
                                    "4": {
                                        "id": 4,
                                        "startTime": null,
                                        "endTime": null
                                    },
                                    "1": {
                                        "id": 1,
                                        "enabled": true,
                                        "startTime": null,
                                        "endTime": null
                                    },
                                    "2": {
                                        "id": 2,
                                        "startTime": null,
                                        "endTime": null
                                    },
                                    "3": {
                                        "id": 3,
                                        "startTime": null,
                                        "endTime": null
                                    }
                                }
                            }
                        },
                        "timeInCar": "2022-11-16T08:56:20+01:00",
                        "carCapturedTimestamp": "2022-11-16T07:56:20+00:00"
                    }
                },
                "userCapabilities": {
                    "capabilitiesStatus": {
                        "capabilities": {
                            "webApp": {
                                "id": "webApp",
                                "expirationDate": "2052-11-12T23:59:59+00:00"
                            },
                            "automation": {
                                "id": "automation",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "batteryColdWarning": {
                                "id": "batteryColdWarning",
                                "expirationDate": "2052-11-12T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "batterySupport": {
                                "id": "batterySupport"
                            },
                            "charging": {
                                "id": "charging",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "chargingProfiles": {
                                "id": "chargingProfiles",
                                "expirationDate": "2024-11-14T23:59:59+00:00"
                            },
                            "chargingStations": {
                                "id": "chargingStations",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "climatisation": {
                                "id": "climatisation",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "climatisationTimers": {
                                "id": "climatisationTimers",
                                "expirationDate": "2024-11-14T23:59:59+00:00"
                            },
                            "dealerAppointment": {
                                "id": "dealerAppointment",
                                "expirationDate": "2052-11-12T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "destinations": {
                                "id": "destinations",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "fuelStatus": {
                                "id": "fuelStatus",
                                "expirationDate": "2024-11-14T23:59:59+00:00"
                            },
                            "ignition": {
                                "id": "ignition",
                                "expirationDate": "2024-11-14T23:59:59+00:00"
                            },
                            "mapUpdate": {
                                "id": "mapUpdate",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "measurements": {
                                "id": "measurements",
                                "expirationDate": "2052-11-12T23:59:59+00:00"
                            },
                            "onlineSpeech": {
                                "id": "onlineSpeech",
                                "status": [
                                    1003,
                                    1004
                                ],
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "parkingBrake": {
                                "id": "parkingBrake",
                                "expirationDate": "2052-11-12T23:59:59+00:00"
                            },
                            "parkingInformation": {
                                "id": "parkingInformation",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "parkingPosition": {
                                "id": "parkingPosition",
                                "expirationDate": "2052-11-12T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "personalizationOnline": {
                                "id": "personalizationOnline",
                                "expirationDate": "2052-11-12T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "poiSearch": {
                                "id": "poiSearch",
                                "expirationDate": "2025-11-12T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "readiness": {
                                "id": "readiness"
                            },
                            "routing": {
                                "id": "routing",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "state": {
                                "id": "state",
                                "expirationDate": "2052-11-12T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "trafficInformation": {
                                "id": "trafficInformation",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            },
                            "vehicleLights": {
                                "id": "vehicleLights",
                                "expirationDate": "2052-11-12T23:59:59+00:00"
                            },
                            "vehicleWakeUpTrigger": {
                                "id": "vehicleWakeUpTrigger",
                                "expirationDate": "2052-11-12T23:59:59+00:00"
                            },
                            "webRadio": {
                                "id": "webRadio",
                                "expirationDate": "2024-11-14T23:59:59+00:00",
                                "userDisablingAllowed": true
                            }
                        }
                    }
                },
                "charging": {
                    "batteryStatus": {
                        "currentSOC_pct": 18,
                        "cruisingRangeElectric_km": 39,
                        "carCapturedTimestamp": "2022-11-16T07:56:23+00:00"
                    },
                    "chargingStatus": {
                        "chargingState": "notReadyForCharging",
                        "chargeMode": "manual",
                        "chargePower_kW": 0.0,
                        "chargeRate_kmph": 0.0,
                        "chargeType": "invalid",
                        "chargingSettings": "default",
                        "carCapturedTimestamp": "2022-11-16T07:56:23+00:00"
                    },
                    "chargingSettings": {
                        "maxChargeCurrentAC": "maximum",
                        "autoUnlockPlugWhenCharged": "off",
                        "autoUnlockPlugWhenChargedAC": "off",
                        "targetSOC_pct": 80,
                        "carCapturedTimestamp": "2022-11-16T07:56:23+00:00"
                    },
                    "chargeMode": {
                        "preferredChargeMode": "preferredChargingTimes",
                        "availableChargeModes": {}
                    },
                    "plugStatus": {
                        "plugConnectionState": "disconnected",
                        "plugLockState": "unlocked",
                        "externalPower": "unavailable",
                        "ledColor": "none",
                        "carCapturedTimestamp": "2022-11-16T07:56:45+00:00"
                    }
                },
                "chargingProfiles": {
                    "chargingProfilesStatus": {
                        "profiles": {
                            "1": {
                                "id": 1,
                                "name": "Daheim",
                                "maxChargingCurrent": "reduced",
                                "minSOC_pct": 40,
                                "targetSOC_pct": 80,
                                "options": {
                                    "autoUnlockPlugWhenCharged": "off"
                                },
                                "timers": {
                                    "1": {
                                        "enabled": false,
                                        "climatisation": false,
                                        "recurringTimer": {
                                            "startTime": "1900-01-01T06:00:00+00:00",
                                            "recurringOn": {
                                                "mondays": true,
                                                "tuesdays": true,
                                                "wednesdays": true,
                                                "thursdays": true,
                                                "fridays": true,
                                                "saturdays": false,
                                                "sundays": false
                                            }
                                        }
                                    },
                                    "2": {
                                        "enabled": false,
                                        "climatisation": false,
                                        "recurringTimer": {
                                            "startTime": "1900-01-01T08:00:00+00:00",
                                            "recurringOn": {
                                                "mondays": false,
                                                "tuesdays": false,
                                                "wednesdays": false,
                                                "thursdays": false,
                                                "fridays": false,
                                                "saturdays": true,
                                                "sundays": true
                                            }
                                        }
                                    },
                                    "3": {
                                        "enabled": false,
                                        "climatisation": false,
                                        "recurringTimer": {
                                            "startTime": "1900-01-01T06:00:00+00:00",
                                            "recurringOn": {
                                                "mondays": true,
                                                "tuesdays": true,
                                                "wednesdays": true,
                                                "thursdays": true,
                                                "fridays": true,
                                                "saturdays": true,
                                                "sundays": true
                                            }
                                        }
                                    }
                                },
                                "preferredChargingTimes": {
                                    "4": {
                                        "id": 4,
                                        "startTime": null,
                                        "endTime": null
                                    },
                                    "1": {
                                        "id": 1,
                                        "enabled": true,
                                        "startTime": null,
                                        "endTime": null
                                    },
                                    "2": {
                                        "id": 2,
                                        "startTime": null,
                                        "endTime": null
                                    },
                                    "3": {
                                        "id": 3,
                                        "startTime": null,
                                        "endTime": null
                                    }
                                }
                            }
                        },
                        "timeInCar": "2022-11-16T08:56:20+01:00",
                        "carCapturedTimestamp": "2022-11-16T07:56:20+00:00"
                    }
                },
                "climatisation": {
                    "climatisationStatus": {
                        "climatisationState": "off",
                        "remainingClimatisationTime_min": 0,
                        "carCapturedTimestamp": "2022-11-16T07:56:23+00:00"
                    },
                    "climatisationSettings": {
                        "targetTemperature_C": 21.0,
                        "targetTemperature_F": 70.0,
                        "unitInCar": "celsius",
                        "carCapturedTimestamp": "2022-11-16T07:56:23+00:00"
                    },
                    "windowHeatingStatus": {
                        "windows": {
                            "front": {
                                "windowHeatingState": "off"
                            },
                            "rear": {
                                "windowHeatingState": "off"
                            }
                        },
                        "carCapturedTimestamp": "2022-11-16T07:56:23+00:00"
                    }
                },
                "departureTimers": {
                    "departureTimersStatus": {
                        "error": {
                            "code": 4104,
                            "message": "Bad Gateway",
                            "group": 4,
                            "info": "Looks like your service has expired. Please update your service subscription.",
                            "timestamp": "2022-11-16T18:47:28+00:00"
                        }
                    }
                },
                "fuelStatus": {
                    "rangeStatus": {
                        "carType": "electric",
                        "primaryEngine": {
                            "type": "electric",
                            "currentSOC_pct": 18,
                            "remainingRange_km": 39
                        },
                        "totalRange_km": 39,
                        "carCapturedTimestamp": "2022-11-16T07:56:23+00:00"
                    }
                },
                "vehicleLights": {
                    "lightsStatus": {
                        "lights": {
                            "right": {
                                "status": "off"
                            },
                            "left": {
                                "status": "off"
                            }
                        },
                        "carCapturedTimestamp": "2022-11-16T07:56:25+00:00"
                    }
                },
                "lvBattery": {
                    "lvBatteryStatus": {
                        "batterySupport": "disabled"
                    }
                },
                "readiness": {
                    "readinessStatus": {
                        "connectionState": {
                            "isOnline": true,
                            "batteryPowerLevel": "comfort",
                            "dailyPowerBudgetAvailable": true
                        },
                        "connectionWarning": {
                            "insufficientBatteryLevelWarning": false,
                            "dailyPowerBudgetWarning": false
                        }
                    }
                },
                "vehicleHealthInspection": {
                    "maintenanceStatus": {
                        "inspectionDue_days": 357,
                        "mileage_km": 23405,
                        "carCapturedTimestamp": "2022-11-16T07:53:41+00:00"
                    }
                },
                "vehicleHealthWarnings": {
                    "warningLights": {
                        "mileage_km": 23405,
                        "carCapturedTimestamp": "2022-11-16T06:56:09+00:00"
                    }
                },
                "oilLevel": {
                    "oilLevelStatus": {
                        "error": {
                            "code": 4004,
                            "message": "Bad Gateway",
                            "group": 3,
                            "info": "Something went wrong. Please try to re-login. If the problem persists, please contact our support.",
                            "timestamp": "2022-11-16T18:47:28+00:00",
                            "retry": true
                        }
                    }
                },
                "measurements": {
                    "rangeStatus": {
                        "electricRange": 39,
                        "carCapturedTimestamp": "2022-11-16T07:54:16+00:00"
                    },
                    "odometerStatus": {
                        "odometer": 23405,
                        "carCapturedTimestamp": "2022-11-16T07:53:41+00:00"
                    }
                },
                "batterySupport": {
                    "batterySupportStatus": {
                        "batterySupport": "disabled"
                    }
                },
                "parking": {
                    "parkingPosition": {
                        "latitude": 5X
                        "longitude": 1X
                        "carCapturedTimestamp": "2022-11-16T07:56:20+00:00"
                    }
                }
            },
            "parking": {
                "parkingPosition": {
                    "latitude": XX,
                    "longitude": XX,
                    "carCapturedTimestamp": "2022-11-16T07:56:20+00:00"
                }
            },
            "controls": {
                "charging": "none",
                "climatisation": "none",
                "windowheating": "none",
                "wakeup": "none"
            },
            "pictures": {}
        }
    }
}
tillsteinbach commented 2 years ago

One point is:

Last update from Server 2022-11-16 20:39:52

this is one hour in the future

and also, if I switch on the online phases, or climatiziation phases in the graphs, they are shifted.

What does browser time say?

Bildschirmfoto 2022-11-16 um 20 01 32
tillsteinbach commented 2 years ago

And: Are the times for charging sessions correct?

aimsire commented 2 years ago

car_status.zip Here are mine: offline (from the house), online (while sitting) and ignition on (but still parked). For offline and online I have a parking position, in ignition on not. But I think my issue might differ from dazzl's, so should I open another issue?

tillsteinbach commented 2 years ago

This does not look too bad. Is no trip at all recorded, or what are you missing?

dazzzl commented 2 years ago

Browser Time Germany, CET

You mean in Grafana under the Charges? No, there are one hour in the future

tillsteinbach commented 2 years ago

Browser Time Germany, CET

You mean in Grafana under the Charges? No, there are one hour in the future

Sounds a bit like wrong timezone parameters anywhere. Maybe you can try to set the default timezone of the postgres server to UTC

dazzzl commented 2 years ago

How can I do this? In postgres?

dazzzl commented 2 years ago

Form weconnect-cli:

"measurements": {
                    "rangeStatus": {
                        "electricRange": 36,
                        "carCapturedTimestamp": "2022-11-16T20:27:53+00:00"
                    },

Timestamp is one hour in the past

tillsteinbach commented 2 years ago

yes, because it is UTC time (+00:00)

changing the timezone could maybe go like this: ALTER DATABASE vwsfriend SET timezone TO 'UTC';

dazzzl commented 2 years ago

ok, I see no change... do I have to restart something? vwsfriend? grafana? postgres?

tillsteinbach commented 2 years ago

This will probably only make a difference for future data.

btw: when you try to edit a charging session. Is the time then in UTC correct?

dazzzl commented 2 years ago

No,

It was displayed the right time in the VWsFriend html mask... If I change it and save it, then it is now two hours in the future in Grafana, not one hour as it was before ... strange

dazzzl commented 2 years ago

maybe this helps:

postgres=# show timezone;
   TimeZone    
---------------
 Europe/Berlin
(1 Zeile)
timedatectl 
               Local time: Mi 2022-11-16 21:34:14 CET
           Universal time: Mi 2022-11-16 20:34:14 UTC
                 RTC time: Mi 2022-11-16 20:34:13    
                Time zone: Europe/Berlin (CET, +0100)
System clock synchronized: yes                       
              NTP service: inactive                  
          RTC in local TZ: no                   
tillsteinbach commented 2 years ago

The time in the VWsFriend html should be minus 1 hour because that is the current difference between german time and UTC.

The "show timezone" indicates that somehow setting the timezone did not work out properly.

dazzzl commented 2 years ago

with ALTER DATABASE vwsfriend SET timezone TO 'UTC'; I change only the timezone of the database vwsfriend and not for whole postgres

tillsteinbach commented 2 years ago

ah, yes right.

tillsteinbach commented 2 years ago

maybe you can also set the timezone in postgresql.conf

dazzzl commented 2 years ago
vwsfriend=# show timezone;
 TimeZone 
----------
 UTC
(1 Zeile)

So, this worked .. but I have not restart anything..

dazzzl commented 2 years ago

Ok... I was setting the timezone in postgresql.conf to UTC and restarted postgres

Now:

Last update from Server
2022-11-16 22:15:54

looks better!

dazzzl commented 2 years ago

For the trip detection, the database is used?

tillsteinbach commented 2 years ago

There are two ways to detect trips, one is using the parkingPosition (only for SW 3.0 cars) what might have messed up your trips is that the start was in the future. But I'm not 100% sure. We have to see.

aimsire commented 2 years ago

This does not look too bad. Is no trip at all recorded, or what are you missing?

I had a problem with the way to a destination was not recorded as a trip, only the way back. Today the trip was recorded at least (way to and way back), only for the start the location was not set (although it was present as parking position).

dazzzl commented 2 years ago

For me it is working now... Thanks! .... closing it or not?

tillsteinbach commented 2 years ago

I think we can close it for now and reopen if necessary