i want to turn on/off my wireless sockets via openhab on my RaspberryPi.
I can already turn them on/off with the Pi but my configuration with openhab does not work. I tried it first with the exec binding but now it want to do it with a rule. Does anyone know why it does not work?
default.items:
Switch TV_Steckdose “Fernseher”
mysite.sitemap:
sitemap mysite label=“Smarthome” {
Frame label=“Steckdosen” {
Switch item=TV_Steckdose label=“Lautsprecher” mappings=[ON=“An”, OFF=“Aus”]
}
}
default.rules
rule "TV_Steckdose Switch On"
when
Item TV_Steckdose changed to ON
then
sendCommand(bash /scripts/TV_AN.sh)
end
rule "TV_Steckdose Switch Off"
when
Item TV_Steckdose changed to OFF
then
sendCommand(bash /scripts/TV_AUS.sh)
end