I am unable to test this now since I avoid updates during winter time
I used npm from debian repo to install the helper, perhaps that is the issue. Unfortunately I do not use the openhabian, I am not sure what you refer with that.
openHABian comes with a config tool to install/remove lots of third party stuff like Mosquito, Frontal, etc. openhab-rules-tools is included among those.
I believe new installs of openHABian will install it by default.
Hi,
I am new in rule templates at all and I am feeling to be an idiot, since I cannot find any rule or blockly template below âSettings>Automation>Languages & Technologiesâ as described in the docs.
My question here: What is overseen by myself to install rule templates?
I try to find help since hours on the web⊠but it seems, I am the only one whoâs affectedâŠ
I use openhabian 3.4.0 (migrated over the time from 2.something) on a RasPi 4.
Most of the config comes from files, but step by step moving to UI.
May somebody is able to point me to the right direction.
Thanks!
Hi Christian,
thanks for your short time reply.
But what should I say: If I click on the plus sign inside the rule list to add a new rule, the upcoming window does not showcase âCreate from Templateâ as you see in the following picture:
If you scroll down within âautomationâ you should see the rules templates. As the rules templates are online you need a working internet connection so that they show up
Hi Locke,
thanks, since it looks like to be a more general problem in my installation environment, I opened an extra thread, outside of âdebounceâ.
/Mav
Hi Rich,
thanks for the hint. The setting were enabled already, but disabling and re-enabling solved the problem⊠the missing sections now appeared.
BR
/Mav
For a long time I was looking for a feature to lower the knx traffic while updating temperature values from one âResolâ-binding to the âknxâ-binding without typing tons of rules. So at this point thanks for that!
Formerly I had an item definition to âfollowâ the Resol data and update the values to knx:
This âfollowâ-profile works, but the values are being updated every 6 to 10 seconds. Far too much traffic within the knx line with a lot of unused data.
I tried the following item definition to âdebounceâ the Resol binding temperature values by 3 minutes:
The ârawâ Item should be linked to the Channel.
The ârawâ Item should be a member of the Debounce Group.
The "debounced " Item should not be linked to anything. No channels, no follow profile, nothing. The only source of itâs state will come from the Debounce rule. If you need to cause the debounced value to be sent back out to another Channel, you can link the Item to a Channel but set the âcommandâ option to âtrueâ.
This version of the rule template was written in Nashorn JS so nothing else needs to be installed. If you are running this on OH 4, please use Debounce [4.0.0.0;4.1.0.0) instead. Note that if you remove the template and readd it after moving to OH 4 it will install this version. OH 4 requires the JS Scripting add-on to be installed but it also has a lot of error checking and if there is something wrong it will report it.
thanks @rlkoshak - I got it working. For some reason the group was not correct configured as trigger for the rule.
What is striking: The first value is written to the proxy item once the timer has expired for the first time. My stats are updated every 6-10 seconds through the âResolâ -binding. However, the proxy item remains NULL and only after the specified debounce time period has elapsed the proxy item had received a value. From my point of view, it would make more sense, if the first incoming value would already been send to the proxy item in case the item never got a value before. Especially when the debounce time is âveryâ long (for example hours). In my case it is just 3 minutes and it is no problem, that one has to wait 3 minutes (for example on a restart) before the first usable values are coming in.
With default persistence configs that restore the state of all Items on startup, this case will only happen once, when the Item is first created. After that point it will always have a state so I donât really see a need to add that as an option (note the opposite is equally as valid, always wait the debounce period, which adds a good bit of complexity to the rule to support a rare case.
If the debounce is that long you probably should not use this rule template and instead code something that can handle a restart of OH more gracefully. But even so, in that case a manual update of the debounce Item when itâs first created would address that problem.
Hi @rlkoshak ,
Iâve just upgraded from 3.4 to 4.0.3 and it has stopped working.
Iâve read that you can change the script type to application/javascript;version=ECMAScript-2021, but Iâve changed the two instances of application/javascript to application/javascript;version=ECMAScript-2021 and it still doesnât work.
How should I do this?
Thanks.
Ideally you should delete the rules, remove the rule template, and install the rewritten rule that was rewritten for OH 4. Debounce [4.0.0.0;4.9.9.9]
If you want to try to keep this old version you need to either:
Install the Nashorn JS add-on and change the type to application/javascript;version=ECMAScript-5.1
Install the GraalVM add-on and leave the type application/javascript
But Iâve rewritten all of my rule templates for OH 4 and you should really move to the newer ones. Iâm not going to maintain these 3.x versions of the template and the new ones work better and have better error checking. Some of the rule templates have changed behaviors slightly so be sure to read the docs for the template.