Posts: 3
Joined: Dec 2012
Reputation:
0
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.
Posts: 5,184
Joined: Jan 2009
Reputation:
131
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.
Posts: 3
Joined: Dec 2012
Reputation:
0
Migube, that is my idea too.
Montellese, I was thinking more of making the CEC methods callable via "Addons.ExecuteAddon" or something.
Posts: 3,077
Joined: Jun 2009
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
Posts: 3
Joined: Dec 2012
Reputation:
0
2013-01-15, 23:04
(This post was last modified: 2013-01-15, 23:07 by eth0.)
Tolriq, have you got any code handy that makes use of the CEC volume up/down commands via Event Server?
Posts: 5,184
Joined: Jan 2009
Reputation:
131
@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.
Posts: 2,274
Joined: Feb 2009
Reputation:
30
opdenkamp
Retired Team-Kodi Member
Posts: 2,274
@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.
Posts: 2
Joined: Apr 2013
Reputation:
0
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.
Posts: 27
Joined: Jan 2009
Reputation:
1
Any ideas or workarounds? Could this be implemented as a plugin? (I think eth0 was suggesting this)
Posts: 9
Joined: Nov 2012
Reputation:
0
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...
Posts: 22
Joined: Jul 2012
Reputation:
0
migube
Junior Member
Posts: 22
+1 any ways to issue CEC commands without breaking XBMC CEC?
This Json API or other looks a good way to do...
Tx guys