Hi,
I have a problem since the update of exec-binding.
With exec-binding 1.9 and openhab build 524 i could see executed commandLine … in log:tail when i switched on the button.
Now with exec-binding 2.0 and openhab build 624 with the same conf i don t see anything and my item has no action on the reality.
I guess that the module have a problem but in bundle:list i can see it. (193 | Active | 80 | 2.0.0.201611291735 | Exec Binding).
I m on MACOSX yosemith.
Have you got a solution ?
edit : With exec-binding 2.0, executeCommandLine is undefinned with Eclipse SmartHomeDesigner…
This line works with exec binding 1.9 and openhab build 524
No file *.things
Openhab log show that exec command is captured
08:16:35.849 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘GUDESLOT1’ received command OFF
08:16:35.850 [INFO ] [marthome.event.ItemStateChangedEvent] - GUDESLOT1 changed from ON to OFF
08:16:35.852 [INFO ] [ab.binding.exec.internal.ExecBinding] - executed commandLine ‘bash /Users/name/Documents/openhab/conf/scripts/switchGudeStatus.sh t282-gude02 1 off’
In exec binding 2.0 build 624 Openhab log just show button switch on or off,
08:12:54.662 [INFO ] [marthome.event.ItemStateChangedEvent] - test changed from ON to OFF
08:12:55.124 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘test’ received command ON
08:12:55.126 [INFO ] [marthome.event.ItemStateChangedEvent] - test changed from OFF to ON
08:12:55.696 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘test’ received command OFF
For Daniel :
Ok i will try to change my setting with a things declaration
Have you got example with a switch system ? I don’t understand how can i do as exec binding 1.9. I want to run my script with parameter on switch on, and other parameter on switch off.
Thank you, It’s working but with a big delay.
When I click on the on or off button, there is 10-30 seconds of waiting time before action. With rules and exec command it’s immediately. Do you know why ?
Cheers
Edit : OK I have changed autorun false => true and it works.
But I don’t like the result, there is no update to the status (red or green), It’s not what i need.
In fact, I would like a switch which call a rule with 3 parameters (2 custom parameters and 1 which is the status of the switch : on or off).
Like this :
var status_on = " on"
var status_off = " off"
var gude001 = " t282-gude02"
var port1 = " 1"
rule "gude001"
when
Item t282gude02slot1 received command
then
if(receivedCommand == OFF) executeCommandLine("bash /Users/name/Documents/openhab/conf/scripts/switchGudeStatus.sh"+gude001+port1+status_off)
if(receivedCommand == ON) executeCommandLine("bash /Users/name/Documents/openhab/conf/scripts/switchGudeStatus.sh"+gude001+port1+status_on)
end
Now i would like to do something like that :
*.items
Switch t282gude02slot1 {gude001=" t282-gude02"} , but i don’ know the syntax
Hi please help not working for me what am i doing wrong?
things.
Thing exec:command:micropcofft [command=“net rpc shutdown -I 10.0.0.10 -U gadof01%%123 -f”, interval=0, autorun=false]