Reactor randomly failing since 7.30

Quite true, so Basically the concept is this:

Turn on the AC and set it to 23c when the following conditions are met:

>= 26c Outside
>= 23c in the Rumpus Room
House Mode = Home OR Away
AC is not already On

Then there are 3 main sections which ramp the AC Set-point Up or Down depending on the Outside temp - they check the following:

**< 30c Outside:** Set-Point to 23c
< 30c Outside
House Mode = Home OR Away
AC is already On
Setpoint is NOT 23c

**> 30c Outside:** Set-Point to 22c
> 30c Outside
< 36c Outside
House Mode = Home OR Away
AC is already On
Setpoint is NOT 22c

**> 36c Outside:** Set-Point to 20c
>= 36c Outside
House Mode = Home OR Away
AC is already On
Setpoint is NOT 20c

there is also a Cooling-off condition:

< 23c Outside
< 22c in the Rumpus Room
House Mode = Home OR Away
AC is already On 

This has been working really well since last summer - so I assume the logic is sound.

It thinks it fired but the results show it didn’t as the logic is designed to know when something is in the correct state. I was wondering what reactor does to ensure Vera actually follows commands. I checked my Honeywell stat and it never received a command to turn on as best as I can tell.

yes, I want to check the current state of the AC controller so I dont send redundant commands and can respond to the actual AC state.

yes, it is intentional. that is so it can ramp up or down the set-point.

I wonder if that is a “Vera” problem - these sort of random issues (things not changing state) have been occurring a lot for me since 7.3x.

I’ll give that a try.

How do I do this?

Once a group goes true, the activity fires once. It does not fire repeatedly. I think if you look at your LuaUPnP log at around the 11:16 mark, you’ll see Reactor issuing the command to the Lyric. Whether or not the Lyric gets it is out of Reactor’s control.

To get the log: http://your-vera-local-IP/cgi-bin/cmh/log.sh?Device=LuaUPnP

yes, I want to check the current state of the AC controller so I dont send redundant commands and can respond to the actual AC state.

Then you definitely should be checking ModeTarget, not ModeStatus.

I just checked and that field does not exist on the HoneyWell Lyric.

Understood, I was merely wondering if reactor checked to see if the state changed as instructed.

Argh, looks like the logs rotate (hourly?) and I can see back further than 13:06 :frowning:

No. That would be a Herculean feat in the Vera world. For starters, not every action modifies states that can be tested, or modifies them in a deterministic way or even in a timeframe that’s relevant. It would take a huge database of knowledge about every kind of device and all of their actions. It doesn’t exist.

EDIT: A couple more things…

  1. I just installed the Lyric plugin so I could look at the code. Sure enough, they don’t implement ModeTarget, which isn’t UPnP, but in any case, ModeStatus serves the purpose.
  2. The code uses a 20-second timeout when communicating with the remote service. It may not be able to walk and chew gum at the same time, so increase your delays to 20 seconds or more between commands, so that the HTTP requests are serialized/not overlapping.
  3. The plugin logs a lot, so capturing the log activity around a missed command would likely be very telling.
  4. The access token for the cloud service can expire, and when a command is issued to change the thermostat settings and the cloud service complains that the token is expired, it doesn’t refresh the token and retry the command, it just fails. That is a big hole! I’d bet a fair amount that this what is actually causing comm errors, and it would be somewhat random. The refresh is performed by a timer task, but if it expires between timer task events (which it most certainly does), you’re screwed until the next timer tick–no commands can be issued. Huge bug, actually.

Now… you want a state engine? You can do it, because your logic conditions are specifically testing to see if you are in a certain state, and if not, set that state. To get Reactor to re-issue the actions until the state changes (so that the logic conditions for that group are not met) is this: install Reactor 3.5 stable branch, and then put your condition groups into “pulse” mode with repeats (important: that’s an option you set on the groups for this application, in the options panel). The repeats feature is new in 3.5 so the upgrade is necessary to get it.

What this will do is, while the group’s conditions are true, the group will repeatedly toggle between true and false (pulse with repeat), using the timing you specify (make a wide gap between pulses) Each time it goes true, the activity will be re-run. Presumably, if there’s trouble communicating with the thermostat, eventually one of the re-runs will hit and change state, stopping the pulse train.

But if you do this, you’d better make darn sure your group logic cannot, no way, not ever, overlap, or you will have two or more groups competing for control of the thermostat and repeatedly sending commands–back and forth and back and forth, fighting each other, possibly even at machine speed. Be very cautious.

2 Likes

Bugger, that was one thing I liked about Home Assistant - it’s a state engine 1st with everything else built on top of that.

Just replied to you with a bunch, including a big bug in the Lyric plugin, and how to re-run activities…

1 Like

Cheers, i wonder if the Nest Thermostat plugin is similar? I had to put in 20 second gaps between commands to get it reliable some time back.

and I get the logs via the link you provided earlier?

That would be very annoying if correct. :unamused:

Oh very interesting, cheers I’ll have a play around. :+1:

I have seen similar issues as well. Not really dug into them because, well, laziness but certainly has happened.

C

Dig in, man. Look at the amount of time that’s been spent on this issue (imagine–you can’t really know, of course, but imagine). Look at the amount of time @rafale77 has spent on Z-Wave issues. It’s exhausting. We need your effort. It takes 10% of the effort for you to diagnose it when the problem is in hand in front of you than it does for us to try to troubleshoot it by remote control. And when you’re done doing it, you’ve probably leveled-up, even if you’re not successful.

Go! :slight_smile: If nothing else, the more people try (and talk about it), the greater the chances we’ll find it, if it’s there.

1 Like

Fair call, sir. I am suitably chastened.

Next time I see it, I shall dig

C

Not intended! That was supposed to look more like encouragement… cheering… active support. This environment rewards effort–we see it every day… this is the way.

1 Like

Ok, im now convinced its my Vera being a PITA.

All these conditions are met and none of the 3 Z-Wave fans turned on: :rage:

this is yet another Reator sensor that has been working 100% for months.

Cycling the reactor sensor produced the desired result.

Screen shots are probably the least useful thing you can show me for stuff like this. I feel like a broken record. Logic Summary. Always Logic Summary.

2 Likes

I didn’t bother because I know the logic is good (I do have it captured and can post later if you are interested) - I think my VP was in a downward spiral as the failures seemed to be happening more frequently than normal.

I even tried to install the Netatmo plugin (from scratch) and the install process did not go normally and I had to manually remove it as it failed. I then rebooted my Vera and this time it installed successfully. My Vera had only been up for 8 days, since the last reboot, so I was not really expecting it to be an issue. :frowning:

Closing the loop

*************************************************** REACTOR LOGIC SUMMARY REPORT ***************************************************
   Version: 3.4 config 19226 cdata 19082 ui 19237 pluginDevice 120
    System: Vera version 1.7.4903 on Sercomm G450; loadtime 1579028471; systemReady 1579028496; Lua 5.1; JSON dkjson 2.5+LPeg
Local time: 2020-01-15T08:07:06+1100; DST=1; Kilsyth, Victoria Australia
House mode: plugin 1; system 1; tracking on
  Sun data: {"stamp":2020015,"civdawn":1579027316,"nautdawn":1579025058,"sunset":1579081359,"nautdusk":1579085440,"latitude":-37.804519,"astrodusk":1579087947,"longitude":145.331965,"civdusk":1579083182,"astrodawn":1579022551,"sunrise":1579029139}
  Geofence: not running
====================================================================================================================================
Upstairs Fans (#304) tripped
    Version 19082.38 01/12/20 14:33:53
    Message/status: Tripped
    Condition group "Reactor Sensor 48" (OR)  TRUE as of 06:00:00 <root>
      |-T-group "Fans On" (AND)  TRUE as of 06:00:02 <grpjouu4qm>
      |     &-T-housemode in 1,2,3 [3 => 1 at 06:00:00; T/T as of 01-08.09:43:29/01-08.09:43:29] <cond0>
      |     &-T-service Nest Thermostat US (9) urn:upnp-org:serviceId:TemperatureSensor1/CurrentTemperature >= 21 [23 => 22.5 at 07:46:34; T/T as of 01-13.12:51:59/01-13.12:51:59] <condjourqju>
      |     &-T-service WU - Conditions (368) urn:toggledbits-com:serviceId:SiteSensor1/Value2 >= 23 [24 => 23 at 07:56:35; T/T as of 10:41:15/10:41:15] <condjousjr9>
      |     &-T-group "Fans = Off" (OR)  TRUE as of 06:00:02 <grpjrfa5gu>
      |     |     |-T-service Hugos Room Fan (297) urn:upnp-org:serviceId:SwitchPower1/Status = 0 [1 => 0 at 06:01:38; T/T as of 06:01:38/06:01:38] <condjrfajc1>
      |     |     |-T-service Maddies Room Fan (300) urn:upnp-org:serviceId:SwitchPower1/Status = 0 [1 => 0 at 06:01:39; T/T as of 06:01:39/06:01:39] <condjrfbmpg>
      |     |     |-T-service Main Bedroom Fan (292) urn:upnp-org:serviceId:SwitchPower1/Status = 0 [1 => 0 at 06:01:37; T/T as of 06:01:37/06:01:37] <condjrfc4mb>
      |-F-group "Off Logic" (OR)  false as of 06:01:39 <grpjouw7h8>
      |     |-F-group "Cools Down" (AND)  false as of 01-08.09:43:29 <grpjr1nyxb>
      |     |     &-T-housemode in 1,2,3 [3 => 1 at 06:00:00; T/T as of 01-08.09:43:29/01-08.09:43:29] <condjouwqyn>
      |     |     &-F-service WU - Conditions (368) urn:toggledbits-com:serviceId:SiteSensor1/Value2 <= 16 [24 => 23 at 07:56:35; F/F as of 01-13.08:51:14/01-13.08:51:14] <condjoux5ev>
      |     |     &-F-service Nest Thermostat US (9) urn:upnp-org:serviceId:TemperatureSensor1/CurrentTemperature <= 20 [23 => 22.5 at 07:46:34; F/F as of 01-13.12:05:59/01-13.12:05:59] <condjouy6x9>
      |     |     &-F-group "Fans = On" (OR)  false as of 06:01:39 <grpjxae2zt>
      |     |     |     |-F-service Hugos Room Fan (297) urn:upnp-org:serviceId:SwitchPower1/Status = 1 [1 => 0 at 06:01:38; F/F as of 06:01:38/06:01:38] <condjr1opgb>
      |     |     |     |-F-service Main Bedroom Fan (292) urn:upnp-org:serviceId:SwitchPower1/Status = 1 [1 => 0 at 06:01:37; F/F as of 06:01:37/06:01:37] <condjr0rnrb>
      |     |     |     |-F-service Maddies Room Fan (300) urn:upnp-org:serviceId:SwitchPower1/Status = 1 [1 => 0 at 06:01:39; F/F as of 06:01:39/06:01:39] <condjr1o158>
      |     |-F-group "UD Heat = On" (AND)  false as of 01-11.05:01:49 <grpk39vq48>
      |     |     &-F-service Nest Thermostat US (9) urn:upnp-org:serviceId:HVAC_UserOperatingMode1/ModeStatus = HeatOn [energysavingsmode => coolon at 06:02:41; F/F as of 01-12.11:01:26/01-12.11:01:26] <condk39vzip>
      |     |     &-F-grpstate (self) (-1) Fans = On (grpjxae2zt) istrue [true => false at 06:01:39; F/F as of 06:01:39/06:01:39] <condk39xbuj>
      |     |-F-group "Night mode turns Off" (AND)  false as of 06:01:39 <grpjxaqbb3>
      |     |     &-T-housemode in 3,1 [3 => 1 at 06:00:00; T/T as of 06:00:00/06:00:00] <condjxaqlnp>
      |     |     &-F-grpstate (self) (-1) Fans = On (grpjxae2zt) istrue [true => false at 06:01:39; F/F as of 06:01:39/06:01:39] <condk39uw0e>
      |     |     &-F-trange bet ,,,6,0,,,,6,5 [1579034794 => 1579035395 at 07:56:35; F/F as of 06:05:00/06:05:00] <condkn0ibgz>
    Activity grpjouu4qm.true
        Device Main Bedroom Fan (292) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="1" )
        Delay 1 inline
        Device Hugos Room Fan (297) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="1" )
        Delay 1 inline
        Device Maddies Room Fan (300) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="1" )
    Activity grpjouw7h8.true
        Device Main Bedroom Fan (292) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
        Delay 1 inline
        Device Hugos Room Fan (297) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
        Delay 1 inline
        Device Maddies Room Fan (300) action urn:upnp-org:serviceId:SwitchPower1/SetTarget( newTargetValue="0" )
    Events
        01/15/20 06:01:37 evalchange: newState=false, cond=condjrfajc1, oldState=true
        01/15/20 06:01:37 condchange: newState=true, cond=condjr1opgb, oldState=false
        01/15/20 06:01:37 evalchange: newState=true, cond=condjr1opgb, oldState=false
        01/15/20 06:01:37 devicewatch: device=292, old="1", name=Main Bedroom Fan, var=urn:upnp-org:serviceId:SwitchPower1/Status, new="0"
        01/15/20 06:01:37 condchange: newState=true, cond=condjrfc4mb, oldState=false
        01/15/20 06:01:37 evalchange: newState=true, cond=condjrfc4mb, oldState=false
        01/15/20 06:01:37 condchange: newState=false, cond=condjr0rnrb, oldState=true
        01/15/20 06:01:37 evalchange: newState=false, cond=condjr0rnrb, oldState=true
        01/15/20 06:01:38 runscene: scene=grpjouu4qm.true, sceneName=grpjouu4qm.true, group=3, notice=Starting scene group 3
        01/15/20 06:01:38 endscene: scene=grpjouu4qm.true, sceneName=grpjouu4qm.true
        01/15/20 06:01:38 runscene: scene=grpjouw7h8.true, sceneName=grpjouw7h8.true, group=2, notice=Starting scene group 2
        01/15/20 06:01:38 runscene: scene=grpjouw7h8.true, sceneName=grpjouw7h8.true, group=3, notice=Scene delay until 06:01:39
        01/15/20 06:01:38 devicewatch: device=300, old="0", name=Maddies Room Fan, var=urn:upnp-org:serviceId:SwitchPower1/Status, new="1"
        01/15/20 06:01:38 condchange: newState=false, cond=condjrfbmpg, oldState=true
        01/15/20 06:01:38 evalchange: newState=false, cond=condjrfbmpg, oldState=true
        01/15/20 06:01:38 condchange: newState=true, cond=condjr1o158, oldState=false
        01/15/20 06:01:38 evalchange: newState=true, cond=condjr1o158, oldState=false
        01/15/20 06:01:38 devicewatch: device=297, old="1", name=Hugos Room Fan, var=urn:upnp-org:serviceId:SwitchPower1/Status, new="0"
        01/15/20 06:01:38 condchange: newState=true, cond=condjrfajc1, oldState=false
        01/15/20 06:01:38 evalchange: newState=true, cond=condjrfajc1, oldState=false
        01/15/20 06:01:38 condchange: newState=false, cond=condjr1opgb, oldState=true
        01/15/20 06:01:38 evalchange: newState=false, cond=condjr1opgb, oldState=true
        01/15/20 06:01:39 runscene: scene=grpjouw7h8.true, sceneName=grpjouw7h8.true, group=3, notice=Starting scene group 3
        01/15/20 06:01:39 endscene: scene=grpjouw7h8.true, sceneName=grpjouw7h8.true
        01/15/20 06:01:39 devicewatch: device=300, old="1", name=Maddies Room Fan, var=urn:upnp-org:serviceId:SwitchPower1/Status, new="0"
        01/15/20 06:01:39 condchange: newState=true, cond=condjrfbmpg, oldState=false
        01/15/20 06:01:39 evalchange: newState=true, cond=condjrfbmpg, oldState=false
        01/15/20 06:01:39 condchange: newState=false, cond=condjr1o158, oldState=true
        01/15/20 06:01:39 evalchange: newState=false, cond=condjr1o158, oldState=true
        01/15/20 06:01:39 condchange: newState=false, cond=grpjxae2zt, oldState=true
        01/15/20 06:01:39 evalchange: newState=false, cond=grpjxae2zt, oldState=true
        01/15/20 06:01:39 condchange: newState=false, cond=condk39xbuj, oldState=true
        01/15/20 06:01:39 evalchange: newState=false, cond=condk39xbuj, oldState=true
        01/15/20 06:01:39 condchange: newState=false, cond=condk39uw0e, oldState=true
        01/15/20 06:01:39 evalchange: newState=false, cond=condk39uw0e, oldState=true
        01/15/20 06:01:39 condchange: newState=false, cond=grpjxaqbb3, oldState=true
        01/15/20 06:01:39 evalchange: newState=false, cond=grpjxaqbb3, oldState=true
        01/15/20 06:01:39 condchange: newState=false, cond=grpjouw7h8, oldState=true
        01/15/20 06:01:39 evalchange: newState=false, cond=grpjouw7h8, oldState=true
        01/15/20 06:01:39 devicewatch: device=304, old="1", name=Upstairs Fans, var=urn:toggledbits-com:serviceId:ReactorGroup/GroupStatus_grpjxae2zt, new="0"
        01/15/20 06:01:39 devicewatch: device=9, old="CoolOn", name=Nest Thermostat US, var=urn:upnp-org:serviceId:HVAC_UserOperatingMode1/ModeStatus, new="EnergySavingsMode"
        01/15/20 06:02:41 devicewatch: device=9, old="EnergySavingsMode", name=Nest Thermostat US, var=urn:upnp-org:serviceId:HVAC_UserOperatingMode1/ModeStatus, new="CoolOn"
        01/15/20 06:05:00 condchange: newState=false, cond=condkn0ibgz, oldState=true
        01/15/20 06:05:00 evalchange: newState=false, cond=condkn0ibgz, oldState=true
        01/15/20 06:20:14 devicewatch: device=9, old="22.5", name=Nest Thermostat US, var=urn:upnp-org:serviceId:TemperatureSensor1/CurrentTemperature, new="23"
        01/15/20 07:15:44 devicewatch: device=9, old="23", name=Nest Thermostat US, var=urn:upnp-org:serviceId:TemperatureSensor1/CurrentTemperature, new="22.5"
        01/15/20 07:37:34 devicewatch: device=9, old="22.5", name=Nest Thermostat US, var=urn:upnp-org:serviceId:TemperatureSensor1/CurrentTemperature, new="23"
        01/15/20 07:41:35 devicewatch: device=368, old="23", name=WU - Conditions, var=urn:toggledbits-com:serviceId:SiteSensor1/Value2, new="24"
        01/15/20 07:46:34 devicewatch: device=9, old="23", name=Nest Thermostat US, var=urn:upnp-org:serviceId:TemperatureSensor1/CurrentTemperature, new="22.5"
        01/15/20 07:56:35 devicewatch: device=368, old="24", name=WU - Conditions, var=urn:toggledbits-com:serviceId:SiteSensor1/Value2, new="23"
    Devices
        Main Bedroom Fan (292) urn:schemas-upnp-org:device:BinaryLight:1 (3/3); parent 290; plugin -
        Main Bedroom (290) urn:schemas-upnp-org:device:BinaryLight:1 (3/3); parent 1; plugin -
        Vera Connect Works W (5) urn:schemas-micasaverde-com:device:VeraConnectWWN:1 (0/-1); parent 0; plugin 8151
        Nest Thermostat US (9) urn:schemas-upnp-org:device:HVAC_ZoneThermostat:1 (5/1); parent 5; plugin -
        Maddies Room Fan (300) urn:schemas-upnp-org:device:BinaryLight:1 (3/3); parent 298; plugin -
        Hugos Bedroom (295) urn:schemas-upnp-org:device:BinaryLight:1 (3/3); parent 1; plugin -
        WU - Conditions (368) urn:schemas-toggledbits-com:device:SiteSensor:1 (4/0); parent 0; plugin 8942
        Hugos Room Fan (297) urn:schemas-upnp-org:device:BinaryLight:1 (3/3); parent 295; plugin -
        Maddies Bedroom (298) urn:schemas-upnp-org:device:BinaryLight:1 (3/3); parent 1; plugin -
```

Btw, I haven’t had any state change failures since rebooting my Plus. As a result I’ve reinstated weekly scheduled reboots (I had hoped Monthly would be enough).

This summary shows the “Fans On is TRUE” activity and “Off Logic is TRUE” activity running at the same time… look at the logged “runscene” entries, and the effect on the devices (“devicewatch”).

You may want to make sure your logic is interlocked sufficiently that both can’t fire together.

Also, set MaxEvents higher on this ReactorSensor… 100 or 150 maybe, so you can capture more history. May be useful.

That odd as I wasnt seeing any logic conflicts in the main status page.

The main status page only updates about every 2 seconds. That’s a Vera limitation–that’s as fast as UI7 gets updates from the controller. So anything that happens is less than two seconds may not be evident on the status page. The only way you would know is (a) the effect on devices, and (b) the state times change in the status view, but that’s a really subtle change (e.g. the state time may change from 18:00:14 to 18:00:15).

1 Like