Sometimes I receive this warning. Is it because the Item is updated every second?
2023-03-28 15:45:01.925 [WARN ] [d4j.internal.RRD4jPersistenceService] - Failed to open rrd4j database 'timerOfficeLight' to store data (java.lang.IllegalStateException: request interrupted for file:///var/lib/openhab/persistence/rrd4j/timerOfficeLight.rrd)
If I want to display the countdown in HABPanel I can not format it to the wished format
I have no idea what timerOfficeLight is and how it relates to anything else. This is the first time I’ve seen it - you haven’t mentioned it above I think.
Unfortunately I have zero knowledge about HABPanel. I have never used it. Have you tried reading the documentation? That’s what I would do before scouring the forums.
timerOfficeLight is an Number:Time Item
I changed your Timeout item and rename it to timerOfficeLight
In the item language it would be like that:
Number:Time timerOfficeLight "Timer countdown"
In the item configuration the pattern for the State Description is %tT this gives me a nice format.
Unfortunately I do not know how to format it into javascript recognised by the HABPanel widgets. Neither %tT nor HH:mm:SS work
2023-03-29 08:49:48.461 [WARN ] [ore.internal.scheduler.SchedulerImpl] - Scheduled job '<unknown>' failed and stopped
java.lang.NullPointerException: cannot invoke method public boolean org.openhab.core.model.script.actions.Timer.cancel() on null
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeOperation(XbaseInterpreter.java:1177) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeOperation(XbaseInterpreter.java:1167) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._invokeFeature(XbaseInterpreter.java:1153) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.invokeFeature(XbaseInterpreter.java:1098) ~[?:?]
at org.openhab.core.model.script.interpreter.ScriptInterpreter.invokeFeature(ScriptInterpreter.java:151) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:878) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:243) ~[?:?]
at org.openhab.core.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:226) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:227) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:475) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:251) ~[?:?]
at org.openhab.core.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:226) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:227) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:488) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:267) ~[?:?]
at org.openhab.core.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:226) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:227) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter._doEvaluate(XbaseInterpreter.java:475) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.doEvaluate(XbaseInterpreter.java:251) ~[?:?]
at org.openhab.core.model.script.interpreter.ScriptInterpreter.doEvaluate(ScriptInterpreter.java:226) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.internalEvaluate(XbaseInterpreter.java:227) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.XbaseInterpreter.evaluate(XbaseInterpreter.java:213) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.ClosureInvocationHandler.doInvoke(ClosureInvocationHandler.java:47) ~[?:?]
at org.eclipse.xtext.xbase.interpreter.impl.AbstractClosureInvocationHandler.invoke(AbstractClosureInvocationHandler.java:30) ~[?:?]
at com.sun.proxy.$Proxy424.apply(Unknown Source) ~[?:?]
at org.openhab.core.internal.scheduler.SchedulerImpl.lambda$12(SchedulerImpl.java:191) ~[?:?]
at org.openhab.core.internal.scheduler.SchedulerImpl.lambda$1(SchedulerImpl.java:88) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) [?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) [?:?]
at java.lang.Thread.run(Thread.java:829) [?:?]
Some more explanation…
I have an office room without the wall switches (they are physically but have been placed behind the furniture) The only way to lighten the office is movement recognition and time controlled lighting.
I know it is not the best way but only this one i was concentrating on.
By the way I very appreciate your support. You were able to help me in resolving quite big part of the problem. I am not a developer so I would not be able to resolve that issues without your support. Thanks for that again!
I don’t use rrd4j persistence, and I don’t really know how the “default” settings are and where / how to change it. Apparently openhab is shipped with rrd4j by default and it persists every item by default. @rlkoshak do you know how to exclude one particular item from the “default” rrd4j config?
Here’s the documentation and explanation about persistence:
and
Yeah, I know they have the same title… confusing even to me, but they are two different articles / pages.
this is what I was afraid of.
I can assume because the item is a Number:Time type we need to parse value to the single days. Hovewer, what is confusing me that for the same item I use state description %tT and it is working in the UI.
BTW. I opened a new post dedicated to this problem. To not confuse subjects with Timers and HABPanel.
Only by creating and defining an rrd4j.persist file where you define specifically those Items you do want to save. There is no way to say “all but this one Item”. It’s either all Items or only those items listed that get saved.
You could also just post "20 min" and OH will convert to seconds or hours or whatever as required. One of the purposes of units is that we do not need to convert between compatible units ourselves.
HABPanel is, relatively speaking, old. There were minimal updates made to it between OH 2 and OH 3. It doesn’t know anything about the State Description Pattern. I never used HABPanel either so I don’t know it if handles the pattern when defined on the Item’s label, but for that I think you might need to define the Items in text files.