IR blaster
In the IR blaster role, the board drives an ELKSMART USB IR dongle on its USB host port, and takes IR codes over the network the way a Global Caché iTach does: the iTach TCP API on port 4998. GEM's Global Caché iTach and Global Caché drivers use it as they would an iTach, as can other control systems and apps that speak iTach. Use it to switch TVs, cable boxes and projectors that only have an IR remote.
Set up the board
- Choose IR blaster under Settings and Save & reboot.
- Plug the dongle straight into the board's USB host port (see dongles). The IR blaster panel shows its name and ID.
- Aim the dongle at the equipment's IR window.
- Enabled: accept iTach clients on TCP 4998 is on from the start:
choosing the role is the opt-in, and an iTach has no password either.
Fill in Allowed clients (blank: anyone) with the controllers that may
send codes, such as
192.168.1.0/24 10.0.0.5, and choose Save. Changes apply at once.
The iTach API has no password or encryption, and the admin password doesn't cover it. Anyone allowed to connect can send codes. Use the allow list.
The panel shows the connected clients under Clients, the codes sent and learned under Codes, and anything wrong under Problems.
Use it from GEM
- In GEM, add a device with the Global Caché iTach driver (the
Global Caché family driver works too). Set IP Address to the
board's address and leave TCP Command Port at
4998. - Enable it. GEM asks the board for its ports and creates one
IR Transmitter child device at
1:1. - On that child, set the Command Set to the equipment's IR codes:
Pronto hex with
command_formatset tohex, or Global Cachésendircodes withgc.
GEM adds sendir,1:1, itself, so a code in a GEM command set is the part
after it: 1,38000,1,1,341,170,....
GEM's learn_ir and stop_learn commands turn the board's learning on and off (see learn a code).
The board doesn't send Global Caché's discovery beacon, so add it by IP address. Give it a static IP or a DHCP reservation.
Test a code
Paste a code into Code and choose Send. It takes a whole sendir
line, or a code as GEM stores it, without sendir,1:1,:
sendir,1:1,1,38000,1,1,172,172,21,64,21,64,21,64,21,21,...
1,38000,1,1,172,172,21,64,21,64,21,64,21,21,...
The board takes codes the way an iTach does: sendir,1:1,<id>,<frequency>,<repeat>,<offset>,<on>,<off>,...,
with the on and off times in carrier periods. Compressed codes, where the
letters A to O stand for pairs already spelled out, work too. That is
the form GEM writes when it converts Pronto hex.
Learn a code
- Choose Learn. The button reads Stop learning while the board listens, for up to a minute.
- Hold the remote within about 1 cm of the dongle and press the button once.
- The code appears in Code as a whole
sendirline. Send it to check it works. For GEM, copy everything aftersendir,1:1,.
Learned codes come back at 38 kHz: the dongle doesn't report the carrier frequency, and 38 kHz suits most TVs and set-top boxes. A press often comes back as several frames, because many remotes repeat a code or send more than one per press. A capture of fewer than 6 pulses is taken as stray light and ignored. If a learned code doesn't work, learn it again.
A code to send interrupts learning, which resumes after it has gone out.
How codes go out
Codes go out one at a time, in the order they arrive, from every client.
Each is answered completeir,1:1,<id> once the dongle reports it has sent
it. Up to 8 codes can wait; one more is answered busyIR,1:1,<id>. stopir
drops the codes still waiting, but can't stop the one going out.
iTach commands
| Command | Answer |
|---|---|
getdevices | device,0,0 ETHERNET, device,1,1 IR, endlistdevices |
getversion | the firmware version |
get_NET,0:1 | NET,0:1,UNLOCKED,DHCP or STATIC, then IP address, netmask and gateway |
get_IR,1:1, set_IR,1:1,IR | IR,1:1,IR (IR output is the only mode) |
sendir,1:1,… | completeir,1:1,<id> once sent, or busyIR,1:1,<id> |
stopir,1:1 | stopir,1:1 |
get_IRL | IR Learner Enabled, then a sendir line for each code learned |
stop_IRL | IR Learner Disabled |
End each command with a carriage return. Errors come back as
ERR_<connector>,<code> with iTach's codes, such as ERR_1:1,009 for bad
pulse data. Learned codes go to every client that sent get_IRL. Up to 4
clients can be connected at once.
To try it by hand:
printf 'getdevices\r' | nc -q1 <board> 4998
Dongles
ELKSMART USB IR dongles, with USB IDs 045c:0132, 045c:0184 and
045c:0195. Tested: the 045c:0132 Smart IR Blaster. The board drives
one dongle, plugged in directly: hubs aren't supported. It has one IR output,
connector 1:1.
Limits
- One dongle, no hubs, one IR output.
- Up to 4 clients, and 8 codes waiting.
- A code can have up to 260 on/off pairs, a repeat count of 1 to 50 and a
carrier of 15 to 500 kHz. A long code with many repeats can still be too
long for the dongle in one go, and is answered
ERR_1:1,020. - Learned codes are always reported at 38 kHz.
stopircan't stop a code that is already going out.- No discovery beacon.