This is something I just struggled with, too. Looking at habmin didn’t help, because at least for me, it isn’t showing the latest data. @chris: I was just about to ask you on that. My habmin downloaded from GitHub (v0.1.4-snapshot or so, I believe that’s still the latest one ?) is 12-24 hours behind time on most values. Some values are current, others are not. So far, I have been unable to decipher what makes the difference here. Any rough idea what to check for ? The values WERE put into the database, as I’ve checked with the method below
@Andrew_Pawelski:
Try adding this to logback.xml (I think you’ll spot the line where to insert it):
to debug rule execution.
Now what to do if the values ARE in and it still doesn’t work, I don’t know. I, too, thought that was a problem of my persistence, but it the end, that just turned out to be an ordinary syntax error in my rule.
Note also the hint in persistence Wiki pages about restoreOnStartup and that it can take some time for item states to restore after startup.
You need to install the binding jar, of course, i.e. put org.openhab.persistence.db4o-<some version>.jar into the addons directory.
Note that IIRC the default is rrd4j (define in openhab.cfg), so eventually change that && restart openHAB.
OK I guess I should have worked that out - wasnt in the wiki under install. OK I have installed the rrd4j binding and created a rrd4j.persist
I have checked the openhab.cfg and is using as you said the default.
Ensure you use habmin display for rrd4j values (it might default to some other mechanism - it’s the icon at the bottom right).
Do you see the items under ‘configuration’ ? If not, your problem might be unrelated to persistence (e.g. file access rights)
If that ain’t it, I’m not sure. Could be anything, then. Means you need to go all the way, step by step, then, to find out what’s missing. Enable debug logs … does the binding start, do you see log lines showing startup and/or errors ? Do you see lines claiming values get stored ? (see my previous post w.r.t logging)
[quote=“Andrew_Pawelski, post:6, topic:2942, full:true”]
I still see nothing in habmin?[/quote]
Habmin is a bit tricky at this point: supposed your setup is correct and data are stored, you need to go to the persistence tab, under “Label” you should see your persisted switches, contacts or whatever, highlight one with your mouse, click on update, go to the right hand side of the screen, click on chart (at the bottom), then click on table … at least NOW you should see your data.
If you can’t see anything under “Labels” your setup is wrong.
OK thanks for clarifying - I am in the right spot in habmin but nothing which means I must have something wrong set up wise. I hope you still have the patience to help? I’m sure its something I have overlooked.
I have the rrd4j binding appearing at the bottom right of habmin and here are my bindings - I’m sure I have more than I need in there but that isn’t the problem is it?
my openhab.cfg file has this line:
persistence:default=rrd4j
my rrd4j.persist file is this:
// persistence strategies have a name and a definition and are referred to in the “Items” section
Strategies {
everyHour : “0 0 * * * ?”
everyDay : “0 0 0 * * ?”
// if no strategy is specified for an item entry below, the default list will be used
default = everyChange
}
/*
Each line in this section defines for which item(s) which strategy(ies) should be applied.
You can list single items, use “" for all items or "groupitem” for all members of a group
item (excl. the group item itself).
*/
Items {
// persist all items once a day and on every change and restore them from the db at startup
// careful, this might result in huge databases - that’s why it is in comment here
OK i changed the openhab.cfg file to use db4o, created a db4o.persist file, and actually removed the rr4j persistance file and binding but still no good. based on the bindings above there is an exec and a logging binding is there any others needed?
in etc there is a db4o folder and inside that store.db4o with a recent date stamp and I have a sensor that is updating and the date stamp is changing but nothing in habmin?
as I had already asked once: do you see any items under ‘configuration’ ?
If no, your habmin setup is bad (maybe in addition to a bad persistence setup, but then, either way, you need to debug habmin first).
If so, check jetty server logs, and if the openHAB config files can be accessed by the UNIX user that your webserver/habmin runs as.
My situation is similar to OP. I am running Openhab on RPi2 and my persistence is setup with mysql. I am able to draw graphs via “Chart item=” in the classic UI. I even see the data in mysql.
In Habmin i can see the items in configuration but in the persistence tab there are no items. I have the mysql selected in bottom right.
I have selected default persistence service to mysq in openhab.conf.
Typically, this would indicate that while you have items configured, the mysql.persist file is not configured? Have you enabled the items persistence in this file (or in HABmin, which will result in the file being updated).
this is my default.items file :
Number QubinoPlug_1_Energy “Switch #1 consumption [%.1f W]” (Energy_Chart) { zwave=“3:command=meter” }
Number QubinoPlug_2_Energy “Switch #2 consumption [%.1f W]” (Energy_Chart) { zwave=“5:command=meter” }
Number Temp “Inside Temperature [%.1f °C]” (Weather_Chart) {zwave=“4:command=Sensor_multilevel,sensor_type=1”}
Number Lux “Lux: [%.2f Lux]” {zwave=“4:command=Sensor_multilevel,sensor_type=3”}
Number Movement “Movement: [%s]” {zwave=“4:command=sensor_binary”}
…
Data get populated in the mysql database and i am even able to draw graphs from them in classicUI via Item graph.
Is there some other config i should set them up for Habmin to see them ?
Thanks
Maybe this JAR is too old? I would make sure you’re using the latest version just to be sure since I don’t remember when the persistence features to read items was added.
The latest JAR is from 1.7 so I would definitely change to this version.
thanks will try the jar
I am also getting this in the output not sure if its related or something different but problematic
[o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule ‘Lights off when Play Starts’: The name ‘.historic_state()’ cannot be resolved to an item or type.
I was also running 1.5.0 have grabbed 1.7.0 noticed it is only 35kb?
the web interface runs but never goes to online status- I just dropped the jar into addons was there anything else I needed to do (also rebooted) to get that running?
This is a common problem with downloads from GitHub - they often terminate early. Try again, or go to the GH site directly and click the raw button - it seems a bit hit and miss when downloading binaries from GH
Hey Chris,
I updated the habmin to org.openhab.io.habmin-1.7.0-SNAPSHOT.jar. Now after restart habmin states that openhab is offline in upper right corner.
I also tried to update z-wave binding to attached org.openhab.binding.zwave-1.8.0-SNAPSHOT.jar.
z-wave is working but habmin still shows offline.
My java version is
java version “1.8.0”
Java™ SE Runtime Environment (build 1.8.0-b132)
Java HotSpot™ Client VM (build 25.0-b70, mixed mode)