Does eventhandler work for device types?

The documentation ( implies that you can use:
def eventHandler(evt)

to get more information about an event. But I think it can only be used in smartapps. Can anyone confirm this or tell me how to do it in a device type handler?

Can you describe more about what you are actually trying to do? i.e., what is your end requirement?

Offhand, I don’t think eventHandler() is applicable within a DTH, because a DTH receives events through its parse() method.

When I posted this, I was trying to look for a few extra debugging tools, mostly. Looked like a lot of good info could be in those events, was trying to get at it.

If it only works in smartapps, that’s okay. Just want to clarify at this point.

In a DTH, indeed, there is a lot of useful information from “events”, but the events are routed to parse(), not to an arbitrary Event Handler.

You know - I was thinking of the kind of events that you do when you do “createevent” or “sendevent”. Pretty dumb - sorry about that!

I’m familiar with parse (and even “intercepting” it) although there are some things in here I didn’t actually realize. :slight_smile: