Announcement

Collapse
No announcement yet.

Z-Net - Reconnection Test

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

    Z-Net - Reconnection Test

    I'm sorry if this is common knowledge, but I couldn't seem to find the answer via search. My z-net will randomly disconnect every so often, maybe once a week give or take. If I unplug and plug it back it, it usually reconnects to HomeSeer without an issue. It never reconnects on it's own when it gets in these states.

    I'd like to basically put some kind of script on that determines if a connection is lost, to kill and restart a service (or even just do a reboot) to get it to try and reconnect. Has anyone got a solution out there before I start playing around and trying to solve it myself?

    #2
    I do the exact thing you are looking for using Jon00 logmonitor and TPLink adapter with TPLink plugin.

    Logmonitor can trigger a script for the correct settings. When the Z-Net goes off line, there are typical errors that you can use to trigger a script. My script simply turns off the adapter then waits a few seconds and then turns it back on. I also have a virtual device for enabling or disabling this function. Script also sends a pushover message to me.

    These LogMonitor parameters work for me:

    SearchType="Z-Wave Error"
    SearchMessage="Z-Net Master Bedroom:"

    I have a bunch of these. https://www.amazon.com/Kasa-Smart-Wi.../dp/B079B7SHD8 They go on sale alot and can be found for less.


    Here is the script:

    Code:
    Sub Main(ByVal Parm As Object)
    If hs.DeviceValueEx(5857) = 0 then
    hs.writelog ("info" , "Will not cycle Z-Net Master Bedroom. Virtual device is off")
    exit sub
    End If
    hs.CAPIControlHandler(hs.CAPIGetSingleControl(5653,false,"Off",false,true))
    hs.waitsecs(30)
    hs.CAPIControlHandler(hs.CAPIGetSingleControl(5653,false,"On ",false,true))
    
    dim CO(8) as Object
    dim PushoverMessage as String = "Z-Net Master Bedroom was restarted by Log Monitor."
    CO(0) = "All Clients"
    CO(1) = PushoverMessage
    CO(2) = "HOMESEER"
    CO(3) = Nothing
    CO(4) = Nothing
    CO(5) = Nothing
    CO(6) = Nothing
    CO(7) = Nothing
    CO(8) = Nothing
    hs.PluginFunction("Pushover 3P", "", "Pushscript", CO)
    
    End Sub

    Comment


      #3
      Originally posted by prsmith777 View Post
      I do the exact thing you are looking for using Jon00 logmonitor and TPLink adapter with TPLink plugin.

      Logmonitor can trigger a script for the correct settings. When the Z-Net goes off line, there are typical errors that you can use to trigger a script. My script simply turns off the adapter then waits a few seconds and then turns it back on. I also have a virtual device for enabling or disabling this function. Script also sends a pushover message to me.

      These LogMonitor parameters work for me:

      SearchType="Z-Wave Error"
      SearchMessage="Z-Net Master Bedroom:"

      I have a bunch of these. https://www.amazon.com/Kasa-Smart-Wi.../dp/B079B7SHD8 They go on sale alot and can be found for less.


      Here is the script:

      Code:
      Sub Main(ByVal Parm As Object)
      If hs.DeviceValueEx(5857) = 0 then
      hs.writelog ("info" , "Will not cycle Z-Net Master Bedroom. Virtual device is off")
      exit sub
      End If
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(5653,false,"Off",false,true))
      hs.waitsecs(30)
      hs.CAPIControlHandler(hs.CAPIGetSingleControl(5653,false,"On ",false,true))
      
      dim CO(8) as Object
      dim PushoverMessage as String = "Z-Net Master Bedroom was restarted by Log Monitor."
      CO(0) = "All Clients"
      CO(1) = PushoverMessage
      CO(2) = "HOMESEER"
      CO(3) = Nothing
      CO(4) = Nothing
      CO(5) = Nothing
      CO(6) = Nothing
      CO(7) = Nothing
      CO(8) = Nothing
      hs.PluginFunction("Pushover 3P", "", "Pushscript", CO)
      
      End Sub
      Thanks! What are the trigger lines in the log that you monitor for?

      Comment


        #4
        Originally posted by skhs View Post

        Thanks! What are the trigger lines in the log that you monitor for?
        As mentioned in the original post:

        These LogMonitor parameters work for me:

        SearchType="Z-Wave Error"
        SearchMessage="Z-Net Master Bedroom:"​

        Comment


          #5
          My Z-NET has been doing this too. Why is this happening? My older Z-NET, which I'm still using, has never done this once in the years that I've had it.

          Comment

          Working...
          X