I am following nearly verbatim the code prescribed in the help page to run a script remotely....
http://www.homeseer.com/support/home...r_remotely.htm
I have two HS servers-- I want to load the values of certain devices from one onto the other. I've had little luck with XAP over a WAN.
I tried all versions (script, vb, vbnet); I can get it to work initially-- but in all cases I get the message "Unable to connect to Homseer: Error in the register channel: The channel 'gtcp' is already registered. I even get this connecting locally.
My scripting reference from settings.ini.
ScriptingReferences=System.xml;System.xml.dll,HomeSeer2.appl ication;HomeSeer2.dll,Scheduler.hsapplication;scheduler.dll
My latest incarnation is: I invoke this from an event....
-----------------------------------------
Imports HomeSeer2
Public hsinterface As HomeSeer2.application
Public hsapp As Scheduler.hsapplication
Sub Main(ByVal Parms As Object)
Try
hsinterface = nothing
hsapp = nothing
hsinterface = New HomeSeer2.application
hsinterface.SetHost("localhost")
'hsinterface.disconnect()
Dim rval As String = hsinterface.Connect("", "")
If rval <> "" Then
MsgBox("Unable to connect to HomeSeer: " & rval)
Exit Sub
Else
MsgBox("Connected")
End If
hsapp = hsinterface.GetHSRef
hsapp.speak("Hello from my application")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
----------------------------------------
http://www.homeseer.com/support/home...r_remotely.htm
I have two HS servers-- I want to load the values of certain devices from one onto the other. I've had little luck with XAP over a WAN.
I tried all versions (script, vb, vbnet); I can get it to work initially-- but in all cases I get the message "Unable to connect to Homseer: Error in the register channel: The channel 'gtcp' is already registered. I even get this connecting locally.
My scripting reference from settings.ini.
ScriptingReferences=System.xml;System.xml.dll,HomeSeer2.appl ication;HomeSeer2.dll,Scheduler.hsapplication;scheduler.dll
My latest incarnation is: I invoke this from an event....
-----------------------------------------
Imports HomeSeer2
Public hsinterface As HomeSeer2.application
Public hsapp As Scheduler.hsapplication
Sub Main(ByVal Parms As Object)
Try
hsinterface = nothing
hsapp = nothing
hsinterface = New HomeSeer2.application
hsinterface.SetHost("localhost")
'hsinterface.disconnect()
Dim rval As String = hsinterface.Connect("", "")
If rval <> "" Then
MsgBox("Unable to connect to HomeSeer: " & rval)
Exit Sub
Else
MsgBox("Connected")
End If
hsapp = hsinterface.GetHSRef
hsapp.speak("Hello from my application")
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
----------------------------------------
Comment