Remote button -> Send CEC command (tv-poweroff)?
#1
Hello!
Currently, controlling my RPi2 via CEC works fine.
A remaining issue is the somehow awkward method of powering off my kodi/TV/AVR. If RPi powers down, I would have to re-plug the power adaptor for a restart. Confused

I'd like to keep the RPi on all the time, but poweroff/standby the TV and AVR via some CEC-command.
Is this possible yet, perhaps via some add-on?
Mapping a remote button to some kodi-function seems to be easy via remote.xml, or keymap editor add-on. Unfortunately this maps only default kodi commands, and the CEC-plugin doesn't have such a poweroff feature, yet.
Does the CEC-plugin publish extra system-commands, like CEC_TV_poweroff, I could use in remote.xml like <power>cec_tv_poweroff</power>?
Any suggestions?
Reply
#2
If you're using CEC I'd assume your using your TV or AVR remote, so why can't you just power of the TV with the remote?

Anyways if you go into settings/system/input they're are some CEC options you can play with
Reply
#3
I'm using the AVR-remote which sends BD-player CEC-commands (Onkyo) to kodi. Using the TV-remote is not possible, because controlling the volume results in ping-pong CEC-messages between my AVR and the TV resulting in quite large volume+/- steps.
Using the TV-power button is, what would work correctly for standby/resume. I'd like to emulate that via CEC-command.

> Anyways if you go into settings/system/input they're are some CEC options you can play with

I played with all that settings already. No option for letting kodi just on alone, and switch off other devices.
Reply
#4
Does your remote allow you to program your TV? I use my LG remote to control everything. Pi is plugged into hdmi2 and hdmi1 is ARC from TV to AVR.

The LG remote works perfectly, when I need to use other devices that are attached to the AVR inputs as long as they are turned on after the AVR the inputs switch automatically. Only device that does not do this is my xbox 360
Reply
#5
> Does your remote allow you to program your TV?

Yes, it does. But the TV (=Samsung) power button on this remote isn't reachable very well in the dark, so I wanted to solve it via CEC.

This thread/question was also meant for some future CEC-controlling I have in mind. So, I still need a solution for sending CEC commands. Wink
There seem to be some code already in libcec. I just found the following states, which I still have to check out:
CECToggleState Toggle state of playing device via a CEC peripheral v13 Addition
CECActivateSource Wake up playing device via a CEC peripheral v13 Addition
CECStandby Put playing device on standby via a CEC peripheral
Perhaps that works - or is even extendable to some manual commands.
As for the cec-client program which can send commands, it unfortunately kills the kodi<->TV connection.
Reply
#6
CECStandby is exactly what you need. But you have to allow the TV to be shut down in the Samsung Anynet settings first. CECActivateSource will turn the TV back on.

But at least in my case (Samsung 32C6700 TV, Teufel Corestation AVR, OpenElec 6.0) the AVR seems to get lost in the process. The TV will turn on again, the RasPi will stay on all the time, but the AVR in between doesn't come back.
Reply

Logout Mark Read Team Forum Stats Members Help
Remote button -> Send CEC command (tv-poweroff)?0