jbree / homebridge-platform-cec

A Homebridge Plugin to Control Devices over HDMI-CEC
MIT License
1 stars 1 forks source link

Error: cec-client never reported ready #1

Open ageorgios opened 7 years ago

ageorgios commented 7 years ago

I get this error

Error: cec-client never reported ready
Dec 24 17:48:59 raspberrypi homebridge[613]: at Timeout._onTimeout (/usr/lib/node_modules/homebridge-platform-cec/node_modules/cec-promise/index.js:13:12)
Dec 24 17:48:59 raspberrypi homebridge[613]: at ontimeout (timers.js:365:14)
Dec 24 17:48:59 raspberrypi homebridge[613]: at tryOnTimeout (timers.js:237:5)
Dec 24 17:48:59 raspberrypi homebridge[613]: at Timer.listOnTimeout (timers.js:207:5)
jbree commented 7 years ago

Thanks for the report. Did you install the cec-utils package using the package manager(apt-get on raspberry pi)? homebridge-platform-cec currently leverages an executable in that package called cec-client to send command and receive info over HDMI.

ageorgios commented 7 years ago

yes as you instruct in the readme file. is there any post setup action to do? Thank you for your response and for your work!

pi@raspberrypi:~ $ cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 4.0.0
no serial port given. trying autodetect:
 path:     Raspberry Pi
 com port: RPI

opening a connection to the CEC adapter...
DEBUG:   [             113] Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [             114] Open - vc_cec initialised
DEBUG:   [             114] logical address changed to Free use (e)
jbree commented 7 years ago

:D Absolutely! Hopefully we can get you sorted out. Try running cec-client from the command line and report back with what it has to say.

I've found a little bit of inconsistency with this program; sometimes I need to restart the raspberry pi to make it connect properly.

ageorgios commented 7 years ago
No device type given. Using 'recording device'
CEC Parser created - libCEC version 4.0.0
no serial port given. trying autodetect:
 path:     Raspberry Pi
 com port: RPI

opening a connection to the CEC adapter...
DEBUG:   [             128] Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [             130] Open - vc_cec initialised
DEBUG:   [             130] logical address changed to Free use (e)
NOTICE:  [             131] connection opened
DEBUG:   [             132] processor thread started
DEBUG:   [             133] << Broadcast (F) -> TV (0): POLL
DEBUG:   [             133] initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [             133] << e0
DEBUG:   [             195] >> POLL sent
DEBUG:   [             195] TV (0): device status changed into 'present'
DEBUG:   [             195] << requesting vendor ID of 'TV' (0)
TRAFFIC: [             196] << e0:8c
TRAFFIC: [             384] >> 0f:87:00:00:f0
DEBUG:   [             384] TV (0): vendor = Samsung (0000f0)
DEBUG:   [             384] >> TV (0) -> Broadcast (F): device vendor id (87)
DEBUG:   [             385] expected response received (87: device vendor id)
DEBUG:   [             385] replacing the command handler for device 'TV' (0)
NOTICE:  [             385] registering new CEC client - v4.0.0
DEBUG:   [             385] detecting logical address for type 'recording device'
DEBUG:   [             385] trying logical address 'Recorder 1'
DEBUG:   [             385] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [             385] << 11
TRAFFIC: [             656] << 11
DEBUG:   [             927] >> POLL not sent
DEBUG:   [             927] using logical address 'Recorder 1'
DEBUG:   [             927] Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG:   [             927] Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG:   [             927] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG:   [             927] Recorder 1 (1): CEC version 1.4
DEBUG:   [             927] AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG:   [             928] logical address changed to Recorder 1 (1)
DEBUG:   [             928] Recorder 1 (1): osd name set to 'CECTester'
DEBUG:   [             928] Recorder 1 (1): menu language set to 'eng'
DEBUG:   [             929] GetPhysicalAddress - physical address = 3000
DEBUG:   [             929] AutodetectPhysicalAddress - autodetected physical address '3000'
DEBUG:   [             929] Recorder 1 (1): physical address changed from ffff to 3000
DEBUG:   [             929] << Recorder 1 (1) -> broadcast (F): physical address 3000
TRAFFIC: [             929] << 1f:84:30:00:01
NOTICE:  [            1080] CEC client registered: libCEC version = 4.0.0, client version = 4.0.0, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 3.0.0.0, git revision: libcec-4.0.0-3+4-12fa275, compiled on Sat Dec 24 16:40:20 UTC 2016 by pi@raspberrypi on Linux 4.4.35-v7+ (armv7l), features: P8_USB, DRM, P8_detect, randr, RPi
DEBUG:   [            1080] << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [            1080] << 10:47:43:45:43:54:65:73:74:65:72
DEBUG:   [            1381] << requesting power status of 'TV' (0)
TRAFFIC: [            1382] << 10:8f
TRAFFIC: [            1523] >> 01:90:01
DEBUG:   [            1523] TV (0): power status changed from 'unknown' to 'standby'
DEBUG:   [            1523] >> TV (0) -> Recorder 1 (1): report power status (90)
waiting for input
DEBUG:   [            1523] expected response received (90: report power status)
jbree commented 7 years ago

Hmmm... I expect it to produce a little bit more output. I'm not an expert with cec-client, but what I see is that it polls other HDMI devices for information and figures out how it fits in into the picture.

No device type given. Using 'recording device'
CEC Parser created - libCEC version 3.0.1
no serial port given. trying autodetect: 
 path:     Raspberry Pi
 com port: RPI

opening a connection to the CEC adapter...
DEBUG:   [              52] Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [              52] InitHostCEC - vchiq_initialise succeeded
DEBUG:   [              52] InitHostCEC - vchi_initialise succeeded
DEBUG:   [              52] InitHostCEC - vchi_connect succeeded
DEBUG:   [              53] Open - vc_cec initialised
DEBUG:   [              53] logical address changed to Free use (e)
NOTICE:  [              53] connection opened
DEBUG:   [              53] processor thread started
DEBUG:   [              53] << Broadcast (F) -> TV (0): POLL
DEBUG:   [              54] initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [              54] << e0
DEBUG:   [             114] >> POLL sent
DEBUG:   [             114] TV (0): device status changed into 'present'
DEBUG:   [             114] << requesting vendor ID of 'TV' (0)
TRAFFIC: [             115] << e0:8c
TRAFFIC: [             313] >> 0f:87:08:00:46
DEBUG:   [             313] >> TV (0) -> Broadcast (F): device vendor id (87)
DEBUG:   [             313] TV (0): vendor = Sony (080046)
DEBUG:   [             313] expected response received (87: device vendor id)
NOTICE:  [             313] registering new CEC client - v3.0.1
DEBUG:   [             313] detecting logical address for type 'recording device'
DEBUG:   [             313] trying logical address 'Recorder 1'
DEBUG:   [             313] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [             313] << 11
TRAFFIC: [             584] << 11
DEBUG:   [             854] >> POLL not sent
DEBUG:   [             854] using logical address 'Recorder 1'
DEBUG:   [             854] Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG:   [             854] Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG:   [             854] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG:   [             854] Recorder 1 (1): CEC version 1.4
DEBUG:   [             854] AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG:   [             855] logical address changed to Recorder 1 (1)
DEBUG:   [             855] Recorder 1 (1): osd name set to 'CECTester'
DEBUG:   [             855] Recorder 1 (1): menu language set to 'eng'
DEBUG:   [             856] GetPhysicalAddress - physical address = 0000
NOTICE:  [             856] setting HDMI port to 1 on device TV (0)
DEBUG:   [             856] Recorder 1 (1): physical address changed from ffff to 1000
DEBUG:   [             856] << Recorder 1 (1) -> broadcast (F): physical adddress 1000
TRAFFIC: [             856] << 1f:84:10:00:01
NOTICE:  [            1007] CEC client registered: libCEC version = 3.0.1, client version = 3.0.1, firmware version = 1, logical address(es) = Recorder 1 (1) , base device: TV (0), HDMI port number: 1, physical address: 1.0.0.0,  compiled on Fri Jul  3 19:20:43 UTC 2015 by pbuilder@mgorven-pc.thefacebook.com on Linux 3.16.0-41-generic (armv7l), features: P8_USB, P8_detect, 'RPi'
DEBUG:   [            1007] << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [            1007] << 10:47:43:45:43:54:65:73:74:65:72
DEBUG:   [            1308] << requesting power status of 'TV' (0)
TRAFFIC: [            1308] << 10:8f
TRAFFIC: [            1475] >> 01:90:00
DEBUG:   [            1475] >> TV (0) -> Recorder 1 (1): report power status (90)
DEBUG:   [            1475] TV (0): power status changed from 'unknown' to 'on'
waiting for input
DEBUG:   [            1476] expected response received (90: report power status)

Are you certain the device you've plugged into is capable of communicating via the CEC protocol? Not all HDMI devices are. Also, it's possible that your receiver is capable, but the features is disabled. I think the first step to making this work is going to be getting the cec-client communicating correctly.

After launching cec-client, try sending a message to your receiver requesting the power status by typing tx 15:8f and pressing return. Does this give you anything?

jbree commented 7 years ago

Okay, looks like you updated your output with something more in line with what I expect. I'm going to look into the specifics of the ready event we're waiting for and see what could be causing it not to fire. It being Christmas weekend and all, don't hold your breath. Thanks for the report, and I'll see what I can do.

jbree commented 7 years ago

I updated one of the dependencies of this project to adjust the timeout, which seemed to fix someone else's report of the same issue in #4. If you're still interested, please run reinstall, or npm update to get the latest version of cec-promise, which should fix the issue. You may need to flush out your homebridge cache files.

ageorgios commented 7 years ago

updated but same error

Jan 29 18:51:01 rpi3 homebridge[547]: at Timeout._onTimeout (/usr/lib/node_modules/homebridge-platform-cec/node_modules/cec-promise/index.js:14:12)
Jan 29 18:51:01 rpi3 homebridge[547]: at ontimeout (timers.js:365:14)
Jan 29 18:51:01 rpi3 homebridge[547]: at tryOnTimeout (timers.js:237:5)
Jan 29 18:51:01 rpi3 homebridge[547]: at Timer.listOnTimeout (timers.js:207:5)
pi@rpi3:~ cec-client
No device type given. Using 'recording device'
CEC Parser created - libCEC version 3.0.1
no serial port given. trying autodetect:
 path:     Raspberry Pi
 com port: RPI

opening a connection to the CEC adapter...
DEBUG:   [              59] Broadcast (F): osd name set to 'Broadcast'
DEBUG:   [              59] InitHostCEC - vchiq_initialise succeeded
DEBUG:   [              59] InitHostCEC - vchi_initialise succeeded
DEBUG:   [              59] InitHostCEC - vchi_connect succeeded
DEBUG:   [              59] Open - vc_cec initialised
DEBUG:   [              60] logical address changed to Free use (e)
NOTICE:  [              60] connection opened
DEBUG:   [              60] processor thread started
DEBUG:   [              60] << Broadcast (F) -> TV (0): POLL
DEBUG:   [              60] initiator 'Broadcast' is not supported by the CEC adapter. using 'Free use' instead
TRAFFIC: [              60] << e0
DEBUG:   [             121] >> POLL sent
DEBUG:   [             121] TV (0): device status changed into 'present'
DEBUG:   [             121] << requesting vendor ID of 'TV' (0)
TRAFFIC: [             121] << e0:8c
TRAFFIC: [             308] >> 0f:87:00:00:f0
DEBUG:   [             308] >> TV (0) -> Broadcast (F): device vendor id (87)
DEBUG:   [             308] TV (0): vendor = Samsung (0000f0)
DEBUG:   [             309] expected response received (87: device vendor id)
DEBUG:   [             309] replacing the command handler for device 'TV' (0)
NOTICE:  [             309] registering new CEC client - v3.0.1
DEBUG:   [             309] detecting logical address for type 'recording device'
DEBUG:   [             309] trying logical address 'Recorder 1'
DEBUG:   [             309] << Recorder 1 (1) -> Recorder 1 (1): POLL
TRAFFIC: [             309] << 11
TRAFFIC: [             580] << 11
DEBUG:   [             850] >> POLL not sent
DEBUG:   [             850] using logical address 'Recorder 1'
DEBUG:   [             850] Recorder 1 (1): device status changed into 'handled by libCEC'
DEBUG:   [             850] Recorder 1 (1): power status changed from 'unknown' to 'on'
DEBUG:   [             850] Recorder 1 (1): vendor = Pulse Eight (001582)
DEBUG:   [             850] Recorder 1 (1): CEC version 1.4
DEBUG:   [             850] AllocateLogicalAddresses - device '0', type 'recording device', LA '1'
DEBUG:   [             851] logical address changed to Recorder 1 (1)
DEBUG:   [             851] Recorder 1 (1): osd name set to 'CECTester'
DEBUG:   [             851] Recorder 1 (1): menu language set to 'eng'
DEBUG:   [             851] GetPhysicalAddress - physical address = 3000
DEBUG:   [             851] AutodetectPhysicalAddress - autodetected physical address '3000'
DEBUG:   [             851] Recorder 1 (1): physical address changed from ffff to 3000
DEBUG:   [             851] << Recorder 1 (1) -> broadcast (F): physical adddress 3000
TRAFFIC: [             851] << 1f:84:30:00:01
NOTICE:  [            1002] CEC client registered: libCEC version = 3.0.1, client version = 3.0.1, firmware version = 1, logical address(es) = Recorder 1 (1) , physical address: 3.0.0.0,  compiled on Fri Jul  3 19:20:43 UTC 2015 by pbuilder@mgorven-pc.thefacebook.com on Linux 3.16.0-41-generic (armv7l), features: P8_USB, P8_detect, 'RPi'
DEBUG:   [            1002] << Recorder 1 (1) -> TV (0): OSD name 'CECTester'
TRAFFIC: [            1002] << 10:47:43:45:43:54:65:73:74:65:72
DEBUG:   [            1302] << requesting power status of 'TV' (0)
TRAFFIC: [            1302] << 10:8f
TRAFFIC: [            1443] >> 01:90:00
DEBUG:   [            1443] >> TV (0) -> Recorder 1 (1): report power status (90)
DEBUG:   [            1443] TV (0): power status changed from 'unknown' to 'on'
waiting for input
DEBUG:   [            1444] expected response received (90: report power status)
jbree commented 7 years ago

Hey, I'm sorry we weren't able to get this working for you. I'm closing off development on this plugin for now, and moving over to homebridge-cec-accessory. This will allow you to add controls for only the devices you want, and doesn't require a rewrite to add other devices. It simplifies the code, and makes configuration less of a mystery.

After removing homebridge-platform-cec and installing homebridge-cec-accessory, I'm hopeful that this issue will go away.

Please let me know how it goes. Thanks!