Hey all,
Are we able to pull device events or Hubitat Logs for use in Rule Machine (either legacy or 5.0)?
My situation is as follows - My Yale lock only shows the following device states:
- "lastCode" (Whatever the last user code that was used)
- "lock" (if the lock is currently locked/unlocked)
- Few other code-related things that are unrelated to this post, really
So using Rule Machine, I can't really create a notification that says "Lock was physically locked" or "Lock was locked via Z-Wave", etc. That being said, it appears as though Device Events and Hubitat Logs has this information, so it's definitely provided via Z-Wave:
dev:3152021-07-28 18:56:32.815 infoFront Door Lock was manually locked [physical][6:1]
dev:3152021-07-28 18:56:22.072 infoFront Door Lock was manually unlocked [physical][6:2]
dev:3152021-07-28 18:27:28.404 infoFront Door Lock was manually locked [physical][6:1]
dev:3152021-07-28 18:27:21.561 infoFront Door Lock was unlocked by Jane Doe[6:6]
dev:3152021-07-28 18:27:09.052 infoFront Door Lock was autolocked[6:9]
dev:3152021-07-28 18:26:31.855 infoFront Door Lock was manually unlocked [physical][6:2]
dev:3152021-07-28 17:58:09.633 infoFront Door Lock was manually locked [physical][6:1]
dev:3152021-07-28 17:57:20.767 infoFront Door Lock was manually unlocked [physical][6:2]
dev:3152021-07-28 17:54:08.813 infoFront Door Lock was manually locked [physical][6:1]
dev:3152021-07-28 17:53:57.623 infoFront Door Lock was unlocked by John Doe[6:6]
dev:3152021-07-28 17:53:03.136 infoFront Door Lock was manually unlocked [physical][6:2]
I could at this point send a notification when the door is locked or unlocked, but anything beyond "door is unlocked/locked" is impossible. It's also really not doable to say how the door was locked or unlocked, as
ASK
How can I leverage these logs or Device Events in a Rule Machine message action? At the very least, I'd love to be able to send that raw log message, and my stretch goal is to use regex, etc to modify the message to remove pieces of the string, etc.
Of course, a driver update to incorporate this info would be ideal, but hoping I can work around the issue short-term using RM.
Thanks!