britkat1980 / giv_tcp

TCP connection (from inverter) and MQTT implementation
71 stars 32 forks source link

Gen3 inverter TZ query #108

Closed asnaedae closed 8 months ago

asnaedae commented 10 months ago

I have a gen3 3.6 inverter recently installed, have been working on getting the whole HomeAssistant/batpred/givtcp setup in place, but noticed that batpred was complaining about clock skew/drift. From the GE API I can see UTC times being returned, and see the following in givtcp (version 2.3.3)

/app # curl -s localhost:6345/readData | grep 2023
        "Invertor_Time": "2023-08-21T15:55:42+01:00",
    "Last_Updated_Time": "2023-08-21T15:55:45.396453+00:00",
            "Discharge_Completion_Time": "2023-09-14T12:18:45.403268+01:00",
            "system_time": "2023-08-21 15:55:42",

From the GE API ("https://api.givenergy.cloud/v1/inverter/XXXXXXXXXX/meter-data/latest"

{
  "data": {
    **"time": "2023-08-21T15:55:04Z",**
    "today": {
      "solar": 13.7,
      "grid": {
        "import": 5.7,
        "export": 3.7
      },

I've been able to work around this by setting the timezone for the givtcp container to UTC instead of default (Europe/London), just wanting to confirm this is correct/expected behaviour?

If so I'll happily raise a PR to add some docs

asnaedae commented 8 months ago

Issue with the inverter config that GE were able to 'fix' remotely.