When following the documentation to insert charts into sitemaps, I am running into some trouble regarding groups.
The group Temperature_Living contains multiple temperature sensors. All sensor values AND the value of the group itself, are persisted every minute and on every change.
Instead of a line for each sensor in the group, I would like to get a single line, showing the group itself. I can do this because I also persist the value of the group itself, and if the URL is changed to the below, it works fine (Changed groups= to items= ):
Unfortunately I cannot decide in the sitemap configuration if I want the group items or the group itself to be shown in the chart. Or does anyone know a way to do this?
That’s pretty sad, because the intended graph can already be rendered. It is just a matter of changing the URL of the chart image being loaded by the sitemap…
Thanks for the ideas. I really do not like adding pseudo items just to fix something that is already working. (I.e. the data is already persisted for the Temperature_Living item, and the graph can actually be shown, if the image URL changes one parameter). - The simplest solution at this time, is not to use the Chart element in the Sitemap, but to use an Image element in the Sitemap instead, where I manually add the URL for the graph. Works fine for now.
So just in case anyone else has the same problem: If you create a Chart for a Group Item, then the Chart will depict a dataseries (line) for each of the included group members. However, if you change the “?group=” part in the URL, to “?items=”, it will show the value for the group itself. (Which is the value, e.g. AVG, depending on the group configuration). Naturally, this will only work, if the group value itself is also persisted.
// Instead of the Chart item:
Chart item=Temperature_Living refresh=60 period=W
// I now use the Image item:
Image url="http://myhome.com:8080/chart?items=Temperature_Living&period=W" refresh=60
Drawback: URL must be available from wherever you access the chart, but that is no problem if you have a (sub)domain linked to your openHAB server.