The manual does not contain any information yet how to use ultramon3 in homeseer v3 scripts (i.e. using the ultramon3 API). I had the following statement in a homeseer v2 script to access the ultramon2 API:
In homeseer v3 I changed to code as folows:
But then the line:
Does not work anymore as it behaves now as an array of rows with the data in it, which does not seem to contain the device refence ID. I can work around this, but I am sure there is an easier method.
Can you give an example how to get for example the IP address and MAC address of a homeseer device with reference id X?
Regards,
Jan-Willem
Code:
Dim UltramonNetworkDeviceList As Hashtable Dim NetworkDevice As Object UltramonNetworkDeviceList = hs.Plugin("ultramon").GetMonitoredDevices() NetworkDevice = UltramonNetworkDeviceList(CStr(DeviceRef)) Debug.Print(NetworkDevice.DevCode) Debug.Print(NetworkDevice.DevName) Debug.Print(NetworkDevice.HostID) Debug.Print(NetworkDevice.HostName) Debug.Print(NetworkDevice.HostIPAddr) Debug.Print(NetworkDevice.Result)
Code:
Dim UltramonNetworkDeviceList As System.Data.DataTable Dim NetworkDevice As Object UltramonNetworkDeviceList = hs.PluginFunction("UltraMon3", "", "GetMonitoredDevices", Nothing)
Code:
NetworkDevice = UltramonNetworkDeviceList(CStr(DeviceRef))
Can you give an example how to get for example the IP address and MAC address of a homeseer device with reference id X?
Regards,
Jan-Willem