Example: InfraRed control with LogicMachine


How to control your AV with Global Cache IR control channel equipment, from KNX and LogicMachine visualization?

IR command transmit

IR controller from GC-100 or iTach family from Global Cache can be used for transmission.
LogicMachine is interconnected with IR controller over Ethernet or RS-232 serial port.

Below you can find a script code for LogicMachine Event-based script to transmit a command:

Source code    
  1. local socket = require("socket")
  2. local tcp = assert(socket.tcp())
  4. tcp:connect(IP_adress, port); -- IP_adress: IP address
  5. -- of GlobalCache controller
  6. -- port: port number
  7. -- of GlobalCache controller
  8. -- default: 4998
  9. tcp:send(GC_Command); -- GC_Command: transmit string
  10. -- to controller GlobalCache
  11. tcp:receive()
  12. tcp:close()

GC_Command string’s format (without spaces):

  • Command: Command for execution by controller of Global Cache. To transmit IR command Command=sendir. See full list in GLobal Cache manual.
  • Modul: The module containing the appropriate IR port (e.g. for iTach=1
  • NumDev: Number of port in the module starting with 1.
  • Id: Id number of the command in range 0 – 65535
  • Freq: IR channel frequency in Hz, from 20000 – 500000
  • Repeat: on 0 – repeat the command up to 65535 times or while the command transmit is terminated
  • Offset: Time period to repeat the telegram in the next transmissions (Repeat<>1), 1 – 255
  • P0,…,Pn: String sequence defining impulse sequence in IR telegram
  • ^: Symbol defining the end of command string, OD (Hex)


Source code    
  1. DevIR05CmdH="sendir,1:1,1,37650,1,1,"; -- неизменная часть простой IR команды
  3. tcp:send(DevIR05CmdH ..
  4. "341,171,21,21,21,21,21,64,21,21,21,21,21,21,21,21,21,21,21,64,21,64,21,21,21,64,21,64,21,64,21,64,21,64,21,64,21,21,21,21,21,21,21,64,21,21,21,21,21,21,21,21,21,64,21,64,21,64,21,21,21,64,21,64,21,64,21,1520,342,85,21,3765\r");
  5. -- "\r" this is "0D" (Hex) in LogicMachine.

IR command definition

Sequence of P0,…,Pn can be received:

  • from Global Cachedatabase of IR commands
  • by scanning IR commands

For scanning you will need:

  •  Scanner of IR commands, e.g., Global Cache iTach IP IP2IR
  • Scanning application Global Cache iLearn
  • PC with communication possibility with iLearn and scanner 



















After receiving a telegram from IR remote in the “Edit View” window the string will appear defining the command to use with IR control channel from LogicMachine.