First of all thanks for your work.
I have a little problem.
I just want to use one button to toggle my switch on and off.
But it doesn´t work.
Perhabs you could have a look and tell me what i did wrong.
#toggle begin prog = irexec button = KEY_POWER config = sudo python /opt/scripts/wohnzimmerswitch.py toggle >/dev/null/ 2>&1 end
My python script:
import os import sys arg = sys.argv if arg == "toggle": bashCommand = 'curl -X GET --insecure "xxx:xxx" http://192.168.178.140/api/device/rfswitch1/toggle'; os.system(bashCommand);
If i put the http:// part in my browser adress field it works like a charm.