Announcement

Collapse
No announcement yet.

Help for a script to restart a Z-Net

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

    Help for a script to restart a Z-Net

    Hi

    I am having a lot of issues with a specifiuc Z-net that is outside the house in a secondary house on the same network as the main property that does not reconnect when there are small power failures. My HS4 is running on a battery power pack and have about 1 hour of juice, if the current only flicker, the secondary Z-NET never recovers.

    the only way to recover is to stop Z-WAVE controler, reboot the Z-net and restart the z-wave controler.

    As i am not always home when failure happens, i sometime loose the connection for hours.

    Does anyone would have an idea for a script that i could run from an event in hs4 where i would stop the z-wave plugin, remotly reboot the z-net and then restart HS$ ?

    I ave been told so many times that HS should recover from this kind of connection lost but it never never work.

    thanks for any help

    #2
    Have you considered putting the Z-Net on a UPS?

    Comment


      #3
      What I do for this situation is use Jon00 Logmonitor and listen in the log for when a Zwave device stops communicating. For my Z-Net in the shop, I listen for type "Z-Wave Error" and "Z-Net Shop: Exception transmitting". Logmonitor will then trigger a script that will cycle a TPLink wifi plug ( These are cheap and work well https://www.amazon.com/gp/product/B0...?ie=UTF8&psc=1 ) that the Z-Net is plugged into. The script turns off the plug for 10 seconds and then turns the plug back on. This will then reboot the Z-Net. The wifi plug must be able to reach your network for this solution to work, but wifi range is much better than Z-Wave range, at least at my home. You could also use an event instead of a script to do the same thing with Logmonitor. You will need to get the TPLink plugin. This works very well. I use it for all 4 of my Z-Nets and no longer worry when a Z-Net loses connection for whatever reason.

      Comment


        #4
        My setup of weatherXML with mono leaks memory (I am running on Linux). Here is the event I use to kill weatherXML nightly. You can use logmonitor for the trigger instead of time.

        Click image for larger version

Name:	Screenshot from 2020-07-20 08-36-44.png
Views:	327
Size:	28.1 KB
ID:	1404261

        Here is the perl script that does the heavy lifting.

        Code:
        #!/usr/bin/perl -w
        use strict;
        
        chdir "/opt/HomeSeer/scripts";
        
        my $prog = `/bin/ps -eo pid,cmd | grep "[W]EATHERXML"`;
        
        #print "Process: $prog\n";
        
        my @pid = split(' ', $prog, 2);
        
        #print "pid: $pid[0]\n";
        
        $prog = "/bin/kill -9 $pid[0]";
        
        #print "program: $prog\n";
        
        system($prog);
        HS3Sentry restarts the plugin.

        You can replace the perl call on windows by using Launch taskkill with parameters /IM "process name" /F

        Comment


          #5
          In 2016, independent research on the board identified some issues with Z-Net's recovery from network interruptions. HST implemented the identified fixes in an update, but in the final update (1.0.23, Nov 2016), rolled them back for some reason. The script posted here installs these fixes.

          Another option identified was to use a log monitor to identify the error condition, then visit the URL http://<Z-Net-IP>/Main/Reboot.php to reboot the super-secure Z-Net.

          Comment


            #6
            zwolfpack i installed the fix about 4 months ago but it does not work, it does not reconnect.

            i already use the log monitor and this is how I am warn about the connection lost, I will add the reboot line you just sent me

            Comment


              #7
              Originally posted by goldriver View Post
              zwolfpack i installed the fix about 4 months ago but it does not work, it does not reconnect.

              i already use the log monitor and this is how I am warn about the connection lost, I will add the reboot line you just sent me
              I too did Zwolf's fix on my Z-Nets, but still had issues with some devices getting stuck. The reboot command will not work if the Z-Net is not communicating on the network. Only thing that works is a power recycle... see above.

              Comment


                #8
                Originally posted by prsmith777 View Post
                Only thing that works is a power recycle... see above.
                You're right about that ... if the network connection stays down, neither of my workarounds will help.

                Comment


                  #9
                  i Finnaly resigned and installed 3 Tasmota wifi plug for each of my Z-net, I'll monitor and hope I can get rid of this connection issue that has been haunting me for a while

                  thanks all for the reccomendations, hope HS will get a fix this this someday !

                  Comment


                    #10
                    It's times like this where another protocol is good to have around.
                    HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

                    Comment

                    Working...
                    X