Greetings All !
Say, I was thinking of writing a script to act as sort of an "announcements wrapper"... and I was hoping to possibly get some tips and examples.
I figured that I'd write a script that would check to see if my two stereos in the basement (which are plugged into one lamp module) are on. And, if not, turn them on. Raise the volume to maximum. Then, take whatever text was passed to this script / function as a parameter and do an "hs.Speak" of it. Then, bring the volume back down to what it was. And, if the stereos were previously powered-off, turn them back off again.
The idea would be that instead of using "Speak" steps in my various events, I'd use calls to a single wrapper script and pass it a parameter for the text to be spoken (though I'm not sure how yet to do that with Homeseer).
I'm new to scripting with Homeseer (though I've done a little bit of work in the past with VB... and I know PHP very well). I'd just like to see some models of how other people are doing this.
And, who knows? Maybe I'm already going about this the wrong way. Or maybe there are some other checks I might want to make before actually executing the Speak command.
Thanks!
-= Dave =-
Say, I was thinking of writing a script to act as sort of an "announcements wrapper"... and I was hoping to possibly get some tips and examples.
I figured that I'd write a script that would check to see if my two stereos in the basement (which are plugged into one lamp module) are on. And, if not, turn them on. Raise the volume to maximum. Then, take whatever text was passed to this script / function as a parameter and do an "hs.Speak" of it. Then, bring the volume back down to what it was. And, if the stereos were previously powered-off, turn them back off again.
The idea would be that instead of using "Speak" steps in my various events, I'd use calls to a single wrapper script and pass it a parameter for the text to be spoken (though I'm not sure how yet to do that with Homeseer).
I'm new to scripting with Homeseer (though I've done a little bit of work in the past with VB... and I know PHP very well). I'd just like to see some models of how other people are doing this.
And, who knows? Maybe I'm already going about this the wrong way. Or maybe there are some other checks I might want to make before actually executing the Speak command.
Thanks!
-= Dave =-
Comment