How do I actually create a (service) condition to add an expresion as a variable?

Hi,

I cannot see my variable named in any of the options in the conditions list. Where is it selected so i can use it? Its name DS_Heat_Comp in the data below and checks temperature vs a multistring value.

Thanks

John

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.4 config 19226 cdata 19082 ui 19237 pluginDevice 93
    System: Vera version 1.7.4453 on Sercomm G450; loadtime 1573497668; systemReady 1573497682; Lua 5.1; JSON dkjson 1.2
Local time: 2019-11-11T19:10:27+0000; DST=0; Workington, England United Kingdom
House mode: plugin 1; system 1; tracking off
  Sun data: 
  Geofence: not running
====================================================================================================================================
WeekyMorning Heat On (#95)
    Version 19082.44 11/11/19 19:07:01
    Message/status: Not tripped
    Variable/expressions
       0: DS_Temp_Comp             getstate( 45, "urn:upnp-org:serviceId:TemperatureSensor1", "CurrentTemperature" ) < getstate( 28, "urn:upnp-org:serviceId:VContainer1", "Variable1" ) [last true(boolean)]
    Condition group "Heating Morning On" (AND)  false as of 18:38:31 <root>
      &-T-service Heating (26) urn:dcineco-com:serviceId:MSwitch1/Status1 = 1 [0 => 1 at 18:40:56; T/T as of 18:40:56/18:40:56] <condkaz77yh>
      &-T-weekday { "id": "condkaz9nfn", "type": "weekday", "value": "2,3,4,5,6", "operator": "" } [2 at 18:39:47; T/T as of 18:39:47/18:39:47] <condkaz9nfn>
      &-F-trange bet ,,,6,45,,,,8,30 [1573499192 => 1573499222 at 19:07:02; F/F as of 18:39:47/18:39:47] <condkaz9vo9>
    Activity root.false
    Activity root.true
        Device Downstairs Heating (60) action urn:upnp-org:serviceId:HVAC_UserOperatingMode1/SetModeTarget( NewModeTarget="HeatOn" )
    Events
        11/11/19 18:41:17 reload: notice=Luup reload
        11/11/19 18:41:17 start: 
        11/11/19 18:42:26 configchange: 
        11/11/19 18:44:06 configchange: 
        11/11/19 18:44:07 condchange: newState=false, cond=condkazf2jr
        11/11/19 18:44:07 evalchange: newState=false, cond=condkazf2jr
        11/11/19 18:46:35 configchange: 
        11/11/19 18:46:45 configchange: 
        11/11/19 18:47:29 configchange: 
        11/11/19 18:50:31 configchange: 
        11/11/19 18:52:21 configchange: 
        11/11/19 18:57:06 configchange: 
        11/11/19 18:57:07 condition: condition=condkazt6jd, error=TROUBLE: device used in condition not available
        11/11/19 18:57:19 configchange: 
        11/11/19 18:57:20 variable: newval=(luaxp.NULL), variable=test
        11/11/19 18:57:20 condition: condition=condkazt6jd, error=TROUBLE: device used in condition not available
        11/11/19 18:58:26 configchange: 
        11/11/19 19:04:24 configchange: 
        11/11/19 19:04:25 variable: newval=(luaxp.NULL), variable=Device_State
        11/11/19 19:05:55 configchange: 
        11/11/19 19:06:31 configchange: 
        11/11/19 19:07:01 configchange: 
    Devices
        Heating (26) urn:schemas-dcineco-com:device:MSwitch26:1 (0/-1); parent 0; plugin 5836

John,

What I recommend is that you have the variable simple retrieve the value from the multistring, not do the comparison in the variable expression. You can do it that way, but then the condition to test it isn’t as straightforward, which is why you’re confused.

So, set DS_Heat_Comp = getstate( 28, "urn:upnp-org:serviceId:VContainer1", "Variable1" )

Then, the condition is a “Device State” type, and you’re going to choose the temperature sensor as the device, the “less than” operator, and enter {DS_Heat_Comp} as the operand, exactly as shown here.

Thank you. I understand it now.

1 Like