Announcement

Collapse
No announcement yet.

Have I got a broken z-Net

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

    #31
    These lines

    Code:
    Jan-20 12:17:06                 Z-Wave Error    zBrockhill: The  zBrockhill interface did not respond to the request for the HomeID and  Node - it may be disconnected or malfunctioning (2).
    Jan-20 12:15:51           Z-Wave     zBrockhill: Z-Wave Ethernet at IP 192.168.0.150, connected to interface ok.
    indicate that the plugin connected to the Raspberry Pi, but that the Zwave controller was unresponsive, as Home ID/Node is the first thing the plugin tries to get.

    When it gets into this state, ssh into the znet and issue this command

    netstat -t

    and post results.

    This will tell us if there is an existing connection which isn't exiting properly. This is what the patch is supposed to prevent. If there isn't a lingering connection, my best guess would be that the UZB (the external zwave controller) is faulty.

    Comment


      #32
      Looks like there is no connection to the HS Server which is 192.168.0.6 (0.5 is the PC runnning Putty) - here's the netstat result..

      pi@zBrockhill:~ $ netstat -t
      Active Internet connections (w/o servers)
      Proto Recv-Q Send-Q Local Address Foreign Address State
      tcp 0 0 192.168.0.150:2001 192.168.0.6:61410 ESTABLISHED
      tcp 0 268 192.168.0.150:ssh 192.168.0.5:51811 ESTABLISHED
      pi@zBrockhill:~ $


      Since the mod last week, I have noticed that clicking twice on the Exclamation icon in z-wave controller management (once to disconnect, once again to connect) it has started connecting without a z-net cold boot.

      Scott
      Last edited by ScottRennie; January 23, 2018, 02:57 AM.

      Comment


        #33
        There is a connection, as indicated by this line

        tcp 0 0 192.168.0.150:2001 192.168.0.6:61410 ESTABLISHED

        2001 is the server (znet) side port number used for zwave comms. This shows that the client (zwave plugin) at IP 192.168.0.6 has an established connection to the znet on this port.

        Was this when it was in the error state? The purpose of the patch is to enable a two minute timeout; after two minutes without receiving anything the znet breaks the connection and becomes ready to accept a new one. The zwave plugin tries repeatedly to establish a connection, so once the znet is ready, connection is established and all is good. I'd be puzzled if it stayed in this error state for longer than two minutes.

        Instead of toggling the icon, try just refreshing the page. I have noticed it doesn't always refresh itself properly which can be misleading.

        Comment


          #34
          Hi zwolfpack,
          Missed that IP - oops!
          Yes, this was when it was in the error state - I had stopped HS3 then restarted it.
          I'll try refreshing next time and let you know.

          Thank you again for your help with this!

          Cheers
          Scott

          Comment


            #35
            OK, I tried it again, the first time a refresh did fix it. The second time it didn't and I have no z-wave comms. Heres the netstat in this case
            pi@zBrockhill:~ $ netstat -t
            Active Internet connections (w/o servers)
            Proto Recv-Q Send-Q Local Address Foreign Address State
            tcp 0 0 192.168.0.150:2001 192.168.0.6:54607 ESTABLISHED
            tcp 0 0 192.168.0.150:45622 40.76.43.114:http TIME_WAIT
            tcp 0 216 192.168.0.150:ssh 192.168.0.5:62634 ESTABLISHED
            tcp 0 0 192.168.0.150:45620 40.76.43.114:http TIME_WAIT
            pi@zBrockhill:~ $

            Clicked the Exclamation twice and it came back online and is working. This is the Netstat after initializing
            pi@zBrockhill:~ $ netstat -t
            Active Internet connections (w/o servers)
            Proto Recv-Q Send-Q Local Address Foreign Address State
            tcp 0 0 192.168.0.150:2001 192.168.0.6:55075 ESTABLISHED
            tcp 0 216 192.168.0.150:ssh 192.168.0.5:62634 ESTABLISHED
            pi@zBrockhill:~ $


            Scott

            Comment


              #36
              So it doesn't recover after a two minute wait? This is a mystery. I presume that the log is churning with attempts by the plugin to reestablish connection?

              One thing, check if the client (remote) port number (highlighted) is changing or remains constant when measured more than two minutes apart:

              tcp 0 0 192.168.0.150:2001 192.168.0.6:54607 ESTABLISHED

              Comment


                #37
                Originally posted by zwolfpack View Post
                So it doesn't recover after a two minute wait? This is a mystery. I presume that the log is churning with attempts by the plugin to reestablish connection?

                One thing, check if the client (remote) port number (highlighted) is changing or remains constant when measured more than two minutes apart:

                tcp 0 0 192.168.0.150:2001 192.168.0.6:54607 ESTABLISHED
                I'll check and get back to you

                Comment


                  #38
                  Loads of problems at the weekend. Had a problem where a PIR lost it's Node ID and wouldn't remove. When I tried a new PIR it added it to an existing Node and caused problems with that. In the end I removed the zNET and dug out the old one with the NET problem. It's been fine so far.

                  Returning as faulty, hopefully the replacement will be better.

                  Should I do the Timeout update anyway?

                  Scott

                  Comment


                    #39
                    I would say yes - intent of the timeout is to prevent communication deadlock in case the plugin and the znet get out of sync.

                    Comment


                      #40
                      Hi zwolfpack. I had a Z-Net issue the other day (status light turned RED). Turned out to be a failed switch which took HomeTroller offline. When I replaced the failed switch, it re-establishing connection to Z-Net, and the status light turned GREEN. I thought that was the end of it. However, the next morning the status light was back to RED, and I'm getting the typical Z-Net connection errors in my log. So I thought I would try to run your two scripts above in case my issue was the same patch issue, but I'm not able to get that far. When I run the WGET command, it's returning an error saying the file was not found. Here's my terminal output.

                      Code:
                      pi@ZNet-Apartment:~ $ wget 'https://forums.homeseer.com/attachment.php?attachmentid=65791&d=1515641659' -O znetcare.zip
                      --2019-01-08 13:12:07--  https://forums.homeseer.com/attachment.php?attachmentid=65791&d=1515641659
                      Resolving forums.homeseer.com (forums.homeseer.com)... 149.28.235.27
                      Connecting to forums.homeseer.com (forums.homeseer.com)|149.28.235.27|:443... connected.
                      HTTP request sent, awaiting response... 301 Moved Permanently
                      Location: filedata/fetch?id=1194766 [following]
                      --2019-01-08 13:12:07--  https://forums.homeseer.com/filedata/fetch?id=1194766
                      Reusing existing connection to forums.homeseer.com:443.
                      HTTP request sent, awaiting response... 404 Not Found
                      2019-01-08 13:12:08 ERROR 404: Not Found.
                      
                      pi@ZNet-Apartment:~ $
                      Am I doing something wrong here or is there some other issue?

                      Comment


                        #41
                        The trick of downloading from the forum with wget doesn't seem to work anymore since the forum update.

                        Best to download it to your PC the normal way (click on the link & save), then use WinSCP to move it to the Z-Net.

                        I will update the post with the instructions later today.

                        Comment


                          #42
                          Originally posted by zwolfpack View Post
                          The trick of downloading from the forum with wget doesn't seem to work anymore since the forum update.

                          Best to download it to your PC the normal way (click on the link & save), then use WinSCP to move it to the Z-Net.

                          I will update the post with the instructions later today.
                          Thanks! I used WinSCP to get the file over and rename. Then ran the commands mentioned. Here's my output, can you review and let me know what you think my next steps should be?

                          Code:
                          login as: pi
                          pi@192.168.1.10'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.
                          pi@ZNet-Apartment:~ $ unzip znetcare.zip -d znetcare
                          Archive:  znetcare.zip
                            inflating: znetcare/Makefile
                            inflating: znetcare/znet_info.sh
                            inflating: znetcare/znet_patch.sh
                            inflating: znetcare/zled
                          pi@ZNet-Apartment:~ $ cd znetcare
                          pi@ZNet-Apartment:~/znetcare $ ./znet_info.sh
                          
                          Z-Net version 2 revision 1.0.23
                          
                          Internal (GPIO) serial device detected - it's an EZZee.
                          
                          ser2net port 2001 timeout (seconds): 0 - (per rev. 1.0.18 and prior, and 1.0.23) - not recommended (timeout disabled)
                          Your installed ser2net is pre-1.0.21 and does not have the patch added in rev. 1.0.21/1.0.22.
                          pi@ZNet-Apartment:~/znetcare $ ./znet_patch.sh
                          Note: This is a Z-Net v2, firmware revision 1.0.23
                          Note: superuser (root) privilege required to install this patch -
                          Note: displaying commands that would be run by superuser.
                          Note: /etc/ser2net.conf modifications (< old; > new):
                          74c74
                          < 2001:raw:0:/dev/ttyAMA0:115200 8DATABITS NONE 1STOPBIT -XONXOFF -RTSCTS
                          ---
                          > 2001:raw:120:/dev/ttyAMA0:115200 8DATABITS NONE 1STOPBIT -XONXOFF -RTSCTS
                          Note: backing up existing /etc/ser2net.conf...
                          install -p /etc/ser2net.conf /etc/ser2net.conf-orig
                          Note: installing patched /etc/ser2net.conf...
                          install -p -t /etc ser2net.conf
                          rm -f ser2net.conf
                          Note: patched ser2net binary is not installed.
                          Note: patched ser2net binary was previously downloaded.
                          Note: backing up existing /usr/local/sbin/ser2net...
                          install -p /usr/local/sbin/ser2net /usr/local/sbin/ser2net-orig
                          Note: installing patched ser2net binary...
                          install -p -s /var/www/Main/ser2net.x /usr/local/sbin/ser2net
                          pi@ZNet-Apartment:~/znetcare $

                          Comment


                            #43
                            This shows that you don't have the patches installed. To install them, you can run znet_patch.sh as superuser like this:

                            Code:
                            sudo ./znet_patch.sh
                            It will run the commands shown above, which modify the configuration file /etc/ser2net.conf and install an updated ser2net executable.

                            Comment


                              #44
                              Originally posted by zwolfpack View Post
                              This shows that you don't have the patches installed. To install them, you can run znet_patch.sh as superuser like this:

                              Code:
                              sudo ./znet_patch.sh
                              It will run the commands shown above, which modify the configuration file /etc/ser2net.conf and install an updated ser2net executable.
                              I really appreciate you helping me through this process. I ran the command using SUDO as mentioned. I got the same/similar replies as before. Does that means it's done?

                              If so, would I reboot the device? Usually to reboot I unplug power, but not sure if that's really good for it. But rather than pull the power plug, could I use something like one of these commands I found using Google?

                              > sudo shutdown -r now
                              > sudo reboot

                              Thanks again!!!

                              EDIT: I ran the sudo reboot command and I saw my Z-Net reboot, but after it came back up, I still have the status light glowing RED.

                              Should I re-run the status commands to see if it shows any different?

                              EDIT 2: My bad - I had disabled my Z-Net to change the IP address to be a reserved address rather than DHCP. And I had forgotten to re-enable the Z-Wave plugin. Once I saw that, it connected right up and the status light is now GREEN! Again, thank you for all your help!

                              Code:
                              login as: pi
                              pi@192.168.1.10'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.
                              pi@ZNet-Apartment:~ $ cd znetcare
                              pi@ZNet-Apartment:~/znetcare $ sudo ./znet_patch.sh
                              [sudo] password for pi:
                              Note: This is a Z-Net v2, firmware revision 1.0.23
                              Note: /etc/ser2net.conf modifications (< old; > new):
                              74c74
                              < 2001:raw:0:/dev/ttyAMA0:115200 8DATABITS NONE 1STOPBIT -XONXOFF -RTSCTS
                              ---
                              > 2001:raw:120:/dev/ttyAMA0:115200 8DATABITS NONE 1STOPBIT -XONXOFF -RTSCTS
                              Note: backing up existing /etc/ser2net.conf...
                              Note: installing patched /etc/ser2net.conf...
                              Note: patched ser2net binary is not installed.
                              Note: patched ser2net binary was previously downloaded.
                              Note: backing up existing /usr/local/sbin/ser2net...
                              Note: installing patched ser2net binary...
                              pi@ZNet-Apartment:~/znetcare $

                              Comment


                                #45
                                Great!

                                To check that the patches have been applied, run the znet_info.sh again. Results should be different now.

                                'sudo reboot' and 'sudo shutdown -r now' do exactly the same thing. I use the 1st cause its less typing

                                Comment

                                Working...
                                X