2016-05-13, 12:21
Hi!
I'm trying to integrate my HTPC (Asrock N3150) with my AVR, (VSX-930).
To control it, I’m using a Flirc receiver with Xbox One Media remote, so the configuration was really easy to do in terms of controlling the interactions with the Kodi menu.
My problem is now with the volume and mute. What I want is, with the same remote, control the volume on my VSX. I guess the normal solution would be HDMI CEC, but this board doesn’t have it.
As a workaround, I know that I can control my VSX via Telnet (by sending VD to the VSX_IPort, I’m able to increase the volume).
Now, my question. Is there any way to do this actions with Kodi? If I can associate that action (Send VD via telnet to VSX_IPort) to a physical key, I could afterwards associate that key with my Xbox One remote. At the end, the final result would be with the same remote control the HTPC and the AVR.
Is this possible? Any other workaround?
Thanks!!
EDIT1:
Well, thanks to faugusztin for the hints, I finally have this working as I wanted to.
Basically, I have an infrared remote control (Xbox One) which I previously mapped properly. (I use Flirc)
The volume UP/Down and Mute, has been also mapped to three different keys. Once one of this keys is pressed, it runs a little Python script to send a command via Telnet to the Pioneer VSX.
So, first I created three scripts:
8102 is the default control port.
The other scripts are the same, just changing the VU (Volume Up) for VD (Volume Down) and MZ (Mute). The full list can easily be found in Google.
I save them in /home/kodi/Scripts with the names volume_down.py, volume_up.py and mute.py
Then, I created a keyboard.xml file in ~/.kodi/userdata/keymaps with the following:
So the volume up is F7, down F6 and mute F5.
I just had to map again this three buttons in my remote to emulate this keys and that's it.
I'm trying to integrate my HTPC (Asrock N3150) with my AVR, (VSX-930).
To control it, I’m using a Flirc receiver with Xbox One Media remote, so the configuration was really easy to do in terms of controlling the interactions with the Kodi menu.
My problem is now with the volume and mute. What I want is, with the same remote, control the volume on my VSX. I guess the normal solution would be HDMI CEC, but this board doesn’t have it.
As a workaround, I know that I can control my VSX via Telnet (by sending VD to the VSX_IPort, I’m able to increase the volume).
Now, my question. Is there any way to do this actions with Kodi? If I can associate that action (Send VD via telnet to VSX_IPort) to a physical key, I could afterwards associate that key with my Xbox One remote. At the end, the final result would be with the same remote control the HTPC and the AVR.
Is this possible? Any other workaround?
Thanks!!
EDIT1:
Well, thanks to faugusztin for the hints, I finally have this working as I wanted to.
Basically, I have an infrared remote control (Xbox One) which I previously mapped properly. (I use Flirc)
The volume UP/Down and Mute, has been also mapped to three different keys. Once one of this keys is pressed, it runs a little Python script to send a command via Telnet to the Pioneer VSX.
So, first I created three scripts:
Code:
import getpass
import sys
import telnetlib
tn = telnetlib.Telnet("192.168.1.44",8102)
tn.write("VU\n\r")
tn.close()
8102 is the default control port.
The other scripts are the same, just changing the VU (Volume Up) for VD (Volume Down) and MZ (Mute). The full list can easily be found in Google.
I save them in /home/kodi/Scripts with the names volume_down.py, volume_up.py and mute.py
Then, I created a keyboard.xml file in ~/.kodi/userdata/keymaps with the following:
Code:
<keymap>
<global>
<keyboard>
<F5>RunScript(/home/kodi/Scripts/volume_down.py)</F5>
<F6>RunScript(/home/kodi/Scripts/mute.py)</F6>
<F7>RunScript(/home/kodi/Scripts/volume_up.py)</F7>
</keyboard>
</global>
</keymap>
So the volume up is F7, down F6 and mute F5.
I just had to map again this three buttons in my remote to emulate this keys and that's it.