Overview
CEC (Consumer Electronics Control) is an HDMI feature that allows devices to send control commands over the HDMI cable. In a simple point-to-point setup, this allows a TV remote to control a connected source device.
CEC works reliably when a single source is connected to a single display. However, in a distributed HDMI over IP system, one source may be routed to multiple displays. Without proper control management, a single CEC command (such as Play or Power On) could affect multiple zones unintentionally.
To prevent this, Just Add Power devices isolate native HDMI CEC communication and instead allow CEC commands to be intentionally passed to a specific endpoint device through IP control.
CEC over IP
In a Just Add Power system, the physical CEC link between the source and display is interrupted at the Encoder and Decoder.
- CEC commands from a source stop at the Encoder.
- CEC commands from a display stop at the Decoder.
CEC is then treated similarly to IR over IP or Serial over IP. A control system sends a CEC command to a specific Just Add Power device, which then forwards the command to the connected source or display.
This ensures CEC commands are zone-specific and predictable.
Access
CEC commands are entered through the Command Line Interface (CLI) by telnetting to the IP address of the appropriate Encoder or Decoder.
All commands are case-sensitive.
Built-In Commands
The following CEC commands are built into Just Add Power devices and are supported in standard drivers:
| Function | CLI Command | API Command | Notes |
|---|---|---|---|
| Power On | |
|
Works on most displays |
| Power Off | |
|
Works on most displays |
| Select HDMI 1 | |
|
Works on most displays and AVRs |
| Audio Mute | |
|
Primarily for AVR HDMI outputs |
| Audio Un-mute | |
|
Primarily for AVR HDMI outputs |
CEC Mode Behavior Modification (cec_mode)
A configurable parameter called cec_mode allows modification of how the following built-in commands behave:
cec_tv_on.shcec_tv_off.sh
This setting allows the system to automatically send an additional cec_watch_me.sh command before or after a power command. This can improve reliability on displays that require an active input selection event in addition to a power command.
Available Options
Multiple options may be applied simultaneously. When more than one is set, all selected behaviors will execute.
| Option | Behavior |
|---|---|
|
Sends cec_watch_me.sh BEFORE cec_tv_on.sh |
|
Sends cec_watch_me.sh AFTER cec_tv_on.sh |
|
Sends cec_watch_me.sh BEFORE cec_tv_off.sh |
Applying the Setting
Use the following syntax in the CLI:
Apply one option:
astparam s cec_mode wake_on
Apply two options:
astparam s cec_mode wake_on wake_off
Apply all options:
astparam s cec_mode wake_on wake_off watch_on
After applying the setting, reboot the device for changes to take effect.
Custom Commands
Any valid CEC command can be sent through Just Add Power if the correct hexadecimal sequence is known.
Format
CEC commands consist of hexadecimal byte pairs. The first pair identifies the sending and receiving logical addresses. Subsequent pairs define the command and any associated parameters.
Example:
EF 82 10 00
To send a custom command:
CEC_SEND_BYTES EF 82 10 00
Finding CEC Codes
Because CEC is part of the HDMI specification, many codes are standardized. However, manufacturer implementation varies. Always test commands before deployment.
A commonly used CEC lookup tool is:
CEC-O-Matic is published and maintained by INCYMA. All credit for that tool belongs to its respective owners.
Common Custom Codes
Begin all entries below with CEC_SEND_BYTES
| Function | Code | Notes |
|---|---|---|
| Power On | E0 04 |
Works on most displays |
| Power Off | E0 36 |
Works on most displays |
| Select HDMI 1 | EF 82 10 00 |
Works on most displays and AVRs |
| Select HDMI 2 | EF 82 20 00 |
Works on most displays and AVRs |
| Select HDMI 3 | EF 82 30 00 |
Works on most displays and AVRs |
| Toggle Mute | E0 44 43 |
Device-dependent |
| Volume Up | E0 44 41 |
Device-dependent |
| Volume Down | E0 44 42 |
Device-dependent |

