Announcement

Collapse
No announcement yet.

HS4 Internet Monitoring

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

    HS4 Internet Monitoring

    It now seems we are more dependent on our Internet access because of these troubled times. What are you guys using to monitor your Internet connection via HS4? I used to use BLLAN, but it doesn't seem to work under HS4 (Status value not updating). I basically want to Speak a message when the Internet is down or Google DNS cannot be reached.

    Thoughts?

    #2
    You could use the newer Node Red capabilities and follow this guide with the final output going to a HomeSeer device, or doing your notification via Node Red.

    There may be other solution as well. Big5 could possibly do something if you have that but I do not so I cannot say either way.
    Karl S
    HS4Pro on Windows 10
    1070 Devices
    56 Z-Wave Nodes
    104 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

    Comment


      #3
      I also intend to deploy some internet monitoring; had noted this thread which uses BLLAN:

      https://forums.homeseer.com/forum/in...topped-working

      will follow this thread for other options.

      Comment


        #4
        I still use BLLAN, now on HS4. Not just to monitor my Internet (I ping Google) but also monitoring phones etc. It still works fine

        Comment


          #5
          I wrote a short script to ping Google and update an HS device.
          Code:
          Public Sub Main(ByVal Parms As Object)
          
          Dim Google1 As String = "8.8.8.8"
          Dim Google2 As String = "8.8.4.4"
          Dim intR1 As Integer
          Dim intR2 As Integer
          
          intR1 = hs.Ping(Google1)
          intR2 = hs.Ping(Google2)
          
          If intR1 = 0 OR intR2 = 0 Then
          If hs.DeviceValue(1657) = 100 Then hs.WriteLogEx ("Internet", "OK", "#008000")
          hs.SetDeviceValueByRef(1657, 0, True)
          Else
          hs.WriteLogEx ("Internet", "??", "#FF0000")
          hs.SetDeviceValueByRef(1657, 100, True)
          End If
          
          End Sub
          Mike____________________________________________________________ __________________
          HS3 Pro Edition 3.0.0.548, NUC i3

          HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

          Comment


            #6
            Uncle Michael

            The script doesn't return any errors, but if I manually reset the virtual device value to 0 and run the script, it won't update to 100...

            Code:
            Public Sub Main(ByVal Parms As Object)
            
            Dim Google1 As String = "8.8.8.8"
            Dim Google2 As String = "8.8.4.4"
            Dim intR1 As Integer
            Dim intR2 As Integer
            
            intR1 = hs.Ping(Google1)
            intR2 = hs.Ping(Google2)
            
            If intR1 = 0 OR intR2 = 0 Then
            If hs.DeviceValue(3889) = 100 Then hs.WriteLogEx ("Internet", "OK", "#008000")
            hs.SetDeviceValueByRef(3889, 0, True)
            Else
            hs.WriteLogEx ("Internet", "??", "#FF0000")
            hs.SetDeviceValueByRef(3889, 100, True)
            End If
            
            End Sub
            And internet is up obviously...

            Comment


              #7
              Originally posted by 123qweasd View Post
              Uncle Michael

              The script doesn't return any errors, but if I manually reset the virtual device value to 0 and run the script, it won't update to 100...And internet is up obviously...
              If the ping is successful the device is set to 0. It will be set to 100 if there is not a response to the ping. Try setting the device to 100. It should reset to 0 if the internet is up.

              Mike____________________________________________________________ __________________
              HS3 Pro Edition 3.0.0.548, NUC i3

              HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

              Comment


                #8
                Originally posted by Uncle Michael View Post
                If the ping is successful the device is set to 0. It will be set to 100 if there is not a response to the ping. Try setting the device to 100. It should reset to 0 if the internet is up.
                Makes sense now, just overlooked the script logic.
                ill have to rename device to something like "Internet down - Alert" or just switch the values.
                Thanks for this useful script!
                Cheers

                Yann

                Comment


                  #9
                  using a slightly modified "internet on/off" version , thanks again for your help!

                  Code:
                  Public Sub Main(ByVal Parms As Object)
                  
                  Dim Google1 As String = "8.8.8.8"
                  Dim Google2 As String = "8.8.4.4"
                  Dim intR1 As Integer
                  Dim intR2 As Integer
                  
                  intR1 = hs.Ping(Google1)
                  intR2 = hs.Ping(Google2)
                  
                  If intR1 = 0 OR intR2 = 0 Then
                  If hs.DeviceValue(3889) = 0 Then hs.WriteLogEx ("Internet", "Restored", "#008000")
                  hs.SetDeviceValueByRef(3889, 100, True)
                  Else
                  hs.WriteLogEx ("Internet", "??", "#FF0000")
                  hs.SetDeviceValueByRef(3889, 0, True)
                  End If
                  
                  End Sub

                  Comment


                    #10
                    Sorry, as I'm still a newbie with scripting. Can you post screen shot of hiw this WORK S? Assume it's in a virtual device,.. and or updates another virtual device with status changes?

                    Comment


                      #11
                      Hi Tomgru
                      simply need to save the script under a xxxxx.vb filename within the hs3/scripts directory and call the script from an event with recurring trigger.
                      Also ensure you create a virtual device and change the ref number accordingly in the script (here 3889).

                      Cheers
                      Yann

                      Comment


                        #12
                        Originally posted by 123qweasd View Post
                        Hi Tomgru
                        simply need to save the script under a xxxxx.vb filename within the hs3/scripts directory and call the script from an event with recurring trigger.
                        Also ensure you create a virtual device and change the ref number accordingly in the script (here 3889).

                        Cheers
                        Yann
                        So if i have this working correctly with your modified script. If the ping is successful, the virtual device should show up (or remain) "ON"....value 100
                        If i lose internet, when the event runs, it will change the VD to "OFF", value 0

                        Do i have it?

                        Comment


                          #13
                          Correct.

                          and if the current state is 0 (off) and changes to 100 (on), then it will log "internet restored"

                          The original script is simply the opposite.

                          Comment


                            #14
                            Is it possible to add some sort of occurrence to this script so it'll trigger after 5 ping attempts?

                            Comment


                              #15
                              perfect. thanks

                              Comment

                              Working...
                              X