Please Take a Critical Look at my Logic.

I’m trying a simple PLEG that will set the House Mode to Away Mode when it is in Home Mode and any of my locks are locked using the Lock Button.

Am I on the right track?

TIA

After Reloading the LUA I get this error:

“Program Logic Event Generator (PLEG)[348] : m11 AND ( t1_Laundry_Door_Locked OR t2_Front_Door_Locked OR t3_Back_Door_Locked ): Invalid Value token: M11”

Not sure how M11 got in there and not sure where to go to delete it.

Made a few tweaks now this:

“Set to Away[348] : Home AND ( t1_Laundry_Door_Locked OR t2_Front_Door_Locked OR t3_Back_Door_Locked ): Invalid Value token: HOME”

Rename the Mode Naming to m_Home with the Mode HOME. This is not necessary, but will help you understand that it is a House Mode setting and helps clarify the condition parameters later on, if you ever need to revisit your code and logic.
Replace

m11 AND ( t1_Laundry_Door_Locked OR t2_Front_Door_Locked OR t3_Back_Door_Locked )

with

m_Home AND ( t1_Laundry_Door_Locked OR t2_Front_Door_Locked OR t3_Back_Door_Locked )

m11 came to be when the Mode was created and either immediately deleted or renamed. It is the second instance of the m1 auto-named mode, so it could have occurred during testing. PLEG is very good at updating naming conventions, but you can not expect perfection, especially if something gets deleted while still used in another area (like a condition). I have seen this occur in my own testing and it is easily fixed. If these simple steps don’t fix it, delete BOTH the Mode and Condition and start fresh.

It isn’t necessary to increment your trigger names (t1_xxx, t2_xxx and so forth) but it does not hurt either. I find it easier to simply use t_ for triggers, c_ for conditions, m_ for house modes and p_ for properties. Keep it simple and its easier to maintain when your list becomes larger.

Maybe HOME is a reserved keyword, and my previous comment about not being necessary was a mistake. ???

Thanks for your responses. I’ll look into it later today and report back.

So here’s what I have now but it isn’t changing the House Mode to Away when I trigger a door lock. I clicked “Reload Lua” and I refreshed my browser.

People will be able to much more easily help you if you provide the STATUS report.
You see the value of variables and WHEN they were changed.

Attached is an example.

I was not around yesterday but here’s the status report. When I hit the lock button, it doesn’t go into Away mode.

I am wondering if this is related to Vera’s recent issues with Schlage Locks? It seems that the lock state isn’t being updated as the date for change in lock state is on January 9, and I just manually pressed the lock button on the lock but the change in house modes seems to be getting reported.

You may be on to something. From what I can see, the last time any of the locks triggers we true were was 1/9. And none were false. If doors are ever unlocked, there should be a last false date.

Regardless, the condition Set Home Away is true so the action should have executed on 1/14 when it became true. I would suggest turning on repeats for the Set Home Mode To Away action, so when the condition changes to false and then back to true, it executes again.

Otherwise I do not see why it would not work.

[quote=“Don Phillips”]You may be on to something. From what I can see, the last time any of the locks triggers we true were was 1/9. And none were false. If doors are ever unlocked, there should be a last false date.

Regardless, the condition Set Home Away is true so the action should have executed on 1/14 when it became true. I would suggest turning on repeats for the Set Home Mode To Away action, so when the condition changes to false and then back to true, it executes again.

Otherwise I do not see why it would not work.[/quote]so infinite repeats?

Sent from my SM-G930P using Tapatalk

[Quote]Subject:Notification
The Lock button was pressed on Back Door Lock in room Garage at 2018-01-14 14:03:52.[/quote]

I am getting notifications of door lock status but no change in the house mode and the status.log still shows 1/9 as the last time this, or any, door was locked.

Sent from my SM-G930P using Tapatalk

BTW, I’m wondering if I should use a Device Status instead of Trigger for the locks?

Also, are the repeats done under “Counters” and how?

TIA again.

You can use either triggers or status. I have used both in some of my conditions. Repeats are done under actions.

I upgraded to f/w 3501 this morning. The status of the locks still is not being reported. In addition to this, my PLEG keeps getting set to “Disarm” after I manually “Arm” it. I’m not sure if this is related or not but it wasn’t doing this before to my knowledge.

There is nothing in PLEG that will disarm the PLEG.

You must have login in a PLEG, PLTS, or Scene that is doing this.

[quote=“RichardTSchaefer, post:18, topic:198237”]There is nothing in PLEG that will disarm the PLEG.

You must have login in a PLEG, PLTS, or Scene that is doing this.[/quote]

Thanks for the reply Richard. This issue manifested itself with the latest f/w v7.3501. It was not doing this prior to this morning. I have sent an email to MiCasaVerde but am yet to hear back from them. The issue with my Schlage Locks was not resolved in the f/w either but they promised it would be.

Customer Support has rolled me back to f/w v7.3015.

When I push the lock button on the exterior of the Schlage Lock I get both a text notification and an email notification such as this:

The "Lock" button was pressed on "Laundry Door Lock" in room "Laundry Room" at 2018-01-18 05:37:42.

Yet the Status Report from PLEG reports that nothing has occurred as seen in the PDF. I’m perplexed as I think my logic is sound.