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 mean is there urn for requesting PLEG Condition value in LUUP like: 
 local val = luup.variable_get("urn:upnp-org:serviceId:PLEG-Condition", "Status", 106)
 
- 
					
					
					
					
 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! 
 
- 
					
					
					
					
 
 
- 
					
					
					
					
 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:  
 
- 
					
					
					
					
 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. 
 
 
			
		