Repository: openhab/openhab-addons

Issue #8502: [jdbc.mysql] First two hours of any chart always flat
Created: 2020-09-20T09:37:33Z
When adding any chart to the sitemap (classic ui), the first two hours are always a flat line. Doesn't seem to be an issue with persistence, if I switch to a longer period, the data is there and displayed. Just for each chart, not depending on displayed period, first two hours display a flat line. For hourly charts, of course the trace is then entirely flat.
I use the mysql persistence. No other persistence services enabled.
How to reproduce:
Every chart in a sitemap is affected. For example:
"Chart item=SomeNumberItem period=h refresh=30000" should produce a flat line.
I'm using openhab2 with docker, using the following docker file:
version: '2.2'

volumes:
    db:

services:
  db:
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - db:/var/lib/mysql
    environment:
      - MYSQL_USER=openhab
      - MYSQL_DATABASE=OpenHAB
      - MYSQL_ROOT_PASSWORD=XXX
      - MYSQL_PASSWORD=XXX

  knxd:
    image: "welteki/knxd:latest"
    restart: always
    network_mode: host
    command: knxd -D -R -T -S -e 0.0.1 -E 0.0.2:32 -u /tmp/knxd --send-delay=30 -b ipt:192.168.2.101

  openhab:
    image: "openhab/openhab:latest-debian"
    restart: always
    volumes:
      - "/etc/localtime:/etc/localtime:ro"
      - "/share/Container-Data/openhab/addons:/openhab/addons"
      - "/share/Container-Data/openhab/conf:/openhab/conf"
      - "/share/Container-Data/openhab/userdata:/openhab/userdata"
    environment:
      OPENHAB_HTTP_PORT: "8080"
      OPENHAB_HTTPS_PORT: "8443"
      EXTRA_JAVA_OPTS: "-Duser.timezone=Europe/Berlin"
    ports:
      - "2080:8080"
      - "2443:8443"
      - "2101:8101"
    links:
      - db

Duplicate issue #9308: [jdbc.mysql] Not all values showed in graph
Created: 2020-12-09T16:45:36Z
@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

Go to an Item in the UI
Click on Analyze

Your environment
runtimeInfo:
  version: 3.0.0.M5
  buildString: Milestone Build
locale: sv_SE
systemInfo:
  configFolder: /etc/openhab
  userdataFolder: /var/lib/openhab
  logFolder: /var/log/openhab
  javaVersion: 11.0.9.1
  javaVendor: Azul Systems, Inc.
  javaVendorVersion: Zulu11.43+100-CA
  osName: Linux
  osVersion: 5.9.11-rockchip64
  osArchitecture: aarch64
  availableProcessors: 6
  freeMemory: 67019920
  totalMemory: 442499072
bindings:
  - exec
  - mail
  - networkupstools
  - pushover
  - robonect
  - sonos
  - systeminfo
  - tellstick
  - tibber
  - zwave
clientInfo:
  device:
    ios: false
    android: false
    androidChrome: false
    desktop: true
    iphone: false
    ipod: false
    ipad: false
    edge: false
    ie: false
    firefox: true
    macos: false
    windows: true
    cordova: false
    phonegap: false
    electron: false
    nwjs: false
    webView: false
    webview: false
    standalone: false
    os: windows
    pixelRatio: 1.25
    prefersColorScheme: light
  isSecureContext: false
  locationbarVisible: true
  menubarVisible: true
  navigator:
    cookieEnabled: true
    deviceMemory: N/A
    hardwareConcurrency: 8
    language: sv-SE
    languages:
      - sv-SE
      - sv
      - en-US
      - en
    onLine: true
    platform: Win32
  screen:
    width: 1536
    height: 864
    colorDepth: 24
  support:
    touch: false
    pointerEvents: true
    observer: true
    passiveListener: true
    gestures: false
    intersectionObserver: true
  themeOptions:
    dark: light
    filled: true
    pageTransitionAnimation: default
    bars: filled
    homeNavbar: default
    homeBackground: default
    expandableCardAnimation: default
  userAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101
    Firefox/83.0
timestamp: 2020-12-09T12:32:19.503Z

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.

Closing comment (2020-12-12T09:23:13Z): Seems to be related or similar to #8502.