kkapitan / homebridge-homesung

A Homebridge plugin for Samsung SmartTV H and J models with the pairing protocol
MIT License
30 stars 5 forks source link

Problems with CEC #12

Closed dariusrosendahl closed 5 years ago

dariusrosendahl commented 5 years ago

Hi,

When I'm starting the server with enableCEC I get the following error:

uncaught exception
Error: spawn cec-client ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:232:19)
    at onErrorNT (internal/child_process.js:407:16)
    at process._tickCallback (internal/process/next_tick.js:63:19)
    at Function.Module.runMain (internal/modules/cjs/loader.js:745:11)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:743:3)
uncaught exception
TypeError: Cannot read property 'kill' of undefined
    at process.NodeCec.NodeCec.stop (/usr/local/lib/node_modules/homebridge-homesung/node_modules/node-cec/lib/node-cec.js:64:26)
    at process.emit (events.js:187:15)
    at process.emit (/usr/local/lib/node_modules/homebridge-config-ui-x/node_modules/source-map-support/source-map-support.js:461:21)
    at process.exit (internal/process/per_thread.js:168:15)
    at ChildProcess.ui.on (/usr/local/lib/node_modules/homebridge-config-ui-x/src/index.ts:58:15)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:962:16)
    at Pipe.channel.onread (internal/child_process.js:535:7)

The error looks a lot like https://github.com/kkapitan/homebridge-homesung/issues/7 but the problem is I haven't used docker at all, just the normal install..can you help?

dariusrosendahl commented 5 years ago

Ok, of course you find an answer after you ask the question.

I had to install: sudo apt-get install cec-utils.

After doing this the homebridge starts but I keep getting the message:

[Config] Unauthorised WebSocket Connection Closed .

My config:

"power": {
  "name": "TV",
  "key": "KEY_POWER",
  "enableCEC": true
}

Anything I can do about this?

dariusrosendahl commented 5 years ago

I should have read the readme better. When the RBPi was connected to the TV it worked fine :)