How to get PLEG condition value from LUUP code? With luup.variable_get()?
-
How to get PLEG condition value from LUUP code? With luup.variable_get()?
I have several conditions in PLEG and I would like to track and plot the values in order to see, verify and optimize the behavior of the PLEG logic. For plotting I have done a scene with LUUP code that sends other sensor data to plot.ly for graphing. Now I need also the PLEG condition states, but how?
-
I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.
-
I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.
@BulldogLowell said:
I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.
I did that and got an answer:
"
A recent feature was to add the ability to Export a condition. (See the conditions tab).
This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_getThe servceid is: "urn:rts-services-com:serviceId:User"
"Awesome!
-
@BulldogLowell said:
I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.
I did that and got an answer:
"
A recent feature was to add the ability to Export a condition. (See the conditions tab).
This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_getThe servceid is: "urn:rts-services-com:serviceId:User"
"Awesome!
-
@BulldogLowell said:
I would post a question right to the PLEG author, Richard Schaefer on the Vera Forum.
I did that and got an answer:
"
A recent feature was to add the ability to Export a condition. (See the conditions tab).
This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_getThe servceid is: "urn:rts-services-com:serviceId:User"
"Awesome!
A recent feature was to add the ability to Export a condition. (See the conditions tab).
This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_get
The servceid is: "urn:rts-services-com:serviceId:User"Unfortunately (of course) that did not work and the variable_get returns nil for that urn even if the Condition is marked to be exported. :-|
-
A recent feature was to add the ability to Export a condition. (See the conditions tab).
This creates a variable that can be imported into another PLEG as a device property OR access via luup.variable_get
The servceid is: "urn:rts-services-com:serviceId:User"Unfortunately (of course) that did not work and the variable_get returns nil for that urn even if the Condition is marked to be exported. :-|
post your lua code, maybe we can help...
Double check your service id's by hovering over them with your mouse:

-
post your lua code, maybe we can help...
Double check your service id's by hovering over them with your mouse:

Actually it started to work after update to 5.37 version of PLEG where Richard made some bugfix for numeric conditions.
Now the exported condition is shown correctly as a variable in the advanced tab.
So case resolved. :-D
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login