Announcement

Collapse
No announcement yet.

Ultramon3 scripting - how?

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

    Ultramon3 scripting - how?

    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:

    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)
    In homeseer v3 I changed to code as folows:

    Code:
    Dim UltramonNetworkDeviceList As System.Data.DataTable
    Dim NetworkDevice As Object
    
     UltramonNetworkDeviceList = hs.PluginFunction("UltraMon3", "", "GetMonitoredDevices", Nothing)
    But then the line:
    Code:
    NetworkDevice = UltramonNetworkDeviceList(CStr(DeviceRef))
    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
Working...
X