Announcement

Collapse
No announcement yet.

Linux HS: bash script support?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    Originally posted by cytec View Post
    I have an alternate and faster method of executing bash scripts on Linux using HomeSeers speak.sh.

    I simply added the code:
    Code:
    # Execute bash command
    case $1 in bash*)
    command=$(echo "$1" | sed -e 's/\<bash\>//g' | sed -e 's/^ *//')
    eval $command
    esac
    now for any speak event in HomeSeer that starts with the word "bash", that will be executed as a script.

    This avoids the delay involved in executing using a vb script as the first time its run after each reboot can result in up to a 6 second delay on my system. Using this method I have seen no visible delay at all even after restart.

    Obviously customise for your system as needed.
    haha omg... how to use a poor written hsteam speak action at your advantage !!

    i said to myself that I would use that, but i did resquest a change in hs4 to protect the speak and speaktofile text from the shell (it doesN,t like apostrophe)

    Comment


      #17
      There should be a way to use homeseer json api in a bash script to get the value, and put this value into a variable ... then send the curl command with the value.

      But that is a lot of steps..

      I thinks it's the time to ask hst to implement this in hs4 '' the ability to put replacement variables into the argument zone

      see here : https://forums.homeseer.com/forum/de...rogram-command

      Comment

      Working...
      X