Skip to content
ggodart edited this page Jan 2, 2021 · 3 revisions

IR_Item

See original

SYNOPSIS

  $TV = new IR_Item 'TV';
  $v_tv_control = new  Voice_Cmd("tv [power,on,off,mute,vol+,vol-,ch+,ch-]");
  set $TV $state if $state = said $v_tv_control;

  $VCR = new IR_Item 'vcr', '3digit';
  set $VCR "12,RECORD" if time_cron('59 19 * * 3');
  set $VCR "STOP"      if time_cron('00 20 * * 3');

WARNING:

Many of these devices are obsolete and all of the links on this page are broken

DESCRIPTION

This object controls IR transmiters. The devices currently supported are the X10 IR Commander, HomeVision, CPU-XA/Ocelot/Leopard, and UIRT2 (http://www.fukushima.us/UIRT2/).

The X10 IR Commander (http://www.x10.com/products/ux17a_bj2.htm) receives commands from the wireless CM17 (firecracker) interface. Currently, you must use the X10 supplied software (http://www.x10.com/commander.htm and/or ftp://ftp.x10.com/pub/applications/commander/) to program the IR Commander to use the codes for your various remotes.

INHERITS

Generic_Item

INI PARAMETERS

None

METHODS

Method Description
new($type, $code, $interface, $mapref) Creates a new Item.
$type is the type of device being controlled. Default is TV. Here are the only valid types for the X10 IR Commander; TV, VCR, CAB, CD, SAT, DVD
$code specifies how numbers will be treated. Default is 2digit.
- noPad : numbers are not modified
- 2digit : single digits will be padded with a leading zero
- 3digit : numbers will be padded to 3 digits with leading zeros
- addEnter: adds an ENTER command after any numbers, to make changing channels faster on devices that wait for a timeout (e.g. Sony TVs).
$interface is the transmitter to be used. Default is cm17.
- cm17 : X10 IR Commander
- homevision: HomeVision
- ncpuxa : CPU-XA/Ocelot/Leopard
- uirt2 : UIRT2 (http://www.fukushima.us/UIRT2/)
- xAP : Sends / receives data via the xAP protocol.
$mapref is a reference to a hash that specifies commands to be mapped to other commands. This is useful for transmitters like the Ocelot which use slot numbers instead of device and function name pairs. Default is a reference to a hash containing ( ON => POWER, OFF => POWER ) Which you would not want if you had discrete ON and OFF codes.

INHERITED METHODS

Method Description
state Returns the last state that was sent
state_now Returns the state that was sent in the current pass.
state_log Returns a list array of the last max_state_log_entries (mh.ini parm) time_date stamped states.
set($command) Sends out commands to the IR device. Here is a list of valid commands for the X10 IR Commander:: Note: Commands are not case insensitive
POWER MUTE
CH+ CH-
VOL+ VOL-
' 1 2<br/> 3 4<br/> 5 6<br/> 7 8<br/> 9 0<br/> MENU ENTER<br/> FF REW<br/> RECORD PAUSE<br/> PLAY STOP<br/> AVSWITCH DISPLAY<br/> UP DOWN<br/> LEFT RIGHT<br/> SKIPDOWN SKIPUP<br/> TITLE SUBTITLE<br/> EXIT OK<br/> RETURN

AUTHOR

SEE ALSO

None

Clone this wiki locally