I've recently developed an Onkyo Commander application, which is a .net C# Web Api and Windows Application that allows you to send commands to an Onkyo AV Receiver over the network.
I struggled initially to find much documentation about this, and there is not apparently an Onkyo API, so I've started creating one as part of this project.
I began by developing a simple Windows app with a text-box and submit button. I decided to send the commands over TCP and I connect to my Onkyo via a socket using it's IP and Port, convert the string command to hex, and send it as bytes to the opened socket.
Now I have proven that the commands are being sent to the Onkyo I am developing it as an API. It is on Github and it is open it up for extension development. I might choose expose the API publicly on this website (this will default to a predefined Onkyo local IP address).
I plan to work on Spotify integration, because the Onkyo apps I have used so far, while quite good, don't have enough functionality for what I want to do.