-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Daily gas usage date one day off. #299
Comments
Bump? |
Sorry for the late response. Actually, I think it is correct. T23:00Z means 11:00PM in UTC time, which differs (depending on daylight savings time) 1 hour from the GMT. So converted to local time in NL, this results in 00:00 of the next day. Check it out at https://savvytime.com/converter/utc-to-netherlands-amsterdam |
Thanks. Ok, I suspected as much. Problem is, this gets dumped into influxdb, then viewed by grafana, and it's a day off. I'll try to find a way around it. |
Here it's set to Browser time, and also in the grafana.conf file it is set to browser. Which is UTC+0100, same as in your screenshot. I changed it, but it made no difference. If you look back at my initial message, it's a difference between the cmdline tool and the output in node-red. So that's before it goes into influxdb. But both that cmdline tool and nodered are running on the same server, same timezone, etc. And I don't have timezone problems with any other data, e.g. realtime temperature sensors, p1-energy data, etc. |
Did you also correctly set the location of the Nefit Easy thermostat? (under the account settings) |
I checked the code, but there is no calculation on the timezone. This is the mapping from my sync operation:
Basically the nefit module calls the neift-easy-commands library: |
Is the timezone for Node-Red also correct? |
Yes, set to my home location. (In NL.)
Not sure where to change it. Looks OK if I make a small test flow like this: var d = new Date(); A shell in the FreeBSD jail running node-red is also displaying correct time (CET) |
Hi @nachtbraker did you manage to find/resolve the issue? |
The daily gas usage data seems to be one day off. E.g. when I use the cmd line utility from https://github.com/robertklep/nefit-easy-client I get:
/usr/local/bin/easy --serial=### --access-key=### --password=### gas-usage
[{"date":"Mon Nov 28 2022","hot water":6.2,"central heating":65.6,"average outdoor temperature":9.5},
[snip]
{"date":"Thu Dec 15 2022","hot water":5.7,"central heating":123.1,"average outdoor temperature":2.6}]
Which is what I expect (today being Dec 16.)
However, using the example nefit-easy-dailygasusage-to-influx.json flow, the days seem to be one day off. The output of this flow is:
nefit-easy : msg.payload : array[18]
array[18]
[0 … 9]
0: object
date: "2022-11-27T23:00:00.000Z"
hot water: 6.2
central heating: 65.6
average outdoor temperature: 9.5
[snip]
17: object
date: "2022-12-14T23:00:00.000Z"
hot water: 5.7
central heating: 123.1
average outdoor temperature: 2.6
Perhaps a timezone thing? (I'm in NL.)
To Reproduce
See above.
Expected behavior
object.date above should be dated one day later.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: