Announcement

Collapse
No announcement yet.

An HS3-Linux installer package

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

  • An HS3-Linux installer package

    I've been evaluating HS3 on Linux (Raspberry Pi). Overall review is mixed. It has promise but the implementation is sloppy. The developer's Windows-centricism really shows. I won't be abandoning the 3-yr old Win7 Hometroller S6 anytime soon (not by choice anyhow). Glad I followed my instinct to stick with the platform with which they had the greater expertise.

    That said, I thought I would share the installer package that I put together.

    This installs HS3, mono, the referenced audio packages (unfortunately the provided voices are poor quality; see the PollyC thread for an alternative), a systemd unit for startup/shutdown, and some fixups so that all the TOOLS->System menu items function.

    The provided systemd unit provides HS3 startup at bootup and clean shutdown at reboot/halt/powerdown.

    Starting with a fresh install of Raspian OS, download the attached zip file and unzip. The installer runs via make(1), so a 'Makefile' is what drives it all.

    For full install (mono, audio, HS3) -

    Code:
    sudo make install-all
    Append 'build=nnn' to override the default latest release.
    Append 'login=username: password' (no space after colon) if local login enabled (see below)

    After this finishes (it takes awhile), HS3 will be up and running. Search on https://find.homeseer.com, navigate to the web interface and input your license info. Then install plugins and import your data (if applicable).

    To install/upgrade just HS3, build 472 for example -

    Code:
    sudo make upgrade-hs3 build=472
    If your installation is at the standard /usr/local or /opt, the installer will locate that and install there. Otherwise, you will need to append 'installpoint=/your/install/point'. Don't include the 'HomeSeer' component in this.

    Important note regarding the systemd unit

    The HS3 application is not implemented in a service-friendly way, so shutdown is accomplished by submitting "hs.shutdown()" command to Control Panel via the web interface. If you have the setup option "No password required for local login" unchecked, you will need to specify the login credentials to the installer. This is done by appending 'login=username: password' (no space after the colon) after any of the 'make' commands. Alternately, edit file 01settings and place the credentials there. These credentials need to be capable of login to the HS3 web interface with admin privilege. To update just the credentials, the command would be

    Code:
    sudo make install-service login=username:password

    Notes on some of the included files

    check_passwd - in the HS3 distribution, check_passwd is an Intel executable, which doesn't run on the ARM processor of the raspi. This replacement is a perl script which will run anywhere.

    restart.sh, shutdown_controller.sh - these replace the HS3 distribution versions. When shutting down a service, in some circumstances systemd will send signals to terminate all processes spawned from the service's parent process. This includes these scripts, preventing them from performing the expected reboot or powerdown command. Solution is to move the reboot/powerdown commands to a trap on exit. This way they are executed when a termination signal is received as well as a normal exit.

    run_command.sh - I don't think much of the "Linux Tools" functionality; however this version offers a small enhancement such that any command error output is displayed as well as the normal output.

    updater_override_3p.sh - this is an add-on helper script to aid installation of plugins that don't use the normal updater, such as PHLocation. To install PHLocation,

    Code:
    wget https://jphuddlestone.co.uk/phlocation/HSPI_PHLocation.zip
    sudo ./updater_override_3p.sh HSPI_PHLocation.zip
    This will place the contents of the zip file at appropriate places so the updater will offer the plugin under the "Local Updates" category.

    bootedit.sh - this shell script (called by the installer) configures the internal serial device for use with a Z-Wave
    controller GPIO daughter card such as the Razberry or EZZee.
    Attached Files

  • #2
    Great stuff David!!!!

    Can we move this to a sticky over here or in the DIY section?

    We can ask Mark or Rich to move it to the sticky notes under Homeseer 3 beta maybe?
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU - Mono 6.00
    Homeseer Zee2 (Lite) - 3.0.0.534 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro - Mono 6.00

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation.

    Comment


    • #3
      Wow, zwolfpack. This should go beyond a sticky. HomeSeer Technologies should just contract with you to formally integrate these improvements into the product. Skills are worth something.

      Comment


      • #4
        Thanks guys!

        Comment


        • #5
          Originally posted by zwolfpack View Post
          I've been evaluating HS3 on Linux (Raspberry Pi). Overall review is mixed. It has promise but the implementation is sloppy. The developer's Windows-centricism really shows. I won't be abandoning the 3-yr old Win7 Hometroller S6 anytime soon (not by choice anyhow). Glad I followed my instinct to stick with the platform with which they had the greater expertise.

          That said, I thought I would share the installer package that I put together.e.
          Awesome, thanks!

          Comment


          • #6
            very cool - testing this now on my new B+ setup and a razberry

            ok, literally just opened up the pi kit, flashed the newest raspbian os, booted, downloaded zip, extracted and ran... (nano to look at the makefile)
            ---
            sudo nano Makefile
            sudo make install-all
            ---
            and homeseer is now running. VERY cool. going to see if my razberry is identified.

            ok, after the above, HS3 was running with no errors, razberry would not initialize
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            Oct-30 22:41:43 Z-Wave RAZBERRY: Getting node information from controller...
            Oct-30 22:41:43 Z-Wave Warning RAZBERRY: Exception(1) with COM port (/dev/ttyAMA0): Inappropriate ioctl for device
            which let me to run -
            ---
            sudo ./bootedit.sh
            rebooted
            now the razberry zwave controller is working. i then ran ---

            wget https://jphuddlestone.co.uk/phlocati...PHLocation.zip
            sudo ./updater_override_3p.sh HSPI_PHLocation.zip
            and installed phlocation - which currently has an issue that you need to cd and copy a file -
            cd /opt/HomeSeer/bin/PHLocation/Nsoft/
            sudo cp Newtonsoft.Json.dll ../
            which copies that .dll to the PHLocation directoy and allows the install of phlocation to complete



            added my handful of plugins and its running well. your setup honestly makes the whole process MUCH less painless. i might be willing to move my primary controller to this tonight.
            Last edited by sudogreg; October 30th, 2018, 06:00 PM.

            Comment


            • #7
              Originally posted by zwolfpack View Post
              I've been evaluating HS3 on Linux (Raspberry Pi). Overall review is mixed. It has promise but the implementation is sloppy. The developer's Windows-centricism really shows. I won't be abandoning the 3-yr old Win7 Hometroller S6 anytime soon (not by choice anyhow). Glad I followed my instinct to stick with the platform with which they had the greater expertise.

              That said, I thought I would share the installer package that I put together.

              This installs HS3, mono (5.14), the referenced audio packages (unfortunately the provided voices are poor quality; see the PollyC thread for an alternative), a systemd unit for startup/shutdown, and some fixups so that all the TOOLS->System menu items function.

              The provided systemd unit provides HS3 startup at bootup and clean shutdown at reboot/halt/powerdown.

              Starting with a fresh install of Raspian OS, download the attached zip file and unzip. The installer runs via make(1), so a 'Makefile' is what drives it all.

              For full install (mono, audio, HS3) -

              Code:
              sudo make install-all
              Append 'build=nnn' to override the default 435.
              Append 'login=username: password' (no space after colon) if local login enabled (see below)

              After this finishes (it takes awhile), HS3 will be up and running. Search on https://find.homeseer.com, navigate to the web interface and input your license info. Then install plugins and import your data (if applicable).

              To install/upgrade just HS3, build 472 for example -

              Code:
              sudo make upgrade-hs3 build=472
              If your installation is at the standard /usr/local or /opt, the installer will locate that and install there. Otherwise, you will need to append 'installpoint=/your/install/point'. Don't include the 'HomeSeer' component in this.

              Important note regarding the systemd unit

              The HS3 application is not implemented in a service-friendly way, so shutdown is accomplished by submitting "hs.shutdown()" command to Control Panel via the web interface. If you have the setup option "No password required for local login" unchecked, you will need to specify the login credentials to the installer. This is done by appending 'login=username: password' (no space after the colon) after any of the 'make' commands. Alternately, edit file 01settings and place the credentials there. These credentials need to be capable of login to the HS3 web interface with admin privilege. To update just the credentials, the command would be

              Code:
              sudo make install-service login=username:password

              Notes on some of the included files

              check_passwd - in the HS3 distribution, check_passwd is an Intel executable, which doesn't run on the ARM processor of the raspi. This replacement is a perl script which will run anywhere.

              restart.sh, shutdown_controller.sh - these replace the HS3 distribution versions. When shutting down a service, in some circumstances systemd will send signals to terminate all processes spawned from the service's parent process. This includes these scripts, preventing them from performing the expected reboot or powerdown command. Solution is to move the reboot/powerdown commands to a trap on exit. This way they are executed when a termination signal is received as well as a normal exit.

              run_command.sh - I don't think much of the "Linux Tools" functionality; however this version offers a small enhancement such that any command error output is displayed as well as the normal output.

              updater_override_3p.sh - this is an add-on helper script to aid installation of plugins that don't use the normal updater, such as PHLocation. To install PHLocation,

              Code:
              wget https://jphuddlestone.co.uk/phlocation/HSPI_PHLocation.zip
              sudo ./updater_override_3p.sh HSPI_PHLocation.zip
              This will place the contents of the zip file at appropriate places so the updater will offer the plugin under the "Local Updates" category.

              bootedit.sh - this shell script (called by the installer) configures the internal serial device for use with a Z-Wave
              controller GPIO daughter card such as the Razberry or EZZee.
              This is sweet!!! I wish I would have seen this before I built my new ubuntu system.


              Sent from my iPhone using Tapatalk

              Comment


              • #8
                I am just curious,

                Can this be run on a x64 linux machine?

                Comment


                • #9
                  Originally posted by MattLau View Post
                  Can this be run on a x64 linux machine?
                  Its only been tested against Raspberry Pi (Raspbian stretch and jessie), as that is all I have to work with.

                  For other architectures, the mono repository name won't be correct. This can be manually specified by adding the parameter mono_dist to the installer command.

                  The repository for the various Linux flavors can be found here.

                  So on Ubuntu 18.04 for example, you could try
                  sudo make install-all mono_dist=stable-bionic

                  Beyond that, your on your own. Be brave! ;-)

                  Comment


                  • #10
                    I am REALLY hoping that Home Seer will pick this up and use it for the main distribution on the Pi (and why not on Linux in general)!

                    I fully agree with the statement that the current Linux installation is very "non Linux" like (even "naive") and this is actually the main drawback I always tell other techies when we talk home automation and I am asked to share my HomeSeer experiences.

                    Fix this and I will wholeheartedly recommend HomeSeer to anybody!

                    Comment


                    • #11
                      EDITED: After doing some digging in the Make file, not something I'm good at, I found that it already reads in the /etc/os-release file. This should be easier to do now.

                      -------------------------------------

                      I think this can be made more general, so it will handle multiple versions of Linux. Information about what version of Linux is in use can be pulled from /etc/os-release file. Example here is the contenders of this file based on the Linux running on my Z-NET, raspberry pi, and Ubuntu 18.04 LTS running my HS3 system. The the major issue are mainly between the Raspberry Pi and other systems although other single board computers such as the Rock64 will also have issues similar to the Pi.

                      Something else that might be useful is modifications for the led.sh command. I started working on one that is generic but then calls a second script that's written for the specific platform. I'm still working on mine but I've not yet figured out how to control the ring LED on my NUC8i3.

                      Raspberry Pi:
                      Code:
                      PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
                      NAME="Raspbian GNU/Linux"
                      VERSION_ID="8"
                      VERSION="8 (jessie)"
                      ID=raspbian
                      ID_LIKE=debian
                      HOME_URL="http://www.raspbian.org/"
                      SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
                      BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

                      Ubuntu:
                      Code:
                      NAME="Ubuntu"
                      VERSION="18.04.2 LTS (Bionic Beaver)"
                      ID=ubuntu
                      ID_LIKE=debian
                      PRETTY_NAME="Ubuntu 18.04.2 LTS"
                      VERSION_ID="18.04"
                      HOME_URL="https://www.ubuntu.com/"
                      SUPPORT_URL="https://help.ubuntu.com/"
                      BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
                      PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
                      VERSION_CODENAME=bionic
                      UBUNTU_CODENAME=bionic
                      HomeSeer Version: HS3 Standard Edition 3.0.0.531 | Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:02:17 UTC 2019)
                      Linux version: Linux auto 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
                      IP Address: 10.0.2.16 | Number of Devices: 417 | Number of Events: 667 | Available Threads: 399 | HSTouch Enabled: True

                      Enabled Plug-Ins: AirplaySpeak: 3.0.0.13 | BLBackup: 2.0.61.0 | EasyTrigger: 3.0.0.65 | LiftMaster MyQ: 1.3.7006.42100
                      mcsMQTT: 4.0.2.2 | PHLocation2: 3.0.0.53 | Pushover 3P: 0.0.0.45 | Z-Wave: 3.0.1.262

                      Z-Net version: 1.0.23 using a HomeSeer SmartStick+: 6.04 (ZDK 6.81.3)

                      Comment


                      • #12
                        David,

                        I'm checking all of the files for anything that is actually RPi specific so I can see if this can be made for work with my NUC8i3 running Ubuntu 18.04 LTS. Is there anything specific for the RPi that pops off the top of your head other than booted.sh?

                        I would be great to have this work with multiple version of Linux.
                        HomeSeer Version: HS3 Standard Edition 3.0.0.531 | Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:02:17 UTC 2019)
                        Linux version: Linux auto 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
                        IP Address: 10.0.2.16 | Number of Devices: 417 | Number of Events: 667 | Available Threads: 399 | HSTouch Enabled: True

                        Enabled Plug-Ins: AirplaySpeak: 3.0.0.13 | BLBackup: 2.0.61.0 | EasyTrigger: 3.0.0.65 | LiftMaster MyQ: 1.3.7006.42100
                        mcsMQTT: 4.0.2.2 | PHLocation2: 3.0.0.53 | Pushover 3P: 0.0.0.45 | Z-Wave: 3.0.1.262

                        Z-Net version: 1.0.23 using a HomeSeer SmartStick+: 6.04 (ZDK 6.81.3)

                        Comment


                        • #13
                          Main things are the mono repo name and bootedit.sh like you said. I've made a few minor enhancements in the code to handle these better, which I can upload.

                          What does this command return for you?

                          Code:
                          lsb_release -a

                          Comment


                          • #14
                            Originally posted by Timon View Post
                            I'm still working on mine but I've not yet figured out how to control the ring LED on my NUC8i3.
                            Do you have anything in /sys/class/leds/ ?

                            Comment


                            • #15
                              Originally posted by zwolfpack View Post
                              Main things are the mono repo name and bootedit.sh like you said. I've made a few minor enhancements in the code to handle these better, which I can upload.

                              What does this command return for you?

                              Code:
                              lsb_release -a
                              Here is what I get for both. Your were already using /etc/os-release, are you switching over to usb_release?

                              Code:
                              homeseer@auto:/opt/HomeSeer$ cat /etc/os-release
                              
                              NAME="Ubuntu"
                              VERSION="18.04.2 LTS (Bionic Beaver)"
                              ID=ubuntu
                              ID_LIKE=debian
                              PRETTY_NAME="Ubuntu 18.04.2 LTS"
                              VERSION_ID="18.04"
                              HOME_URL="https://www.ubuntu.com/"
                              SUPPORT_URL="https://help.ubuntu.com/"
                              BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
                              PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
                              VERSION_CODENAME=bionic
                              UBUNTU_CODENAME=bionic
                              Code:
                              homeseer@auto:/opt/HomeSeer$ lsb_release -a
                              
                              No LSB modules are available.
                              Distributor ID:    Ubuntu
                              Description:    Ubuntu 18.04.2 LTS
                              Release:    18.04
                              Codename:    bionic
                              homeseer@auto:/opt/HomeSeer$
                              HomeSeer Version: HS3 Standard Edition 3.0.0.531 | Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:02:17 UTC 2019)
                              Linux version: Linux auto 4.15.0-48-generic #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
                              IP Address: 10.0.2.16 | Number of Devices: 417 | Number of Events: 667 | Available Threads: 399 | HSTouch Enabled: True

                              Enabled Plug-Ins: AirplaySpeak: 3.0.0.13 | BLBackup: 2.0.61.0 | EasyTrigger: 3.0.0.65 | LiftMaster MyQ: 1.3.7006.42100
                              mcsMQTT: 4.0.2.2 | PHLocation2: 3.0.0.53 | Pushover 3P: 0.0.0.45 | Z-Wave: 3.0.1.262

                              Z-Net version: 1.0.23 using a HomeSeer SmartStick+: 6.04 (ZDK 6.81.3)

                              Comment

                              Working...
                              X