Hi all.
My Setup:
Raspberry PI 3 with 433 mhz transmitter
Openenhabian
Whats working:
I am able to let the rollershutters go UP and DOWN with console.
I open the console and enter this command:
sudo ./fernotron-control/FernotronSend 7111111…31241
(the … stand for a lot more numbers)
I enter the sudo password and they go up and down. AWESOME.
Now i would like to integrate them into my openhab2 HABPanel and/or BasicUI but it does not work on both of them.
My code is the following:
rollershutter.items
Switch rollershutter_1_A <rollershutter>
Switch rollershutter_2_A <rollershutter>
Switch rollcontrol { channel="exec:command:rollcontrol:run" }
String rollcontrol_Args { channel="exec:command:rollcontrol:input"}
String rollcontrol_Out { channel="exec:command:rollcontrol:output" }
rollershutter.rules
rule "rollershutter_1_A"
when
Item rollershutter_1_A received command
then
if(receivedCommand == UP){
rollcontrol_Args.sendCommand("71111...241")
}else if(receivedCommand == STOP){
rollcontrol_Args.sendCommand("71111...3141")
}else if(receivedCommand == DOWN){
rollcontrol_Args.sendCommand("71111...222")
}
end
rule "rollershutter_2_A"
when
Item rollershutter_2_A received command
then
if(receivedCommand == UP){
rollcontrol_Args.sendCommand("711111116....222")
}else if(receivedCommand == STOP){
rollcontrol_Args.sendCommand("711111116....322")
}else if(receivedCommand == DOWN){ rollcontrol_Args.sendCommand("7111111...122")
}
end
Thats how i edited the sudoers file
User privilege specification
root ALL=(ALL:ALL) ALL
openhab ALL=NOPASSWD: /fernotron-control/
openhabian ALL=NOPASSWD: /fernotron-control/
It get the following errors in the log file
2017-10-24 13:34:09.922 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/rollershutter_2_A’ with an invalid status value ‘DOWN’.
2017-10-24 13:34:10.095 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/rollershutter_2_A’ with an invalid status value ‘DOWN’.
2017-10-24 13:34:12.352 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/rollershutter_2_A’ with an invalid status value ‘UP’.
2017-10-24 13:34:12.534 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/rollershutter_2_A’ with an invalid status value ‘UP’.
And when i click the button which i programmed like this
it get this error in log file
2017-10-24 13:36:49.569 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/rollershutter_2_A’ with an invalid status value ‘UP’.
2017-10-24 13:36:49.942 [WARN ] [thome.io.rest.core.item.ItemResource] - Received HTTP POST request at ‘items/rollershutter_2_A’ with an invalid status value ‘DOWN’.