From: George C. <ge...@fe...> - 2014-02-07 01:16:04
|
Hi Jim, Thanks. My final config for it was to use the CODE, entry in the MHT so all the definitions were kept together. INSTEON_IOLINC, 22.7A.37, io_garage_door, Sensors #Garage Door 22.7A.37 2540 I/O Link CODE, $io_garage_door_sensor = new Insteon::IOLinc_sensor($io_garage_door); CODE, $Sensors -> add($io_garage_door_sensor); DOOR, io_garage_door_sensor, Garage_door With this, the on/off open/close mapping is automatic. if ( my $state = state_now $Garage_door ) { if ( $state eq 'open' ) { ... George On 02/06/2014 08:01 PM, Jim Duda wrote: > On 02/05/2014 02:56 PM, Kevin Robert Keegan wrote: >> George, >> >> As you discovered the IO_Linc is a strange device. Due to the complexity, the POD documentation for the IO_Linc is your friend. >> >> At some point we could add a MHT definition for the sensor, I was just concerned about polluting the read_table_a.pm <http://read_table_a.pm> library with a bunch of definitions. >> >> Kevin >> > I defined my IO_LINC device as a SWITCHLINC in the MHT like this: > INSTEON_SWITCHLINC, 17.77.D2:01, garage_door #, iolincs, PLM,0007 # v1.1 iolinc > > And I get get state_now via said without any trouble. > > if (my $state = said $garage_door) { > print_log "garage_door state: $state"; > if ($state =~ /off/) { > if ($g_GarageState->state( ) eq 'open') { > speak (text=> "notice: the garage door just closed"); > } > $g_GarageState->set('shut'); > } > elsif ($state =~ /on/) { > if ($g_GarageState->state( ) eq 'shut') { > speak (text=> "notice: the garage door just opened"); > } > $g_GarageState->set('open'); > } > } > > This seems to work fine, but I don't use IO_LINC. > > Jim > >> ------------------------------------------------------------------------------ >> Managing the Performance of Cloud-Based Applications >> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. >> Read the Whitepaper. >> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk >> >> >> >> ________________________________________________________ >> To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users >> > > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > ________________________________________________________ > To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users > |