2016-07-22, 21:40
I have a very simple python script set up in my keymap.xml file that executes a simple script. I have a URC remote control that seeds the keymap command to Kodi via IR, and it executes the script.
The problem that i'm running into is that it will continue executing the script even after I release the button on the remote. It continues spawning new processes until the system eventually crashes after a few minutes. I configured the remote so that it cannot send more than 1 repeat command, and if I execute the script from the command line, it executes once and works as designed.
I've been messing with it for a few hours and i'm stumped. Any suggestions? Thanks in advance!
Keymap Entry:
<f mod="ctrl,alt">RunScript(/storage/.kodi/userdata/vera/Bedtime.py)</f>
Bedtime.py:
import urllib
import sys
urllib.urlopen('http://192.168.1.22:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=3')
sys.exit()
The problem that i'm running into is that it will continue executing the script even after I release the button on the remote. It continues spawning new processes until the system eventually crashes after a few minutes. I configured the remote so that it cannot send more than 1 repeat command, and if I execute the script from the command line, it executes once and works as designed.
I've been messing with it for a few hours and i'm stumped. Any suggestions? Thanks in advance!
Keymap Entry:
<f mod="ctrl,alt">RunScript(/storage/.kodi/userdata/vera/Bedtime.py)</f>
Bedtime.py:
import urllib
import sys
urllib.urlopen('http://192.168.1.22:3480/data_request?id=lu_action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=3')
sys.exit()