Announcement

Collapse
No announcement yet.

Z-Net not reconnecting after disconnect - Solved!

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

    Originally posted by Bob_Linux_User View Post
    Howard,

    If the internet is still down you will not get this message and actually a power cycle will not help under those circumstances since the the HS3 host cannot obtain data from the ZNet anyway.

    Bob
    Bob,

    I haven't delved into this at the level you have. My anecdotal experience is that when I've had a ZNet connectivity issue that I could not correct via the HS3 interface, power cycling the device always restored the connection. Based on my failure scenarios, the power cycle option would solve my issues.

    Howard
    Last edited by Frazierwa; August 29, 2016, 09:11 PM.

    Comment


      Z-NET ser2net timeout test patch

      For the brave souls, here is a patch package that will build a new ser2net executable. It also includes pre-built binaries if you are both brave and trusting

      From included 00README.txt
      Code:
      Z-NET ser2net timeout test patch
      August 2016 (dgo)
      
      CONTENTS:
      
      0. 00README.txt - this file
      1. build_ser2net-znet.sh - shell script that builds the ser2net executable
                                 from source.
      2. install_ser2net-znet.sh - shell script that installs a new ser2net binary,
                                 invoking the build script if necessary.
      3. ser2net-znet-timeout.patch - file detailing changes this patch makes to the
                                 downloaded source archive. 
      4. ser2net-v1 - pre-built binary for znetv1.
      5. ser2net-v2 - pre-built binary for znetv2.
      
      USAGE:
      
      Using sftp, upload the patch archive to a workspace on your Z-NET, then unzip
      
      $ mkdir ser2net-znet-timeout_patch
      $ cd ser2net-znet-timeout_patch
      $ unzip ser2net-znet-timeout_patch.zip
      
      TO BUILD FROM SOURCE
      
      1. Download ser2net-3.0-rc4.tar.gz source archive from 
         https://sourceforge.net/projects/ser2net/
         to the workspace on the Z-NET
      3. Run the install script:
      
      $ ./install_ser2net-znet.sh
      
      This unarchives the source archive, 
      applies the patch file (contents item 3), 
      builds the executable, 
      stops the running ser2net process,
      backs up the existing executable (1st time only)
      installs the new executable
      re-starts the service
      
      You can also perform just the build:
      
      $ ./build_ser2net-znet.sh
      
      Then do the install:
      
      $ ./install_ser2net-znet.sh
      
      TO USE PRE-BUILT BINARY - ONLY IF YOU TRUST ME :-)
      
      rename the appropriate pre-built binary and run the install script as above
      
      $ mv ser2net-v1 ser2net-ok
      $ ./install_ser2net-znet.sh
      
      NOTES
      
      If zwave plugin is running when the new binary is installed, you will see a
      "burp" in the log, then it should reconnect and run as normal.
      
      Problems with build? Rerun build script as follows and post results
      
      $ ./build_ser2net-znet.sh V=1
      Attached Files

      Comment


        Originally posted by zwolfpack View Post
        For the brave souls, here is a patch package that will build a new ser2net executable. It also includes pre-built binaries if you are both brave and trusting

        From included 00README.txt
        Code:
        Z-NET ser2net timeout test patch
        August 2016 (dgo)
        
        CONTENTS:
        
        0. 00README.txt - this file
        1. build_ser2net-znet.sh - shell script that builds the ser2net executable
                                   from source.
        2. install_ser2net-znet.sh - shell script that installs a new ser2net binary,
                                   invoking the build script if necessary.
        3. ser2net-znet-timeout.patch - file detailing changes this patch makes to the
                                   downloaded source archive. 
        4. ser2net-v1 - pre-built binary for znetv1.
        5. ser2net-v2 - pre-built binary for znetv2.
        
        USAGE:
        
        Using sftp, upload the patch archive to a workspace on your Z-NET, then unzip
        
        $ mkdir ser2net-znet-timeout_patch
        $ cd ser2net-znet-timeout_patch
        $ unzip ser2net-znet-timeout_patch.zip
        
        TO BUILD FROM SOURCE
        
        1. Download ser2net-3.0-rc4.tar.gz source archive from 
           https://sourceforge.net/projects/ser2net/
           to the workspace on the Z-NET
        3. Run the install script:
        
        $ ./install_ser2net-znet.sh
        
        This unarchives the source archive, 
        applies the patch file (contents item 3), 
        builds the executable, 
        stops the running ser2net process,
        backs up the existing executable (1st time only)
        installs the new executable
        re-starts the service
        
        You can also perform just the build:
        
        $ ./build_ser2net-znet.sh
        
        Then do the install:
        
        $ ./install_ser2net-znet.sh
        
        TO USE PRE-BUILT BINARY - ONLY IF YOU TRUST ME :-)
        
        rename the appropriate pre-built binary and run the install script as above
        
        $ mv ser2net-v1 ser2net-ok
        $ ./install_ser2net-znet.sh
        
        NOTES
        
        If zwave plugin is running when the new binary is installed, you will see a
        "burp" in the log, then it should reconnect and run as normal.
        
        Problems with build? Rerun build script as follows and post results
        
        $ ./build_ser2net-znet.sh V=1
        I am going to try this new patch on 1.0.17 as well as 1.0.20. I'll build a fresh image of 1.0.17 and apply the patch, then do the same with a fresh 1.0.17 updated to 1.0.20.

        I'll test and see what happens.
        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

        Comment


          Originally posted by rprade View Post
          I am going to try this new patch on 1.0.17 as well as 1.0.20. I'll build a fresh image of 1.0.17 and apply the patch, then do the same with a fresh 1.0.17 updated to 1.0.20.

          I'll test and see what happens.
          Sounds good. I don't think it will have any effect on 1.0.17, because there the timeout is disabled. So the patch change won't come into play.

          Comment


            Originally posted by zwolfpack View Post
            For the brave souls, here is a patch package that will build a new ser2net executable. It also includes pre-built binaries if you are both brave and trusting

            From included 00README.txt
            Code:
            Z-NET ser2net timeout test patch
            August 2016 (dgo)
            
            CONTENTS:
            
            0. 00README.txt - this file
            1. build_ser2net-znet.sh - shell script that builds the ser2net executable
                                       from source.
            2. install_ser2net-znet.sh - shell script that installs a new ser2net binary,
                                       invoking the build script if necessary.
            3. ser2net-znet-timeout.patch - file detailing changes this patch makes to the
                                       downloaded source archive. 
            4. ser2net-v1 - pre-built binary for znetv1.
            5. ser2net-v2 - pre-built binary for znetv2.
            
            USAGE:
            
            Using sftp, upload the patch archive to a workspace on your Z-NET, then unzip
            
            $ mkdir ser2net-znet-timeout_patch
            $ cd ser2net-znet-timeout_patch
            $ unzip ser2net-znet-timeout_patch.zip
            
            TO BUILD FROM SOURCE
            
            1. Download ser2net-3.0-rc4.tar.gz source archive from 
               https://sourceforge.net/projects/ser2net/
               to the workspace on the Z-NET
            3. Run the install script:
            
            $ ./install_ser2net-znet.sh
            
            This unarchives the source archive, 
            applies the patch file (contents item 3), 
            builds the executable, 
            stops the running ser2net process,
            backs up the existing executable (1st time only)
            installs the new executable
            re-starts the service
            
            You can also perform just the build:
            
            $ ./build_ser2net-znet.sh
            
            Then do the install:
            
            $ ./install_ser2net-znet.sh
            
            TO USE PRE-BUILT BINARY - ONLY IF YOU TRUST ME :-)
            
            rename the appropriate pre-built binary and run the install script as above
            
            $ mv ser2net-v1 ser2net-ok
            $ ./install_ser2net-znet.sh
            
            NOTES
            
            If zwave plugin is running when the new binary is installed, you will see a
            "burp" in the log, then it should reconnect and run as normal.
            
            Problems with build? Rerun build script as follows and post results
            
            $ ./build_ser2net-znet.sh V=1
            Problems with install. I am not seeing any results from the install or build

            Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	28.8 KB
ID:	1186867

            I am going to set the permissions on the script files and try again. Based on what you wrote above I will start with firmware 1.20. Building a fresh image now.
            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

            Comment


              Originally posted by rprade View Post
              Problems with install. I am not seeing any results from the install or build

              [ATTACH]56238[/ATTACH]

              I am going to set the permissions on the script files and try again. Based on what you wrote above I will start with firmware 1.20. Building a fresh image now.
              You shouldn't have to do the sudo. But I don't think that would help with this.

              ls -l should show the executable ('x') bits set. I verified that unzip preserves those on the v2, but didn't check on the v1. Which one are you trying it on? If 'x' isn't set try

              $ chmod +x *.sh

              Comment


                Originally posted by rprade View Post


                I am going to set the permissions on the script files and try again. Based on what you wrote above I will start with firmware 1.20. Building a fresh image now.
                I added -x to the script permissions and the patch ran as expected.

                Code:
                login as: homeseer
                homeseer@192.168.2.5's password:
                
                The programs included with the Debian GNU/Linux system are free software;
                the exact distribution terms for each program are described in the
                individual files in /usr/share/doc/*/copyright.
                
                Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
                permitted by applicable law.
                homeseer@Z-Net:~ $ mkdir ser2net-znet-timeout_patch
                homeseer@Z-Net:~ $ cd ser2net-znet-timeout_patch
                homeseer@Z-Net:~/ser2net-znet-timeout_patch $ chmod +x *
                homeseer@Z-Net:~/ser2net-znet-timeout_patch $ ./install_ser2net-znet.sh
                patching file ser2net-3.0-rc4-znet/configure
                patching file ser2net-3.0-rc4-znet/sol.c
                patching file ser2net-3.0-rc4-znet/dataxfer.c
                checking for a BSD-compatible install... /usr/bin/install -c
                checking whether build environment is sane... yes
                checking for a thread-safe mkdir -p... /bin/mkdir -p
                checking for gawk... no
                checking for mawk... mawk
                checking whether make sets $(MAKE)... yes
                checking whether make supports nested variables... yes
                checking for gcc... gcc
                checking whether the C compiler works... yes
                checking for C compiler default output file name... a.out
                checking for suffix of executables...
                checking whether we are cross compiling... no
                checking for suffix of object files... o
                checking whether we are using the GNU C compiler... yes
                checking whether gcc accepts -g... yes
                checking for gcc option to accept ISO C89... none needed
                checking whether gcc understands -c and -o together... yes
                checking for style of include used by make... GNU
                checking dependency style of gcc... gcc3
                checking build system type... armv7l-unknown-linux-gnueabihf
                checking host system type... armv7l-unknown-linux-gnueabihf
                checking how to print strings... printf
                checking for a sed that does not truncate output... /bin/sed
                checking for grep that handles long lines and -e... /bin/grep
                checking for egrep... /bin/grep -E
                checking for fgrep... /bin/grep -F
                checking for ld used by gcc... /usr/bin/ld
                checking if the linker (/usr/bin/ld) is GNU ld... yes
                checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
                checking the name lister (/usr/bin/nm -B) interface... BSD nm
                checking whether ln -s works... yes
                checking the maximum length of command line arguments... 1572864
                checking how to convert armv7l-unknown-linux-gnueabihf file names to armv7l-unknown-linux-gnueabihf format... func_convert_file_noop
                checking how to convert armv7l-unknown-linux-gnueabihf file names to toolchain format... func_convert_file_noop
                checking for /usr/bin/ld option to reload object files... -r
                checking for objdump... objdump
                checking how to recognize dependent libraries... pass_all
                checking for dlltool... no
                checking how to associate runtime and link libraries... printf %s\n
                checking for ar... ar
                checking for archiver @FILE support... @
                checking for strip... strip
                checking for ranlib... ranlib
                checking command to parse /usr/bin/nm -B output from gcc object... ok
                checking for sysroot... no
                checking for a working dd... /bin/dd
                checking how to truncate binary pipes... /bin/dd bs=4096 count=1
                checking for mt... mt
                checking if mt is a manifest tool... no
                checking how to run the C preprocessor... gcc -E
                checking for ANSI C header files... yes
                checking for sys/types.h... yes
                checking for sys/stat.h... yes
                checking for stdlib.h... yes
                checking for string.h... yes
                checking for memory.h... yes
                checking for strings.h... yes
                checking for inttypes.h... yes
                checking for stdint.h... yes
                checking for unistd.h... yes
                checking for dlfcn.h... yes
                checking for objdir... .libs
                checking if gcc supports -fno-rtti -fno-exceptions... no
                checking for gcc option to produce PIC... -fPIC -DPIC
                checking if gcc PIC flag -fPIC -DPIC works... yes
                checking if gcc static flag -static works... yes
                checking if gcc supports -c -o file.o... yes
                checking if gcc supports -c -o file.o... (cached) yes
                checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
                checking whether -lc should be explicitly linked in... no
                checking dynamic linker characteristics... GNU/Linux ld.so
                checking how to hardcode library paths into programs... immediate
                checking whether stripping libraries is possible... yes
                checking if libtool supports shared libraries... yes
                checking whether to build shared libraries... yes
                checking whether to build static libraries... yes
                checking linux/version.h usability... yes
                checking linux/version.h presence... yes
                checking for linux/version.h... yes
                checking for Linux epoll(7) interface with signals extension... yes
                checking OpenIPMI/ipmiif.h usability... no
                checking OpenIPMI/ipmiif.h presence... no
                checking for OpenIPMI/ipmiif.h... no
                checking whether TIOCSRS485 is declared... yes
                checking whether make supports nested variables... (cached) yes
                checking for ANSI C header files... (cached) yes
                checking for main in -lnsl... yes
                checking that generated files are newer than configure... done
                configure: creating ./config.status
                config.status: creating Makefile
                config.status: creating ser2net.spec
                config.status: executing depfiles commands
                config.status: executing libtool commands
                rm -rf .libs _libs
                 rm -f ser2net
                rm -f *.o
                rm -f *.lo
                  CC       controller.o
                  CC       dataxfer.o
                  CC       devcfg.o
                  CC       readconfig.o
                  CC       selector.o
                  CC       ser2net.o
                  CC       utils.o
                  CC       telnet.o
                  CC       buffer.o
                  CC       sol.o
                  CCLD     ser2net
                Installing /usr/local/sbin/ser2net from /home/homeseer/ser2net-znet-timeout_patch/ser2net-3.0-rc4-znet/ser2net
                -rwxr-xr-x 1 root staff 79532 Aug 30 12:46 /usr/local/sbin/ser2net
                homeseer@Z-Net:~/ser2net-znet-timeout_patch $
                Being limited on my Linux experience, I can't be sure, but it looked like it ran without problems.
                HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                Comment


                  Originally posted by zwolfpack View Post
                  You shouldn't have to do the sudo. But I don't think that would help with this.

                  ls -l should show the executable ('x') bits set. I verified that unzip preserves those on the v2, but didn't check on the v1. Which one are you trying it on? If 'x' isn't set try

                  $ chmod +x *.sh
                  As I posted above, it was not executable. This is a v2. My mistake may have been that I unzipped the files on my Windows machine, then uploaded (using WinSCP) to the Z-Net.
                  HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    I update the Z-NET firmware to 1.0.21, please give it a try.

                    The issue I found was that if you had some Z-Wave devices transmitting frequently, this caused serial traffic which would keep the network connection open. This is why the timeout worked for some and not for others. I made a change to ignore serial traffic for the timeout and it appears to timeout the connection reliably if there is no network traffic.

                    I posted updates for the both the V1 and V2 Z-Net.
                    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                    Comment


                      I update the Z-NET firmware to 1.0.21, please give it a try.
                      Rich,

                      I tested this on my V2 Znet at the Office using ZWave 3.0.1.92 and it WORKED great. I will propagate the update to my distant ZNets and see how it goes. Thanks.

                      Bob

                      Comment


                        Originally posted by rjh View Post
                        I update the Z-NET firmware to 1.0.21, please give it a try.

                        The issue I found was that if you had some Z-Wave devices transmitting frequently, this caused serial traffic which would keep the network connection open. This is why the timeout worked for some and not for others. I made a change to ignore serial traffic for the timeout and it appears to timeout the connection reliably if there is no network traffic.

                        I posted updates for the both the V1 and V2 Z-Net.
                        When I get back home I will test this as well. I will post back later this evening.
                        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          Rich,

                          I updated one of my V1 ZNets and now it will not connect at all. I can SSH to the ZNet but HS will now not connect. Suggestions?

                          Bob

                          Comment


                            Rich,

                            Ran "ps -f -C ser2net" and it is not running..

                            Bob

                            Comment


                              Originally posted by Bob_Linux_User View Post
                              Rich,



                              Ran "ps -f -C ser2net" and it is not running..



                              Bob


                              Bob,

                              Try
                              $ ps -C ser2net

                              Remember that the time service isn't running on the v1, so the -f causes ps to fail.


                              Sent from my iPhone using Tapatalk

                              Comment


                                Try
                                $ ps -C ser2net

                                Remember that the time service isn't running on the v1, so the -f causes ps to fail.
                                I did and ser2net is not running and of course HS will not connect. DEAD IN THE WATER. This unit is 30 miles from here and too late to go there to replace the ZNet with the spare.

                                Bob

                                Comment

                                Working...
                                X