Help with CEC commands (N2)

Yes! Just leave the physical port option! I have just tested CEC at home and have the same behavior as you that it resets the HDMI physical port to 0 when Kodi is restarted. No matter 9.2.5 or current nightly. But now I have done following: when TV is shut down - do nothing. When Kodi is not rebooted the option of HDMI physical port remains. I have set there the value of two and it works just perfectly. Looking forward for your fix. Please tell me what is the correct value for the setup when Kodi is connected to AVR?

It’s like this pdf shows:

TV is physical address 0000

device direct on TV: physical address x000
x is the HDMI port where the device is connected to the TV

device connected to AVR and the AVR is connected to TV: physical address xy00
x is the HDMI port where the AVR is connected to the TV.
y is the HDMI port where the device is connected to the AVR

Example:
2200 is [TV] -> HDMI 2 -> [AVR] -> HDMI 2 -> [CE DEVICE]

I removed now the HDMI setting and it looks working with only the physical address. When it’s set 0 it auto detect the physical address and save it. But you are able to modify the value of you want to.
If it is not equal 0 auto detection is off and libCEC use the set address.
But I have only a CE19 build ready to test, CE 9.2 is still compiling…

2 Likes

Thank you! I have now just set the kodi to stay on when TV is off. But when your 9.2 build is ready I will test it with pleasure.

Looks working here. When I am connected to my monitor what isn’t able to handle CEC at all and I set 2200 just for tests it looks like it get used:

DEBUG: CecLogMessage - CEC client registered: libCEC version = 4.0.4, client version = 4.0.0, firmware version = 5, logical address(es) = Recorder 1 (1) , physical address: 2.2.0.0,  compiled on Wed Jan  6 16:50:24 UTC 2021 by portisch@ubuntu on Linux 5.4.0-58-generic (x86_64), features: P8_USB, DRM, P8_detect, AOCEC

Here a test image. It’s based on nightly + this CEC fix:
https://mega.nz/file/PeoVGY6A#CA2n2YSAr11cBC8KutQo5SCYt9Wx319KR-hb2-7cLwM
If the CEC fix got merged please update again to a nightly or release as this image will do not update automatic, thank you.

1 Like

After the reboot it says physical address. 0, But before the reboot there were 2400 as value… when i manually change it to 2400 it changes it to 0 at the next reboot… Is it supposed to be like that? Is it somehow possible to save the value at reboot?

I will also try the nightly with CEC fix.
So I should set in CE to address 1, 2 or 3?
N2 -> AVR -> TV HDMI 1 is my current config

Here it does save it, then I reboot and the value is still there. Maybe you remove cec_CEC_Adapter.xml in userdata folder. Then reboot and setup CEC from scratch.

1 Like

I did remove all the settings. (this XML file), then set the physical adress to 2, after reboot it is back to 0… Also if I set it 2400 it is back to 0 after a reboot. Maybe i am doing something wrong. Anyway i set it to 2400 for now and disabled the kodi shutdown when tv is off. I will install next nightly to test. Is it possible to set this “2400” value using the config file when the sd card is installed in the pc?

Enable debug log in Kodi and cec component. Then set 2400 as physical address.

Reboot

After reboot share your kodi.log please.

2 is a wrong number and would not work. To the physical address mask does need 4 numbers in a range from 1000-FFFE

The log is here: http://ix.io/2L5s
i hope we can find the problem…

You have a Typo in your link…

1 Like

Thank you. Have corrected it… Hopefully it helps.

No, there is no kodi.log included. Looks like you picked the wrong debug upload.
But wait, I will create a new test image first…


Here is my log.

The log shows me it got set to 2400 on start.
Anyway here a new image. please use this and set the value again after update. then reboot and make a new kodi.log if necessary.

https://mega.nz/file/fSRAATqI#nZYZu8e90TZ1zyZnbyjoYI_X7-tTvZB7_9dA2QAhzx4

1 Like

Working fine now! I will upload my log now… Here it is. I have tested both scenarios: What happens when TV is off: standby, what happens when tv is off: shutdown. In both cases it remains with the setting 2400. Excellent!!


Here are the last logs.

I installed the latest nightly you posted.
I can change the port, it remains the same after reboot, but didn’t solve my issue.
Although, I’m not sure if I have set it to correct value. Here are the logs, perhaps you can tell something from this what is happening.
log-2021-01-07-08.11.45.zip (849.8 KB)

When I boot it works. But if I change to DVB-C or Netflix on TV and change back to HDMI2 (where AVR is) I loose CEC. I need to connect with Viera link again on TV to get CEC back. AVR is in standby passthrough mode, but that shouldn’t make a difference.

Just a side note… I remember this behauvour way back… I think years+, when using LE on Rpi2… I am really glad that it has some attention. Wish luck with troubleshooting, would be great to have reliable CEC back on configurations with more devices than CE–TV.

1 Like

On start the address is set to 1000.
But after you switch forward and backwards on the HDMI ports it change to 2100.
So the AVR is connected to HDMI 2 on the TV?
And the CE device on HDMI 1 on the AVR?

Then try to set it to 2100 and reboot the CE device.

1 Like