Get last device event date/ timestamp in RM

Hello. Is there a way to extract the last device event date/timestamp and set to a local variable in RM?

I use this to set a Global Variable, with a delay, when the hub is rebooted. That GV is then used in a few rules.

You could do something similar with any device event. If that's what you mean. If not please post your scenario

EDIT: To see what you can do with Global variables check out this thread.

1 Like

Thanks but I was referencing device events, not hub location events.

You can use Global Variable or Local Variable for devices events and to set time too.

Create GV or LV - Set Time Stamp - chose 'Time' - set a time (required)

Make rule ....

Here I made a sample for you.

I would use GV if you plan to use it with multiple rules, but without knowing your end game it is hard to say which is better (I am also still learning RM)

Thanks, but I was looking to pull the last event based on a weekly scheduled rule. Each Saturday morning query several devices and check for an extended amount of time indicating a possible battery failure. Thoughts?

I think the problem is that sometimes battery devices will show good battery life, however they stop checking into HE.

Ideally the app will monitor for battery level and last event timestamp/ checkin.

Why didn't you just say that? lol in that case just use Device Watchdog. I then use the Follow Me driver to out put the results to my dashboard tile for locks.

1 Like

Thank you!

1 Like