Help with exec:command needed

Hi all.
I need some help - for the life of me I can’t seem to get this right!

Thing:
Thing exec:command:Blinds_Stairwell “Blinds” [ command=“ssh remote ‘bash teptron.sh 1 %2$s’”, interval=0, autorun=true ]
(remote edited for privacy)

Item:
String Blinds_Stairwell_Command “Blinds” { channel=“exec:command:Blinds_Stairwell:input”, autoupdate=“false” }

Sitemap:
Switch item=Blinds_Stairwell_Command label=“Stairwell Blinds” mappings=[1=“OPEN”, 255=“CLOSE”]

What I thought this would do is:

  • show me buttons for open and close in classic sitemap
  • send 1 and 255 (for open and close) as the parameter for the command
  • the exec:command then do the ssh command to the remote device as above

I don’t get buttons in the sitemap. The exec isn’t working.

Can anyone please tell me what the obvious error I’ve made is? Thanks in advance.

First I recommend opening your configs in Eclipse SmartHome Designer 0.8.0 to check for syntax errors.

Second, I’m not sure seeing the input channel automatically causes the script to run. You may need to create a rule to send ON to the run channel when the input is updated.

Third, is the openhab user configured to ssh to remote without a password?

1 Like

Hi @rlkoshak
Thank for tips.
I now have it working.
The change in the channel runs the script without a rule, fyi.
Cheers!