- Platform information:
- Hardware: RPI4 (2GB RAM)
- OS: Debian Linux
- Java Runtime Environment: openjdk version .1.8.0_272
- openHAB version:2.5.10-1
I am trying to configure a virtual ON/OFF switch to execute a python script. With this aim I have installed the Exec binding. Therefore I have set up the following files.
exec.things:
Thing exec:command:luce [command=“python /srv/openhab2-conf/python_scripts/light_on.py”]
exec.items:
Switch Trigger “Trigger”
String in {channel=“exec:command:luce”}
exec.rules:
rule “Exec script”
when
Item Trigger received command ON
then
executeCommandLine(“python /srv/openhab2-conf/python_scripts/light_on.py”)
end
In the control panel of OpenHAB the switch is disactivated.
I also tried to set another thing connected to a physical switch as autorun=true, interval=10 so the script starts automatically once the physical switch is off, but this is not what I want.
How can I solve the issue?