SzilagyiR
(Szilagyi R)
November 27, 2022, 5:22pm
1
Hi!
I trying to show my house temperatures in a chart.
I installed RRD4J, and set up the following:
sitemap:
Frame label="Nappali" icon="humidity"{
Text item=Temperature {
Text item=natemp
Switch item=GraphRange label="Time:" mappings=[0="1H", 1="24h", 2="48h", 3="W", 4="M"]
Chart item=gTemp_Outdoor period=h refresh=6000 visibility=[GraphRange==0, GraphRange=="Uninitialized"]
Chart item=gTemp_Outdoor period=D refresh=6000 visibility=[GraphRange==1]
Chart item=gTemp_Outdoor period=2D refresh=6000 visibility=[GraphRange==2]
Chart item=gTemp_Outdoor period=W refresh=6000 visibility=[GraphRange==3]
Chart item=gTemp_Outdoor period=M refresh=6000 visibility=[GraphRange==4]
}
}
items:
Group gTemp_Outdoor
Number natemp "Nappali hőmérséklet [%.1f °C]" (gTemp_Outdoor) {mqtt="<[raspberrypi:tele/thermostat/SENSOR:state:JSONPATH($.DS18B20.Temperature)]"}
//dummy item:
Number GraphRange
presist:
Strategies {
everyMinute : "0 * * * * ?"
everyHour : "0 0 * * * ?"
everyDay : "0 0 0 * * ?"
default = everyChange
}
Items {
gTemp_Outdoor* : strategy = everyMinute, restoreOnStartup
}
Temperature graph shows nothing, what am I doing worong?
rossko57
(Rossko57)
November 27, 2022, 5:29pm
2
Which persistence service(s) are you using, and what is your system default set to (because that controls where the Chart widget looks)
I’m guessing you are on OH2, you must tell us these things.
SzilagyiR
(Szilagyi R)
November 27, 2022, 5:32pm
3
RRD4J is the default, and yes I use openHAB 2.5.12, sorry!
opus
(JĂĽrgen Baginski)
November 27, 2022, 5:46pm
4
What does the logging tell you?
Did you install JSONPATH transformation?
Did you check wether any data is persisted at all (checking for the relevant .rrd filesor checking via the REST API)?
SzilagyiR
(Szilagyi R)
November 27, 2022, 5:55pm
5
Hi!
I checking the log with Frontail but it shows nothing to me.
JSONPATH transformation is active.
Yes the weather data (24,9) is accurate.
SzilagyiR
(Szilagyi R)
November 27, 2022, 6:50pm
6
I found this error message:
2022-11-27 19:48:56.234 [ERROR] [ui.internal.items.ItemUIRegistryImpl] - Cannot retrieve item for widget org.eclipse.smarthome.model.sitemap.sitemap.Text
SzilagyiR
(Szilagyi R)
November 27, 2022, 7:42pm
7
I founfd the .rrd files, looks like RRD4J working.
SzilagyiR
(Szilagyi R)
November 27, 2022, 8:02pm
8
I found this soulution, but I don’t know how to do it, someone please explane me?
I reinstalled the persistence service, but the charts were still empty. The solution was very simple: because /etc/ and /usr/lib are only accessible as root the file owner of rrd4j was root. chown openhab … and i see the chart-lines.
Thank you for your help - often the bugs are soo simple…
Greetings!
rossko57
(Rossko57)
November 27, 2022, 8:22pm
9
That’s something else, obviously a Text widget like one of these two, or somewhere else in the sitemap.
Check Item name spelling, and it is case-sensitive,
SzilagyiR
(Szilagyi R)
November 27, 2022, 8:28pm
10
Items name spelling looks good to me, “natemp” is storing the actual temperature.
rossko57
(Rossko57)
November 27, 2022, 10:45pm
11
And right above that Text widget for “natemp” is another Text widget pointing to a supposed Item “Temperature”. Does that exist? You’ll need to look at every Text widget in your sitemap.
Its unlikely this has anything to do with your chart problem, but I suppose if the failing Text widget {encloses} the charts it just might.
I think I’d use REST API to see if you can access data .for the group member Item(s)
1 Like
SzilagyiR
(Szilagyi R)
November 28, 2022, 8:14pm
12
I started over form the begening, and now it works fine with this settings!
Thanks for everyone!