Finding event data on an IF trigger


#1

I am using a DH from RBoy apps - obviously I cant post the code for this here but the DH I am using is for a Yale Keyfree Zwave Lock. Its one of the types that goes onto PVC and composite doors.
When you pull the handle up (to lock the door) you get a Lock event, but you also get a lock event when the handle automatically locks etc.
I spoke to RBoy support and they told me to look in the data and within that data field look at type where you can check for the value manual.
So my question is, how do I look in the data that comes with the lock trigger in webCoRE?
I am wanting to create a trigger on lock event when the type is manual only (handle pulled up).

Thanks


#2

I would go into the IDE live logging and trigger the locks like how you’d expect it and watch the live feed for the device output, that is where I would start since you can’t post the handler.


#3

Well it is done via the createEvent class.
Here are some snippets:

map.descriptionText = "Unlocked manually"
map.data = [ method: “manual” ]
if (map) {
if (map.data) {
map.data.lockName = deviceName
} else {
map.data = [ lockName: deviceName ]
}
result << createEvent(map)
}


#4

What do you have available for attributes when you select that lock device.


#5

I have all these guys!:


#6

I don’t see anything in there (that stands out) that might have the info you need.


#7

Here is a screenshot of the logs.
As you can see I am trying to get hold of the additional map data, in particular the method variable. I need to pick up when it is ‘manual’.

Thanks


#8

I see it on the first event, maybe someone with the same dth can shed some light on how to capture that data section.


#9

Found it! Just to let anyone else know…this kind of data is in the $args variable.
With a bit of string manipulation I got the method value!


#10

Sorry for reviving an old thread. Just wondering what your piston looks like? I’m trying to trigger something when the ‘manual’ knob is used to lock my door. I see the ‘method:manual’ in the logs. Just not sure how to input that data to use in webcore.


#11

Hi, I am travelling right now, but here is a screen shot. Let me know if it helps!


#12

Thank you so much! I’ll try this when I’m home. Safe travels.

Edit: I used line 20 of your piston and it works great!! Really appreciate it. Now I’m frustrated again trying to figure out what the line actually means :grinning: Again, thank you.