TI103.pm

NAME

ControlX10::TI103 - Perl extension for X10 'ActiveHome' Controller

SYNOPSIS

  use ControlX10::TI103;

    # $serial_port is an object created using Win32::SerialPort
    #     or Device::SerialPort depending on OS
    # my $serial_port = setup_serial_port('COM10', 4800);

  $data = &ControlX10::TI103::receive_buffer($serial_port);
  $data = &ControlX10::TI103::read($serial_port, $no_block);
  $percent = &ControlX10::TI103::dim_level_decode('GE'); # 40%

  &ControlX10::TI103::send($serial_port, 'A1'); # Address device A1
  &ControlX10::TI103::send($serial_port, 'AJ'); # Turn device ON
    # House Code 'A' present in both send() calls

  &ControlX10::TI103::send($serial_port, 'B'.'ALL_OFF');
    # Turns All lights on house code B off

DESCRIPTION

The TI103 is a bi-directional X10 controller that connects to a serial port and transmits commands via AC power line to X10 devices. This module translates human-readable commands (eg. 'A2', 'AJ') into the Interface Communication Protocol accepted by the TI103.

This code is based heavily on CM11.pm.

read

This checks for an incoming transmission. It will return "" for no input. It is largely untested.

EXPORTS

The send_ti103, receive_ti103, read_ti103, and dim_decode_ti103 functions are exported by default starting with Version 2.09. They are identical to the "fully-qualified" names and accept the same parameters. The export on request tag :FUNC is maintained for compatibility (but deprecated).

  use ControlX10::TI103;
  send_ti103($serial_port, 'A1');            # send() - address
  send_ti103($serial_port, 'AJ');            # send() - function
  $data = receive_ti103($serial_port);           # receive_buffer()
  $data = read_ti103($serial_port, $no_block);       # read()
  $percent = dim_decode_ti103('GE');         # dim_level_decode()

AUTHORS

David H. Lynch Jr. dhlii@dlasys.net http://dlasys.net:8888

COPYRIGHT

Copyright (C) 2006 David H. Lynch Jr. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 1 January 2006.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 537:

'=item' outside of any '=over'

Around line 542:

You forgot a '=back' before '=head1'

 TI103.pm