openhab-docs
openhab-docs copied to clipboard
Persistence: Wrong example in docs
@bgilmer77, you've recently updated this article: http://docs.openhab.org/configuration/persistence.html#items
According to it I just wanted to define a minimal config of this format:
Strategies {
default = everyUpdate, restoreOnStartup
}
Items {
Whg_Heating_Mode
}
The latter doesn't seem to evaluate and yields:
Configuration model 'mapdb.persist' has errors, therefore ignoring it: [6,5]: no viable alternative at input 'Whg_Heating_Mode'
Wdyt?
@ThomDietrich would you like me to see if I get the same results on my dev machine?
Plus correcting the article, yes :)
@Confectrician , I checked but this example is not there anymore and / or already fixed. This issue can be closed.
Thanks for the catch.
This is still not working.
Search for the minimal configuration using "GF_Hall_Light" in the link above and you'll get something like "Configuration model 'mapdb.persist' has errors, therefore ignoring it: [6,5]: no viable alternative at input 'Whg_Heating_Mode'"
Please be aware that docs.openhab.org may be an old link. https://www.openhab.org/docs/configuration/persistence.html is the link we are redirected to.
Could you please post your whole .persist file (as the error emerges for another Input)?
Here is the link: https://www.openhab.org/docs/configuration/persistence.html#items
Here is the content of my jdbc.persist file:
Strategies {
everyHour : "0 0 * * * ?"
default = everyChange
}
Items {
Total_Energy
}
Here is the error:
2019-11-23 21:06:22.095 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'jdbc.persist' has errors, therefore ignoring it: [7,2]: no viable alternative at input 'Heating_Energy'
While this content works fine:
Strategies {
everyHour : "0 0 * * * ?"
default = everyChange
}
Items {
Total_Energy : strategy = everyChange
}
Just ran into the same problem. Strategy needs to be explicitly declared for each item.