I realize this is likely more a Kodi question than a CoreELEC question. I never seem to get much of a response on the Kodi forums, though, so I thought I might start with the experts here…
Is it possible to “divert” any of the HDMI-CEC command handling within Kodi to a Python addon / service? Specifically I’m thinking of the
The NAD receiver that is handling 2-channel audio doesn’t connect to HDMI, but it does have what seems like a pretty straightforward RS232 interface:
C388 RS232 Codes (ZIP file of PDFs and Windows test executable)
I have plenty of unused USB ports on the Odroid C4 that’s running CE, and $10 gets one a USB-to-serial cable. It would seem possible to have Python (even the Python 2 that’s available within Kodi Leia) transmit and receive via that path.
Any of the variables that can be set by RS232 can also be queried. Ideally, a Python service could be polled by Kodi to determine what the current volume is. That would then permit Kodi to reflect any volume changes that were made by, you know, actually moving the knob on the front of the amplifier.
The intent is to permit control of the playback volume through DLNA. The app I typically use on the iPad has volume control available, but I’ve always just left that at 100% and used the integrated amplifier to control the actual volume. It would be nifty to control the amplifier as well as Kodi through that app. (So long as it was rock solid – no sudden changes to maximum volume, for instance!)
I found this nifty project on github:
but I don’t believe it actually integrates with Kodi’s volume controls in anyway. It just lets one interact with a Denon receiver via menus within Kodi (using an RPi’s UART to communicate with the Denon).
Clearly this isn’t a feature of earth-shattering importance in any way! I do have a universal remote. The NAD also offers remote control via bluetooth, but the responsiveness on that path can be pretty poor. So, largely I’m just curious. Plus, controlling everything via a single app would be cool.