CEC: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Added information on changing the Cec device name)
 
(38 intermediate revisions by 21 users not shown)
Line 1: Line 1:
[[File:Pulse Eight CEC.jpg|300px|right|thumb|The Pulse-Eight USB to CEC adapter, for devices that don't have CEC connected to their internal HDMI pins.]]
[[File:Pulse Eight CEC.jpg|300px|right|thumb|The Pulse-Eight USB to CEC adapter, for devices that don't have CEC connected to their internal HDMI pins.]]
{{mininav|[[Remote controls]]}}
{{mininav|[[Remote controls]]}}
<section begin="intro" />[[w:Consumer Electronics Control|CEC]] ({{u|C}}onsumer {{u|E}}lectronics {{u|C}}ontrol) allows for control of devices over the HDMI port. Since v11 (Eden) XBMC comes with [http://libcec.pulse-eight.com/ libCEC] which allows control of the XBMC interface over the standard TV remote that comes with your TV. As buttons are pressed the remote command is sent via the HDMI cable to your XBMC device.<section end="intro" />
<section begin="intro" />[[w:Consumer Electronics Control|CEC]] ({{u|C}}onsumer {{u|E}}lectronics {{u|C}}ontrol) allows for control of devices over the HDMI port.  
 
All modern televisions and AV-receivers support HDMI-CEC, which is a technology that allows devices to talk with each other over the HDMI cable. {{Kodi}} comes with [http://libcec.pulse-eight.com/ libCEC] (CEC abstraction and interface library from Pulse-Eight) which allows control of the {{Kodi}} input over the standard TV remote that comes with your TV. As buttons are pressed the remote command is sent via the HDMI cable to your {{Kodi}} device.
 
Using this feature a {{Kodi}} compatible CEC controller/adapter will send and receive remote key presses to and from your television and AV-receiver via [http://libcec.pulse-eight.com/ libCEC].<section end="intro" />


CEC allows you to do things such as:
CEC allows you to do things such as:
* Controlling XBMC from the TV's remote control
* Controlling {{Kodi}} from the TV's remote control
* Automatically switch to the right TV input device
* Automatically switch to the right TV input device
* Letting the HTPC control what mode your audio receiver is on when the TV switches on
* Letting the HTPC control what mode your audio receiver is on when the TV switches on
Line 11: Line 15:
* And a lot more!
* And a lot more!


== Settings ==
=Overview=
Settings for your CEC devices can be found in:
Consumer Electronics Control (CEC) is an HDMI feature designed to allow the user to command and control up-to 15 CEC-enabled devices, that are connected through HDMI,[63][64] by using only one of their remote controls (for example by controlling a television set, set-top box, and DVD player using only the remote control of the TV).[65] CEC also allows for individual CEC-enabled devices to command and control each other without user intervention.
 
It is a one-wire bidirectional serial bus that is based on the CENELEC standard AV.link protocol to perform remote control functions. CEC wiring is mandatory, although implementation of CEC in a product is optional. It was defined in HDMI Specification 1.0 and updated in HDMI 1.2, HDMI 1.2a and HDMI 1.3a (which added timer and audio commands to the bus). USB to CEC adapters exist that allow a computer to control CEC-enabled devices.
 
{{Kodi}} uses libCEC (CEC library) from Pulse-Eight for send and receive CEC commands over the HDMI bus, this is because libCEC acts an abstraction layer and translate the commands to match each vendor and devices compatibility issues.
 
libCEC is aimed at being a reference implementation of the HDMI 1.4b Specification, however what each adopter supports is not always what they should support. Equally some mandatory features of HDMI-CEC are not implemented by some vendors.
 
{{youtube|1eDJbT35X5k}}
 
'''The following is a list of the most commonly used HDMI-CEC commands:'''
* '''One Touch Play''' allows devices to switch the TV to use it as the active source when playback starts
* '''System Standby''' enables users to switch multiple devices to standby mode with the press of one button
* '''Preset Transfer''' transfers the tuner channel setup to another TV set
* '''One Touch Record''' allows users to record whatever is currently being shown on the HDTV screen on a selected recording device
* '''Timer Programming''' allows users to use the EPG (Electronic Program Guides) that are built into many HDTVs and set-top-boxes to program the timer in recording devices like PVRs and DVRs
* '''System Information''' checks all components for bus addresses and configuration
* '''Deck Control''' allows a component to interrogate and control the operation (play, pause, rewind etc.), of a playback component (Blu-ray or HD DVD player or a Camcorder, etc.)
* '''Tuner Control''' allows a component to control the tuner of another component
* '''OSD Display''' uses the OSD of the TV set to display text
* '''Device Menu Control''' allows a component to control the menu system of another component by passing through the user interface (UI) commands
* '''Routing Control''' controls the switching of signal sources
* '''Remote Control Pass Through''' allows remote control commands to be passed through to other devices within the system
* '''Device OSD Name Transfer''' transfers the preferred device names to the TV set
* '''System Audio Control''' allows the volume of an AV receiver, integrated amplifier or preamplifier to be controlled using any remote control from a suitably equipped device(s) in the system
 
= Settings in {{Kodi}} for CEC =
These instructions work for all libCEC compatible HDMI-CEC controllers and adapters, such as the Pulse-Eight USB - CEC Adapter or the HDMI-CEC controller built-into the Raspberry Pi.
 
Settings for your CEC devices can be found in: [[Settings/System/Input|Kodi Input Settings]]
 
CEC uses the '''[[keymap|remote.xml keymap]]''', editing that XML file will allow you to customize most buttons.


System -> Settings -> System -> Input Devices -> Peripherals -> CEC adapter
To identify button names, enable the [[Log_file|debug log]] and look for OnKey messages. Unfortunately the key name reported is bogus and you will need to deduce it by searching for the reported action in the [[Keymap#Defaults|default remote.xml]] and noting the key that causes the action in the window showing when the message was logged.


CEC uses the '''[[keymap|remote.xml keymap]]''', so using that XML file will allow you to customize most buttons.
== Changing the CEC name ==
By default {{Kodi}} will present itself as <code>{{Kodi}}</code> to other CEC devices, this can be changed if needed by editing the config file.
The file will be located in userdata/peripheral_data and the filename will contain CEC (on a Raspberry Pi running LibreElec it's <code>cec_CEC_Adapter.xml</code>, On Windows 10 with a Pulse-Eight USB adapter it's <code>usb_''"deviceid"''_CEC_adapter.xml</code>).


You can also use the [[debug log]] to see what the buttons are named for that keymap file. See [[keymap]] for more information.
To edit this file you will first need to stop {{Kodi}} or the changes will be overwritten when exiting {{Kodi}}.


== CEC-capable HTPCs ==
The layout of the <code>''"CEC file"''</code> is as follows:
<syntaxhighlight lang=xml enclose="div">
<settings>
  <setting id="activate_source" value="1" /> 
  ...
  <setting id="device_name" value="Kodi" />
  ...
  <setting id="wake_devices_advanced" value="" />
</settings>
</syntaxhighlight>
 
To change the name, go to the <code>device_name</code> row and change <code>value</code> from Kodi to what you want.
As an example to set the <code>device_name</code> to idoK the line would be
<syntaxhighlight lang=xml enclose="div">
  <setting id="device_name" value="idoK" />
</syntaxhighlight>
 
Save the changes and start {{Kodi}}.
 
= CEC-capable HTPCs =
* Most HTPCs, such as x86 ("desktop"-class) HTPCs, don't have the ability to use CEC on their internal HDMI ports. Probably because the industry is silly. Those HTPCs will need to use an adapter to inject the CEC signal into the HDMI cable, such as the Pulse-Eight CEC USB adapter: http://www.pulse-eight.com/store/products/104-usb-hdmi-cec-adapter.aspx
* Most HTPCs, such as x86 ("desktop"-class) HTPCs, don't have the ability to use CEC on their internal HDMI ports. Probably because the industry is silly. Those HTPCs will need to use an adapter to inject the CEC signal into the HDMI cable, such as the Pulse-Eight CEC USB adapter: http://www.pulse-eight.com/store/products/104-usb-hdmi-cec-adapter.aspx


* Some ARM/"Android boxes" have the ability to use CEC, but only expose some basic functions to XBMC. These functions are typically enough to use a TV remote to control that box. For example, the [[Amazon Fire TV]] has this kind of CEC functionality.
* Some ARM/"Android boxes" have the ability to use CEC, but only expose some basic functions to {{Kodi}}. These functions are typically enough to use a TV remote to control that box. For example, the [[Amazon Fire TV]] has this kind of CEC functionality.


* Other devices, such as the [[Raspberry Pi]], have more complete CEC abilities, and are completely built-in.
* Other devices, such as the [[Raspberry Pi]], have more complete CEC abilities, and are completely built-in.


== Trade names ==
= Trade names =
There are different trade names for HDMI CEC, depending on who is the manufacturer of your device, so it doesn't have to be stated as HDMI-CEC. Find your manufacturer on this list and see what it is called for your device:
There are different trade names for HDMI CEC, depending on who is the manufacturer of your device, so it doesn't have to be stated as HDMI-CEC. Find your manufacturer on this list and see what it is called for your device:


Line 34: Line 91:
* LG - '''SimpLink'''
* LG - '''SimpLink'''
* Loewe - '''Digital Link''' or '''Digital Link Plus'''
* Loewe - '''Digital Link''' or '''Digital Link Plus'''
* Marantz - '''HDMI Control'''
* Mitsubishi - '''NetCommand for HDMI'''
* Mitsubishi - '''NetCommand for HDMI'''
* Onkyo - '''RIHD (Remote Interactive over HDMI)'''
* Onkyo - '''RIHD (Remote Interactive over HDMI)'''
Line 42: Line 100:
* Samsung - '''Anynet+'''
* Samsung - '''Anynet+'''
* Sharp - '''Aquos Link'''
* Sharp - '''Aquos Link'''
* Sony - '''BRAVIA Link''' or '''BRAVIA Sync'''
* Sony - '''BRAVIA Link''' or '''BRAVIA Sync''' (You may need to use a port labeled HDMI-MHL if the regular HDMI port does not work.)
* Toshiba - '''Regza Link''' or '''CE-Link'''
* Toshiba - '''Regza Link''' or '''CE-Link'''


== Devices Known to work ==
== {{Kodi}} Devices ==
With different TV's and devices comes different compatibility. An up to date vendor support matrix can be found [http://libcec.pulse-eight.com/vendor/support here], which lists which features are supported for each vendor.
Most HDMI ports on computers (onboard or via GPU) do not have integrated support for the CEC feature, but instead can use a external CEC adapter, such as the ones from [[Pulse-Eight]], and some more recent Intel motherboards come with a integrated HTPC header to allow you to connect an internal CEC-adapter.  


Below is a list of TV's which are known to be working with CEC and XBMC:
=== Pulse-Eight USB CEC Adapter ===
[[Pulse-Eight]] makes two different formats of HDMI-CEC USB-adapters, one for [http://www.pulse-eight.com/store/products/104-usb-hdmi-cec-adapter.aspx external] and one [http://www.pulse-eight.com/store/products/117-internal-hdmi-cec-adapter.aspx internal]. The work the same, with both permitting a connected device to send and receive HDMI-CEC control commands on the HDMI bus. The [[Pulse-Eight]] CEC adapters can be installed for use with {{Kodi}}. Your television remote can then be used to control {{Kodi}}, and {{Kodi}} can control all compatible connected devices.


=== TVs ===
=== Intel NUC ===
* LG 47LS4600
Intel Graphics doesn't support CEC commands (http://www.intel.com/support/graphics/sb/CS-034397.htm under "What are the differences between different HDMI versions?") and a Pulse-Eight adapter is required. Both the external USB adapter and the internal adapter (http://www.intel.com/support/motherboards/desktop/sb/CS-034631.htm) works.
* LG 47CS570
* LG LM620T
* LG 37LG6000
* LG 42LD420
* LG 42LD550
* LG 60PM6700 (Most of the expected buttons work, EXCEPT the number & channel buttons)
* LG 32LN572B (2013 model tested on Raspberry Pi running OpenELEC 3.2.3. The regular TV remote control works except forward and rewind but the left and right skip keys works so it's quiet useable. The Magic Remote also seems to work but haven't been tested properly)
* Panasonic TXL-47DT50
* Panasonic Viera GT30
* Panasonic Viera GT60
* Panasonic Viera S60
* Panasonic Viera ST50
* Panasonic Viera TH-42PX80E
* Panasonic Viera TH-42PZ85E
* Panasonic Viera TH-P42S10A
* Panasonic Viera TH-P50G10A
* Philips 37PFL6007K
* Philips 47PFL5007K
* Samsung ES6800
* Samsung LE32B650
* Samsung LE37D570
* Samsung LE40C650
* Samsung UE40C7700
* Samsung UE46F8000
* Samsung UE50EH5300
* Samsung UE55F6510
* Sharp LC-52D83X
* Sony Bravia KDL-32W5500 (Guide button doesn't work as context menu - reassign a coloured button for this function)
* Sony Bravia KDL-40M4000
* Sony Bravia KDL-46EX520
* Sony Bravia KDL-40HX705
* Sony Bravia KDL-46HX800
* Sony Bravia KDL-46NX715
* Sony Bravia KDL-52NX800
* Sony Bravia KD-55X9004A
* Sony NSX-40GT1 (Google TV)
* Vizio M-Series


=== Home Cinema Systems ===
=== [[Raspberry Pi]] ===
* Marantz SR7005
The Raspberry Pi GPU has CEC support which is supported by libCEC, and is therefore fully supported by {{Kodi}}.
* Onkyo HT-R390 Amplifier
* Sony STR-DH820
* Yamaha RX-V473 AV-Receiver
* Yamaha RX-V1071 AV Receiver (only on HDMI Out 1)


=== Projectors ===
* Epson EH-TW6100


=== XBMC Devices ===
= Common Issues with CEC =
HDMI ports on computers (onboard or via GPU) do not have the CEC feature, but can use a CEC adapter such as this one from [[Pulse-Eight]]: http://www.pulse-eight.com/store/products/104-usb-hdmi-cec-adapter.aspx
When "setting up" CEC make sure your configuration uses good HDMI cables. Especially cheap cables - still able to support 1080p without any problems - have been reported to cause problems with CEC (eg. devices like raspberry not showing up in the CEC menu at all, devices showing up but remote not working, etc).


Some recent Intel motherboards come with a new HTPC header, to connect Pulse-Eight's internal HDMI CEC adapter: http://www.pulse-eight.com/store/products/117-internal-hdmi-cec-adapter.aspx
Using better HDMI cables might resolve that problem.


==== [[Intel NUC]] ====
There are also reports of devices with improper HDMI CEC implementation, such as ROKU streaming box, causing problems with CEC device recognition. Disconnecting non-CEC devices, or upgrading firmware on those devices, may resolve the problem.
Intel Graphics doesn't support CEC commands (http://www.intel.com/support/graphics/sb/CS-034397.htm under "What are the differences between different HDMI versions?") and a Pulse-Eight adapter is required. Both the external USB adapter and the internal adapter (http://www.intel.com/support/motherboards/desktop/sb/CS-034631.htm) works.


==== [[Raspberry Pi]] ====
= Further reading =
The Raspberry Pi GPU has CEC support which is supported by libCEC, and is therefore fully supported by XBMC.
* http://libcec.pulse-eight.com/faq
* https://en.wikipedia.org/wiki/Consumer_Electronics_Control  (English Version)
* https://de.wikipedia.org/wiki/Consumer_Electronics_Control  (German Version)
* https://elinux.org/CEC_(Consumer_Electronics_Control)_over_HDMI


=== Common Issues with CEC ===
= Some Videos to demonstrate how it works =
When "setting up" CEC make sure your configuration uses good HDMI cables. Especially cheap cables - still able to support 1080p without any problems - have been reported to cause problems with CEC (eg. devices like raspberry not showing up in the CEC menu at all, devices showing up but remote not working, etc).


Using better HDMI cables might resolve that problem.
Simple but easy to understand:<br />
{{youtube|-X7dSQicyBw}} 


There are also reports of devices with improper HDMI CEC implementation, such as ROKU streaming box, causing problems with CEC device recognition. Disconnecting non-CEC devices, or upgrading firmware on those devices, may resolve the problem.
More technical:<br />
{{youtube|Q6S2FabX2WA}} 


== Further reading ==
{{updated|18}}
* http://libcec.pulse-eight.com/faq


[[Category:Remotes]]
[[Category:Remotes]]
[[Category:XBMC Manual]]
[[Category:Manual]]
{{frodo updated}}
[[Category:Hardware]]

Latest revision as of 20:45, 28 July 2022

The Pulse-Eight USB to CEC adapter, for devices that don't have CEC connected to their internal HDMI pins.
Home icon grey.png   ▶ Remote controls ▶ CEC

CEC (Consumer Electronics Control) allows for control of devices over the HDMI port.

All modern televisions and AV-receivers support HDMI-CEC, which is a technology that allows devices to talk with each other over the HDMI cable. Kodi comes with libCEC (CEC abstraction and interface library from Pulse-Eight) which allows control of the Kodi input over the standard TV remote that comes with your TV. As buttons are pressed the remote command is sent via the HDMI cable to your Kodi device.

Using this feature a Kodi compatible CEC controller/adapter will send and receive remote key presses to and from your television and AV-receiver via libCEC.

CEC allows you to do things such as:

  • Controlling Kodi from the TV's remote control
  • Automatically switch to the right TV input device
  • Letting the HTPC control what mode your audio receiver is on when the TV switches on
  • Turning all devices off with one remote
  • Set volume/mute of the receiver
  • And a lot more!

Overview

Consumer Electronics Control (CEC) is an HDMI feature designed to allow the user to command and control up-to 15 CEC-enabled devices, that are connected through HDMI,[63][64] by using only one of their remote controls (for example by controlling a television set, set-top box, and DVD player using only the remote control of the TV).[65] CEC also allows for individual CEC-enabled devices to command and control each other without user intervention.

It is a one-wire bidirectional serial bus that is based on the CENELEC standard AV.link protocol to perform remote control functions. CEC wiring is mandatory, although implementation of CEC in a product is optional. It was defined in HDMI Specification 1.0 and updated in HDMI 1.2, HDMI 1.2a and HDMI 1.3a (which added timer and audio commands to the bus). USB to CEC adapters exist that allow a computer to control CEC-enabled devices.

Kodi uses libCEC (CEC library) from Pulse-Eight for send and receive CEC commands over the HDMI bus, this is because libCEC acts an abstraction layer and translate the commands to match each vendor and devices compatibility issues.

libCEC is aimed at being a reference implementation of the HDMI 1.4b Specification, however what each adopter supports is not always what they should support. Equally some mandatory features of HDMI-CEC are not implemented by some vendors.

The following is a list of the most commonly used HDMI-CEC commands:

  • One Touch Play allows devices to switch the TV to use it as the active source when playback starts
  • System Standby enables users to switch multiple devices to standby mode with the press of one button
  • Preset Transfer transfers the tuner channel setup to another TV set
  • One Touch Record allows users to record whatever is currently being shown on the HDTV screen on a selected recording device
  • Timer Programming allows users to use the EPG (Electronic Program Guides) that are built into many HDTVs and set-top-boxes to program the timer in recording devices like PVRs and DVRs
  • System Information checks all components for bus addresses and configuration
  • Deck Control allows a component to interrogate and control the operation (play, pause, rewind etc.), of a playback component (Blu-ray or HD DVD player or a Camcorder, etc.)
  • Tuner Control allows a component to control the tuner of another component
  • OSD Display uses the OSD of the TV set to display text
  • Device Menu Control allows a component to control the menu system of another component by passing through the user interface (UI) commands
  • Routing Control controls the switching of signal sources
  • Remote Control Pass Through allows remote control commands to be passed through to other devices within the system
  • Device OSD Name Transfer transfers the preferred device names to the TV set
  • System Audio Control allows the volume of an AV receiver, integrated amplifier or preamplifier to be controlled using any remote control from a suitably equipped device(s) in the system

Settings in Kodi for CEC

These instructions work for all libCEC compatible HDMI-CEC controllers and adapters, such as the Pulse-Eight USB - CEC Adapter or the HDMI-CEC controller built-into the Raspberry Pi.

Settings for your CEC devices can be found in: Kodi Input Settings

CEC uses the remote.xml keymap, editing that XML file will allow you to customize most buttons.

To identify button names, enable the debug log and look for OnKey messages. Unfortunately the key name reported is bogus and you will need to deduce it by searching for the reported action in the default remote.xml and noting the key that causes the action in the window showing when the message was logged.

Changing the CEC name

By default Kodi will present itself as Kodi to other CEC devices, this can be changed if needed by editing the config file.

The file will be located in userdata/peripheral_data and the filename will contain CEC (on a Raspberry Pi running LibreElec it's cec_CEC_Adapter.xml, On Windows 10 with a Pulse-Eight USB adapter it's usb_"deviceid"_CEC_adapter.xml).

To edit this file you will first need to stop Kodi or the changes will be overwritten when exiting Kodi.

The layout of the "CEC file" is as follows:

<settings>
   <setting id="activate_source" value="1" />   
   ...
   <setting id="device_name" value="Kodi" />
   ...
   <setting id="wake_devices_advanced" value="" />
</settings>

To change the name, go to the device_name row and change value from Kodi to what you want. As an example to set the device_name to idoK the line would be

   <setting id="device_name" value="idoK" />

Save the changes and start Kodi.

CEC-capable HTPCs

  • Some ARM/"Android boxes" have the ability to use CEC, but only expose some basic functions to Kodi. These functions are typically enough to use a TV remote to control that box. For example, the Amazon Fire TV has this kind of CEC functionality.
  • Other devices, such as the Raspberry Pi, have more complete CEC abilities, and are completely built-in.

Trade names

There are different trade names for HDMI CEC, depending on who is the manufacturer of your device, so it doesn't have to be stated as HDMI-CEC. Find your manufacturer on this list and see what it is called for your device:

  • AOC - E-link
  • Hitachi - HDMI-CEC
  • LG - SimpLink
  • Loewe - Digital Link or Digital Link Plus
  • Marantz - HDMI Control
  • Mitsubishi - NetCommand for HDMI
  • Onkyo - RIHD (Remote Interactive over HDMI)
  • Panasonic - VIERA Link or HDAVI Control or EZ-Sync
  • Philips - EasyLink
  • Pioneer - Kuro Link
  • Runco International - RuncoLink
  • Samsung - Anynet+
  • Sharp - Aquos Link
  • Sony - BRAVIA Link or BRAVIA Sync (You may need to use a port labeled HDMI-MHL if the regular HDMI port does not work.)
  • Toshiba - Regza Link or CE-Link

Kodi Devices

Most HDMI ports on computers (onboard or via GPU) do not have integrated support for the CEC feature, but instead can use a external CEC adapter, such as the ones from Pulse-Eight, and some more recent Intel motherboards come with a integrated HTPC header to allow you to connect an internal CEC-adapter.

Pulse-Eight USB CEC Adapter

Pulse-Eight makes two different formats of HDMI-CEC USB-adapters, one for external and one internal. The work the same, with both permitting a connected device to send and receive HDMI-CEC control commands on the HDMI bus. The Pulse-Eight CEC adapters can be installed for use with Kodi. Your television remote can then be used to control Kodi, and Kodi can control all compatible connected devices.

Intel NUC

Intel Graphics doesn't support CEC commands (http://www.intel.com/support/graphics/sb/CS-034397.htm under "What are the differences between different HDMI versions?") and a Pulse-Eight adapter is required. Both the external USB adapter and the internal adapter (http://www.intel.com/support/motherboards/desktop/sb/CS-034631.htm) works.

Raspberry Pi

The Raspberry Pi GPU has CEC support which is supported by libCEC, and is therefore fully supported by Kodi.


Common Issues with CEC

When "setting up" CEC make sure your configuration uses good HDMI cables. Especially cheap cables - still able to support 1080p without any problems - have been reported to cause problems with CEC (eg. devices like raspberry not showing up in the CEC menu at all, devices showing up but remote not working, etc).

Using better HDMI cables might resolve that problem.

There are also reports of devices with improper HDMI CEC implementation, such as ROKU streaming box, causing problems with CEC device recognition. Disconnecting non-CEC devices, or upgrading firmware on those devices, may resolve the problem.

Further reading

Some Videos to demonstrate how it works

Simple but easy to understand:

More technical: