|
|
|
|
|
Re: New Modular Rule Concept [message #1697890 is a reply to message #1697834] |
Tue, 09 June 2015 11:18 |
Marin Mitev Messages: 22 Registered: December 2014 |
Junior Member |
|
|
Chris Jackson wrote on Mon, 08 June 2015 18:36Hi Kai,
No-one has commented on the suggestion of an "initialisation" and "termination" block ...
...
I'm wondering if there should be an initialisation and termination block definition that ensures that a rule is initialised correctly, and also if it's disabled, it can appropriately close things down. For example, if we had a rule that controlled a heater, we might want to set up some variables when the rule is first run, and then when it's deactivated for some reason, we might want to ensure that the heater is turned off?
Chris
This is interesting use-case, but it is not supported in that way currently. Maybe it could be covered by events generated by the engine when rule is executed or disabled, however this will require a separate rule, which may not be very convenient...
|
|
|
Re: New Modular Rule Concept [message #1697896 is a reply to message #1697890] |
Tue, 09 June 2015 12:35 |
Chris Jackson Messages: 256 Registered: December 2013 |
Senior Member |
|
|
Quote:
... but if you want to display it as a description text, then I think it is already covered by the description element which is already present in each building block: the modules, rules, rule templates and module types. So the tooltip shown in Rule designer can display those description elements, and they can be localizable
Ok - I didn't realize that there was a "description" element in all parts of the definition. I'm not completely sure how/why this is localisable though as the input would be free-form input that is entered by the user when they are 'writing' a rule - not something that is defined by a module provider (sorry if I use the wrong terminology). I just say this as I'm worried we might be talking at cross terms? In the HABmin rule designer that I referenced, the comment boxes have information that is entered by the user to describe the rule they are writing so that they can remember how it works when they look at it 12 months later.
Quote:
This is interesting use-case, but it is not supported in that way currently. Maybe it could be covered by events generated by the engine when rule is executed or disabled, however this will require a separate rule, which may not be very convenient...
Yes, I think this would be inconvenient, and prone to error. My example use case is to control a heater - I have a rule that turns the heater, and a fan, on and off depending on different inputs (temperature, humidity and time). When this rule is disabled, I want to ensure the heater is disabled - I think having to add a separate rule and manage the link could go wrong and I would suggest that this should be added to the todo list (maybe not for the first release, but in the pipeline).
Likewise for the initialization - I think there needs to be some way to initialize a rule - the initialization block seems a clean approach, but maybe there's a better/alternative way...
Thanks.
Cheers
Chris
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: New Modular Rule Concept [message #1711375 is a reply to message #1711105] |
Thu, 15 October 2015 12:08 |
Kai Kreuzer Messages: 673 Registered: December 2011 |
Senior Member |
|
|
Quote:Probably we will need other contexts, e.g., date / time, state etc. Are they going to be predefined?
Yes, that's the plan.
Quote:Other issue that I think should be addressed is how to match between triggers and conditions.
Correct. Besides the type (as a very simple check if inputs and outputs can be matched), we plan to use the tags for this purpose, where the tags define the semantics of the input/output. As with contexts, a default set of tags will need to be defined.
Quote:Also, do you plan to add above / below triggers / conditions to the automation module core?
Possibly yes, but I would want trying to keep the set of "core" modules small. Probably it makes sense to start with a "comparison" condition, which has the comparator (=, <, >, !=, <=, >=) as a configuration option.
|
|
|
|
|
|
|
|
|
|
|
|