PLEG logic question

I have a logic which is supposed to become true when the last PingJust true is 20 minutes ago. I always thought it was working, but today I looked at the stautus report and I don’t think it has done what I wanted it to. Last true PingJust was at 10:24, and NopingJ was last true 10:24. I guess I have a glitch in my logic… I always struggle with the NOW and when I want a condition to be true after a certain time or for a certain time. Somehow this does not want to compute in my head…

PingJust Ping Justine is Tripped false 2014-03-19 10:24:00.236 2014-03-19 10:27:10.125

NopingJ No (PingJust and (PingJust; Now > 20:00)) false 2014-03-19 10:24:24.243 2014-03-19 12:06:57.194

Mike,
You really need to include the Status report … or strip it down to include:

  1. Any associated inputs (Triggers, Device Properties, Schedules)
  2. Any associated conditions (and their inputs)
  3. Any associated actions.

Sorry I thought it might just be something very obvious and easy to see rather than having to go through my cluttered status report…

But here it is in .doc format for easier reading

Something is very wrong with your NOW computations.

Refresh your browser …
Can you cut and paste the value from the advanced tab of your PLEG:
ObjectStatusMap

I thought something was not working right as I had other problems, I think you had seen and responded on my other thread. So maybe it isn’t me…

Here it is:

{{name = ‘BothOff’, state = true, seq = 1395201675.7874, oseq = 1395201554.4573},{name = ‘AutoOn1’, state = false, seq = 1395201553.8146, oseq = 1395201554.4589},{name = ‘BothAutoOn’, state = false, seq = 1395201554.4614, oseq = 1395201675.7927},{name = ‘AutoOff1’, state = true, seq = 1395201675.1216, oseq = 1395201553.8281},{name = ‘LastTrip’, state = false, seq = 1395201554.4673, oseq = 1395201560.1779},{name = ‘AutoOn2’, state = false, seq = 1383951662.0296, oseq = 0},{name = ‘LastTripHall’, state = false, seq = 1383951662.0352, oseq = 0},{name = ‘AutoOff2’, state = true, seq = 1395207752.1679, oseq = 1395168698.1586},{name = ‘GardenOn’, state = false, seq = 1395170108.1243, oseq = 1395181295.1305},{name = ‘GardenOff’, state = false, seq = 1395181235.2375, oseq = 1395187241.1575},{name = ‘HallmotionOn’, state = false, seq = 1383951662.0178, oseq = 0},{name = ‘Night1’, state = false, seq = 1395168698.1387, oseq = 1395207752.1285},{name = ‘Vacation1’, state = false, seq = 1391936072.8923, oseq = 1392055174.2575},{name = ‘On3’, state = false, seq = 1395201554.4541, oseq = 1395201675.7841},{name = ‘Patio_door_opened’, state = false, seq = 0, oseq = 1395231501.5549},{name = ‘Patiodoor’, state = false, seq = 0, oseq = 0},{name = ‘FDmotion’, state = false, seq = 1395232181.0991, oseq = 1395232191.0447},{name = ‘MotionOn2’, state = false, seq = 1395232181.0674, oseq = 1395232190.9705},{name = ‘MotionFDarmed’, state = false, seq = 1395232181.0677, oseq = 1395232190.9709},{name = ‘Jdistance’, state = ‘44%2E622’, seq = 1395237019.1449, oseq = 1395235765.1932},{name = ‘WE11’, state = ‘0’, seq = 1395014400.2075, oseq = 1394841600.2131},{name = ‘PingMike’, state = false, seq = 1395209061.305, oseq = 1395209131.1309},{name = ‘Porchdooropen’, state = false, seq = 1395224053.5501, oseq = 1395224060.5602},{name = ‘Jdirection’, state = ‘0’, seq = 1395231152.6515, oseq = 1395231149.5905},{name = ‘Jhome’, state = false, seq = 1395171215.2369, oseq = 1395231151.8694},{name = ‘Jgoingaway’, state = false, seq = 1393530740.1059, oseq = 1393530833.432},{name = ‘PingJust’, state = false, seq = 1395224640.2367, oseq = 1395224830.1253},{name = ‘Mhome’, state = false, seq = 1395167114.0976, oseq = 1395209663.1418},{name = ‘Dark’, state = false, seq = 1395166898.1005, oseq = 1395207572.1005},{name = ‘AutoAway’, state = true, seq = 1395231151.8793, oseq = 1395167114.1218},{name = ‘AutoAway5m’, state = true, seq = 1395231501.1445, oseq = 1395167114.1251},{name = ‘AutoHome’, state = false, seq = 1395167114.141, oseq = 1395167116.8856},{name = ‘Jcomhome’, state = false, seq = 1393359528.6336, oseq = 1393359624.7245},{name = ‘Justaway’, state = true, seq = 1395231151.7233, oseq = 1395171120.0528},{name = ‘Porcharm’, state = false, seq = 1394469642.9429, oseq = 1395231501.1981},{name = ‘Cloakarm’, state = false, seq = 0, oseq = 1395231502.4382},{name = ‘LWindowarm’, state = false, seq = 1383161775.1605, oseq = 1395231502.1781},{name = ‘RWindowarm’, state = false, seq = 1383163025.1429, oseq = 1395231501.906},{name = ‘Kitchenarm’, state = false, seq = 1394552243.4742, oseq = 1395231501.361},{name = ‘Garagearm’, state = false, seq = 1394914176.082, oseq = 1395231501.7201},{name = ‘AutohomeON’, state = false, seq = 1395167116.8317, oseq = 1395231502.8157},{name = ‘NopingJ’, state = false, seq = 1395224664.2439, oseq = 1395230817.1949},{name = ‘Justnotnear’, state = true, seq = 1395231151.7319, oseq = 1394923568.2658},{name = ‘Jhomelights’, state = false, seq = 1393359624.4827, oseq = 1393396148.2312},{name = ‘_Jmute’, state = false, seq = 1395231136.5938, oseq = 1395236961.1524},{name = ‘JustSteady’, state = true, seq = 1395231152.718, oseq = 1395171373.4722},{name = ‘JustcomingC’, state = false, seq = 1393359528.6685, oseq = 1393359624.7599},{name = ‘_Junmute’, state = false, seq = 1395224053.6179, oseq = 1395231151.8767},{name = ‘Mikehome2’, state = false, seq = 1395167114.031, oseq = 1395209301.1165},{name = ‘Mikeaway1’, state = true, seq = 1395209301.117, oseq = 1395167114.0312},{name = ‘Mikeaway2’, state = true, seq = 1395209663.1747, oseq = 1395167114.1621},{name = ‘Justhome1’, state = false, seq = 1395171215.1802, oseq = 1395231151.8052},{name = ‘Mikecominghome’, state = false, seq = 1395167163.2842, oseq = 1395167223.2285},{name = ‘NOW’, state = true, seq = 1395236961.1004, oseq = 0},}

Mike,
You might need to set the LOG level for that PLEG to
Debug in Standalone file …
If it’s been in this state for a long time … turn Debug OFF (this will delete the log file) … then turn it back to standalone file.
THen send me the log file when you next see the problem.

Ok I’ve done that now. When I next see a problem i’ll send you a pm, and an email (my emails always end up in your spam)

thanks

@RichardTSchaefer

did you get my email with the log and status report and the pm ?

Received it … have not looked at it yet.

Ok great. As long as you have it, no rush. Thanks

@RichardTSchaefer

I might have found another case of PLEG not firing as it should.

PingJust Ping Justine is Tripped false 2014-04-02 14:53:05.371 2014-04-02 15:00:45.129

NopingJ No (PingJust and (PingJust; Now < 15:00)) false 2014-04-02 14:54:07.533 2014-04-02 15:00:45.210

My understanding is that condition should fire if the last PingJust is over 15 mins ago, so should have fired 15:08 ?

If it is wrong I can email you the logs tonight

Attached full status report in .doc format

(PingJust and (PingJust; Now < 15:00))

Will be true if for 15 minutes after PingJust, if PingJust is still true

(PingJust and (PingJust; Now > 15:00))

Will be true if PingJust is true and has been true for over 15 minutes.

why do I always struggle with these… I can never get my head round that. So the logic is wrong for what I want

what I wanted is the condition to be true when I did not have a ping for 15 mins…

@mikee123

Don’t be so hard on your self … You are only 1 character off … whats a < or a > among friends!

You might attach notifications to your conditions that are in doubt.
I always use Vera Alerts to tell me what conditions have just fired … It makes debugging easier.

so for what I want it is:

NOT (PingJust and (PingJust; Now > 15:00))

Mike,
If you want to test that something is FALSE and has been FALSE for 15 minutes you should use:

!PingJust and (!PingJust; NOW > 15:00)

If you want to test that something is TRUE and has been TRUE for 15 minutes you should use:

PingJust and (PingJust; NOW > 15:00)

Yes that makes sense now. Thanks