I'm running both HS3 and HS4 on my local LAN and I am trying to monitor HS4 from HS3 using a script.Is there some quick and dirty way to have a device represent HS4 with two states; online and offline?
Thanks
Thanks
If this is your first visit, be sure to check out the FAQ. You must register before you can post.
IMPORTANT: Your first post will be checked for appropriate content. This may take a bit of time.
Sub Main(ByVal Parm As Object) Dim Host As String = "http://192.168.1.20" ' HS4 IP Address Dim Port As Integer = 80 ' HS4 port Dim Page As String = "/runscript.html" Dim Ref As Integer = 123 Dim R As String = hs.GetURL(Host, Page, False, Port) If R.ToUpper.Startswith("ERROR") Then hs.SetDeviceValueByRef(Ref, 0, True) ' offline hs.SetDeviceString(Ref, "HS4 Offline", True) Else hs.SetDeviceValueByRef(Ref, 1, True) ' online hs.SetDeviceString(Ref, "HS4 Online", True) End If End Sub
Comment