HDMI CEC with pycec Remote

I am having trouble getting hdmi_cec with the new pycec module working. I have a raspberry pi 3 hooked up to my TV.
pycec is running as a service on my raspberry pi and shows successful connection from my Home Assistant instance and scrolls through various commands as it polls for devices, but very rarely does anything ever show up in Home Assistant and when it does, it doesn’t work. I have had TV 0 ()show up and I think I have had the Chromecast Show up once, both as a Switch, but the switch does nothing for either of them. When I try to manually call the hdmi_cec/select_device or any of the services and specify device: 0.0.0.0 or any address that matches with one of my devices, nothing happens and no errors are recorded.

Config:

hdmi_cec:
  host: 10.111.111.108
  devices:
    TV: 0.0.0.0
    Chromecast: 2.0.0.0

Logs from pycec:

Jan 31 20:07:47 raspberrypi pycec[13758]: 2017-01-31 20:07:47,766 - pycec - INFO - Received poll fd from ('10.111.111.210', 32790)
Jan 31 20:07:47 raspberrypi pycec[13758]: 2017-01-31 20:07:47,767 - pycec - INFO - Received poll fe from ('10.111.111.210', 32790)
Jan 31 20:07:47 raspberrypi pycec[13758]: 2017-01-31 20:07:47,771 - pycec - INFO - Sending 01 to ('10.111.111.210', 32790)
Jan 31 20:07:47 raspberrypi pycec[13758]: 2017-01-31 20:07:47,772 - pycec - INFO - Sending 41:47:43:68:72:6f:6d:65:63:61:73:74 to ('10.111.111.210', 32790)
Jan 31 20:07:47 raspberrypi pycec[13758]: 2017-01-31 20:07:47,774 - pycec - INFO - Sending 41:00:71:04 to ('10.111.111.210', 32790)
Jan 31 20:07:47 raspberrypi pycec[13758]: 2017-01-31 20:07:47,775 - pycec - INFO - Sending 4f:87:00:1a:11 to ('10.111.111.210', 32790)
Jan 31 20:07:47 raspberrypi pycec[13758]: 2017-01-31 20:07:47,776 - pycec - INFO - Sending 41 to ('10.111.111.210', 32790)
Jan 31 20:07:47 raspberrypi pycec[13758]: 2017-01-31 20:07:47,777 - pycec - INFO - Sending 41:90:00 to ('10.111.111.210', 32790)
Jan 31 20:08:00 raspberrypi pycec[13758]: 2017-01-31 20:08:00,653 - pycec - INFO - Sending 41:9e:05 to ('10.111.111.210', 32790)
Jan 31 20:08:00 raspberrypi pycec[13758]: 2017-01-31 20:08:00,839 - pycec - INFO - Sending 41:00:91:04 to ('10.111.111.210', 32790)

and it just cycles through stuff like that with no errors or anything odd looking.

Occasionally in the Home Assistant Log I get this:

17-01-31 20:12:42 INFO (Thread-16) [pycec] Looking for new devices...

but never any errors about pycec (it occasionally fails to connect and I have to restart both pycec and hass, but that is a separate problem)

When I use CEC Client, I get

 $ echo scan |cec-client -s -d 1
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:        Unknown
osd string:    TV
CEC version:   unknown
power status:  unknown
language:      ???


device #1: Recorder 1
address:       1.0.0.0
active source: no
vendor:        Pulse Eight
osd string:    CECTester
CEC version:   1.4
power status:  on
language:      eng


device #4: Playback 1
address:       2.0.0.0
active source: no
vendor:        Google
osd string:    Chromecast
CEC version:   1.4
power status:  on
language:      ???


currently active source: unknown (-1)

so I know that my HDMI CEC is working on my pi.

1 Like

You might want to remove those above

I just added:

and it found my two devices and added switches for them

might worth to try it out

I’m having the same issues. Looks like we are not alone:

1 Like

Any update on this? I’m having the same issue

This is still an issue for me. No amount of configuration tinkering has been able to get this working. I am almost to the point of putting my Home-Assistant back on the Raspberry pi rather than running on my server in Docker.

Similar but related concern, I want to use pyCEC TCP network commands with multiple hosts. Anyone have any experience with this? Current capability doesn’t seem to support this so I’m looking for some dev advice/support…

Not sure if this thread is trying to install pycec on a stand alone pi but take a look at this: Help with PyCec I got it to work. Hope it helps.