jbree / homebridge-cec-accessory

Homebridge support for CEC devices over HDMI
MIT License
19 stars 6 forks source link

Option to slow down updates? #10

Open remino opened 6 years ago

remino commented 6 years ago

Is there any option to tell the CEC accessory to take it easy for a little bit?

I see it’s trying to get an update on the status of CEC devices several times per second and that eventually breaks into timeouts to the point I cannot switch on or off the accessories anymore.

jbree commented 6 years ago

Hmmm this should not be happening. Can you tell me which version of the plugin you're using, and post your homebridge log?

remino commented 6 years ago

Thanks for the reply. Sorry for writing back late.

I updated Homebridge, but I'm still having issues with homebridge-cec-accessory.

I added details of my setup below, with the most recent log today after I restarted Homebridge. Note that the version of Node is intentionally old, as I'm running RetroPie on my Raspberry Pi and it doesn’t work with more recent versions of Debian (for which, in turn, a more recent of Node won’t work or is not supported).

As you may notice in the log, I'm trying to turn on my TV via HomeKit on my iPhone. It repeatedly recognises the command, but then reports the status of the TV as “off” shortly after. I try again and again, and eventually, it works, but that’s far from stable.


Raspberry Pi 3 Raspbian GNU/Linux 8.0 (jessie) Node v4.8.6 libCEC version 4.0.2 homebridge@0.4.33 homebridge-cec-accessory@0.3.0 cec-promise@0.2.0 node-cec@0.1.2

Truncated log:

Dec 06 12:10:19 asobiki homebridge[6542]: [12/6/2017, 12:10:19 PM] [TV] getOn: 224
Dec 06 12:10:19 asobiki homebridge[6542]: (node) warning: possible EventEmitter memory leak detected. 11 REPORT_POWER_STATUS listeners added. Use emitter.setMaxListeners() to increase limit.
Dec 06 12:10:19 asobiki homebridge[6542]: Trace
Dec 06 12:10:19 asobiki homebridge[6542]: at NodeCec.addListener (events.js:239:17)
Dec 06 12:10:19 asobiki homebridge[6542]: at NodeCec.once (events.js:265:8)
Dec 06 12:10:19 asobiki homebridge[6542]: at /usr/lib/node_modules/homebridge-cec-accessory/node_modules/cec-promise/index.js:43:14
Dec 06 12:10:19 asobiki homebridge[6542]: at tryCallOne (/usr/lib/node_modules/homebridge-cec-accessory/node_modules/cec-promise/node_modules/promise/lib/core.js:37:12)
Dec 06 12:10:19 asobiki homebridge[6542]: at /usr/lib/node_modules/homebridge-cec-accessory/node_modules/cec-promise/node_modules/promise/lib/core.js:123:15
Dec 06 12:10:19 asobiki homebridge[6542]: at flush (/usr/lib/node_modules/homebridge-cec-accessory/node_modules/cec-promise/node_modules/promise/node_modules/asap/raw.js:50:29)
Dec 06 12:10:19 asobiki homebridge[6542]: at nextTickCallbackWith0Args (node.js:489:9)
Dec 06 12:10:19 asobiki homebridge[6542]: at process._tickCallback (node.js:418:13)
Dec 06 12:10:20 asobiki homebridge[6542]: [12/6/2017, 12:10:20 PM] [PS4] [Error: No REPORT_POWER_STATUS received after 3000ms]
Dec 06 12:10:20 asobiki homebridge[6542]: [12/6/2017, 12:10:20 PM] [TV] [Error: No REPORT_POWER_STATUS received after 3000ms]
Dec 06 12:10:20 asobiki homebridge[6542]: [12/6/2017, 12:10:20 PM] [PS4] getOn: 228
Dec 06 12:10:20 asobiki homebridge[6542]: [12/6/2017, 12:10:20 PM] [TV] getOn: 224
Dec 06 12:10:20 asobiki homebridge[6542]: [12/6/2017, 12:10:20 PM] [PS4] getOn: 228
Dec 06 12:10:20 asobiki homebridge[6542]: [12/6/2017, 12:10:20 PM] [TV] getOn: 224
Dec 06 12:10:21 asobiki homebridge[6542]: [12/6/2017, 12:10:21 PM] [PS4] [Error: No REPORT_POWER_STATUS received after 3000ms]
Dec 06 12:10:21 asobiki homebridge[6542]: [12/6/2017, 12:10:21 PM] [TV] [Error: No REPORT_POWER_STATUS received after 3000ms]
Dec 06 12:10:21 asobiki homebridge[6542]: [12/6/2017, 12:10:21 PM] [PS4] [Error: No REPORT_POWER_STATUS received after 3000ms]
Dec 06 12:10:21 asobiki homebridge[6542]: [12/6/2017, 12:10:21 PM] [TV] [Error: No REPORT_POWER_STATUS received after 3000ms]
Dec 06 12:10:21 asobiki homebridge[6542]: [12/6/2017, 12:10:21 PM] [PS4] getOn: 228
Dec 06 12:10:21 asobiki homebridge[6542]: [12/6/2017, 12:10:21 PM] [TV] getOn: 224
Dec 06 12:10:21 asobiki homebridge[6542]: [12/6/2017, 12:10:21 PM] [PS4] getOn: 228
Dec 06 12:10:21 asobiki homebridge[6542]: [12/6/2017, 12:10:21 PM] [TV] getOn: 224
Dec 06 12:10:22 asobiki homebridge[6542]: [12/6/2017, 12:10:22 PM] [PS4] getOn: 228
Dec 06 12:10:22 asobiki homebridge[6542]: [12/6/2017, 12:10:22 PM] [TV] getOn: 224

Complete log: https://pastebin.com/raw/HSpsJZz7