HDMI CEC on HA Supervised

Hello Community,

I browsed the forum but without any significant luck.

I have installed Home Assistant Supervised using this method:

Then I have installed libcec using this way:

However, I cannot Run CEC-Scan addon as it gives me the following errors:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[10:23:37] INFO: Starting CEC client scan...
autodetect FAILED
[cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
[s6-finish] sending all processes the TERM signal.

The Core log is full of this:

2021-11-14 04:06:08 WARNING (SyncWorker_0) [pycec] Not initialized. Waiting for init.

At some earlier stages I saw that the HA is referring to the python3.9 folder but I didn’t have it and I installed python3.9 manually using these instructions, though I didn’t set it to default:

I have used manifest.txt to remove the Libcec and recompiled it again to get it into python3.9 (i don’t know what i am speaking about, just thought it may be the right way)

Then I have installed the PyCEC using pip3 install pycec.

Also, I get this error in the Log:

cont-finish.d] executing container finish scripts...
[cont-finish.d] done.
[s6-finish] waiting for services.
2021-11-14 04:07:12 ERROR (SyncWorker_7) [homeassistant] Error doing job: Task was destroyed but it is pending!
2021-11-14 04:07:13 ERROR (MainThread) [homeassistant] Error doing job: Future exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/src/homeassistant/homeassistant/components/hdmi_cec/__init__.py", line 347, in _shutdown
    hdmi_network.stop()
  File "/usr/local/lib/python3.9/site-packages/pycec/network.py", line 463, in stop
    self._adapter.shutdown()
  File "/usr/local/lib/python3.9/site-packages/pycec/cec.py", line 44, in shutdown
    self._adapter.Close()
AttributeError: 'NoneType' object has no attribute 'Close'
2021-11-14 04:07:13 ERROR (MainThread) [homeassistant.components.hassio.handler] Client error on /homeassistant/restart request Server disconnected
[finish] process exit code 0
s6-svscanctl: fatal: unable to control /var/run/s6/services: supervisor not listening
[s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] done.
[services.d] starting services
[services.d] done.

Then I have read something that CEC is not supported by HomeAssistant on Raspberry anymore and I have installed this addon:

It started somehow to work, I see the switches in the automated LoveLace but I get more than I have:

My configuration is:

hdmi_cec:
  host: 58c14403-pi-cec
  devices:
    JackFruitTV: 0.0.0.0
    plexPi: 1.0.0.0
    hassPi: 2.0.0.0
    JackFruitSound: 3.0.0.0

echo scan | cec-client -s -d 1 in Raspberry SSH returns:


opening a connection to the CEC adapter...
requesting CEC bus information ...
CEC bus information
===================
device #0: TV
address:       0.0.0.0
active source: no
vendor:        LG
osd string:    TV
CEC version:   1.3a
power status:  in transition from standby to on
language:      eng


device #1: Recorder 1
address:       1.0.0.0
active source: yes
vendor:        Unknown
osd string:    raspberry
CEC version:   1.3a
power status:  on
language:      eng


device #2: Recorder 2
address:       2.0.0.0
active source: no
vendor:        LG
osd string:    CECTester
CEC version:   1.3a
power status:  on
language:      eng


device #4: Playback 1
address:       3.0.0.0
active source: no
vendor:        Panasonic
osd string:    Playback 1
CEC version:   unknown
power status:  standby
language:      ???


device #5: Audio
address:       3.0.0.0
active source: no
vendor:        Panasonic
osd string:    Audio
CEC version:   unknown
power status:  standby
language:      ???


currently active source: Recorder 1 (1)
Segmentation fault

I got these entities in the switch, but none of them apparently work

image

All these devices are connected to the TV as it has the most HDMI ports.

So my question is:

How can I get HDMI without separate addons working in my environment?
How to get this pycec to work?
What I am doing wrong and please guide me:)

Thank you very much

1 Like