This object is in archive! 

Best way to store datetime of "last movement"

Robert Hercz shared this question 7 years ago
Need Answer

Hi guys,


I'm trying to find a way to store Date, Time and SensorIdentifier for last movement, for later use (testing, retrieval)

Programmatically, it would make sense to set a variable to (NOW), inside a WHEN block, but the rule builder does not allow this.

(SensorIdentifier can of course be set, the issue is NOW).

Does anyone have any suggestion as to how I can achieve this?


Best regards

Robert

Replies (3)

photo
1

Dear Robert,

Please have a look at the attached picture. Did you mean on something like this?

Best regards,

Pero Zovkic

Files: Rule.jpg
photo
1

can't you just add a timestamp option piece which includes all the above features. This method seems a little convoluted. Plus, in the future you will need to be paying for a premium service just to get this simple timestamp via a variable.

photo
photo
1

Hi Pero,

Thanks. I do mean something like what you describe, only in a single variable instead.

I guess the best is to submit a request to add UnixTime as a separate property to the NOW object :-)


Best regards, Robert

photo
1

Pero,

I've been trying and testing and testing and trying, but not found any way to store a time or a date value, nor have I found any way to measure elapsed time.

The rule in your initial reply shows how to assemble the values of date and time in a message by having separate variables for each element value, but unfortunately I have yet to find a way to for example store a date or a time in a variable, not as numeric values and also not as strings.

Any tips or tricks would be highly welcomed!

Leave a Comment
 
Attach a file