BASH and events
Posted: Tuesday 13 September 2016 17:22
Hi,
I am quite unfamiliar with Bash and I have managed to make a rudi-mental script for what I want, however it doesn't always work.
What I want:
when I flick a (virtual) switch, I want the following to happen:
1) switch on a KAKA switch
2) wait for my Harmony Hub to come online (preferably via ping)
3) wait 5 seconds
4) select the right program for the Hub (TV and surround on and at right channels etc)
5) wait 5 seconds
6) Wake my HTPC
Right now I have set up a script that does step 1,4 and 6 via a curl command and the rest via sleep. However I have not managed to check for the Hub via Bash, so right now I wait 2 minutes, however, this occasionally does not work, so I'd like to send the commands when the Hub is online.
Anybody able to help me?
Cheers,
Freek
I am quite unfamiliar with Bash and I have managed to make a rudi-mental script for what I want, however it doesn't always work.
What I want:
when I flick a (virtual) switch, I want the following to happen:
1) switch on a KAKA switch
2) wait for my Harmony Hub to come online (preferably via ping)
3) wait 5 seconds
4) select the right program for the Hub (TV and surround on and at right channels etc)
5) wait 5 seconds
6) Wake my HTPC
Right now I have set up a script that does step 1,4 and 6 via a curl command and the rest via sleep. However I have not managed to check for the Hub via Bash, so right now I wait 2 minutes, however, this occasionally does not work, so I'd like to send the commands when the Hub is online.
Anybody able to help me?
Cheers,
Freek