Control AVR volume using Kodi

Hello,

Does anyone know how Kodi can control AVR (AV receiver) volume using commands? Here is my issue: my connections over HDMI are: Kodi (Cubox) -> AVR -> TV. I successfully set up my remote control to work with Kodi.

First time TV is on, AVR is on, and Kodi starts, Kodi controls volume of AVR by volume up and volume down from my remote. I’m assuming this is done using CEC.

As soon as I turn off TV, which turns off AVR, then later on I turn TV on and AVR on, Kodi cannot control volume of AVR any more but only Kodi internal volume. TV seems to take over the volume control of AVR OR Kodi simply losses control (I guess something to do with CEC).

Now I know Yatse app on Android can control volume up and down of my AVR even when Kodi cannot. So what commands is Yatse sending to control AVR volume? Is is the Kodi built-in Lirc.Send() commands? Is it something else? If it is Lirc.Send() commands then what is the command syntax to increase and decrease volume of AVR?

If I know this, I can map those commands to volume up and down of my remote in Kodi and my problem with CEC is gone. Any help is appreciate.