From: Eloy P. <pe...@ch...> - 2013-04-25 14:46:49
|
Hi Marc, On 04/24/2013 01:28 PM, Marc MERLIN wrote: > On Wed, Apr 24, 2013 at 01:24:50PM -0400, Eloy Paris wrote: >> I'll send an update if I can figure out how to reflect the open/closed >> state of the door on one of the KeypadLinc's button LEDs. > > If you just use the scene syntax, it really is trivial. > Make a PLM scene that only contains the button(s) you want to switch. > Sync the new scene to the PLM > > Then you can say garagestate->set(ON) from perl code. > > That's it, that simple, no fuss :) I am testing your suggestion, and it does not seem to work because when I do garagestate->set(ON) to just turn on the LED associated with the button, that causes MisterHouse to think that the button was actually pressed, which causes MisterHouse to send a command to activate the door. I can control the LED, but when I control the LED it has the side effect of activating the door, which I don't want. Just to make sure I am not missing anything, here's what I have: items.mht: ------------------------------------------ INSTEON_KEYPADLINCRELAY, 22.91.ed:01, garage_light, All_Lights|Garage|Outside INSTEON_KEYPADLINCRELAY, 22.91.ed:03, kpl_garage_scene_a, buttons INSTEON_ICONTROLLER, 11, kpl_scene_a_light, All_Scenes SCENE_MEMBER, kpl_garage_scene_a, kpl_scene_a_light, on ------------------------------------------ User code: ------------------------------------------ # Handle KeypadLinc scene A button press if ($kpl_garage_scene_a->state_now() ) { $garage_centurion->set("dob", 1); # $garage_centurion is an Owfs_Item. This toggles the garage door } if ($state = state_changed $garage_door) { # Update indicator in KeypadLinc by the garage entrance $kpl_scene_a_light->set($state eq "open" ? ON : OFF, "garage_door.pl"); ---> Does not work because it'll cause the door to be toggled above } ------------------------------------------ Cheers, Eloy Paris.- |