CEC forcing wrong source on receiver


I have my rpi2 connected to my receiver. I use a Logitech Harmony to start activities.
CEC is enabled, but all options in Kodi are disabled, so the only thing it should do is transmit the commands from the remote.
The remote is working perfectly for controlling Kodi, but when I start ‘Watch TV’, my receiver is forced to the wrong source, showing Kodi instead of my cable box…
Looked aroud already, the hdmi_ignore_cec_init=1 solution doesn’t seem to be working…
The only solution I found so far is to disable CEC completely, but now I have to use my phone to control Kodi :frowning:

Any ideas? Thanks!

hdmi_ignore_cec_init=1 does not disable CEC. It prevents the Raspberry Pi firmware from activating CEC at early boot time, thus prevents the Pi from switching the TV to it’s input when first powered on. This has no bearing on the use of CEC after Kodi has loaded.

I would check your “Watch TV” activity configuration on your Harmony remote carefully. It’s almost certainly going to be a problem with how that is configured.

When you say the remote is working for controlling Kodi, what kind of remote do you have it emulating ? Is it just emulating your TV’s remote to control Kodi via CEC ?

Personally I would not take this approach because the function of some of the buttons of the TV remote that the harmony is sending will perform different actions depending on whether the TV is currently switched to the Pi’s HDMI input or not, and depending on the order in which your Watch TV activity sends commands this may cause issues.

A better approach would be to add a GPIO IR receiver to the Pi, then you can reprogram your Harmony to send just about any other remote that OSMC supports via IR, rather than trying to emulate your TV’s remote. This is going to be far more reliable.

I know hdmi_ignore_cec_init=1 doesn’t disable CEC, that’s not what I’m trying to do :slightly_smiling:
I just tried that option because as for as I can see, it’s the only option to stop forcing a source.

Pretty sure this isn’t the problem:

  • I tried it with my older Harmony, totally wiping it and recreating the activity, same problem
  • I tried manually doing the actions from the activity with separate remotes, same problem
  • When I completely disable CEC in Kodi, the problem is gone (but I can’t use my remote anymore…)

Never had any problems with this approach on my RPi1 actually. I only have the directional buttons, OK and Back mapped, that’s enough and works without any problems.

Seems kind of redundant to me, adding extra hardware where none is needed.
I’ve used this way of working since day 1 when the RPi1 came out.
Think I’m going to take my Pi1 from the bedroom and connect it downstairs to check what happens…

Thanks for the suggestions nonetheless :relaxed:

Firstly with CEC issues, start by powering everything off (unplug from mains) all CEC equipment (especially the TV/receiver).
Are you using hdmi_edid_file?
Can you disconnect any other CEC capable devices that are connected to TV/receiver? I’d like to know if there is some conflict between devices.
Does swapping the Pi and cable box hdmi inputs over make any difference?

I will cut the power to my media-room tonight to test.
Not using the hdmi_edid_file, what would be the practical use for that?

If a powercycle or swapping the hdmi’s doesn’t solve it, what devices should stay connected? Just Pi, receiver, TV?

Thanks for thinking along :slightly_smiling:

It can be useful if you have issues where TV isn’t detected unless powered on before Pi. However the reason for asking is it could cause an issue if you captured the edid to a file when it was connected to a different hdmi port, so just wanted to rule that out.

At the moment we are just collecting information. So unplug everything that is not essential. Disable CEC control on the cable box and report if the behaviour changes. That may narrow the problem down to another CEC device in your system.

Sorry it took me so long to get back, I was out with the flu :mask:
I checked my STB, CEC is disabled (I remember disabling it because it kept turning on my tv in the middle of the night…)
I replaced my Pi2 with my original Pi1. Same CEC-settings, everything worked as expected.
When putting back the Pi2, the problem returns.

I did notice 1 thing. It is not set to the wrong input immediately. I first see the image of my STB for a second or 2.
After that it gets switched to the Pi…

Nobody has any other ideas?

I guess I’ll just install OpenElec or XBian on another sd card and see what happens.
If it’s the same, it’s probably a problem with the rpi2…
If not, something must have changed in the osmc image compared to the rpi1 image…

I had the same issue with a Pi1 and Pi2, when I turned on the Tv or Bluray player with the Harmony Remote, then the Pi forced the receiver to switch the input to the Pi.

I didnt find a work around, so I ended up creating a IR reciver for the gpio pins from cheap parts.

That worked good with the Harmony until November / December somewhere, since then I have a lot of issues with repete button preses, like if Im in a list, then Kodi starts scrolling up or down by itself.
I havent had the time to troubleshot enough, so I ended up buying a RF Remote instead.

If you have this issue with a GPIO IR receiver most likely you have the wrong model of TSOP chip or you are trying to power it from 5v instead of 3.3v. Another thing that can cause random repeats like this believe it or not is some types of compact fluorescent lights.

The Flirc receiver I use on my Mac is sometimes affected by one of the fluorescent lights in the living room. With the light on button presses are sometimes missed or seem to stay pressed down, as soon as the light is turned off the remote works normally. It doesn’t do it all the time either…

It worked fine for a few months, so its unlikley that the pins are wrong. The TSOP modell is the one recomended for an Rpi.

But i will check if there are any leds or other lights near by that might disturb the receiver.