Hi,
I have created new frame called “Indoor” and want to list aver temp and humidity of the house. All seems to be working ok as it will display me correct aver value for both but at the top of it, when I click on temperature section I want to show temperature of the specific room and underneath that wishing to have chart with this temperature.
With my current sitemap it`s currently showing me chart on front page under aver room temp instead of inside underneath this specific room.
What am I doing wrong. Literally need to relocate this chart. Also it would be good to add some history , week, 24hrs and today.
}
Frame label="Indoor" {
Group item=Temperature icon="temperature"
Chart item=Temperature period=h refresh=60
Group item=Humidity icon="humidity"
}
If I’m understanding what you are after correctly you can’t do that using Group elements. You have no control over how the elements under the Group are displayed and you can’t add any other elements like a Chart to that subframe. If you want a chart to appear under Temperature then you must build that up manually.
Frame label="Indoor" {
Text item=Temperature icon="temperature" {
Frame label="Temperatures" {
Text item=room1Temp
Chart item=room1Temp period=h refresh=60
Text item=room2Temp
...
}
}
If you want to show only the chart for the selected room use theVisibility tag in conjunction with a switch. You need to have a chart-line for each room in your sitemap, however only the selected one will show up.
Thank you to both of you for replies. Yes I was struggling with this sitemap but applied the example from above and works well.
Now when I enter temperatures frame I can see the individual room - fab.
Just wonder if I want to add some more details to this chart such as last update and chart period (hour/day/week) how would I do that. This is what I`m after.
Also where is this date being saved in openhab ? Assuming the log will be growing and growing until is manually deleted is that correct.
For the display of the last update just use an item to be displayed.
For the different chart periods you can also use the visibility tag ( yes that would make it even more lines in the sitemap file, but it works that way. You only need to create a number representing the period and the room.
The values are stored in a database which you have selected by the persistence service. Sql would be growing, rrd4j not growing.
For example, see this part of my sitemap on which I have 3 switches to select the correct chart to be displayed.
Thanks.
With the following syntax I get to display chart period (Hour/Day/Week) but when selecting any of them chart is not changing view.
Additionally after adding few extra Chart lines , I now can see 4 charts - two of them are hour, third is day and fourth is week. Only the problem all four charts are displayed separately underneath each other, obviously switch button has no functionality. What else is missing here ?
Refresh problem:
I do see that also, refreshing the page gives the updated view.
Display of first chart:
Your first chart line has no visibility tag, hence it will allways show! Why did you use a refresh of 60 msec? I can’t blink that often!
Display of the three other charts:
I remeber seeing that behaviour when something wasn’t set correctly, can’t remember what it was in my case. The only possible reason I see (not certain on that) is your first chart line.
I removed the first line from sitemap, so have now three charts only but there are still displayed separately. Sorry the first line was only for testing needs - yeah the update time was quick.
I’d have to do some test-trials using your code on my system in order to find what is going on. That will take some time.
It could be any syntax-problem in the sitemap file!
Found it!
I guess your item “Temperature_GF_Living_Period” is defined as a Switch, if you change that to Number it will work.
A switch doesn’t take more then ON/OFF! You are using it with 0,1 and 2!
You need to change the Temperature_GF_Living_Period to a Number!!!
(Edit:) …and that change needs to be done in the .items file, displaying it as a switch on the sitemap is correct!
I got it now. It turns out that I didn`t had Period syntax in items at all as I was trying to build everything in sitemap. After adding this line as Number I can see one chart and chart period selector works properly so problem solved - many thanks , good spot.
When comes to refresh rate is that correct what I have in sitemap ? h=6000, D=30000 & W=30000. If we are talking about ms then this seems to be still quick.
Thanks. I will slow down my refresh rate on this chart as my current refresh setup is 6s for h, and 30s for D and W. Probably it doesn`t need to be that fast.