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

Power via CEC #5

Closed bartbovendeerdt closed 6 years ago

bartbovendeerdt commented 6 years ago

Using the following config.json, I get the this error:

[2018-9-18 18:30:09] [SamsungTV] TV status: on [2018-9-18 18:30:39] [SamsungTV] CONNECTING [2018-9-18 18:30:40] [SamsungTV] CONNECTED [2018-9-18 18:31:00] [SamsungTV] Power via WIFI does not support powering on

"power": { "name": "TV aan/uit", "enableCEC": "true" },

Any idea's?

Kind regards, Bart

kkapitan commented 6 years ago

Hi, thanks for using the plugin!

Try { "enableCEC": true } - without the double quotes.

I guess the flag that enabled CEC is being compared to the boolean true and the use of quote marks makes it a string. I'll try to update this behaviour to make it more flexible. For now doing as I've mentioned above should resolve the issue.

Hope it will work for you :)

bartbovendeerdt commented 6 years ago

Tried that.. didn't work.

events.js:183 throw er; // Unhandled 'error' event ^

Error: spawn cec-client ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19) at onErrorNT (internal/child_process.js:362:16) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) at Function.Module.runMain (module.js:696:11) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3

bartbovendeerdt commented 6 years ago

Tried that.. didn't work.

events.js:183 throw er; // Unhandled 'error' event ^ Error: spawn cec-client ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19) at onErrorNT (internal/child_process.js:362:16) at _combinedTickCallback (internal/process/next_tick.js:139:11) at process._tickCallback (internal/process/next_tick.js:181:9) at Function.Module.runMain (module.js:696:11) at startup (bootstrap_node.js:204:16) at bootstrap_node.js:625:3

Fixed this by running sudo apt-get install cec-utils. 👍

kkapitan commented 6 years ago

It is working... kinda. The flag now correctly switches you to hdmi-cec based power options. But it seems that the cec-client tool is not installed. To confirm that, can you check what is the result of invoking cec-client -d 1 in the terminal?

Are you using raspberry PI? If yes and the cec-client will not be found try apt-get install cec-utils.

kkapitan commented 6 years ago

Ha! Great :D We figured it out in the same time! Nice job :)