Calling All Gurus and Minions! Need Help in writing motion times to string variable



1) Give a description of the problem
I want to log the time and date that my motion detector goes active

2) What is the expected behavior?
Log date and time in a string variable that will self purge every 3 days

3) What is happening/not happening?
I found some other variable that almost fit the bill made some changes but can’t get it quite right.

**4) Post a Green Snapshot of the piston!
I get this:

Using This:

:grinning:Thanks in Advance for any help! :grinning:


Don’t have access to my computer to test anything but I will give a couple suggestions:

  1. Use three variables: motionToday, motionYesterday, and motionBeforeYesterday. Every night at midnight (or whatever time you want to reset), shift the data:
  2. Collect up the times by simply writing to the variable motionToday and separate events by commas. This will allow you to use array functions like count() or arrayItem() to manipulate/view the resulting data.
    Note: I’m not sure if $currenteventtime is the right variable but hopefully you get the idea.