Announcement

Collapse
No announcement yet.

How to monitor a local web page

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

  • donstephens
    replied
    Not a bad idea. I have an event call my script every five minutes and have actions dependent on the state of the device.

    Leave a comment:


  • srodgers
    replied
    Setup some “watchdog” timer events. I do this to monitor Blue Iris. Blue Iris is setup to fire a event on HS every 10 minutes. Event resets a timer back to 0. HS monitors the timer with a second event to see if the timer value exceeds 10 minutes which indicates Blue Iris is offline or crashed and notify me.

    Could have HS 4 fire a event on HS3 that indicates it is still alive using the same process.


    Sent from my iPad using Tapatalk

    Leave a comment:


  • donstephens
    replied
    Perfect!

    Thanks.

    Leave a comment:


  • jon00
    replied
    Maybe something like:

    Code:
    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
    Create a device and change the ref number to suit.

    Leave a comment:


  • donstephens
    started a topic How to monitor a local web page

    How to monitor a local web page

    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
Working...
X