1) Give a description of the problem
I am trying to use a piston to determine if someone may need assistance. In short, I want to see if someone has been home for an extended period of time but hasn’t opened a door. I have tried a number of if/then scenarios but can’t get it to work. I’ve included two screenshot with two of the many approaches I’ve tried but that haven’t worked.
2) What is the expected behavior?
If the individual’s presence hasn’t changed and they haven’t opened their back door, send an SMS alerting a family member something may be wrong.
3) What is happening/not happening?
I am not getting a notification. In one case, the log shows the piston never fired. In the other case, it looks like both conditions (presence and door not opened) were true but the notification wasn’t received.
**4) Post a Green Snapshot of the piston![image|45x37]
Note that the “2 Minute” wait is just for testing. When this is working, I will change it to a 10 hour wait. For this one, the log remains blank which suggests the conditions weren’t met:
I changed the logic in this one. The log suggests the conditions were met but no notification was received:
10/9/2017, 8:13:45 PM +499ms
+6ms ╔Starting piston… (v0.2.0e8.20170918)
+324ms ║╔Subscribing to devices…
+360ms ║║Subscribing to xxxxx’x iPhone.presence…
+373ms ║║Subscribing to Back Door.contact…
+523ms ║╚Finished subscribing (208ms)
+559ms ║Comparison (enum) present stays (string) present = true (6ms)
+571ms ║Comparison (enum) closed stays (string) closed = true (3ms)
+814ms ╚Piston successfully started (814ms)
5) Attach any logs (From ST IDE and by turning logging level to Full)
For the first screenshot, no log was generated. I included the log for the second example with the second screenshot above but I’m posting here again:
10/9/2017, 8:13:45 PM +499ms
+6ms ╔Starting piston… (v0.2.0e8.20170918)
+324ms ║╔Subscribing to devices…
+360ms ║║Subscribing to xxxx’s iPhone.presence…
+373ms ║║Subscribing to Back Door.contact…
+523ms ║╚Finished subscribing (208ms)
+559ms ║Comparison (enum) present stays (string) present = true (6ms)
+571ms ║Comparison (enum) closed stays (string) closed = true (3ms)
+814ms ╚Piston successfully started (814ms)