Openhab3 - Charts Problem with InfluxDB

i uses the existing sitemap + persistence (influxdb) on OH3 that was already in place with OH2.5.
Now i only see the following placeholder…but no information about any errors…


somehow i was not sure if the blank setup with influxdb setup did work properly…but in the :8080 GUI i can see the following graph…but i’m not sure if this comes from influxDB as well or there is some item cache whatever existing…

How did you install OH 3? Did you upgrade or start from fresh? What’s your default Persistence? Do you have any other persistence installed beyond InfluxDB?

thanks Rich for your reply.
I now started with fresh installation and putting in little by little.
Default is influxdb, there is no other persistence installed. i only have a single influx file in pesistence folder.
Checked the log at bootup but there is not a single line based on persistence…except that persistence file is loaded…no idea if no message is good message…

If you started from scratch are you sure of that? rrd4j is installed by default in OH 3 and it is set as the default in OH 3. Persistence add-ons now also have a default persistence strategy so even if you don’t have an rrd4j.persist file doesn’t mean it’s not saving.

The charts in MainUI are generated using what ever is the default persistence engine.

There typically isn’t anything in the log referring to persistence.

Overall you have some persistence running. But there is not enough details presented here to say which one.

I haven’t used built in sitemap charts in many many years and since moving to OH 3 I only use MainUI and do not use sitemaps at all any more. So all I’m really able to do is extract enough information for someone who does can help. I’ve not seen any reports of charts not working but there are not many who use the built in sitemap charting any more.

thanks @rlkoshak i guess you are right about mainly using the new MainUI way. I’ve not much experience on OH3 mainUI charts right now but mostly sitemap charts helps me when using the iOS app to see easily charts not required to swithc to webGUI which i guess will not be that handy via mobile phone.

Regarding persistence, maybe i did something wrong. but i removed the old persistence mode, and now i only have this one:


Is there anything else i need to set in order to switch from the old persistence to InfluxDB?

  • “+” of course the influxdb.cfg file in service folder…
# The database URL, e.g. or .
# Defaults to:
# url=http(s)://<host>:<port>

# The name of the database user, e.g. openhab.
# Defaults to: openhab

# The password of the database user.

# The name of the database, e.g. openhab.
# Defaults to: openhab


I now tried to find out if the influx.conf file is used at all…so i changed the passwd to something wrong…and i now see the following log…which means bad news is good news and it at least seems to use influxdb - but still charts in sitemaps are not presented at all.

2021-06-20 00:00:01.187 [ERROR] [org.influxdb.impl.BatchProcessor    ] - Batch could not be sent. Data will be lost
org.influxdb.InfluxDBException$AuthorizationFailedException: authorization failed

You’ve eliminated the chance that MainUI is using a different DB from InfluxDB. Sio the problem must be with sitemap charts and since I don’t use them and haven’t for years I don’t have any recommendations. You might try filing an issue.

@rlkoshak still struggling and trying out things. I now found the following error log which seems to be a good starting point to finally fix it. a lot is written regarding problems with InfluxDB in the community but not specifically to my error log.

Interesting as i guess due to this error there will not be written any data in InfluxDB…but MainUI independently seems to log historical data for each item…

2021-07-04 23:00:20.825 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'influxdb.persist'
2021-07-04 23:00:21.515 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'QueryablePersistenceService.query()' on 'org.openhab.persistence.influxdb.InfluxDBPersistenceService@                       a0344f': error parsing query: found ALL, expected identifier at line 1, char 48
org.influxdb.InfluxDBException: error parsing query: found ALL, expected identifier at line 1, char 48

That is the persistence-file, InfluxDB version is 1.8x

// 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 * * * * ?"

Items {

        RH_Basement,LRMotionSensor_Temperature,PufferState,RestO2state,EGthermo,DGthermo : strategy = everyMinute
        Hofer_Temps*,PowerMap*,EGvlauf,DGvlauf,Pool_Power,EVchargePower : strategy = everyMinute
        LivingRoom_Power,PowerTotal,VeACkWhFor,VeACkWhRev,EnergyImpDaily,EnergyExpDaily,NG4EnergyExp,NG4EnergyExpDaily,PVisland_Power,PvXL_Power,Devolo3_Power,AirCon_Power,AirDryer_Power,TV_Power,PVislandVolt : strategy = everyMinute
        DBtemp,YRtemp,NG4Top1temp,NG4Top1BathTemp,BathESPtemp,BaseESPtemp,AtticTemp,BaseESPhum,Base2ESPhum,Base2ESPtemp,TuyaSensor01_temp : strategy = everyMinute
        PVng5sum,PvMicro_Power,NG4power,FibGarage_Power,BathESPvcc,SmartDisplay01vcc,SmartDisplay02vcc,AtticVcc,NG4Top1vcc,DBvcc,YRvcc,CollectorTemp : strategy = everyMinute
        EPsolar_PVpower,EPsolar_CASEtemp,EPsolar_BATvolt,Rain_1h : strategy = everyMinute
        BigSmartEPD1vcc,BigSmartEPD2vcc,BigSmartEPD3vcc,BigSmartEPD4vcc,BigSmartEPD5vcc : strategy = everyMinute
        VeBatSoc,VeBatTemp,VeBatPower,VeMP2Temp : strategy = everyMinute

JESUS, after so much trying back and forth, i now found a threat that describes the solution.

Little annoying - that this is not mentioned anywhere - but maybe my fault if i did not see it… happy that it works finally. Cheers

MainUI never writes anything to any database. It only queries the database. If MainUI is showing graphs that means that the data is being saved to your default database. Unless you’ve changed that InfluxDB might not be the default.

But that error is not complaining about writing to the database, it’s complaining about reading from the database so it doesn’t necessarily mean that no data can be written.

I’m glad you got it working but I wanted to clear up those two points for future readers.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.