I recently migrated from Openhab 1.8 to 2. And i must say i like it.
I got everything working (again) except Charts in Basic / Classic UI or Android (Habdroid).
I have for example these items:
Group gChilli
Number Temp1DS1 "Anzuchtbox [%.1f °C]" (gChilli) {mqtt="<[mosquitto:1DS/Temp1:state:default]>"}
Number Temp1DS2 "Heizung [%.1f °C]" (gChilli) {mqtt="<[mosquitto:1DS/Temp2:state:default]>"}
I do not use any other persitence. The default persistence in Paperui --> System is rrd4j.
I think persistence is working since i can look at charts of my items in Habmin. When i look at my Sitemap (in Basic/Classic UI) in the Position where the chart should be there is a icon for a missing graphic… (where the arrow points)
As rrd4j only stores numeric values, I’m not sure your persistence could work like this. When you define “*” (therefore all items) as persisted, there surely are non-numeric items, right?
What happens when you reduce your rrd4j.persist to
What i do not get is:
That In HABmin i can see that persistence is working (at least that is what i think) as i can create Charts. So some Data must be available.
See here. This are the two sensor-values in gChilli.
OH 1.8 wasn’t as much restrictive with “non-100%-compliant” definitions. E. g. you could get ON/OFF items displayed as 0/1 automatically. This doesn’t work anymore in OH2.
I don’t know if HABmin uses the same persistence data (but I think it does…), so this is really strange.
Have a look at /var/lib/openhab2/persistence/rrd4j. Are your persisted items listed as an rrd file there? If so, do the timestamp of the file changes every minute? If so, your persistence is working and it “only” seems to be a display issue.
The log files are in /var/log/openhab2. But maybe you have to switch the log level to DEBUG to see what’s going wrong. Details about logging in OH2 can be found here:
Oh …
last change on gChilli was yesterday. Also the screenshot of the chart i posted in habmin shows yesterday not today i did not realise that until now. so there is something wrong with my persistence.
I had a look at the log file. It is quite huge so i tried to pick out what is important and found these 2 Things so far
2017-02-19 10:24:12.829 [WARN ] [eclipse.jetty.servlet.ServletHandler] -
javax.servlet.ServletException: Could not get chart provider.
and
2017-02-19 10:34:46.786 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'rrd4j.persist'
2017-02-19 10:34:46.855 [WARN ] [.core.persistence.PersistenceManager] - Failed to delete cron job for dbId 'rrd4j'
2017-02-19 10:34:47.825 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'rrd4j.persist'
2017-02-19 10:34:47.946 [ERROR] [.core.internal.folder.FolderObserver] - Error handling update of file '/etc/openhab2/persistence/rrd4j.persist': null.
java.lang.NullPointerException
at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.removeFutures(ExpressionThreadPoolManager.java:321)[98:org.eclipse.smarthome.core:0.9.0.b4]
at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.remove(ExpressionThreadPoolManager.java:291)[98:org.eclipse.smarthome.core:0.9.0.b4]
at org.eclipse.smarthome.core.scheduler.ExpressionThreadPoolManager$ExpressionThreadPoolExecutor.remove(ExpressionThreadPoolManager.java:308)[98:org.eclipse.smarthome.core:0.9.0.b4]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.removeTimers(PersistenceManagerImpl.java:321)[103:org.eclipse.smarthome.core.persistence:0.9.0.b4]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.stopEventHandling(PersistenceManagerImpl.java:377)[103:org.eclipse.smarthome.core.persistence:0.9.0.b4]
at org.eclipse.smarthome.core.persistence.internal.PersistenceManagerImpl.removeConfig(PersistenceManagerImpl.java:348)[103:org.eclipse.smarthome.core.persistence:0.9.0.b4]
at org.eclipse.smarthome.model.persistence.internal.PersistenceModelManager.modelChanged(PersistenceModelManager.java:85)[125:org.eclipse.smarthome.model.persistence:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.notifyListeners(ModelRepositoryImpl.java:207)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.ModelRepositoryImpl.addOrRefreshModel(ModelRepositoryImpl.java:120)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.checkFile(FolderObserver.java:272)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver.access$1(FolderObserver.java:265)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.model.core.internal.folder.FolderObserver$WatchQueueReader.processWatchEvent(FolderObserver.java:146)[122:org.eclipse.smarthome.model.core:0.9.0.b4]
at org.eclipse.smarthome.core.service.AbstractWatchQueueReader.run(AbstractWatchQueueReader.java:122)[98:org.eclipse.smarthome.core:0.9.0.b4]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
There shouldn’t be a gChilli file in the /var/lib/…/rrd4j, as this is only a group. You should have Temp1DS1.rrd and Temp1DS2.rrd files.
But there seems to be a general problem with your rrd4j.persist file. Have you created it using Windows notepad or stuff like that? You should at least use notepad+ or better: Do it on a Linux shell on your Pi or with the Eclipse Smart Home Designer.
Normally i use Notepad++ or the Eclipse SHD but i might have opend it with notepad or whatever today or yesterday.
I deleted the rrd4j.persist file and all *.rrd4j files in /var/lib,
then i created a new rrd4j persist file with the Eclipse Smarthome Designer.
still the same error when i save the file & and no new files in /var/lib/openhab2/persistence/rrd4j
2017-02-19 11:32:12.555 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'
2017-02-19 11:32:12.880 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'rrd4j.persist'
2017-02-19 11:32:12.992 [ERROR] [.core.internal.folder.FolderObserver] - Error handling update of file '/etc/openhab2/persistence/rrd4j.persist': null.
did the same on the py with nano. ( delete, create , save check log file) still the same.
Checked the “line endings” (or whatever they are called in english) in the rrd4j.persist file with notepad++ they are "LF"
the persist file i create looks like this
According to the wiki this definition is not allowed. You can either define one or more items (Temp1DS1, Temp1DS2) without a *, or a group with a * (gChilii*).
Maybe this also results in an error (not sure if this is relevant here…).
Can you try and set up another persistence? Just to check if this service is running without error log entries?
Something like mapdb for restoreOnStartup? The persist file is easy and could look like this:
Strategies {
default = everyUpdate
}
Items {
// persist all items on every change and restore them from the MapDB at startup
* : strategy = everyChange, restoreOnStartup
}
And it’s always good to have such a persistence running. So no waste of time.
I noticed another thing i cannot explain. I tried different things now out of desperation restarting the openhab service several times. Each time openHAB starts i get several of the the following errors. Still everything except the persistence/charts is working fine. Could this have something to do with it?
2017-02-19 23:14:48.357 [ERROR] [org.eclipse.smarthome.ui ] - FrameworkEvent ERROR - org.eclipse.smarthome.ui
java.util.zip.ZipException: Exception in opening zip file: /var/lib/openhab2/cache/org.eclipse.osgi/136/0/.cp/lib/xchart-2.2.1.jar
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:301)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.basicOpen(ZipBundleFile.java:85)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.getZipFile(ZipBundleFile.java:98)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.checkedOpen(ZipBundleFile.java:65)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.storage.bundlefile.ZipBundleFile.getEntry(ZipBundleFile.java:232)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.buddy.DependentPolicy.loadClass(DependentPolicy.java:55)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.buddy.PolicyHandler.doBuddyClassLoading(PolicyHandler.java:141)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:427)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.buddy.DependentPolicy.loadClass(DependentPolicy.java:55)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.buddy.PolicyHandler.doBuddyClassLoading(PolicyHandler.java:141)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:427)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_121]
at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_121]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)[:1.8.0_121]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.sources.SingleSourcePackage.loadClass(SingleSourcePackage.java:36)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:398)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_121]
at java.lang.ClassLoader.defineClass1(Native Method)[:1.8.0_121]
at java.lang.ClassLoader.defineClass(ClassLoader.java:763)[:1.8.0_121]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_121]
at org.eclipse.emf.ecore.xmi.XMIPlugin$Implementation$Activator.createBundle(XMIPlugin.java:85)[66:org.eclipse.emf.ecore.xmi:2.11.1.v20150805-0538]
at org.eclipse.emf.common.EMFPlugin$OSGiDelegatingBundleActivator.createBundleHelper(EMFPlugin.java:187)[64:org.eclipse.emf.common:2.11.0.v20150805-0538]
at org.eclipse.emf.common.EMFPlugin$OSGiDelegatingBundleActivator.<init>(EMFPlugin.java:180)[64:org.eclipse.emf.common:2.11.0.v20150805-0538]
at org.eclipse.emf.ecore.xmi.XMIPlugin$Implementation$Activator.<init>(XMIPlugin.java:80)[66:org.eclipse.emf.ecore.xmi:2.11.1.v20150805-0538]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.8.0_121]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_121]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_121]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[:1.8.0_121]
at java.lang.Class.newInstance(Class.java:442)[:1.8.0_121]
at org.eclipse.osgi.internal.framework.BundleContextImpl.loadBundleActivator(BundleContextImpl.java:755)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:706)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:941)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:318)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.Module.doStart(Module.java:571)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.Module.start(Module.java:439)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
Caused by: java.util.zip.ZipException: invalid END header (bad central directory offset)
at java.util.zip.ZipFile.open(Native Method)[:1.8.0_121]
at java.util.zip.ZipFile.<init>(ZipFile.java:219)[:1.8.0_121]
at java.util.zip.ZipFile.<init>(ZipFile.java:149)[:1.8.0_121]
at java.util.zip.ZipFile.<init>(ZipFile.java:163)[:1.8.0_121]
at org.eclipse.osgi.framework.util.SecureAction.getZipFile(SecureAction.java:288)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
... 75 more