Announcement

Collapse
No announcement yet.

HS3 Linux Ubuntu 18.04 Server

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

    #16
    I was following this thread to update my new SEL before I switched over from my production
    Homeseer, but I have run into a problem (brickwall)

    Installed:
    ubuntu-18.04.1-live-server-amd64.iso

    Installed mono
    homeseer@homeseer-sel:/usr/local/HomeSeer$ mono -V
    Mono JIT compiler version 5.14.0.177 (tarball Mon Aug 6 09:07:45 UTC 2018)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS: __thread
    SIGSEGV: altstack
    Notifications: epoll
    Architecture: amd64
    Disabled: none
    Misc: softdebug
    Interpreter: yes
    LLVM: yes(3.6.0svn-mono-/)
    GC: sgen (concurrent by default)

    Installed:
    hs3_linux_3_0_0_435.tar.gz

    ran:
    /usr/local/Homeseer/go
    loads Homeseer and can register my license
    can change webuser login and homeseer password from the webinterface under setup and linux tools

    but I only get blank webpages under:
    tools/setup/network
    tools/setup/email
    tools/setup/voice
    I can't load plugins on the manage page, so I can't go any further

    in the log i get:

    vbnc : Command line : error VBNC2017: The library 'System.Data.DataSetExtensions.dll' could not be found.
    There were 1 errors and 0 warnings.
    Compilation took 00:00:00.3901410

    log:
    Aug-25 5:49:41 PM Error Compiling script Startup.vb: Visual Basic.Net Compiler version 0.0.0.5943 (Mono 4.7 - tarball) Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved. vbnc : Command line : error VBNC2017: The library 'System.Data.DataSetExtensions.dll' could not be found. There were 1 errors and 0 warnings. Compilation took 00:00:00.3901410

    I see the (Mono 4.7 - tarball) in the error

    What have I done wrong, and how do I move forward?
    Thanks for any help

    Bruce

    Comment


      #17
      Did you install?

      apt-get install mono-vbnc

      or

      apt install mono-vbnc

      ICS-Pine64:~# mono -V
      Mono JIT compiler version 5.14.0.177 (tarball Mon Aug 6 09:52:34 UTC 2018)




      - Pete

      Auto mator
      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

      HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

      Comment


        #18
        I just solved this by installing mono-devel.
        For now everything seems to be working.

        Comment


          #19
          That is in the install steps
          Code:
          sudo apt install mono-complete mono-vbnc
          Has it changed where mono-complete does not include mono-devel anymore? I'll have to check that.

          Comment


            #20
            Interesting cuz here alway installed mono-complete and mono-vbnc and never have installed mono-devel.

            Here for the update from Ubuntu 16.04 to Ubuntu 18.04 mono had been already installed. I just updated the apt sources.
            Last edited by Pete; August 25, 2018, 05:02 PM.
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

            HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
            HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

            Comment


              #21
              I agree that it is odd. The install of the "mono-vbnc" used to handle the dependencies that were needed from mono-devel. I checked the mono-project install docs and they have not changed.

              Comment


                #22
                I figured that mono-complete should be just that: complete, but I could never get it to install with sudo apt-get. Missing dependencies that I could just not solve.
                So I installed piece-meal. mono-vnbc which solved some problems, but then installed mono-devel and that took care of it. I am up and running. I have no idea why mono-complete wouldn't install for me, as I was simply following the steps outlined. Thank you for those instructions. I just wanted to post so that anyone else having problems with
                mono-complete install might be able to get up and running like I did.

                Comment


                  #23
                  Good news dbvanb !!!

                  Here ran in to an issue with Ubuntu 18.04 NetPlan.

                  The HS3 Pro machine started as Ubuntu 14.04 then updated it to Ubuntu 16.04 and recently updated it to Ubuntu 18.04.

                  Originally it was configured with a static address. In Ubuntu 16.04 the ethernet hardware naming changed which was easy to fix.

                  With Ubuntu 18.04 NetPlan was implemented with the upgrade using the static configuration.

                  It was causing some issues so I removed it and made more isssues for myself.

                  I fixed it over the last few days removing the Ubuntu 16.04 static configurations and re implenting the new Ubuntu 18.04 Netplan configurations.

                  I have always recommended doing an update from scratch and here have always updated the OS in vivo.

                  After tinkering with said issue just want to restate that it is better to build from scratch than to update the OS in vivo.


                  - Pete

                  Auto mator
                  Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb

                  HS4 Pro - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                  HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                  X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                  Comment


                    #24
                    Is there any step by step to get HomeSeer to shutdown using the builtin selections in the Menu.

                    Comment


                      #25
                      Pete,
                      Thanks again for all your past help. I installed the pico2wav package as indicated in your PM. Audio tests on Ubuntu indicate everything is working. I have the audio connected VIA Blue Tooth to Alexa successfully. I can play MP3's. wav files etc using programs in Ubuntu . HS3 has no audio output. After seeing the results that dbvanb had do you believe it will help to install mono-devel? There are no error messages as HS3 starts. It does an auto start, so I go into HS3 and have it shut down. Then go into Ubuntu and start it from the terminal and watch for error messages but don't see any.
                      BTW go my new Tesla M3 last week and so have spend my time playing with my new toy instead of working on my old problems.
                      Jim

                      Comment


                        #26
                        Hi guys,

                        EXTREMELY new to Linux flavours etc but wanted to test the stability and reliability of it running HS3. Following these instructions is someone able to point out what i may need to do or have done incorrectly please. It is a fresh complete install of Ubuntu 18.04 and when i run the last line.....

                        sudo cp homeseer.service /etc/systemd/system

                        I get

                        cp: 'homeseer.service' and '/etc/systemd/system/homeseer.service' are the same file

                        I wouldnt be surprised how simple it may be to fix.

                        Thanks in advance

                        Mick

                        Edit: Just noticed this was Ubuntu Server. Could that be the issue?
                        Last edited by Paroxysm; November 6, 2018, 07:04 AM.

                        Comment


                          #27
                          Originally posted by Paroxysm View Post
                          Hi guys,

                          EXTREMELY new to Linux flavours etc but wanted to test the stability and reliability of it running HS3. Following these instructions is someone able to point out what i may need to do or have done incorrectly please. It is a fresh complete install of Ubuntu 18.04 and when i run the last line.....

                          sudo cp homeseer.service /etc/systemd/system

                          I get

                          cp: 'homeseer.service' and '/etc/systemd/system/homeseer.service' are the same file

                          I wouldnt be surprised how simple it may be to fix.

                          Thanks in advance

                          Mick

                          Edit: Just noticed this was Ubuntu Server. Could that be the issue?
                          Look and see if you already copied the file into the systemd directory.

                          HTML Code:
                          ls /etc/systemd/system
                          if you see the file there verify it is valid

                          HTML Code:
                          cat /etc/systemd/system/homeseer.service
                          You should compare the contents with the original to see if they match.

                          The differences between Ubuntu Server and Desktop are mostly that Server does not provide a GUI by default and is streamlined to run server processes and not Desktop applications.

                          Comment


                            #28
                            Wow ok. So the problem is guys like you making this process so easy and seamless for guys like me, that i didn't even look to see what the cp command was supposed to be doing hah. Feel like a dumb *expletive* now. Thankyou for pointing that out.
                            I am not without new issue though....

                            homeseer.service - HomeSeer HS3 Home Automation Server
                            Loaded: loaded (/etc/systemd/system/homeseer.service; enabled; vendor preset: enabled)
                            Active: failed (Result: exit-code) since Wed 2018-11-07 06:11:13 AEDT; 55s ago
                            Process: 872 ExecStart=/usr/bin/mono /HomeSeer/HSConsole.exe --log (code=exited, status=200/CHDIR)
                            Main PID: 872 (code=exited, status=200/CHDIR)

                            Nov 07 06:11:13 Homeseer systemd[1]: homeseer.service: Service hold-off time over, scheduling restart.
                            Nov 07 06:11:13 Homeseer systemd[1]: homeseer.service: Scheduled restart job, restart counter is at 5.
                            Nov 07 06:11:13 Homeseer systemd[1]: Stopped HomeSeer HS3 Home Automation Server.
                            Nov 07 06:11:13 Homeseer systemd[1]: homeseer.service: Start request repeated too quickly.
                            Nov 07 06:11:13 Homeseer systemd[1]: homeseer.service: Failed with result 'exit-code'.
                            Nov 07 06:11:13 Homeseer systemd[1]: Failed to start HomeSeer HS3 Home Automation Server.


                            That is after a reboot and running..

                            sudo systemctl status homeseer.service

                            Once again.... Thnaks in advance

                            Mick

                            Comment


                              #29
                              Originally posted by dbmet View Post
                              Is there any step by step to get HomeSeer to shutdown using the builtin selections in the Menu.
                              Yes! (Well, more or less. This isn't quite step by step.) I've been working on moving HomeSeer to a Linux VM precisely so that I could ensure HomeSeer shuts down properly in the event of a power failure. I've had way too many database corruption issues on my Zee S2, so hopefully this helps.

                              I'm honestly extremely surprised that HomeSeer doesn't seem to provide proper startup and shutdown scripts (instead, leaving you to figure out what to do with the "go" script, which requires a command typed manually to trigger a proper shutdown). It doesn't even seem to be possible to pipe "shutdown" to the process! (I didn't spend too much time investigating, but my guess is they're reading straight from the TTY.)

                              I installed HomeSeer in /opt/HomeSeer and put the following scripts in /opt/HomeSeer-manager. These should allow the Shutdown and Restart commands from within HomeSeer to work, but even more importantly, should ensure that HomeSeer gets shut down properly if the system is halted by another process (like a VM manager in the event of a power failure). I tried to make these as robust as possible to any external influences (things killing HomeSeer, things killing the scripts, crashes, etc.), but they've only been tested so far, so YMMV.

                              install.sh:
                              Code:
                              #!/bin/bash
                              
                              if [ "$(id -u)" != "0" ]; then
                                  exec sudo -- "$0" "$@"
                              fi
                              
                              cd "$(dirname "$0")"
                              
                              
                              cp homeseer.service /etc/systemd/system/
                              systemctl daemon-reload
                              
                              echo "If you haven't already, please run: sudo apt install mono-complete mono-vbnc avahi-daemon libttspico-utils alsa-utils"
                              echo "To start, run: sudo systemctl enable/start homeseer"
                              homeseer.service:
                              Code:
                              [Unit]
                              Description=HomeSeer service
                              
                              [Service]
                              WorkingDirectory=/opt/HomeSeer-manager
                              ExecStart=/opt/HomeSeer-manager/start
                              ExecStop=/opt/HomeSeer-manager/stop
                              Restart=on-failure
                              RestartSec=10
                              TimeoutStopSec=2m30s
                              
                              [Install]
                              WantedBy=multi-user.target
                              start:
                              Code:
                              #!/bin/bash
                              
                              HOMESEER_DIR=/opt/HomeSeer
                              PID_FILE=/run/homeseer.pid
                              START_PID_FILE=/run/homeseer-start.pid
                              
                              
                              # Cleanup if HomeSeer appears to be running.
                              if [ -e "$PID_FILE" ]; then
                                  ./stop || exit #?
                              fi
                              
                              echo $$ > $START_PID_FILE
                              
                              echo "Starting HomeSeer in screen..."
                              echo > "$PID_FILE"
                              screen -dmS homeseer ./run
                              
                              sleep 2
                              
                              # Watch for dead HomeSeer launch process or screen session.
                              LAST_PID=
                              while [ -e "$PID_FILE" ]; do
                                  PID=`cat "$PID_FILE"`
                              
                                  # Log PID. (This shouldn't change, but if it does, best to see it.)
                                  if [ "$PID" != "$LAST_PID" ]; then
                                      [ -n "$PID" ] && echo "HomeSeer running at PID $PID."
                                      LAST_PID="$PID"
                                  fi
                              
                                  # If we have a PID and it's dead, exit.
                                  if [ -n "$PID" ] && ! kill -0 "$PID" > /dev/null 2>&1 && [ -e "$PID_FILE" ]; then
                                      echo "HomeSeer exited unexpectedly."
                                      rm -f "$START_PID_FILE"
                                      exit 1
                                  fi
                              
                                  # If screen is dead, exit.
                                  if ! screen -ls | grep -o '[0-9]*\.homeseer' > /dev/null && [ -e "$PID_FILE" ]; then
                                      echo "screen exited unexpectedly."
                                      rm -f "$START_PID_FILE"
                                      exit 1
                                  fi
                              
                                  if [ -e "$PID_FILE" ]; then
                                      sleep 5
                                  fi
                              done
                              
                              # We should be killed by the run script before getting here.
                              echo "HomeSeer exited."
                              rm -f "$START_PID_FILE"
                              exit 1
                              run:
                              Code:
                              #!/bin/bash
                              
                              HOMESEER_DIR=/opt/HomeSeer
                              PID_FILE=/run/homeseer.pid
                              START_PID_FILE=/run/homeseer-start.pid
                              STOP_PID_FILE=/run/homeseer-stop.pid
                              
                              TIMEOUT=60
                              
                              
                              echo $$ > "$PID_FILE"
                              cd "$HOMESEER_DIR"
                              mono HSConsole.exe --log
                              EXIT=$?
                              echo "HomeSeer exited with code $EXIT."
                              
                              # Homeseer forks shutdown and restart scripts. If we're not trying to stop it, give them time to run.
                              if [ -e "$STOP_PID_FILE" ] || [[ $EXIT -eq 0 ]]; then
                                  TRIES=$((TIMEOUT/5))
                                  while [[ $TRIES -gt 0 ]] && ! [ -e "$STOP_PID_FILE" ]; do
                                      echo "Waiting $((TRIES*5)) seconds for HomeSeer scripts to finish."
                                      sleep 5
                                      TRIES=$((TRIES-1))
                                  done
                              fi
                              
                              # Kill the start / monitoring script here, so it always finishes before the stop script.
                              if ([ -e "$STOP_PID_FILE" ] || [[ $EXIT -eq 0 ]]) && [ -e "$START_PID_FILE" ]; then
                                  echo "Killing monitor."
                                  START_PID=`cat "$START_PID_FILE"`
                                  [ -n "$START_PID" ] && kill "$START_PID" > /dev/null 2>&1 && sleep 2
                                  kill -SIGKILL "$START_PID" > /dev/null 2>&1
                                  rm -f "$START_PID_FILE"
                              fi
                              
                              # Done.
                              rm -f "$PID_FILE"
                              exit $EXIT
                              stop:
                              Code:
                              #!/bin/bash
                              
                              HOMESEER_DIR=/opt/HomeSeer
                              PID_FILE=/run/homeseer.pid
                              START_PID_FILE=/run/homeseer-start.pid
                              STOP_PID_FILE=/run/homeseer-stop.pid
                              
                              TIMEOUT=120
                              
                              
                              # Looks like stop is already running?
                              if [ -e "$STOP_PID_FILE" ]; then
                                  kill -SIGKILL `cat "$STOP_PID_FILE"` > /dev/null 2>&1
                              fi
                              echo $$ > /run/homeseer-stop.pid
                              
                              echo "Stopping HomeSeer..."
                              
                              # Seond "shutdown" command to HomeSeer until timeout or exit.
                              RUNNING=true
                              TRIES=$((TIMEOUT/5))
                              while [[ $TRIES -gt 0 ]] && $RUNNING; do
                                  RUNNING=false
                                  for SESSION in `screen -ls | grep -o '[0-9]*\.homeseer'`; do
                                      echo "Sending shutdown to $SESSION. ($TRIES attempts remaining.)"
                                      screen -p 0 -S "$SESSION" -X stuff 'shutdown^M' && RUNNING=true
                                  done
                              
                                  if $RUNNING; then
                                      sleep 5
                                      TRIES=$((TRIES-1))
                                  fi
                              done
                              
                              # Cleanup any remaining screen sessions.
                              for SESSION in `screen -ls | grep -o '[0-9]*\.homeseer'`; do
                                  echo "Sending quit command to $SESSION."
                                  screen -p 0 -S "$SESSION" -X quit
                              done
                              
                              EXIT=0
                              
                              # Does the start script appear to be alive?
                              if [ -e "$START_PID_FILE" ]; then
                                  START_PID=`cat "$START_PID_FILE"`
                                  if [ -n "$START_PID" ]; then
                                      echo "Killing HomeSeer.start PID $START_PID."
                                      kill -SIGKILL "$START_PID" > /dev/null 2>&1
                                      EXIT=1
                                  fi
                              fi
                              
                              # Does the run script appear to be alive?
                              if [ -e "$PID_FILE" ]; then
                                  PID=`cat "$PID_FILE"`
                                  if [ -n "$PID" ]; then
                                      echo "Killing HomeSeer PID $PID."
                                      kill -SIGKILL "$PID" > /dev/null 2>&1
                                      EXIT=1
                                  fi
                              fi
                              
                              # Cleanup.
                              rm -f "$PID_FILE"
                              rm -f "$START_PID_FILE"
                              rm -f "$STOP_PID_FILE"
                              
                              echo "Done."
                              exit $EXIT
                              I'd be curious to hear if anyone finds these useful.

                              Comment


                                #30
                                Originally posted by simplextech View Post
                                I just did a test install of HS3 on Linux and it went smooth and easy. Here's the information for others. Unlike the other guides I used the latest Ubuntu 18.04 Server (not desktop)


                                Ubuntu 18.04 Server
                                http://releases.ubuntu.com/18.04/ubu...734.1526794158

                                After install login to the server and then update.

                                Code:
                                sudo apt update
                                sudo apt upgrade
                                Mono Install
                                https://www.mono-project.com/downloa.../#download-lin

                                Actual Repo Install Steps Simplified (cut/paste)
                                Code:
                                sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
                                echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
                                sudo apt update
                                After Steps that actually installs Mono:
                                Code:
                                sudo apt install mono-complete mono-vbnc
                                Install Avahi Daemon for Chromecast support:
                                Code:
                                sudo apt install avahi-daemon
                                Download HS3
                                https://homeseer.com/updates3/hs3_li...0_0_435.tar.gz

                                Options of setting up your install location. Different people have different preferences some like /opt others like /usr/local and others like a dedicated user such as homeseer and in /home. Does not matter. For this example I'm just going to do it in my home directory and I will probably move it to /opt later.

                                Code:
                                 tar zxvf <hs3-archive-file.tgz>

                                That will extract into a directory named "Homeseer". Change into that directory and then simply start HS3.

                                Code:
                                cd Homeseer
                                sudo ./go &
                                That will start Homeseer from the current directory. Sudo is used to execute as the root (super user) to give permissions to open port 80 for the webserver.

                                Some plugins are distributed as a zip file for manual install. You will need to install unzip to unzip the zip file (that's a lot of zip in one sentence)

                                Code:
                                sudo apt install unzip
                                Finally, here's a sample SystemD Service file. This can be used to auto start HS3.

                                Code:
                                [Unit]
                                Description=HomeSeer Service
                                
                                [Service]
                                ExecStart=/usr/bin/mono /opt/HomeSeer/HSConsole.exe --log
                                WorkingDirectory=/opt/HomeSeer
                                Restart=on-failure
                                RestartSec=10
                                
                                [Install]
                                WantedBy=multi-user.target
                                Copy and paste that into a file named homeseer.service and then copy that file to /etc/systemd/system.

                                Steps:

                                Copy paste into homeseer.service
                                Code:
                                sudo cp homeseer.service /etc/systemd/system
                                sudo systemctl enable homeseer
                                sudo systemctl start homeseer
                                sudo systemctl status homeseer
                                I just did this install in a VM and it all worked great. I installed the plugins I use and they all ran. However this is all VERY LIMITED TESTING so far. Please don't move your primary system without doing your own testing.
                                I am very new to this and I followed your instructions. I can access the server via WinSCP. For the code above for starting HS automatically you say to copy the first code and name it homeseer.service and copy it to /etc/systemd/system but you also say to copy the second code to homeseer.service. Is this in the same file?

                                Also, and I am sure this is a dumb question but how do I access HS now. I noticed that it is saying that it is connected to MyHS service but I can't see it when I pull up myhs.homeseer.com. And if I use find.homeseer.com on my local network all that comes up is the Rpi that I have setup right now. If I try to use just the IP address it doesn't I still can't access the gui. What am I doing wrong?

                                Comment

                                Working...
                                X