InfraRed (Global Cache) control integration with LogicMachine #
Task #
How to control your AV equipment with Global Cache IR controller, from KNX and LogicMachine visualization?
Sending IR commands #
IR controllers from GC-100 or iTach family from Global Cache can be used for transmission. LogicMachine is connected to the IR controller via TCP/IP.
GC command string format #
Command,Modul:NumDev,Id,freq,Repeat,Оffset,P0,..,Pn^
(without spaces)
Command
- Command for execution by controller of Global Cache. To transmit IR command Command=sendir. See full list in the Global Cache documentation.Modul
- The module containing the appropriate IR port (e.g. for iTach=1)NumDev
- Number of port in the module starting with 1Id
- Id number of the command in range 0 – 65535Freq
- IR channel frequency in Hz, from 20000 – 500000Repeat
- on 0 – repeat the command up to 65535 times or while the command transmit is terminatedOffset
- Time period to repeat the telegram in the next transmissions (Repeat<>1), 1 – 255P0,...,Pn
- String sequence defining impulse sequence in IR telegram^
- Symbol defining the end of command string (\r)
Event script example #
Modify ip
, port
and cmd
as needed.
ip = '192.168.1.1'
port = 4998
cmd = 'sendir,1:1,1,37650,1,1,' ..
'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'
sock = require('socket').tcp()
sock:settimeout(5)
res, err = sock:connect(ip, port)
if res then
sock:send(cmd)
sock:receive()
sock:close()
else
log('connect failed', err)
end
IR command definition #
Sequence of P0,…,Pn
can be received:
- from Global Cache database 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
iLearn #
After receiving a telegram from the IR remote in the Edit View window the string will appear defining the command to use with the IR control channel from LogicMachine.