-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[jdbc.mysql] Not all values showed in graph #9308
Comments
@ghys commented on Dec 9, 2020, 3:45 PM UTC: I'd be willing to take a bet that it's a timezone problem i.e. you live in UTC+1/2 and openHAB's JDBC service queries are made against UTC time. |
@ghys commented on Dec 9, 2020, 3:50 PM UTC: Try to use the developer tools in Chrome or Firefox, find the request where the data is fetched, find the last point's time, and use |
@DanielMalmgren commented on Dec 9, 2020, 4:35 PM UTC: Well, that value is consistent with the last point I see in the graph... I noticed that the URL used for fetching the values are "http://rockpi:8080/rest/persistence/items/Ljusniva_ute?starttime=2020-12-08T16%3A30%3A51.981Z&endtime=2020-12-09T16%3A30%3A51.980Z", while the clock (in my local timezone, which is +1) is 17:30. Does that mean the problem is on the persistence service side? The values in my database are in local time. |
@ghys commented on Dec 9, 2020, 4:41 PM UTC:
that's correct, note the Z at the end, 16:30 zulu time is 17:30 your time. |
@DanielMalmgren commented on Dec 9, 2020, 4:44 PM UTC: Ok. Is it possible to move this ticket over to the correct place or should I create a new one and reference this? |
Since this now turned out to be a persistence problem, I started thinking... My mysql connection setting is the following: url=jdbc:mysql://127.0.0.1:3306/openhab?serverTimezone=Europe/Stockholm Could the serverTimezone be a problem here? |
Seems to be related or similar to #8502. |
@DanielMalmgren commented on Dec 9, 2020, 12:36 PM UTC:
The problem
All values aren't showed in the graph. It seem always the last 1-2 hours are missing.
The last value on the graph below is 58 lux, at 11:10:
At the same time I had the following values in my persistence database (pasting from mysql):
| 2020-12-09 11:00:32 | 40.00 |
| 2020-12-09 11:10:32 | 58.00 |
| 2020-12-09 11:20:32 | 23.00 |
| 2020-12-09 11:30:32 | 82.00 |
| 2020-12-09 11:40:32 | 106.00 |
| 2020-12-09 11:50:32 | 43.00 |
| 2020-12-09 12:00:32 | 30.00 |
| 2020-12-09 12:10:32 | 66.00 |
Expected behavior
The graph should show all values.
Steps to reproduce
Your environment
Additional information
Using jdbc-mysql persistence.
Also see discussion at https://community.openhab.org/t/small-graph-glitches-in-oh3/109734
This issue was moved by ghys from openhab/openhab-webui#611.
The text was updated successfully, but these errors were encountered: