Kodi Community Forum
CEC not working consistently with new HDMI converter - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Raspberry Pi (https://forum.kodi.tv/forumdisplay.php?fid=166)
+---- Thread: CEC not working consistently with new HDMI converter (/showthread.php?tid=349727)



CEC not working consistently with new HDMI converter - ArsenoLupino - 2019-12-02

Hi everyone,

Until yesterday, I was using CEC to control Kodi on my RPi with my TV remote and it was working fine.

Today, I added a Monoprice HDMI Converter to my hardware setup. It takes the Rpi's HDMI signal and outputs the HDMI to the TV (Sharp Aquos) and the audio (optical) to the receiver. 

In Kodi (Settings/System/Input/Peripherals), the CEC Adapter (libCEC) settings are set to Default.

My issue now is that CEC only works after I reboot the Rpi. If I change the TV source to the cable box and later return to the RPi/Kodi source, CEC stops working. I can only get it to work without rebooting by running cec-client in a terminal and entering "as" in the cec-client output to make the TV the active source. This will work (even if I switch the source and return later to Kodi) until I reboot and run cec-client again (with the "as" entry). 

In my new setup, is there a way to avoid running cec-client and keep CEC working when the source is changed?

Thanks.


RE: CEC not working consistently with new HDMI converter - ActionA - 2019-12-02

Try this

https://kodi.wiki/view/Raspberry_Pi_FAQ#TV_is_not_detected_unless_powered_on_first


RE: CEC not working consistently with new HDMI converter - ArsenoLupino - 2019-12-02

(2019-12-02, 03:59)ActionA Wrote: Try this

https://kodi.wiki/view/Raspberry_Pi_FAQ#TV_is_not_detected_unless_powered_on_first
I did (create new edid.dat, copy it to /boot and add lines to /boot/config.txt). It does not change anything. After rebooting, CEC works. I change the TV source and when I change it again to RPi/Kodi, CEC does not work. I start cec-client in a terminal, type "as" and CEC starts working again.


RE: CEC not working consistently with new HDMI converter - ActionA - 2019-12-02

You did create the new edid while all devices in the chain were fully powered and booted and cec was functioning, correct?


RE: CEC not working consistently with new HDMI converter - ArsenoLupino - 2019-12-02

(2019-12-02, 17:01)ActionA Wrote: You did create the new edid while all devices in the chain were fully powered and booted and cec was functioning, correct?
Everything was powered and booted, but I'm not sure CEC was working. I will do it again tonight.


RE: CEC not working consistently with new HDMI converter - ArsenoLupino - 2019-12-03

(2019-12-02, 18:25)ArsenoLupino Wrote:
(2019-12-02, 17:01)ActionA Wrote: You did create the new edid while all devices in the chain were fully powered and booted and cec was functioning, correct?
Everything was powered and booted, but I'm not sure CEC was working. I will do it again tonight.  
Ok, so this time I made sure CEC was functioning before I created a new edid.dat, moved it to /boot and rebooted. It did not solve the problem.

To make things more explicit, I saved a log of cec-client here: uwofetadab.kodi (paste)

I started cec-client when cec stopped working, that is, after I changed the TV source (from Kodi to cable) and returned to Kodi. Note line 68 where I typed "as" to make the source active: from this point on, cec is working again and cec-client is recording the keys that are pressed on the remote: "down" on line 82 and "up" on line 93.

Any help would be greatly appreciated.


RE: CEC not working consistently with new HDMI converter - ArsenoLupino - 2019-12-03

(2019-12-03, 01:04)ArsenoLupino Wrote:
(2019-12-02, 18:25)ArsenoLupino Wrote:
(2019-12-02, 17:01)ActionA Wrote: You did create the new edid while all devices in the chain were fully powered and booted and cec was functioning, correct?
Everything was powered and booted, but I'm not sure CEC was working. I will do it again tonight.    
Ok, so this time I made sure CEC was functioning before I created a new edid.dat, moved it to /boot and rebooted. It did not solve the problem.

To make things more explicit, I saved a log of cec-client here: uwofetadab.kodi (paste)

I started cec-client when cec stopped working, that is, after I changed the TV source (from Kodi to cable) and returned to Kodi. Note line 68 where I typed "as" to make the source active: from this point on, cec is working again and cec-client is recording the keys that are pressed on the remote: "down" on line 82 and "up" on line 93.

Any help would be greatly appreciated.  
I made some progress tonight. While watching TV (with cable input), I go into "HDMI Device Selection" and select the Kodi input. On the TV, this changes the input to Kodi but sound is still coming from the cable box and the receiver. I then start the Kodi activity on my Harmony remote (set TV input to Kodi, set receiver input to optical from RPi HDMI and Monoprice HDMI converter, turn off cable box). CEC keeps working through the whole process. 

So this is an additional step, but I don't have to bother with cec-client. I might even be able to add this step to the Harmony activity.


RE: CEC not working consistently with new HDMI converter - ArsenoLupino - 2019-12-03

(2019-12-03, 05:58)ArsenoLupino Wrote: So this is an additional step, but I don't have to bother with cec-client. I might even be able to add this step to the Harmony activity. 
Actually, after more testing, I do need to keep cec-client running. Otherwise, the HDMI Device Selection option is grayed out. But I don't have to type "as" in cec-client to activate the source.


RE: CEC not working consistently with new HDMI converter - ArsenoLupino - 2019-12-04

(2019-12-03, 06:14)ArsenoLupino Wrote:
(2019-12-03, 05:58)ArsenoLupino Wrote: So this is an additional step, but I don't have to bother with cec-client. I might even be able to add this step to the Harmony activity. 
Actually, after more testing, I do need to keep cec-client running. Otherwise, the HDMI Device Selection option is grayed out. But I don't have to type "as" in cec-client to activate the source.  
More progress tonight... I figured out that running cec-client via commandline actually kills kodi's native cec client. So I installed kodi-eventclients-common and kodi-eventclients-kodi-send and now I can just run this command to activate the TV as the source and use the TV remote (actually Harmony) to control kodi: 
Quote:kodi-send --action="CECActivateSource"
To make things easy, I created an alias in .bashrc to call the command. 

I still have the annoying issue that the CEC link is broken when I switch the input from kodi to cable and back to kodi, but I always keep my laptop close by and quickly type the alias to restore the connection.


RE: CEC not working consistently with new HDMI converter - ArsenoLupino - 2019-12-06

In the end, the most convenient solution for me was to create a macro in my Harmony remote. While in the kodi input, I press a button and the macro quickly navigates the TV menu to HDMI Device Selection and picks Recorder (which is actually kodi). The TV remote then controls kodi. That's it.

It is convenient because I don't need the laptop to activate the source. The TV remote does it all.