System.Exec not executing the given command on key press

  • I have a key that I have programmed successfully in the past to turn on my AVR using cec-client. When I pass the command over ssh it turns the avr on. I ran "python .kodi/avr.py" and that too also turns on the avr.


    However when I pass the python script via the key, it doesn't turn on.


    Here is my python script located at /storage/.kodi/avr.py


    Code
    1. import os
    2. os.system('echo "on 4" | cec-client -s -d 1')


    Here is keymap:


    Code
    1. <keymap>
    2. <global>
    3. <keyboard>
    4. <key id="196">System.Exec(/storage/.kodi/avr.py)</key>
    5. </keyboard>
    6. </global>
    7. </keymap>

    Here is the debug log: