From: Gregg L. <gr...@li...> - 2006-09-28 14:28:29
|
Hi Tom, Quoting Tom Van den Bon (9/28/06 10:14 AM): >> ... good to hear you have working listeners now. Sorry about the early >> failed start on using the external hub. >> > Not a problem - I'm glad it is working, makes mh seem alot more usefull > if you have some hardware bringing in data and events. agreed. For the record, the issue was specific to external hubs that I had not tested against; the (normal) use of the in-built mh xPL hub was unaffected. > So if I have some lights in a group called 'outside', I can add the > generic items to this group yep > - or can I only create a group for certain > items? no such limit exists > So it will call this method(hook) even if I set the state to the same > value again ? I don't think it should be too big a problem. Is there a > way that I can find out what the previous state was before the hook > method was called ? #one way is to declare a var outside of the hook that is updated by the hook: my $prior_state = '?????????'; # initialize to a state that is invalid # note, $prior_state's value won't be preserved across reloads # if this is important, then consider using the $Save hash. # then, in your "hook" sub: if ($state ne $prior_state) { # then, the state has changed # be sure to update $prior_state $prior_state = $state; } |