Reactor on Altui/openluup, variable updates condition

I have installed Reactor 3.4 with hotfix in altui on openluup (docker), but I’m having trouble with my first sensor. In the status tab the second condition is empty and the sensor also doesn’t work correctly, but maybe that has to do with the device I’m using. See report and screenshot.

The second condition “sl_CentralScene updates” never gets true I think.

Can you help me debug this issue?

UPDATE

I now see that when I select the rext on the page the condition text is there (aparently in white). See screenshot. When I choose another theme, the text is visible.

So the only problem left is that the condition does not go to true when I push the referenced button. Can this be device specific?

It’s probably going true and then false again before you can see it on the interface.

Try hitting the drop down on the conditions page, top left and selecting ‘Pulse On’

See if that makes it more obvious?

Apologies if I’ve misunderstood your issue

C

This doesn’t make any difference unfortunately. The time of last trigger is still yesterday.

It seems as if Reactor or openluup does not identify the re-set or there is no re-set.

Ahh this is the Hank button.

Can you see any updates ot sl_CentralScene in the Lua logs?

C

1 Like

Another variable used by many scene controllers is sl_SceneActivated. The variables that change are very much device-specific. You need to pad around the variables list a bit to see what applies to your device.

That sucks, because there isn’t another variable that will work. I will check the logging, but I think I already know the result…

Wait… when you are using “updates”, the output is a pulse, and it’s very short–shorter than the UI is capable of displaying by default.

Try adding a “delay reset” option on your “updates” condition (only) of a few seconds. It may be that it’s just so fast you can’t see it, and if we slow things down, you’ll see it actually is updating. You can remove the delay for “production”.

No, delay reset doesn’t matter. I’m sure now, it does not re-set. That’s disappointing.

OK, let’s do this. Operate the button(s) a few times, most importantly, the one you’ve configured in the ReactorSensor. Then, create and post a logic summary. Please don’t post a screen shot of the logic summary–follow the instructions in the header of the report on how to post it correctly.

Ok here it is:

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.4hotfix-19317 config 19226 cdata 19082 ui 19237 pluginDevice 77
    System: openLuup version 190213 on Linux openluup 4.19.0-0.bpo.5-amd64 #1 SMP Debian 4.19.37-4~bpo9+1 (2019-06-19) x86_64 GNU/Linux; loadtime 1461088957; systemReady 1575733343; ALTUI v2.46; Lua 5.1; JSON dkjson 2.5
Local time: 2019-12-07T20:03:19+0100; DST=0; Zwaag, Europe Nederland
House mode: plugin 1; system 1; tracking off
  Sun data: 
  Geofence: not running
     Power: ?, battery level ?
====================================================================================================================================
Reactor Hank controller (#78)
    Version 19082.61 12/07/19 16:54:16
    Message/status: Not tripped
    Condition group "Controller" (OR)  false as of 20:02:19 <root>
      |-F-group "Button 1" (AND)  false as of 20:01:31 <grplbj35f0>
      |     &-F-service 4 knoppen overloop (10635) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene = 1 [1 => 3 at 20:02:19; F/F as of 20:02:19/20:02:19] <cond0>
      |     &-F-service 4 knoppen overloop (10635) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene update  [1575745291 => 1575745338 at 20:02:19; F/F as of 20:02:19/20:02:19] <condlan7rl5>
      |-F-group "Button 2" (AND)  false as of 20:02:19 <grplbu4b94>
      |     &-T-service 4 knoppen overloop (10635) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene = 3 [1 => 3 at 20:02:19; T/T as of 20:02:19/20:02:19] <condlbu4oj4>
      |     &-F-service 4 knoppen overloop (10635) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene update  [1575745291 => 1575745338 at 20:02:19; F/F as of 20:02:19/20:02:19] <condlbu61j7>
    Activity grplbj35f0.true
        Device DWS02 Rookmelder 1 (10628) action urn:micasaverde-com:serviceId:SecuritySensor1/SetArmed( newArmedValue="1" )
    Activity grplbu4b94.true
        Device DWS02 Rookmelder 1 (10628) action urn:micasaverde-com:serviceId:SecuritySensor1/SetArmed( newArmedValue="0" )
    Events
        12/07/19 20:01:31 evalchange: newState=true, cond=cond0, oldState=false
        12/07/19 20:01:31 condchange: newState=true, cond=condlan7rl5, oldState=false
        12/07/19 20:01:31 evalchange: newState=true, cond=condlan7rl5, oldState=false
        12/07/19 20:01:31 condchange: newState=true, cond=grplbj35f0, oldState=false
        12/07/19 20:01:31 evalchange: newState=true, cond=grplbj35f0, oldState=false
        12/07/19 20:01:31 condchange: newState=false, cond=condlbu4oj4, oldState=true
        12/07/19 20:01:31 evalchange: newState=false, cond=condlbu4oj4, oldState=true
        12/07/19 20:01:31 condchange: newState=true, cond=condlbu61j7, oldState=false
        12/07/19 20:01:31 evalchange: newState=true, cond=condlbu61j7, oldState=false
        12/07/19 20:01:31 condchange: newState=true, cond=root, oldState=false
        12/07/19 20:01:31 evalchange: newState=true, cond=root, oldState=false
        12/07/19 20:01:31 startscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true
        12/07/19 20:01:31 runscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true, group=1, notice=Starting scene group 1
        12/07/19 20:01:31 endscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true
        12/07/19 20:01:31 sensorstate: state=true
        12/07/19 20:01:31 condchange: newState=false, cond=condlan7rl5, oldState=true
        12/07/19 20:01:31 evalchange: newState=false, cond=condlan7rl5, oldState=true
        12/07/19 20:01:31 condchange: newState=false, cond=grplbj35f0, oldState=true
        12/07/19 20:01:31 evalchange: newState=false, cond=grplbj35f0, oldState=true
        12/07/19 20:01:31 condchange: newState=false, cond=condlbu61j7, oldState=true
        12/07/19 20:01:31 evalchange: newState=false, cond=condlbu61j7, oldState=true
        12/07/19 20:01:31 condchange: newState=false, cond=root, oldState=true
        12/07/19 20:01:31 evalchange: newState=false, cond=root, oldState=true
        12/07/19 20:01:31 sensorstate: state=false
        12/07/19 20:02:19 devicewatch: device=10635, old="1", name=4 knoppen overloop, var=urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene, new="3"
        12/07/19 20:02:19 condchange: newState=false, cond=cond0, oldState=true
        12/07/19 20:02:19 evalchange: newState=false, cond=cond0, oldState=true
        12/07/19 20:02:19 condchange: newState=true, cond=condlan7rl5, oldState=false
        12/07/19 20:02:19 evalchange: newState=true, cond=condlan7rl5, oldState=false
        12/07/19 20:02:19 condchange: newState=true, cond=condlbu4oj4, oldState=false
        12/07/19 20:02:19 evalchange: newState=true, cond=condlbu4oj4, oldState=false
        12/07/19 20:02:19 condchange: newState=true, cond=condlbu61j7, oldState=false
        12/07/19 20:02:19 evalchange: newState=true, cond=condlbu61j7, oldState=false
        12/07/19 20:02:19 condchange: newState=true, cond=grplbu4b94, oldState=false
        12/07/19 20:02:19 evalchange: newState=true, cond=grplbu4b94, oldState=false
        12/07/19 20:02:19 condchange: newState=true, cond=root, oldState=false
        12/07/19 20:02:19 evalchange: newState=true, cond=root, oldState=false
        12/07/19 20:02:19 startscene: scene=grplbu4b94.true, sceneName=grplbu4b94.true
        12/07/19 20:02:19 runscene: scene=grplbu4b94.true, sceneName=grplbu4b94.true, group=1, notice=Starting scene group 1
        12/07/19 20:02:19 endscene: scene=grplbu4b94.true, sceneName=grplbu4b94.true
        12/07/19 20:02:19 sensorstate: state=true
        12/07/19 20:02:19 condchange: newState=false, cond=condlan7rl5, oldState=true
        12/07/19 20:02:19 evalchange: newState=false, cond=condlan7rl5, oldState=true
        12/07/19 20:02:19 condchange: newState=false, cond=condlbu61j7, oldState=true
        12/07/19 20:02:19 evalchange: newState=false, cond=condlbu61j7, oldState=true
        12/07/19 20:02:19 condchange: newState=false, cond=grplbu4b94, oldState=true
        12/07/19 20:02:19 evalchange: newState=false, cond=grplbu4b94, oldState=true
        12/07/19 20:02:19 condchange: newState=false, cond=root, oldState=true
        12/07/19 20:02:19 evalchange: newState=false, cond=root, oldState=true
        12/07/19 20:02:19 sensorstate: state=false
    Devices
        4 knoppen overloop (10635) urn:schemas-micasaverde-com:device:SceneController:1 (14/0); parent 1; plugin -
        ZWave (1) urn:schemas-micasaverde-com:device:ZWaveNetwork:1 (19/0); parent 6; plugin -

I have first pushed button 1 three times with some time between and then pushed button 2 three times with some time between.

OK. The Logic Summary, particularly the Event Log section, was really set up as a tool for me to support everyone, but I’ve done some work in upcoming 3.5 to make it more human-readable (even for me). That said, the information is there, so follow along with me…

The first line of the Events section is telling me that it sees the value of sl_CentralScene has gone to 1. The two lines following are saying that the “update” condition is also transitioning to true, and the two lines after that are saying that, with both conditions true, the group itself is now going true. The two lines after that say that the “button 2” group (which actually tests for button 3) is going false. A few more supporting lines and all conditions are up to date, so the “startscene” for the “button 1” group is launched and quickly finishes. The “sensorstate” line also indicates that the overall tripped state of the RS is being set true.

The series of lines that follow, up to the next “sensorstate” (with state=false) show the pulse from “update” going false, taking the group back to false.

About 48 seconds later, you see it gets the button 3 signal (devicewatch). On the next two lines, the sl_CentralScene = 1 test from the “button 1” group goes false (as it should). The “update” condition also goes true in that group (as it should). Then, the sl_CentralScene = 3 condition goes true. That’s followed by the “update” condition in that group going true, and then with both conditions true, the group goes true on the following lines. That then starts the activity for group “button 2” (3) is true.

This is working perfectly, everything exactly as expected.

So… what is it not doing that you expect?

Well, this all seems right IF I pushed the two buttons only ones.

But I pushed both buttons 3 times each (3x1 and then 3x2). So the first time I pushed a button all went well, but the second time I push, for example, button 1 the value of sl_CentralScene is already “1” and the value is apparently not re-set for a second time, because the “updated” condition is not triggered for a second time (or third time for that matter).

So whenever I trigger a scene for the second time, it doesn’t work. But this seems to be a problem of the Hank controller and not of Reactor, correct me if I’m wrong.

Then yes, if the Hank implementation isn’t writing sl_CentralScene every time, that’s a device issue.

You might be able to work around it by setting sl_CentralScene to 0 in your Reactor activities, though. There are a couple of ways to do this, but the simplest and most expeditious is likely a “Run Lua” action with this code:

luup.variable_set( "urn:micasaverde-com:serviceId:SceneController1", "sl_CentralScene", "0", nnnn )

Replace nnnn with your Hank controller device number.

That were my thoughts exactly! However the device seems to automatically set it back to the previous value after setting it to “0”. So that will give me a retrigger.

So now I’m going to use one of the button actions as a reset state. But that means of course that I can’t use that button action on the device. At least until I think of a better solution.

Thanks for your help, it helped me a lot to get to know Reactor. Great job by the way, excellent plugin!

And if you think of an alternative solution, please let me know!

UPDATE
Never mind this doesn’t work either, it resets that value too. I thought it had to do with the value “0”, because it’s not a real setting, but that doesn’t matter. I have to think of another way of setting the variable.

1 Like

I’ve got one of these things on order, because I want to play with it myself. If it’s really not updating sl_CentralScene correctly, that’s a bug that Vera needs to fix, as it would be the only scene controller that I know of to break ranks in that way. So stay tuned… more to follow when the Amazon Fairy visits my house again.

I will await your response. It could also potentially be a problem with openluup, but I will wait for your findings.

Oh lawd, I completely disconnected the fact that you are running on openLuup… that actually makes things easier.

Edit: OK. @akbooer is looking into this.

OK. @abkooer has produced a version in his development branch that addresses this, and I have confirmed that it works, specifically with a Hank four-button controller brdiged from a Vera Plus to openLuup. You need version 19.12.11 of openLuup or higher, and good to go with that.

@akbooer Ok, this is still not behaving like expected. A different problem.

The “updates” condition is triggering when it shouldn’t. So, the value of sl_CentralScene is probably updated when it shouldn’t.

Let me explain the scenario as best as possible. I use the hank controller to set my home to Night mode and Home mode. The initial state was that house mode was “Home” and the sl_CentralScene variable was “1” (this is the value for “Home” in my case).

The first action I did, was set the house mode to “Night”. NOT with the Hank controller, but via the standard button in AltUI. Openluup went to “Night”, but immediately was put back to “Home”. So I did not use the Hank controller.

But when I look in Reactor I see that my first group condition was triggered. The first condition was still tue, because it was “1” in the first place, but the second condition (that verifies if sl_CentralScene is updated) also triggered although I did not touch the Hank controller.

The question is: Why did the sl_CentralScene get updated, while the Hank controller wasn’t touched.

See attaced also the logging of openluup.

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.4hotfix-19317 config 19226 cdata 19082 ui 19237 pluginDevice 77
    System: openLuup version 191211 on Linux openluup 4.19.0-0.bpo.5-amd64 #1 SMP Debian 4.19.37-4~bpo9+1 (2019-06-19) x86_64 GNU/Linux; loadtime 1461088957; systemReady 1576139397; ALTUI v2.46; Lua 5.1; JSON dkjson 2.5
Local time: 2019-12-12T09:48:27+0100; DST=0; Zwaag, Europe Nederland
House mode: plugin 1; system 1; tracking off
  Sun data: 
  Geofence: not running
     Power: ?, battery level ?
====================================================================================================================================
Reactor Hank controller (#78)
    Version 19082.128 12/12/19 09:35:09
    Message/status: Not tripped
    Condition group "Controller" (OR)  false as of 09:47:44 <root>
      |-F-group "Button 1 push" (AND)  false as of 09:47:44 <grplbj35f0>
      |     &-T-service Four Button Scene (10638) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene = 1 [11 => 1 at 07:01:13; T/T as of 07:01:13/07:01:13] <condld4jqgp>
      |     &-F-service Four Button Scene (10638) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene update  [1576140413 => 1576140464 at 09:47:44; F/F as of 09:47:44/09:47:44] <condlio92oh>
      |-F-group "Button 1 hold" (AND)  false as of 12-07.20:02:19 <grplbu4b94>
      |     &-F-service Four Button Scene (10638) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene = 2 [11 => 1 at 07:01:13; F/F as of 12-08.16:57:50/12-08.16:57:50] <condldeckvw>
      |     &-F-service Four Button Scene (10638) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene update  [1576140413 => 1576140464 at 09:47:44; F/F as of 09:47:44/09:47:44] <condlioa0b5>
      |-F-group "Button 2 push" (AND)  false as of 12-11.07:04:11 <grpldjq10b>
      |     &-F-service Four Button Scene (10638) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene = 3 [11 => 1 at 07:01:13; F/F as of 12-11.07:04:11/12-11.07:04:11] <condldjq39z>
      |     &-F-service Four Button Scene (10638) urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene update  [1576140413 => 1576140464 at 09:47:44; F/F as of 09:47:44/09:47:44] <condlioaiyy>
    Activity grplbj35f0.true
        Run scene 29 User modes - Button Home
    Activity grpldjq10b.true
        Device Afzuiging (10483) action urn:micasaverde-com:serviceId:HaDevice1/ToggleState(  )
    Activity grplbu4b94.true
        Run scene 30 User modes - Button Night
    Events
        12/12/19 09:46:53 evalchange: newState=true, cond=condlio92oh, oldState=false
        12/12/19 09:46:53 condchange: newState=true, cond=grplbj35f0, oldState=false
        12/12/19 09:46:53 evalchange: newState=true, cond=grplbj35f0, oldState=false
        12/12/19 09:46:53 condchange: newState=true, cond=condlioa0b5, oldState=false
        12/12/19 09:46:53 evalchange: newState=true, cond=condlioa0b5, oldState=false
        12/12/19 09:46:53 condchange: newState=true, cond=condlioaiyy, oldState=false
        12/12/19 09:46:53 evalchange: newState=true, cond=condlioaiyy, oldState=false
        12/12/19 09:46:53 condchange: newState=true, cond=root, oldState=false
        12/12/19 09:46:53 evalchange: newState=true, cond=root, oldState=false
        12/12/19 09:46:53 startscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true
        12/12/19 09:46:53 runscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true, group=1, notice=Starting scene group 1
        12/12/19 09:46:53 endscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true
        12/12/19 09:46:53 sensorstate: state=true
        12/12/19 09:46:53 condchange: newState=false, cond=condlio92oh, oldState=true
        12/12/19 09:46:53 evalchange: newState=false, cond=condlio92oh, oldState=true
        12/12/19 09:46:53 condchange: newState=false, cond=grplbj35f0, oldState=true
        12/12/19 09:46:53 evalchange: newState=false, cond=grplbj35f0, oldState=true
        12/12/19 09:46:53 condchange: newState=false, cond=condlioa0b5, oldState=true
        12/12/19 09:46:53 evalchange: newState=false, cond=condlioa0b5, oldState=true
        12/12/19 09:46:53 condchange: newState=false, cond=condlioaiyy, oldState=true
        12/12/19 09:46:53 evalchange: newState=false, cond=condlioaiyy, oldState=true
        12/12/19 09:46:53 condchange: newState=false, cond=root, oldState=true
        12/12/19 09:46:53 evalchange: newState=false, cond=root, oldState=true
        12/12/19 09:46:53 sensorstate: state=false
        12/12/19 09:47:44 devicewatch: device=10638, old="1", name=Four Button Scene, var=urn:micasaverde-com:serviceId:SceneController1/sl_CentralScene, new="1"
        12/12/19 09:47:44 condchange: newState=true, cond=condlio92oh, oldState=false
        12/12/19 09:47:44 evalchange: newState=true, cond=condlio92oh, oldState=false
        12/12/19 09:47:44 condchange: newState=true, cond=grplbj35f0, oldState=false
        12/12/19 09:47:44 evalchange: newState=true, cond=grplbj35f0, oldState=false
        12/12/19 09:47:44 condchange: newState=true, cond=condlioa0b5, oldState=false
        12/12/19 09:47:44 evalchange: newState=true, cond=condlioa0b5, oldState=false
        12/12/19 09:47:44 condchange: newState=true, cond=condlioaiyy, oldState=false
        12/12/19 09:47:44 evalchange: newState=true, cond=condlioaiyy, oldState=false
        12/12/19 09:47:44 condchange: newState=true, cond=root, oldState=false
        12/12/19 09:47:44 evalchange: newState=true, cond=root, oldState=false
        12/12/19 09:47:44 startscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true
        12/12/19 09:47:44 runscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true, group=1, notice=Starting scene group 1
        12/12/19 09:47:44 endscene: scene=grplbj35f0.true, sceneName=grplbj35f0.true
        12/12/19 09:47:44 sensorstate: state=true
        12/12/19 09:47:44 condchange: newState=false, cond=condlio92oh, oldState=true
        12/12/19 09:47:44 evalchange: newState=false, cond=condlio92oh, oldState=true
        12/12/19 09:47:44 condchange: newState=false, cond=grplbj35f0, oldState=true
        12/12/19 09:47:44 evalchange: newState=false, cond=grplbj35f0, oldState=true
        12/12/19 09:47:44 condchange: newState=false, cond=condlioa0b5, oldState=true
        12/12/19 09:47:44 evalchange: newState=false, cond=condlioa0b5, oldState=true
        12/12/19 09:47:44 condchange: newState=false, cond=condlioaiyy, oldState=true
        12/12/19 09:47:44 evalchange: newState=false, cond=condlioaiyy, oldState=true
        12/12/19 09:47:44 condchange: newState=false, cond=root, oldState=true
        12/12/19 09:47:44 evalchange: newState=false, cond=root, oldState=true
        12/12/19 09:47:44 sensorstate: state=false
    Devices
        ZWave (1) urn:schemas-micasaverde-com:device:ZWaveNetwork:1 (19/0); parent 6; plugin -
        Four Button Scene (10638) urn:schemas-micasaverde-com:device:SceneController:1 (14/0); parent 1; plugin -
    Scenes
        Scene #30 User modes - Button Night
            Group 1
                Device 2 (    openLuup) openLuup/SetHouseMode ( Mode="3" )
        Scene #29 User modes - Button Home
            Group 1
                Device 2 (    openLuup) openLuup/SetHouseMode ( Mode="1" )

20191212 Log Openluup.txt.zip (36.5 KB)