In the following simple vb.net script I get run time errors or compile errors when the commented lines are run:
Sub Main(ByVal strDevRef As String)
Dim dvRef as Integer
Dim room As String = "Family Room "
Dim dev_nam As String
dev_nam = room & strDevRef
dvRef = hs.GetDeviceRefByName(dev_nam)
If dvRef > 0 Then
hs.WriteLog("more_test1","Good device name:|" & dev_nam & "| dvRef=" & dvRef )
Dim MyPair As VSPair()
''MyPair = hs.DeviceVSP_Get(dvRef) ''Cannot find the requested class member.
''MyPair = hs.DeviceVSP_Get(dvRef, 1, "Both") ''Cannot find the requested class member.
''Dim dev_nam As String = hs.DeviceName(dvRef)) ''does NOT compile
End If
End Sub
I have this line in the settings.ini file: ScriptingReferences=System.Management;System.Management.dll, System.Drawing;System.Drawing.dll,System.Net;System.Net.dll
Can anyone tell me what I'm doing wrong? The HomeSeer on-line documentation is less-than-helpful.
Config: HomeSeer Version: HS3 ZEE S2 Edition 3.0.0.258
Linux version: Linux HomeTrollerZeeS2 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux System
Thanks.
Sub Main(ByVal strDevRef As String)
Dim dvRef as Integer
Dim room As String = "Family Room "
Dim dev_nam As String
dev_nam = room & strDevRef
dvRef = hs.GetDeviceRefByName(dev_nam)
If dvRef > 0 Then
hs.WriteLog("more_test1","Good device name:|" & dev_nam & "| dvRef=" & dvRef )
Dim MyPair As VSPair()
''MyPair = hs.DeviceVSP_Get(dvRef) ''Cannot find the requested class member.
''MyPair = hs.DeviceVSP_Get(dvRef, 1, "Both") ''Cannot find the requested class member.
''Dim dev_nam As String = hs.DeviceName(dvRef)) ''does NOT compile
End If
End Sub
I have this line in the settings.ini file: ScriptingReferences=System.Management;System.Management.dll, System.Drawing;System.Drawing.dll,System.Net;System.Net.dll
Can anyone tell me what I'm doing wrong? The HomeSeer on-line documentation is less-than-helpful.
Config: HomeSeer Version: HS3 ZEE S2 Edition 3.0.0.258
Linux version: Linux HomeTrollerZeeS2 3.18.11-v7+ #781 SMP PREEMPT Tue Apr 21 18:07:59 BST 2015 armv7l GNU/Linux System
Thanks.
Comment