Getting started with OCIR

Output Control InfraRed (OCIR)


  • Runs Python 2.7 on Windows or Linux
  • Can be configured in Client Server mode
  • Controls one or more iTach or IrTek hardware devices
  • Can direct IR to one or multiple outputs
  • Currently supports remotes
    • Classic SA
    • Comcast XMP
    • ONO NEC
  • Written by Mark Adams, Cisco test engineer


Basic OCIR Installation

Installing Python 2.7 (32bit) on Windows (Win XP, Win 7, Win 8)

  • Go to the Active Python Download Page.
    • Click the Active Python Windows x86 link and download. Please do not get the (64-bit, x64) version!
    • Install with all default options.
    • File explore to C:\Python27\Doc and make a Desktop shortcut of the ActivePython27.chm Help File

Finding the DHCP given IP on the iTach

  • You may try their iHelp tool
  • Or our method:
    • Install WireShark
    • Connect PC running WireShark with iTach on an old Ethernet Hub (not a Switch)
    • Sniff the DHCP request and see what IP number was granted to the iTach.

Setting up a static IP on the iTach

  • Using a browser, type the iTach's DHCP given IP into the browser's URL box
  • The iTach IP2IR Setup and Configuration page should appear
  • Click Network and type in static IP in both IP Address and Gateway boxes
  • Type in in Subnet Mask box, click Save

Installing OCIR on Windows

  • Unzip the OCIR package.
  • Move aa_eclipse_workspace to the root of C drive (C:\aa_eclipse_workspace)

Set the iTach in OCIR

  • Edit
  • In class OcirLink edit the list entry in self.device_data
  • Change the self.tag.device_ip data to the new IP number

Launch the example OCIR IR script

  • Open a command prompt and type:
cd C:\aa_eclipse_workspace\py\ocir_v1.05\ir_scripts

Getting the list of available IR Commands

  • Open in an editor lists_of_key_names.txt
  • Use the table of command names specific to your remote

Adding more iTachs to OCIR script

  • Edit
  • In class OcirLink add a new list entry in self.device_data
  • Change the self.tag.device_ip data to the new IP numbers
  • Change the self.out_port1 / 2 / 3 to new names
    • Or you may use the same names to gang multiple outputs

Controlling more than one settop with the same iTach output

monoprice_667.jpg Part# 667, $0.61 6 inch stereo splitter cable
monoprice_668.jpg Part# 668, $0.95 6 foot stereo splitter cable

Optional Installations

Installing Optional Eclipse Python Development Environment

  • Go to the Eclipse Download Page
  • Download Eclipse Classic 4.2.x (Windows 32 Bit) zip file
    • Like,
  • Save it somewhere and extract zip file
  • Move the directory, eclipse to the root of C drive (C:\eclipse)
  • Right click C:\eclipse\eclipse.exe, and SendTo Desktop
  • Launch Eclipse
  • Create and or use the workspace directory, C:\aa_eclipse_workspace
  • Click do not ask again and okay
  • Add Spell Dictionary
  • Install PyDev Eclipse Plugin
    • In Eclispe menu, select Help - Install New Software
    • Click Add and enter Name: pydev, URL:
    • Select the PyDev box, Next, Select PyDev for Eclipse, Next, I agree, Finish.
    • Eclipse will restart
    • Open Eclipse menu: Window, Preferences, PyDev, Interperter - Python, New
    • Select executable C:\Python27\python2.7.exe, ok, ok, ok
    • Open Eclipse menu: File, New, Project, Select PyDev/PyDev Project, Next
    • In Project Name Box type: py, Finish, Yes use PyDev Prospective.
    • Copy your Python code in to C:\aa_eclipse_workspace\py and Refresh py directory.

Installing Optional Python Modules on Windows

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License