[SOLVED] Chart is not displaying rrd4j data

The Temperature item of my weather binding works perfect in Basic UI but I can’t show a chart with rrd4j temperature data.

I read several topics about this problem. Re-wrote my rrd4j.sitemap and rrd4j.persist files without result.

When I query Temperature from rrd4j in the rest-api I get this result

It looks like my persist file does not store data? Am I right?

I’m not certain whether rrd4j supports Items with a Quantity of Measure (e.g. Number:Temperature).

The REST API is indeed showing that there is no data stored for that Item. Or you are not using the everyMinute strategy to store your Items.

Hi Rich,

I’m not sure but many people use charts to display Temperature I guess. Is there a way to convert the a Number to Text before storing it?

This is my persist file:

// persistence strategies have a name and a definition and are referred to in the "Items" section
    Strategies {
        // for rrd charts, we need a cron strategy
        everyMinute : "0 * * * * ?"
        everyHour	: "0 0 * * * ?"
    }
    Items {
        // which data to be stored
    	Temperature : strategy = everyMinute
    	}

So everyMinute is in.

This Quantity of Measure isn’t old, so not that much people will be using it!

It should be possible to convert the temperature with C or F into just a number.
Read Here

Do you think I need to when I want to store it in a rrd4j.persist file?

If that is your problem I would convert to a number instead of to a string.
What does your log show when a new temperature is rcieved?

My log gives serveral warn and error notifications:

2019-05-30 12:54:19.152 [ERROR] [org.openhab.io.net.http.HttpUtil    ] - Fatal transport error: java.net.UnknownHostException: api.darksky.net
2019-05-30 12:54:19.152 [ERROR] [nal.provider.AbstractWeatherProvider] - FORECASTIO[home2]: Can't retreive weather data: Error: response is empty!
2019-05-30 12:55:52.160 [WARN ] [g.dispatch.internal.ConfigDispatcher] - Could not parse line '600'
2019-05-30 12:55:53.019 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Amsterdam'.
2019-05-30 12:55:53.019 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '51.73624677522943,5.5394697711344465'.
2019-05-30 12:55:53.019 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'nl_NL'.
2019-05-30 12:55:54.285 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2019-05-30 12:55:57.464 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.items'
2019-05-30 12:55:57.589 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.items'
2019-05-30 12:55:57.714 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.items'
2019-05-30 12:55:57.729 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'weather.items'
2019-05-30 12:55:57.745 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "NumberItem" with key "Temperature". It exists already from provider "GenericItemProvider"! Failed to add a second with the same UID from provider "GenericItemProvider"!
2019-05-30 12:55:57.745 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "NumberItem" with key "Temperature_F". It exists already from provider "GenericItemProvider"! Failed to add a second with the same UID from provider "GenericItemProvider"!
2019-05-30 12:55:57.745 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "NumberItem" with key "Temp_Feel". It exists already from provider "GenericItemProvider"! Failed to add a second with the same UID from provider "GenericItemProvider"!
2019-05-30 12:55:57.745 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "NumberItem" with key "Temp_Feel_F". It exists already from provider "GenericItemProvider"! Failed to add a second with the same UID from provider "GenericItemProvider"!
2019-05-30 12:55:57.745 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "NumberItem" with key "Temp_Dewpoint". It exists already from provider "GenericItemProvider"! Failed to add a second with the same UID from provider "GenericItemProvider"!
2019-05-30 12:55:57.745 [WARN ] [ore.common.registry.AbstractRegistry] - Cannot add "NumberItem" with key "Temp_Dewpoint_F". It exists already from provider "GenericItemProvider"! Failed to add a second with the same UID from provider "GenericItemProvider"!
2019-05-30 12:55:57.917 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rr4dj.persist'
2019-05-30 12:55:58.802 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2019-05-30 12:55:59.068 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'home.sitemap'
2019-05-30 12:55:59.084 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rr4dj.sitemap'
2019-05-30 12:55:59.099 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.sitemap'
2019-05-30 12:55:59.130 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'weather.sitemap'
2019-05-30 12:55:59.255 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'astro.things'
2019-05-30 12:55:59.552 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:home
2019-05-30 12:56:00.130 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.10.230:8080
2019-05-30 12:56:00.443 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.10.230:8443
2019-05-30 12:56:01.287 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2019-05-30 12:56:01.333 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Started HABmin servlet at /habmin
2019-05-30 12:56:01.583 [DEBUG] [org.openhab.persistence.rrd4j       ] - BundleEvent STARTING - org.openhab.persistence.rrd4j
2019-05-30 12:56:01.583 [DEBUG] [stence.rrd4j.internal.RRD4jActivator] - RRD4j persistence bundle has been started.
2019-05-30 12:56:01.583 [DEBUG] [org.openhab.persistence.rrd4j       ] - BundleEvent STARTED - org.openhab.persistence.rrd4j
2019-05-30 12:56:01.615 [DEBUG] [sistence.rrd4j.internal.RRD4jService] - Created default_other = GAUGE heartbeat = 3600 min/max = NaN/NaN step = 1 6 archives(s) = [ MAX xff = 0.999 steps = 1 rows = 3600 MAX xff = 0.999 steps = 10 rows = 1440 MAX xff = 0.999 steps = 60 rows = 1440 MAX xff = 0.999 steps = 900 rows = 2880 MAX xff = 0.999 steps = 21600 rows = 1460 MAX xff = 0.999 steps = 86400 rows = 3650] 0 items(s) = []
2019-05-30 12:56:01.615 [DEBUG] [sistence.rrd4j.internal.RRD4jService] - Created default_numeric = GAUGE heartbeat = 60 min/max = NaN/NaN step = 60 6 archives(s) = [ AVERAGE xff = 0.5 steps = 1 rows = 480 AVERAGE xff = 0.5 steps = 4 rows = 360 AVERAGE xff = 0.5 steps = 14 rows = 644 AVERAGE xff = 0.5 steps = 60 rows = 720 AVERAGE xff = 0.5 steps = 720 rows = 730 AVERAGE xff = 0.5 steps = 10080 rows = 520] 0 items(s) = []
2019-05-30 12:56:01.615 [DEBUG] [org.openhab.persistence.rrd4j       ] - ServiceEvent REGISTERED - {org.openhab.core.persistence.PersistenceService}={service.id=412, service.bundleid=244, service.scope=bundle, component.name=org.openhab.persistence.rrd4j, component.id=267} - org.openhab.persistence.rrd4j
2019-05-30 12:56:01.630 [DEBUG] [4j.internal.charts.RRD4jChartServlet] - Starting up rrd chart servlet at /rrdchart.png
2019-05-30 12:56:01.630 [DEBUG] [org.openhab.persistence.rrd4j       ] - ServiceEvent REGISTERED - {javax.servlet.ServletContext}={osgi.web.version=1.13.0, osgi.web.contextpath=/, service.id=415, osgi.web.symbolicname=org.openhab.persistence.rrd4j, service.bundleid=244, service.scope=singleton, osgi.web.contextname=custom} - org.openhab.persistence.rrd4j
2019-05-30 12:56:01.630 [DEBUG] [org.openhab.persistence.rrd4j       ] - ServiceEvent REGISTERED - {org.openhab.ui.chart.ChartProvider}={service.id=414, service.bundleid=244, service.scope=bundle, component.name=org.openhab.persistence.rrd4j.chartservlet, component.id=268} - org.openhab.persistence.rrd4j
2019-05-30 12:56:02.872 [INFO ] [kobus.internal.core.NikobusInterface] - Connected to serial port 'COM1'
2019-05-30 12:56:03.138 [INFO ] [kobus.internal.core.NikobusInterface] - Connected to Nikobus :-)
2019-05-30 12:56:03.153 [INFO ] [eather.internal.common.WeatherConfig] - ProviderConfig[providerName=FORECASTIO,apiKey=1f227d70722b21d048d722118c999843]
2019-05-30 12:56:03.153 [INFO ] [eather.internal.common.WeatherConfig] - LocationConfig[providerName=FORECASTIO,language=en,updateInterval=5,latitude=51.736185,longitude=5.539475,woeid=<null>,locationId=home2,name=Heesch]
2019-05-30 12:56:03.153 [INFO ] [eather.internal.common.WeatherConfig] - LocationConfig[providerName=FORECASTIO,language=nl,updateInterval=15,latitude=51.736185,longitude=5.539475,woeid=<null>,locationId=home,name=Heesch]
2019-05-30 12:56:06.185 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Starting and scheduling weatherJob-home2 with interval of 5 minutes
2019-05-30 12:56:06.185 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Disabling weather locationId 'home', no binding available
2019-05-30 12:56:27.431 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename `rr4dj.sitemap` does not match the name `Weather` of the sitemap - please fix this as you might see unexpected behavior otherwise.
2019-05-30 12:56:27.567 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename `rr4dj.sitemap` does not match the name `Weather` of the sitemap - please fix this as you might see unexpected behavior otherwise.
2019-05-30 12:56:28.779 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename `rr4dj.sitemap` does not match the name `Weather` of the sitemap - please fix this as you might see unexpected behavior otherwise.
2019-05-30 12:56:31.162 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename `rr4dj.sitemap` does not match the name `Weather` of the sitemap - please fix this as you might see unexpected behavior otherwise.
2019-05-30 12:56:34.832 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename `weather.sitemap` does not match the name `Weather` of the sitemap - please fix this as you might see unexpected behavior otherwise.
2019-05-30 12:56:34.932 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename `weather.sitemap` does not match the name `Weather` of the sitemap - please fix this as you might see unexpected behavior otherwise.
2019-05-30 12:56:36.057 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename `weather.sitemap` does not match the name `Weather` of the sitemap - please fix this as you might see unexpected behavior otherwise.
2019-05-30 12:56:37.930 [WARN ] [sitemap.internal.SitemapProviderImpl] - Filename `weather.sitemap` does not match the name `Weather` of the sitemap - please fix this as you might see unexpected behavior otherwise.

You should clear the issues logged!
You are trying to create items which already exist, I guess you have the simple mode on. That way for all channels items are created automatically and are linked to the channel. So the items created by file are not needed. Either delete the items files or deselect the simple mode AND delete the auto created items via PaperUI.
Your sitemap file names must match the sitemap name!
Your weather binding has problem: " Disabling weather locationId ‘home’, no binding available".
After clearing those we can look into your persistence problem again!

So you mean i’ve got “double” items. Is it possible they come from another binding (yahoo) i’ve got installed?

I copied a wheather.items file from someone else. Later changed home to home2. I guess I forgot to edit it somewhere.

I corrected my sitemap names.

Do you see no the events in the log when the item Temperature changes?

2019-05-30 13:31:43.492 [vent.ItemStateChangedEvent] - Temperature changed from 16.31 to 16.36

And I display Temperature in several sitemaps and the do change too.

Please raise the log-level for rrd4j to DEBUG and delete the existing file Temperature.rrd and then see what happens.

Bingo

I guess I still had a typemismatch :smirk:

In this case you can reset the log-level to DEFAULT.

Thanks to Jürgen. :clap:

Just a passing comment that the event log reveals that there are no UoM involved.

So far as I believe, the persistance layer strips out any units and stores plain numbers, being essentially a 1.x service

I guess that on restore or read it re-assumes the default units of a UoM number Item