Announcement

Collapse
No announcement yet.

Launch Multiple speaker clients ??

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

    Launch Multiple speaker clients ??

    IN HS2, I called the script below from the startup script. I now get an hs.launch error?

    HTML Code:
    sub main()
     
    if not hs.IsApplicationRunning("Speaker") then
    lRet = hs.Launch(hs.GetAppPath & "\speaker.exe","1st Floor",,1)
    hs.waitSecs 5
    lRet = hs.Launch(hs.GetAppPath & "\speaker.exe","Backyard",,1)
    hs.waitSecs 5
    lRet = hs.Launch(hs.GetAppPath & "\speaker.exe","2nd Floor",,1)
    Else
    hs.writelog "Speakers", "Speaker clients are already running."
    end if
     
    hs.WaitSecs 10
     
    hs.SetVolumeEx 80, "blaser:1st Floor"
    hs.SetVolumeEx 80, "Blaser:2nd Floor"
    hs.SetVolumeEx 80, "Blaser:Backyard"
    
     
    hs.speak "Homeseer speaker clients are running",TRUE
     
    end sub
    Larry

    #2
    Looks like hs.setvolumeex has gone but hs.setvolume still exists in HS3.

    Robert
    HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

    Comment


      #3
      Try:

      PHP Code:
      lRet hs.Launch(hs.GetAppPath "\speaker.exe","1st Floor","",1
      As Robert stated hs.SetVolumeEx has gone so you need to use hs.SetVolume
      Jon

      Comment


        #4
        same result

        HTML Code:
        Nov-01 3:09:29 PM	 	Error	Running script, script run or compile error in file: G:/Program Files/HomeSeer HS3/scripts/Start Speakers.txt5:Invalid procedure call or argument: 'hs.Launch' in line 4 More info: Invalid procedure call or argument: 'hs.Launch'
        Nov-01 3:09:29 PM	 	Event	Running script in background: G:/Program Files/HomeSeer HS3/scripts/Start Speakers.txt
        Larry

        Comment


          #5
          Try this VB.NET script (extension .vb):

          PHP Code:
             Sub Main(ByVal Parm As String)
                  
          Dim lRet As Integer
                  
          If Not hs.IsApplicationRunning("Speaker"Then
                      lRet 
          hs.Launch(hs.GetAppPath "\speaker.exe""1st Floor"""1)
                      
          hs.WaitSecs(5)
                      
          lRet hs.Launch(hs.GetAppPath "\speaker.exe""Backyard"""1)
                      
          hs.WaitSecs(5)
                      
          lRet hs.Launch(hs.GetAppPath "\speaker.exe""2nd Floor"""1)
                  Else
                      
          hs.WriteLog("Speakers""Speaker clients are already running.")
                  
          End If

                  
          hs.WaitSecs(10)

                  
          hs.SetVolume(80"blaser:1st Floor")
                  
          hs.SetVolume(80"Blaser:2nd Floor")
                  
          hs.SetVolume(80"Blaser:Backyard")

                  
          hs.Speak("Homeseer speaker clients are running"True)

              
          End Sub 
          Last edited by jon00; November 1, 2016, 06:10 PM.
          Jon

          Comment


            #6
            That was it Jon00. I did change the dim to "Dim lRet As Integer"
            VB scripting in not my bag yet, but I am hoping to learn quickly.
            Cheers!
            Larry

            Comment

            Working...
            X