Charts when using MySQL persistence binding - how?


recent MySQL binding update makes it usable in OpenHAB2. Variables are being stored correctly and when I select mysql persistance in habm Chart item=Pietro_Suszarnia_T_AZH period=D refresh=60in I can generate chart for some item but all charts in sitemap shows “0”. There is no error in openhab.log file. Any suggestions? Maybe something needs to be added to sitemap file?

Example chart entry:

Chart item=Pietro_Suszarnia_T_AZH period=D refresh=60

Configuration in openhab.cfg:



Hi there,

i use mysql as well for persistance and it works like a charm, ok missing some features, but it works. First i recognise is that your refresh time is very short. If i’m right 60 means 60 milliseconds and this is maybe a little fast for refresh.

In my sitemap it looks like:

Chart item=CsBaBathTemperature service="mysql" period=12h refresh=300000 visibility=[selectChartIntervall==0, selectChartIntervall=="Uninitialized"]

Refresh every 300 secondsequals 5 minutes


Do you have somewhere configured charting in openhab.cfg file or services.cfg in /runtime/etc dir? Just to be sure it works for you on OpenHAB2 right?

EDIT: Setting visibility in sitemap gives:

2015-09-15 09:22:37.795 [ERROR] [s.u.i.items.ItemUIRegistryImpl] - Cannot retrieve visibility item selectChartIntervall for widget org.eclipse.smarthome.model.sitemap.Chart

error in openhab.log file.

Thats a good point i did not read openhab 2 it works on openhab 1.7.1


Ah. Ok. It was working fine for me too in OH 1.x. Charts where working also fine usign JPA persistance but for some reason not for MySQL.

For now I’ve reported it as a bug:

because I’ve found out that service attrib from sitemap file is not being used for chart URL GET param. When I added …&service=mysql for chart image URL it showed correct chart with data fetched from MySQL.