Page 1 of 1

List of possible events for device

Posted: 02 Apr 2014 17:13
by StatikPulse
I apologize if this was asked before.

I'm playing around with creating modules and I was wondering if there's a list of default event names for devices somewhere, or what is the best way to capture all events and output them so I can see what's available as I play with the device.

Thanks.

Re: List of possible events for device

Posted: 03 Apr 2014 03:25
by StatikPulse
Looks like I was able to capture everything using:

Code: Select all

this.controller.onAny
Looks like events are set when the device is manually triggered? I have a Leviton VRI06 switch that supports instant status. Any advice on how to capture a manual toggle?

Re: List of possible events for device

Posted: 06 Apr 2014 20:19
by ollfa
I've made an module which captures changes in the system. It uses "this.controller.onAny" and saves changes to a mysql db.

But for manual changes, like toggle a switch, status is not sent to the system because of a patent(Lutron). You have to press the update button in the UI. Or make a smart module which compensates for the lack of status reports.

I just copied the value logging module included in the latest install and wrote a python script for mysql access...
this.controller.onAny(function () {
var newArgs = get_values(arguments);
newArgs.unshift(this.event);
self.logEventMysql.apply(self, newArgs);
});

Re: List of possible events for device

Posted: 09 Apr 2014 18:30
by StatikPulse
As mentioned, the switch I'm using does support Instant Status (which is what the Lutron patent is for) so it does/should report it's status when manually triggered.

Re: List of possible events for device

Posted: 09 Apr 2014 20:34
by ollfa
Instant status, sounds good!

I donĀ“t have a event list but I hope its included in the documentation soon. I solved my problem this way;

var args = get_values(arguments);
//args example: 28,0,48,1,false, = device, ?, commandClass, instance, level,

debugPrint("device" + args[0] + ", reports level " + args[4])

This way I can do what ever I want with reporting devices and its values.