Req CEC Control via JSON API
#46
It already was at 36037 but i tried switching to 231, now when I try to turn off the tv it switches channel (from HDMI to regular TV channels).
Reply
#47
As defined in Kodi headers, 231 stands for "NONE", so no standby_device, 36037 stands for TV, 36038 for AVR and 36039 for both TV and AVR.
Maybe try the 36039 option?

Btw. does
Code:
echo "standby 0" |cec-client -s
work for you? (be careful, after that you won't be able to control Kodi with your remote anymore, restarting Kodi helps).

I think essentially whatever you have in

Code:
<setting id="connected_device" value="36037" />

you should also have in standby_devices.

Btw. It stopped working for me after the upgrade to Kodi 16.
Reply
#48
(2016-02-22, 10:08)shadzik Wrote: As defined in Kodi headers, 231 stands for "NONE", so no standby_device, 36037 stands for TV, 36038 for AVR and 36039 for both TV and AVR.
Maybe try the 36039 option?

Btw. does
Code:
echo "standby 0" |cec-client -s
work for you? (be careful, after that you won't be able to control Kodi with your remote anymore, restarting Kodi helps).

I think essentially whatever you have in

Code:
<setting id="connected_device" value="36037" />

you should also have in standby_devices.

Btw. It stopped working for me after the upgrade to Kodi 16.

Thanks for the feedback but it didn't help. I can't run cec-client, don't have it installed in my minimal jessie installation :S
Reply
#49
Hi,

is there an addon or script for kodi that would enable RPI to change AVR HDMI input?
I need it because of Samusng TV bug which switches AVR input to TV-Audio when CEC is enabled on TV.

tnx.

tomi
Reply
#50
Hi all.

Has there been any progress with this? I have an Rpi3 that's always on, so there would be a huge benefit in being able to remotely control my TV over http
Reply
#51
(2016-02-21, 21:54)shadzik Wrote: Try changing:
 
Code:
<setting id="standby_devices" value="231" />

to
 
Code:
<setting id="standby_devices" value="36037" />

in
Code:
~/.kodi/userdata/peripheral_data/rpi_2708_1001.xml

or similar. Then restart Kodi. Worked for me and my old Sony Bravia KDL32W4000, which i could only turn on but not turn off before this change. 
Sorry to revive an old topic, but what if the peripheral_data folder is empty?
Reply
#52
I'm just going to put in my 2 cents for what it's worth. I have two Kodi's setup to run continuously on PI 3. What I have done was download an addon called Kodi Callbacks which fires scripts, commands etc based on events. So for my setup, I tell the addon that when the screensaver deactivates, then to change source using the command CECActivateSource. This will not only turn on the TV but it will also switch to the source input if the TV is already on. If Kodi is the source and the TV is on then nothing happens. This means I can use the Kodi remote to activate based on just a single movement or use my custom Google Home Kodi app to activate when I say "Talk to Kodi".

To turn off the TV I was tossing up between 2 options, one was using another callback for shutdown and run a script. So when Kodi shuts down, then we can execute what ever we like. Now you have the option of using a script and doing a cec-client command or you could just run a built-in function CECStandby. If using the shutdown event, then it's best to reboot your device from script as shutting down from my PI in Kodi was problematic. The other thing you can do is create your own custom addon script to process JSON RPC calls and execute those built-in methods from JSON, this is the method I chose for my Google Home command. Anyway, there's a few options to play with, keep in mind that using the built-in functions will keep Kodi and the CEC intact where as using cec-client then Kodi will lose the instance and no longer accept CEC input.
Reply
#53
Also for the record, there are vanilla options in the settings input section for CEC which allows certain controls to happen based on certain events.
Reply
#54
Hi everyone!
Can we send commands over CEC now without touching Kodi-CEC functionality? (Mentioned above Kodi Callbacks looks cool, but can not it change TV source?)
Reply
#55
Hello, as my TV doesn't support CEC standby command I can't turn it off using Kodi. Sending custom commands using cec-client works good. But after issuing command using cec-client it kills CEC interface on Kodi.

So I have implemented builtin command in Kodi and also JSON-RPC method to send custom CEC data. You can find my implementation on github commit

https://github.com/tomasvilda/xbmc/commi...c47b87acbb

My TV supports:
Power (bytes: 10:44:40)
Power On (bytes: 10:44:6C)
Power Off (bytes: 10:44:6D)

To build custom command you can use http://www.cec-o-matic.com
Reply

Logout Mark Read Team Forum Stats Members Help
CEC Control via JSON API3