Some nice to haves ...

Hi Richard,

Whilst using PLEG to implement my home automation I have though of a few things that are missing or would be nice to have. I have hopefully kept my suggestions to a sensible level! In my order of preference these are …

  1. Add a new STRICT qualifier (suggested name) for sequence expressions which would additionally check that for each sequence token X which isn’t a property, that #X > #!X. For example, the expression (STRICT LightOff ; Motion > 10) would be true only if Motion was fired 10 seconds after LightOff, and in addtion that #LightOff > #!LightOff i.e. the light has not been switched on within that 10 seconds. (For ordered sequences the last token needn’t be checked as #X > #!X will always be true.) The current workaround is to use an expression like LightOff AND (LightOff ; Motion > 10) but this is not entirely correct.

  2. On the condition editor, add an “Add Row” button under every condition name, instead of just at the bottom of the list. This could be positioned below each conditon name next to the + and -, or next to the delete button at the end of each row. When an “Add Row” button is clicked a new conditon would be created below the condition hosting the button. This will clearly make it a lot easier to add (groups of) conditions near the top of the list.

  3. Add the ability to custom order the trigger, schedules, and device properties, or at least (have the option to) display them in alphabetical order.

  4. Add notifications linked to state variable changes.

Keep up the good work!

Regards

BZ

Added to the list … but I am not convinced we need #1

Hi Richard, number 1 is not strictly needed as it can be replicated using existing expressions as stated. However, the intent is needed as (LightOff ; Motion) may fire even if LightOff is false. It is a common requirement for (LightOff ; Motion) to only fire if the light is still off. This is the intent I want to capture fully with the STRICT qualification. Anyway, I leave it to your better judgement.

BZ

I agree with Richard, all are very nice, except number one which can be accomlished with a little more syntax with ANDs and ORs. Number 2 and 3 are great!

On reflection, item 1 is not needed in favour of user defined functions. I could achieve the same effect by defining a user function

STRICT (X,Y, T) = (X ; Y > T) AND (#X > #!X).

So, I would go for user defined functions instead!

BZ

[quote=“bigzippy, post:5, topic:179367”]On reflection, item 1 is not needed in favour of user defined functions. I could achieve the same effect by defining a user function

STRICT (X,Y, T) = (X ; Y > T) AND (#X > #!X).

So, I would go for user defined functions instead!

BZ[/quote]
What do you mean? User defined function in LUA code?

Function Library/User Defined Functions/Macro’s … are already on the list …
I have been hesitant because I need to decide on where the limit to PL is and where LUA should start.

Also LUA support has been requested.

[quote=“RichardTSchaefer”]Function Library/User Defined Functions/Macro’s … are already on the list …
I have been hesitant because I need to decide on where the limit to PL is and where LUA should start.

Also LUA support has been requested.[/quote] Maybe an easy and useful way would be to just let pleg call lua functions, this can be done in only one line so each time can pass different values in in the arguments of the functions.

Function({(param1)},{(param2)},…,{(paramN)})

[quote=“Vreo, post:8, topic:179367”][quote=“RichardTSchaefer”]Function Library/User Defined Functions/Macro’s … are already on the list …
I have been hesitant because I need to decide on where the limit to PL is and where LUA should start.

Also LUA support has been requested.[/quote] Maybe an easy and useful way would be to just let pleg call lua functions, this can be done in only one line so each time can pass different values in in the arguments of the functions.

Function({(param1)},{(param2)},…,{(paramN)})[/quote]

Good add-on, right now I have PLEG call a scene, having put my Lua in the scene.