Any suggestion on how to import isNumeric() back into the rules DSL for use? I’ve tried just importing org.apache.commons.lang.StringUtils at the top but I can’t seem to get the syntax for StringUtils working correctly.
That would have worked had you used “32” instead of “32.7”. It very literally only looks for 0-9 as the only characters, the decimal point caused it to fail.
I really like where Openhab is going with these releases! Some quirks that I have observed so far:
time to boot openhab up is significantly longer than it was with openhab 2 (now ~5 minutes, before ~30 seconds)
overall a tad less snappy than OH2, especially latency between physical interaction and reaction of the system
sometimes most of my rules just stop working. Right now I can’t make them work anymore, but since its in the middle of the night now I give up
All rules have been imported from OH2 rules files.
Relevant Log entries (interesting: Caused by: java.lang.IllegalStateException: Cannot create a duplicate value ‘newState’.):
[ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule ‘licht-2’: Fail to execute action: script
[DEBUG] [e.automation.internal.RuleEngineImpl] -
java.lang.RuntimeException: Fail to execute action: script
at org.openhab.core.automation.internal.RuleEngineImpl.executeActions(RuleEngineImpl.java:1187) ~[bundleFile:?]
at org.openhab.core.automation.internal.RuleEngineImpl.runRule(RuleEngineImpl.java:987) [bundleFile:?]
at org.openhab.core.automation.internal.TriggerHandlerCallbackImpl$TriggerData.run(TriggerHandlerCallbackImpl.java:91) [bundleFile:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
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:834) [?:?]
Caused by: java.lang.IllegalStateException: Cannot create a duplicate value ‘newState’.
at org.eclipse.xtext.xbase.interpreter.impl.DefaultEvaluationContext.newValue(DefaultEvaluationContext.java:46) ~[?:?]
at org.openhab.core.model.script.runtime.internal.engine.DSLScriptEngine.createEvaluationContext(DSLScriptEngine.java:143) ~[?:?]
at org.openhab.core.model.script.runtime.internal.engine.DSLScriptEngine.eval(DSLScriptEngine.java:118) ~[?:?]
at org.openhab.core.automation.module.script.internal.handler.ScriptActionHandler.lambda$0(ScriptActionHandler.java:62) ~[?:?]
at java.util.Optional.ifPresent(Optional.java:183) ~[?:?]
at org.openhab.core.automation.module.script.internal.handler.ScriptActionHandler.execute(ScriptActionHandler.java:59) ~[?:?]
at org.openhab.core.automation.internal.RuleEngineImpl.executeActions(RuleEngineImpl.java:1179) ~[bundleFile:?]
… 7 more
In respect to time to start, im having the opposite issue. When I go to shutdown it can take 5 minutes for everything to stop. From what I can tell, the bindings stop pretty quickly as my things all go offline. My rules however continue to kick for several minutes (most are cron based execution so not triggered by items). This was not an issue on OH2.
The YAML stringifier will add double-quotes automatically for strings where there might be an ambiguity on their type, the < character is probably key here, the other values could maybe be considered to be numbers so it added the quotes.
The formatting of some floating point numbers in channels raises exceptions. I have attached two examples for Eltako devices from the EnOcean binding.
The first is the total feed of a smart power meter (Eltako FSS12), the second one is the humidity measure provided by a sensor (Eltako FIFT63AP). The data from other channels of the two devices are formatted correctly.
15:59:11.845 [WARN ] [se.internal.SseItemStatesEventBuilder] - Exception while formatting value '66047.4 kWh' of item PVEinspeisezahler_TotalUsage with format '%d %unit%': d != java.math.BigDecimal
15:55:34.907 [WARN ] [se.internal.SseItemStatesEventBuilder] - Exception while formatting value '48.8' of item SensorBadOG_Humidity with format '%d %%': d != java.math.BigDecimal
Hi @rlkoshak - I upgraded my openhab instance to OH3 M2 using the Openhabian beta menu item. Unfortunately, frontail is configured to point to /var/log/openhab2/openhab.log and /var/log/openhab2/events.log. Do you happen to know where these directories are configured for frontail?
I looked in /lib/system.d/system and could not find the service file there.
Thank you for the quick response. I have just started with openHAB and little experience with Java (although much experience with other languages). As far as I have understood the formats for the channel data are determined by the Eltako binding. In channels.xml I found these:
<channel-type id="humidity">
<item-type>Number</item-type>
<label>Humidity</label>
<description>Relative humidity level in percentages</description>
<category>Humidity</category>
<state min="0" max="100" step="1" pattern="%d %%" readOnly="true"/>
</channel-type>
<channel-type id="totalusage">
<item-type>Number:Energy</item-type>
<label>Total Usage</label>
<description>Used energy in Kilowatt hours</description>
<state pattern="%d %unit%" readOnly="true"/>
<config-description>
<parameter name="validateValue" type="boolean">
<label>Validate Value</label>
<description>Filter out increases more than 10.0 kWh and decreases less than 1.0 kWh</description>
<default>false</default>
</parameter>
</config-description>
</channel-type>
Can I reformat these values myself? Or should I contact the maintainer(s) of the binding to change these settings?
Seems like expire binding still has some outstanding issues but it’s already 2 weeks since M2. Can I make a little request that M3 waits for expire binding? I’m sure I’m not the only one that relies on it for migrating in from 2.5.