Req CEC Control via JSON API
#1
Hi all, I think it would be quite a useful feature to send CEC commands via the JSON API, for example turn the TV on/off or switch to another input. You can currently do this with "cec-client" but this disconnects and kills the built-in CEC of XBMC and the only solution is to restart XBMC.
Reply
#2
+1 would finally be able to turn on /off my Philips TV remotely via some commands to the Raspberry then Smile
tx!
Reply
#3
CEC is an optional component of XBMC and not available on every platform plus it depends on special hardware and would result in not working on a lot of installations so I'm not sure if it's fit for JSON-RPC API. I'd have to discuss with other team members if we'd actually want something like that in the API.
Apart from that I neither have a CEC capable device nor a CEC adapter for my computer so I wouldn't be able to do the work.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Migube, that is my idea too.

Montellese, I was thinking more of making the CEC methods callable via "Addons.ExecuteAddon" or something.
Reply
#5
Just discovered that Rpi is CEC compatible and it's quite a good feature this CEC thing :p

Even if you choose to not add support for it with new commands supporting it over actual commands like volume setting should work.

Volume up / down via Event Server correctly works and forward CEC commands, setting volume via Json does not Sad
Reply
#6
Tolriq, have you got any code handy that makes use of the CEC volume up/down commands via Event Server?
Reply
#7
@Tolriq: I don't really know how CEC works. If it's button press based then hooking it up in calls like Application.SetVolume might be difficult because you can provide percentage values. IF it's not strictly button press based and would allow setting volume etc to a specific value then it's just a matter of placing the CEC-handling code in XBMC into the proper place.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#8
@Montellese: you should have gotten a free CEC adapter. if not, post in the team internal forum and ping malard

You cannot provide percentages for volume changes, only volume up and down.
opdenkamp / dushmaniac

xbmc-pvr [Eden-PVR builds] [now included in mainline XBMC, so no more source link here :)]
personal website: [link]

Found a problem with PVR? Report it on Trac, under "PVR - core components". Please attach the full debug log.

If you like my work, please consider donating to me and/or Team XBMC.
Reply
#9
Any progress on this? It would really be a great feature for use with the Raspberry Pi.

I remember how surprised I was that my TV remote actually controlled my XBMC menus. But, we always want more and I'd love to make it possible that my TV turns on automagically when I select airplay on my iPad. No problem if I would have a way to send CEC commands to my TV via XBMC.
Reply
#10
Any ideas or workarounds? Could this be implemented as a plugin? (I think eth0 was suggesting this)
Reply
#11
This would be immensely useful - being able to issue arbitrary commands to CEC capable devices would mean I could use XBMC as a universal remote of sorts. Smile
Reply
#12
Vote +1

CEC for my TV is not really working, so I use a IR-receiver on my raspberry. If I switch on my TV when the raspberry is already running (which is the normal case because raspberry is 'always on') I could use this to switch the TV to HDMI input. Now I have to search for the TV remote to do this. With this I would issue the "active source" command on my XMBC-Remote...
Reply
#13
(2013-07-25, 09:50)pejobo Wrote: Vote +1

CEC for my TV is not really working, so I use a IR-receiver on my raspberry. If I switch on my TV when the raspberry is already running (which is the normal case because raspberry is 'always on') I could use this to switch the TV to HDMI input. Now I have to search for the TV remote to do this. With this I would issue the "active source" command on my XMBC-Remote...

CEC is not working for your TV but you want to use CEC through JSON-RPC on your TV? How would that work?
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#14
Quote:CEC is not working for your TV but you want to use CEC through JSON-RPC on your TV? How would that work?

I've got an old Toshiba flat TV, attached to a Samsung bluray player via HDMI. The bluray player has two HDMI in, one connected to HDMI out of my XBMC. If I switch on TV before booting XBMC the bluray player wakes up and TV is switching to HDMI in (active source). But if TV is switched on after booting of XMBC (which is my use case, because XBMC is always on) the only way to switch TV to HDMI is by TV remote (which is of course "lost in pillows"). The ideal use case would be:
1) Start movie via iPad remote
2) bluray player is switched on
3) TV is switched on and set to HDMI in
4) be happy Wink

tl;dr;
CEC is not working for my TV, but setting "active source" is recognized by my TV
Reply
#15
+1 any ways to issue CEC commands without breaking XBMC CEC?
This Json API or other looks a good way to do...

Tx guys
Reply

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