How to check that timeseries are properly generated


As I’m continuing my work on an Open Meteo binding, I’m starting to generate timeseries that are sent to the appropriate channels.
In the log, I see this kind of messages:

Item 'OpenMeteo_forecast_Outdoor_Temperature' shall process timeseries [Entry[timestamp=2024-02-22T00:00:00Z, state=9.877501 °C], Entry[timestamp=2024-02-22T01:00:00Z, state=9.9775 °C], Entry[timestamp=2024-02-22T02:00:00Z, state=10.627501 °C], ...

I believe this is then working fine, but I’m having a hard time figuring out what to do with that.
I thought that I could maybe graph the future temperature by creating a Chart page that would display the item linked to that channel.
MainUI created this definition for me:

  label: Temperature
  sidebar: true
  dataZoom: []
    - component: oh-chart-grid
      config: {}
    - component: oh-time-series
        gridIndex: 0
        item: OpenMeteo_forecast_Outdoor_Temperature
        name: Temperature
        type: line
        xAxisIndex: 0
        yAxisIndex: 0
    - component: oh-time-axis
        gridIndex: 0
    - component: oh-value-axis
        gridIndex: 0

But it doesn’t display anything which might be logical as the x axis only goes as far as today.
Looking at the various options, I figured that maybe I could use the offset to see the future, like this:

    offsetAmount: -3
    offsetUnit: day

As the documentation says the amount is subtracted from the value, I thought that a negative value would go in the future.
But this did not change a thing.
Then I reread the 4.1 announcement and saw that RRD4J does not support storing future values.
So I installed JDBC SQLite, configured it and changed the graph page to use jdbc

  service: jdbc

Still to no avail, the graph is still empty.

I looked at the generated SQLite file, it stays empty which would actually explain why the graph is empty.

I also edited the persistence strategy to include forecast on top of everyChange but that did not make the persistence SQLite file grow.

How do I get my timeseries stored in the SQLite persistence file?
What did I miss?

Well, I was able to get some data in the SQLite file by creating a persistence configuration for my item group:

But while this does place elements in the sqlite database, I still don’t have anything showing in the graph.

Setting the JDBC persistence log level to “trace”, I was able to see the queries sent to the database, and they all look like this:

SELECT time, value FROM item0003 WHERE TIME>='2024-03-04 17:46:28' AND TIME<='2024-03-05 17:46:28' ORDER BY time ASC

But the issue here is that in the database, the time field is a large integer value, not a date time field:

The field itself appears to be properly defined as a timestamp:

But it looks like the query is not built properly, at least not for SQLite

Does anyone have any suggestion here?

Well, as it turns out, using another persistence service did the trick.
In my case I used a local instance of MySQL and I now have a valid graph for the future:

So now I can say that my time series are properly generated.

1 Like