I'm not sure if I'm doing something wrong, but since my installation of HS2.1 the following script doesn't work anymore:
sub main()
' Ask for confirmation
hs.SpeakEx 1,"Do you want to re-boot sir?",TRUE
hs.LastVoiceCommand = ""
hs.AddVoiceCommand "yes"
hs.AddVoiceCommand "no"
timeout = timer + 10
do
for ti = 1 to 75
next
s = hs.LastVoiceCommand
if timeout < timer then s="timeout"
if s <> "" then exit do
hs.WaitEvents
loop
if s = "yes" then
hs.SpeakEx 1,"Very well sir. Hold on.",TRUE
hs.Launch "C:\Programs\HomeSeer 2\batch\reboot.bat",""
else
hs.WriteLog "Info", "No response"
end if
hs.ClearAllVoiceCommands
end sub
Problem is that my confirmation "yes" is NEVER heard. This worked just fine untill I installed HS2.1.
Anyone?
sub main()
' Ask for confirmation
hs.SpeakEx 1,"Do you want to re-boot sir?",TRUE
hs.LastVoiceCommand = ""
hs.AddVoiceCommand "yes"
hs.AddVoiceCommand "no"
timeout = timer + 10
do
for ti = 1 to 75
next
s = hs.LastVoiceCommand
if timeout < timer then s="timeout"
if s <> "" then exit do
hs.WaitEvents
loop
if s = "yes" then
hs.SpeakEx 1,"Very well sir. Hold on.",TRUE
hs.Launch "C:\Programs\HomeSeer 2\batch\reboot.bat",""
else
hs.WriteLog "Info", "No response"
end if
hs.ClearAllVoiceCommands
end sub
Problem is that my confirmation "yes" is NEVER heard. This worked just fine untill I installed HS2.1.
Anyone?
Comment