Smarter lock notifications with LUUP

I’ve got a Schlage deadbolt a door and I’d like to be able to use push notifications to keep tabs (to some extent) on who is coming and going.

The deadbolt will send me notifications for the following:
The deadbolt is unlocked
The deadbolt is locked
A PIN code is entered.

Looking at combinations of the 3 events…I can sort of tell what’s happening.

For example, right now if I get 3 notifications in a row:
PIN code 2 entered
Door unlocked
Door locked

Then it’s pretty reasonable to assume that user 2 has just arrived home.

Is there a way, and can somebody walk me through setting up a smarter notification that would look at these 3 events and then JUST send the notification that PIN code 2 was entered?

I don’t want to permanently disable the other notifications, but when multiple events happen within a short time window, I’d like to tell it to send only 1 notification, and tell it which one to send.

I have some other ideas too, but I think I can implement them on my own if somebody can walk me through just this first example.

And just so we’re clear – I have Automator.app and the PUSH notification portion of it working fine…it’s just this advanced scripting stuff that has me totally lost! I’m using UI5 and getting push notifications by a lock trigger event that sends the PUSH notification via a virtual automator.app device.

Search the forum for “prowl”. You can entrer some code associated with an event that will trigger a push to a Prowl client on your smartphone or computer. Its pretty easy to do.

Well I’m not having a problem with the Push notification part…I’m having a problem with how to parse multiple events that happen close together and then send along a notification for just one of them.

I also don’t currently have a windows or Mac machine running full time on my network. I have a laptop. And when I go, it goes.

Is there a way using LUUP to smarten the notifications, or is having Growl do it (and push them through with Prowl) my only option?

Couldn’t you just create a new scene that sends the push notification and have only the pin is entered trigger for the scene as opposed to having three triggers for the scene that sends the push?

Ok…let’s make this a little simpler.

Let’s say I just want to get a notification about the door being unlocked, and I want to know whether it’s been unlocked from the inside or outside.
As a human I can figure that out.

If the only notification I get is “Door Unlocked” than that’s simple. The door was unlocked from the inside.
If I get 2 notifications, one that says “PIN # entered” and then immediately another that says “Door Unlocked” then I know it was unlocked from the outside. Because you can’t unlock it from the outside without entering a PIN.

But instead of getting 2 notifications, I’d like the “PIN entered” event to suppress the sending of the “Door Unlocked” notification. Because if a PIN was entered, the door unlocked notification is redundant.

Right now I have separate scenes for PIN Entered and Door Unlocked. I’m guessing that the answer lies in combining them into 1, smarter scene. But I’m just not sure.

[quote=“mcleanrs, post:5, topic:170723”]Ok…let’s make this a little simpler.

Let’s say I just want to get a notification about the door being unlocked, and I want to know whether it’s been unlocked from the inside or outside.
As a human I can figure that out.

If the only notification I get is “Door Unlocked” than that’s simple. The door was unlocked from the inside.
If I get 2 notifications, one that says “PIN # entered” and then immediately another that says “Door Unlocked” then I know it was unlocked from the outside. Because you can’t unlock it from the outside without entering a PIN.

But instead of getting 2 notifications, I’d like the “PIN entered” event to suppress the sending of the “Door Unlocked” notification. Because if a PIN was entered, the door unlocked notification is redundant.

Right now I have separate scenes for PIN Entered and Door Unlocked. I’m guessing that the answer lies in combining them into 1, smarter scene. But I’m just not sure.[/quote]

So one thing you could look at is that Automator records the message and time stamp of the push notification as variables of the Automator.app device. You could use this in luup code to suppress sending of the second message?