CEC Control From VIZIO TV - Change Device Type to Playback (4)
#1
I'm cross-posting a thread I started in the LibreELEC forum a few days ago around controlling Kodi via CEC from a VIZIO TV. I'm not certain exactly where the answer lies (in Kodi, or in the LibreELEC specific portion of my implementation.) So I'm covering my bases and hoping to tap the Kodi specific knowledge in this forum. Here's the summary from that thread, updated and clarified for Kodi, and a link to the other forum post. I'll keep both threads updated and ensure any resolution is reflected in both for future users.

TL;DR Summary
  • Running the latest version of LibreELEC (9.2.2) and Kodi 18.6 on x86 machine with Pulse Eight USB-CEC adapter.
  • CEC remote control worked great for many years. Then I upgraded my VIZIO TV to a VIZIO P55-F1. CEC control stopped working.
  • Found forum posts about VIZIO TVs having the same problem with Kodi (on Kodi and OSMC forum.) The solution was to change the CEC device type to Playback (4).
  • Specifically, I need to change the adapter's XML config file line "device_type = 1" to "device_type = 4".
  • This forces the CEC adapter to register as a playback device instead of a recording device with the TV on the CEC bus.
  • Attempted to implement by editing .kodi/userdata/peripheral_data/usb_2548_1002_CEC_Adapter.xml, but changes revert after reboot.
  • Attempted to implement by editing /usr/share/kodi/system/peripherals.xml but changes to that file have no impact.
  • How do I make changes to .kodi/userdata/peripheral_data/usb_2548_1002_CEC_Adapter.xml persist across reboots? or
  • Is there another way to force the CEC adapter (libCEC) to register as a Playback device? or
  • How does the .kodi/userdata/peripheral_data/ CEC adapter XML config file get generated?

Here's a link to the original forum thread at LibreELEC where I have more background information and troubleshooting steps complete so far.
CEC Control From VIZIO TV - Change Device Type to Playback (4)

Here are links to previous forum posts implying this solution.
CEC remote on VIZIO P Series Quantum
CEC Control not working - VIZIO E50-E1 - After TV OS Upgrade (4.0.32.2)

And here's a link to my initial log file.
LibreELEC and Kodi Log File

Any help or advice would be greatly appreciated.
Reply
#2
One quick edit as I got the setting format wrong in the initial post. The setting entry I am trying to change in this XML file is <setting id="device_type" value="1" />, which I'd like to change to <setting id="device_type" value="4" /> but am unable.
Reply
#3
Still looking for feedback on this question. I've tried editing peripherals.xml, but it has no impact. I've tried editing the peripheral_data file (usb_2548_1002_CEC_Adapter.xml) but it's rewritten every reboot with the default value (<setting id="device_type" value="1" />.) Can anyone maybe explain to me how this config file in peripheral_data gets generated? Or, where exactly are the GUI based CEC Adapter configuration changes being stored? Am I looking at the wrong config file? Continued review of log data after every change confirms that the adapter is registering as a recording device no matter how the device type is changed.

Could it have anything to do with this being a USB-CEC Adapter, rather than a built-in (like on an RPI) adapter? The previous forum posts which suggested modifying the peripheral_data config file were both for RPI devices, not a USB based CEC-Adapter. Is that why it's getting overwritten every reboot (maybe from a USB bus discovery step?)
Reply
#4
Don't know much about libreElec but perhaps it's using some udev rules to identify your adapter?  That would be where I would start.
Learning Linux the hard way !!
Reply
#5
(2020-04-01, 19:54)black_eagle Wrote: Don't know much about libreElec but perhaps it's using some udev rules to identify your adapter?  That would be where I would start.

Well, it turns out the solution was simple. We got to a solution over at the LibreELEC forum today. I just wasn't stopping Kodi properly before editing the file. I'm definitely showing my novice status. For documentation purposes, the full solution was as follows (this is LibreELEC specific.)
  1. Stop Kodi via the GUI or terminal with "systemctl stop kodi".
  2. Edit the CEC Adapter config file in "/storage/.kodi/userdata/peripheral_data/ via the terminal". This configuration file name varies based on the adapter. For example, for RPI, it seems to be "rpi_2708_1001.xml", and for a Pulse Eight CEC-Adapter, it seems to be "usb_2548_1002_CEC_Adapter.xml".
  3. Change <setting id="device_type" value="1" /> line to <setting id="device_type" value="4" />. To force the adapter to register as a Playback device rather than a Recording device.
  4. Restart Kodi by restarting the machine or running "systemctl start kodi" in the terminal.
Note: You may need to restart the TV, or disable/enable CEC in the TV settings for the change to take effect.
Reply
#6
I've gone ahead and put in a feature request to add a line to the CEC Adapter settings GUI to make this setting easier. Here's hoping it gets picked up. I can't imagine it would be too difficult.

Add Device Type Setting to CEC Adapter Settings GUI
Reply

Logout Mark Read Team Forum Stats Members Help
CEC Control From VIZIO TV - Change Device Type to Playback (4)0