This my first attempt with PLEG.
I want to turn on a light when a certain PIN code is entered on my front door lock. Sorry, I haven’t figured out yet how to copy the actual report window in posts yet.
I had an even more basic version working, without the Day or Night plug-in. But now even that won’t work.
Triggers
Name Description
Pin_Entered PIN Code #2 is entered on Front Door Lock
Night Day or Night indicates Night time.
Schedules
Name Type Time Days
Conditions
Name Expression
c1 Pin_Entered and Night
Actions
Actions for Condition: c1
Device Action Arguments
Double Outlet SetTarget newTargetValue=1
The PLEG is armed and I tried toggling the Day Night plug in.
Since I do not know how your lock is reponding …
Here is how you debug this …
Set the Debug property in the advanced tab to 1.
The Save
Start logging with:
http://YourVeraIP/cgi-bin/cmh/log.sh?Device=LuaUPnP
Run your logic … then look over the log and/or send it to me.
You should be able to email me from my profile.
(Send the PLEG Report as well)
[quote=“RichardTSchaefer, post:2, topic:174924”]Since I do not know how your lock is reponding …
Here is how you debug this …
Set the Debug property in the advanced tab to 1.
The Save
Start logging with:
http://YourVeraIP/cgi-bin/cmh/log.sh?Device=LuaUPnP
Run your logic … then look over the log and/or send it to me.
You should be able to email me from my profile.
(Send the PLEG Report as well)[/quote]I’ve sent the files. I’m trying to decipher the logs, it’s not helping 
I admit it, I’m new. I’ve read through the help but am still struggling with pretty basic stuff.
For example.
I changed the PLEG above to see if I could get results using a different trigger.
I got errors indicating bad token. I have no clue why.
I couldn’t get rid of the errors even after removing the trigger and condition with the “bad” token
So I deleted the PLEG. Now how do I get it back? Apps say it’s still installed, but it doesn’t show up as a device.
So I decide to delete PLEG and reinstall
Now PLEG won’t accept any inputs. Further, the action I had created in my previous failed PLEG shows up in Report even though I didn’t create it and I don’t see it under actions in PLEG.
Like I said, I’m new and very willing to read a Vera or PLEG for dummies book, if someone could point me in the right direction. I’ve gone through the Getting Started link that shows up on the UI5 page of my Vera but was no help as it relates to my problems.
Apps say it's still installed, but it doesn't show up as a device.
The following is standard for ALL plugins:
Goto Apps -> Click on the Application Link (Next to Icon)
Click the button [b]Create Another[/b]
Further, the action I had created in my previous failed PLEG shows up in Report even though I didn't create it and I don't see it under actions in PLEG.
Vera does not provide the plugin a handler to clean up before a device is deleted ... and it does not cleanup all the stuff a plugin has created ... This stuff is all tied to the device ID.
The next Device ID is the highest DeviceID + 1.
If you delete a Device and then create another one … you get the same device ID. And it finds left over stuff! You always ADD a device … before you Delete a device.
In general deleting and re-installing a plugin does NOT help anyway. The problem is usually in the device state … and doing the described add then delete will fix this.
Now PLEG won't accept any inputs.
Did you also re-install [b]Program Logic Core[/b]. PLC, PLTS, and PLEG all should be from the same version.
Thanks for all the great info Richard.
I did go back and delete both plug-ins.
I then re-installed and installed the patch you sent me.
I recreated the PLEG.
The odd thing was the action. Like I said earlier, it magically stayed, but then when I actually executed the PLUG, nothing happened. Turns out the action was now gone. I recreated it and viola, it worked. I added the day/night plug in and toggled it and it worked as expected.
Thanks for your help (and patience).