Announcement

Collapse
No announcement yet.

HS3 Linux with Remote Z-Wave Interface Setup Guide

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

    HS3 Linux with Remote Z-Wave Interface Setup Guide

    NOTE: This is a copy and paste from a forum post over here ==> HS3 Linux with Remote Z-Wave Interface Setup Guide
    Written by Homeseer User Blackbear - Ryan Aldridge

    I've made the conversion from Vera to HS3 over the past month or so. In that time, I have gleamed quite a bit across a number of sources that I wanted to share with the community in a single guide as it may help a lot of other people new to Homeseer if they want to do a similar setup

    My Setup:

    This setup has been rock solid with zero issues. This diagram is the setup I'm running (HS3 running on Ubuntu VM and a Remote Z-Wave interface (HS SmartStick+ connected to a Raspberry Pi 3 (RPi3) B+ using SER2NET to expose the USB interface to the network). This allows me to host my HS3 server within my network equipment closet and have the RPi Z-Wave device anywhere in the house (since I have the whole house wired for ethernet). For those that don't have wired ethernet, this setup should still work for WiFi networks (just imagine the dotted lines connecting the objects below being wireless connections).

    Click image for larger version  Name:	fetch?id=1272611&d=1546668121.jpg Views:	1 Size:	15.7 KB ID:	1272739
    Step 1: Install HS3
    1. I used this fantastic guide by to get my HS3 running on Ubuntu 18.10.
    2. Reboot the Ubuntu server (missing from the linked guide).
    3. Load the initial webpage: http://find.homeseer.com/findhomeseer/
    4. Install the HS3 license
    5. Modify any additional configuration settings you want
    My server specs (probably overkill for now, but I have big plans for this setup):
    • 4 vCPU
    • 8 GB Memory
    • 20 GB HDD
    Average CPU usage is <5% and Memory usage is around 2-3 GB at any given time (I have 10 plugins running currently with about 20 devices).

    Step 2: Install Raspberry Pi 3 OS (Raspbian Lite)

    Hardware: I chose a 16GB MicroSD card. IMPORTANT: Raspberry Pi 3 B+ needs a Class 10 or higher grade card.
    1. Install NOOBS on the MicroSD card using this Raspberry Pi tutorial
    2. Insert the MicroSD card and connect the Smartstick+ USB, Ethernet cable (if you have one), HDMI monitor, keyboard, and mouse to the RPi3 and power it on.
    3. Once the RPi boots to the install menu, select Raspbian Lite from the list of OS choices (it may take a minute or so to display the full list). Follow the prompts to install the OS (I chose all defaults except I set my local timezone).
    4. Once the RPi has finished installing the OS, reboot it.
    5. Login (default username/password = pi / raspberry)
    6. If you don't have the RPi connected via an ethernet cable and instead need to use WiFi, now is the time to connect it.
      1. Open the Config Menu:
        Code:
        sudo raspi-config
      2. Select 2 Network Options
      3. Select N2 Wi-fi
      4. Choose your country
      5. Enter the WiFi network's SSID
      6. Enter the WiFi network's passphrase
      7. If it works, you should get a success (and no error message). If it didn't work, check the SSID and passphrase.
      8. Exit the config menu
    • Enable SSH
      1. Open the Config Menu:
        Code:
        sudo raspi-config
      2. Select 5 Interfacing Options
      3. Select P2 SSH
      4. Select Yes
      5. Exit the config menu
    • Change the default password: Code:
      Code:
      passwd
    Step 3: Setup Static IP for the RPi3 You want to make sure the RPi always has a static IP address so the HS3 server can find it on the network. If DHCP is used, the address will periodically change and the HS3 server will lose connection to the RPi3. You can either set a static IP in the DHCP server like I did or you can configure the RPi to have a static IP. After you configure the static IP, reboot the RPi:
    • Code:
      sudo reboot now
    Step 4: Install ser2net on the RPi3
    ser2net allows COMM ports (such as serial and USB) to be exposed to the network through a TCP port. This makes it really easy for the HS3 Z-Wave plugin to connect to the RPi3 and use the Smartstick+ Z-Wave interface remotely (anywhere in the world if you want).
    1. Log back into the RPi's SSH interface (remember to use the new static IP address you set).
    2. Run the following command to install ser2net:
      Code:
      sudo apt-get install ser2net
    3. Now we need to determine the "device address" of the USB port where the Smartstick+ is located. ser2net uses this to map to a network port.
      1. Run the following command:
        Code:
        dmesg | grep tty | grep USB
      2. The "device address" will start with tty (default should be ttyACM0).
    4. Edit the ser2net.conf file and map the USB device address to a network port. I used port 4000 (doesn't really matter as long as it is above 1024).
      1. Open the /etc/ser2net.conf file: [CODE]sudo nano /etc/ser2net.conf [/CODE
      2. Move the cursor all the way to the bottom of the file
      3. Add the following line of code beneath everything else:
        Code:
        4000:raw:0:/dev/ttyACM0:115200
        • NOTE: The format is <TCP port>:<state>:<timeout>:<device>:<options>
        • You can understand the fields more in the ser2net man page
      4. Save and Exit (Control + X, then Y)
      5. Restart the ser2net service:
    Code:
    sudo systemctl restart ser2net
    Step 5: Install and Configure the HS3 Z-Wave Plugin
    1. From the HS3 webpage, go to Plugins >> Manage.
    2. Expand Additional Interfaces >> Lighting & Primary Technology.
    3. Select the HomeSeer Z-Wave plugin and click Download and Install (just below Additional Interfaces).
    4. Once it's installed, enable the plugin.
    5. Once the plugin has enabled, go to Plugins >> Z-Wave >> Controller Management
    6. Click Add Interface
      • Name: (whatever you want to name it)
      • Interface Model: Ethernet Interface
      • IP Address: <static ip address of the RPi3>
      • Port Number: <ser2net port> (Mine was port 4000)
    7. Click Add
    8. Click the Enable box (it should successfully connect to the RPi3!)
    9. Expand Z-Wave Networks and Options
    10. Rename the network to whatever you want
    This is what my setup looks like:

    Click image for larger version  Name:	fetch?id=1272612&amp;d=1546674113.jpg Views:	1 Size:	92.1 KB ID:	1272827Step 6: Add Z-Wave Devices
    1. From the HS2 webpage, go to Plugins >> Z-Wave >> Controller Management
    2. Expand Z-Wave Interfaces
    3. From the Actions dropdown, select Add/Include a Node
    4. Click the Start button and then press the Programming button on the Z-Wave device itself. You should see activity in the dialog box. If you do, congrats! It works!

    Hopefully this guide will help some newer folks out there if they want to do this sort of similar setup. If you have any questions, feel free to reply or reach out to me.

    One side note about the security of this approach - since the USB of the RPi is exposed to the local network without authentication, I have it in a separate subnet/VLAN along with some other home automation/security related devices. Very few devices on my network can access this "security" network.

    Thanks,
    Ryan
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 20.04 / VB W7e Jetway JBC420U591
    Fanless Intel® Celeron N3160 SoC 8Gb
    HS4 Pro - V4.1.18.1 - Ubuntu 20.04/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb
    HSTouch on Intel tabletop tablets

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

    #2
    I have 2 Z-Nets (one connected by cable and the other WiFi). I followed these instructions and have added the RPi-SmartStick+ as a Z-Wave controller. However, I need some help, because it adds as a Main interface for its ID and I want to make it secondary to the main Z-Net. When I try to make it a secondary, inclusion controller on the main network, it will not receive the replicate data ("Replicate send started..." ..."Replication fails."). Further, the HS3 log shows: "RPi_Z-Wave: Z-Wave PC Controller Library Version: Z-Wave 6.02 (Unknown)" Thanks. Elliott

    EDIT: I resolved this issue. I tried the SmartStick+ on a Win 10 computer running HS3 STD. It worked fine (a device added properly). I plugged it back into the RPi, added it again as a controller in HS3 Pro, erased everything on the SmartStick+, and then I was able to make it a secondary controller.
    Last edited by Richel; December 22, 2019, 12:56 PM. Reason: I resolved this issue.

    Comment


      #3
      Pete Thank you very much for your very detailed explanation. I just finished setting up a Raspberry Pi 3 B+ , and it worked perfectly , no issues whatsoever!
      Many many thanks!.

      2 Questions if you don't mind:
      -I need to setup a second Raspberry pi probably end of next year for a "remote" garage. Will this tutorial from you , most likely also work with another ( newer) Raspberry Pi, Or should I preferably use this Raspberyy Pi 3 B+ ? Should I worry about an updated/ newer version of Raspbian Lite/ser2net ?
      -When I setup another Raspberry , which port should I use? like in your example I used now 4000. Can I use any number ( above 1024) , like 4001 ? or is there a number which makes more sense?

      Best regards,
      Cor

      Comment


        #4
        Quick question: Should my RPi with the HomeSeer SmartStick+ show up in http://find.homeseer.com/findhomeseer/, because it does not? It seems to be working quite well, though.

        Comment


          #5
          Originally posted by Richel View Post
          Quick question: Should my RPi with the HomeSeer SmartStick+ show up in http://find.homeseer.com/findhomeseer/, because it does not? It seems to be working quite well, though.
          No. This is (to best of my knowledge) the only functional difference between a z-net and the diy setup.
          -Wade

          Comment


            #6
            Originally posted by cc4005 View Post

            No. This is (to best of my knowledge) the only functional difference between a z-net and the diy setup.
            Thanks.

            Comment


              #7


              Raspberry Pi, Or should I preferably use this Raspberyy Pi 3 B+

              Here still using the RPi V2 for many years and it is doing fine.

              Should I worry about an updated/ newer version of Raspbian Lite/ser2net ?

              no

              When I setup another Raspberry , which port should I use?

              I have only used the default in the above example. As it is a combo IP / Port it really doesn't matter if you use the same port.

              like in your example I used now 4000. Can I use any number ( above 1024) , like 4001 ? or is there a number which makes more sense?

              No. But give it a try anyways; you cannot break anything.
              - Pete

              Auto mator
              Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
              Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
              HS4 Lite - Ubuntu 20.04 / VB W7e Jetway JBC420U591
              Fanless Intel® Celeron N3160 SoC 8Gb
              HS4 Pro - V4.1.18.1 - Ubuntu 20.04/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb
              HSTouch on Intel tabletop tablets

              X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

              Comment


                #8
                Pete : many thanks.

                Comment


                  #9
                  Port number: I had some issues with my installation and re-installed as port 5000. Works fine.

                  Comment


                    #10
                    Yeah here just logged in to the ZNet like device and looking at the /etc/ser2net.conf file and see:

                    # 2000:telnet:600:/dev/ttyS0:9600 8DATABITS NONE 1STOPBIT banner
                    # 2001:telnet:600:/dev/ttyS1:9600 8DATABITS NONE 1STOPBIT banner
                    # 3000:telnet:600:/dev/ttyS0:19200 8DATABITS NONE 1STOPBIT banner
                    # 3001:telnet:600:/dev/ttyS1:19200 8DATABITS NONE 1STOPBIT banner
                    2001:raw:60:/dev/ttyAMA0:115200

                    root@ICS-ZNet:/etc# uname -a
                    Linux ICS-ZNet 4.19.66-v7+ #1253 SMP Thu Aug 15 11:49:46 BST 2019 armv7l GNU/Linux

                    While there did an update / upgrade.

                    It has been problem free and I do not pay attention anymore. The RPi2 is POE connected and sits in the attic of the two story home on one beam.

                    There is also a W800 & Antenna there and one of two RFID devices. Years now.
                    - Pete

                    Auto mator
                    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                    HS4 Lite - Ubuntu 20.04 / VB W7e Jetway JBC420U591
                    Fanless Intel® Celeron N3160 SoC 8Gb
                    HS4 Pro - V4.1.18.1 - Ubuntu 20.04/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb
                    HSTouch on Intel tabletop tablets

                    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

                    Comment


                      #11
                      I set this up with a spare RPi 3B+ and HomeSeer Z-Wave SmartStick+ to go along with my two Z-Nets. The Z-Nets are very stable. However, about once per week, the RPi Z-Wave loses connection to my HS3Pro. This requires a reboot of the RPi to get it connected again. What is strange is that I can use Putty to access the RPi, when this happens. The HS3 log shows that it loses connection, 10 seconds later it reconnects, 10 seconds or so later it loses connection, etc, etc. Anyone have any thoughts about how to fix? Thanks. Elliott

                      Comment


                        #12
                        Here have not really noticed that with the RPi / POE ZWave device in the attic. That said just saw that sort of happening with a Kodi box I configured to be a mini NAS for a peer.

                        The box went to a pending software update and it was waiting for an acknowledgement of said update. It shouldn't be doing this so I have disabled any auto checking of updates as I manually just update the Kodi box.

                        This is just a guess. Is the RPi connected via DHCP? Are you using a static DHCP address or static IP address? Is it connected via the wire or is it connected wirelessly?
                        - Pete

                        Auto mator
                        Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                        Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                        HS4 Lite - Ubuntu 20.04 / VB W7e Jetway JBC420U591
                        Fanless Intel® Celeron N3160 SoC 8Gb
                        HS4 Pro - V4.1.18.1 - Ubuntu 20.04/VB W7e 64 bit Intel Kaby Lake CPU - 32Gb
                        HSTouch on Intel tabletop tablets

                        X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Smartthings hub, Hubitat Hub, and Home Assistant

                        Comment


                          #13
                          Originally posted by Pete View Post
                          Here have not really noticed that with the RPi / POE ZWave device in the attic. That said just saw that sort of happening with a Kodi box I configured to be a mini NAS for a peer.

                          The box went to a pending software update and it was waiting for an acknowledgement of said update. It shouldn't be doing this so I have disabled any auto checking of updates as I manually just update the Kodi box.

                          This is just a guess. Is the RPi connected via DHCP? Are you using a static DHCP address or static IP address? Is it connected via the wire or is it connected wirelessly?
                          Pete: Thanks. It has a static IP address and it is connected via WiFi. I'll take a look regarding automatic updates. By the way, I was looking to repurpose a Beelink GT1, which runs Kodi, among other things. What OS did you install? Elliott

                          Comment


                            #14
                            Do you have a port timeout set in /etc/ser2net.conf ? It's in the 3rd field of the port specification. I suggest a value of 120 (seconds)

                            Code:
                            2001:raw:[B][COLOR=#FF8C00]120[/COLOR][/B]:/dev/ttyACM0:115200

                            Comment


                              #15
                              Another idea - if you have at least version 3 of ser2net, add this line to your /etc/ser2net.conf, before the port specifier.

                              Code:
                              DEFAULT:kickolduser:true
                              Check your ser2net version via

                              Code:
                              ser2net -v
                              With this setting, when a new connection request comes in (from the Z-Wave plugin), it immediately drops any existing connection and accepts the new one. Without this, in case of a network disruption, sometimes the rpi doesn't realize the connection is broken and thus won't accept a new connect attempt. With kickolduser true, an old connection is dropped immediately.

                              Comment

                              Working...
                              X