Announcement

Collapse
No announcement yet.

Required Steps for ARM Users (Pi, Zee S2, etc.) -- Deprecated as of version 1.2.2

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Required Steps for ARM Users (Pi, Zee S2, etc.) -- Deprecated as of version 1.2.2

    As of 4/30/2018, these instructions are no longer required. Please see this post for Linux users instead!

    If you're using an ARM-based device on a debian-based OS (like raspbian), the version of Mono that's included in the repository (3.2.8) is a bit out of date and has a significant defect relating to making web requests that prevents this plugin from working.

    First, check what version of Mono you're running and verify you have the broken version:

    Code:
    root@sydney:~# mono --version
    Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    The defect was fixed in 3.8, but packages for ARM processors aren't available in the snapshot repository for anything above 3.2.8, so there are no easy command line tools you can use to get these. There is a way to upgrade to a newer 4.X version using apt, but HomeSeer doesn't work with Mono 4.X yet, so you can't use that approach either.

    The only approach I've been able to find that seems to resolve this problem is to compile Mono 3.12.1 from source yourself. It's actually very easy, but it will take somewhere around 4-6+ hours (depending on what you've set your clock speed to with raspi-config).

    Here are the steps I followed (adapted from this guide) on my Raspberry Pi:
    1. BACKUP YOUR SYSTEM! Make a backup copy of your SD card before you do anything; I do not want to be responsible for you crashing your HS3 machine!
    2. Execute the following commands on your Pi:
      Code:
      sudo apt-get remove mono-* libmono*
      sudo apt-get update
      sudo apt-get install libc6 libc6-dev libtool libglib2.0-dev libxrender-dev libfontconfig1-dev libpng12-dev libgif-dev libjpeg-dev libtiff5-dev libexif-dev gettext libcairo2-dev libgdiplus
      cd /usr/local/src
      sudo wget http://download.mono-project.com/sources/mono/mono-3.12.1.tar.bz2
      sudo tar -jxvf mono-3.12.1.tar.bz2
      cd mono-3.12.1
      sudo ./configure --prefix=/usr/local/
      sudo SKIP_AOT=true make
      sudo SKIP_AOT=true make install
    3. Check that "mono --version" shows you now have 3.12.1 installed (may require you to log out and back in again).
    4. Add VB support:
      Code:
      cd /usr/local/src
      sudo wget -O mono-basic-3.8.tar.gz https://github.com/mono/mono-basic/archive/3.8.tar.gz 
      sudo tar -zvf mono-basic-3.8.tar.gz
      cd mono-basic-3.8
      sudo ./configure
      sudo make
      sudo make install
    5. Check that "vbnc" runs and shows you now have "Visual Basic.Net Compiler version 0.0.0.5943 (Mono 3.8 - tarball)" installed (will complain you didn't give it anything to do, which is ok).
    6. Remove any extra Xamarin repositories from your /etc/apt/source.list.d (in case you've tried to upgrade previously).


    I do not have a Zee (or even a true armhf Raspberry Pi2) to test this on, but I hope it helps those of you trying to use this plugin on your servers!

    Update: Thanks to kf6dlq, who ran through and helped troubleshoot these instructions, it looks like this is going to solve the problem without breaking HS3.
    Last edited by shill; May 4th, 2018, 12:34 PM.

  • #2
    Got all the way to here, and am stuck. Any Ideas?

    Your instructions so far are perfect, except I had to use sudo in front of wget. Here is the error.

    homeseer@HomeTrollerZeeS2 /usr/local/src/mono-3.12.1 $ sudo ./configure --prefix=/usr/local/
    checking build system type... armv7l-unknown-linux-gnueabihf
    checking host system type... armv7l-unknown-linux-gnueabihf
    checking target system type... armv7l-unknown-linux-gnueabihf
    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 whether UID '0' is supported by ustar format... yes
    checking whether GID '0' is supported by ustar format... yes
    checking how to create a ustar tar archive... gnutar
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking whether ln -s works... yes
    checking whether make supports nested variables... (cached) yes
    checking host platform characteristics... ok
    checking for gcc... gcc
    checking for gcc... (cached) 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... configure: error: in `/usr/local/src/mono-3.12.1':
    configure: error: cannot run C compiled programs.
    If you meant to cross compile, use `--host'.
    See `config.log' for more details
    homeseer@HomeTrollerZeeS2 /usr/local/src/mono-3.12.1 $

    Comment


    • #3
      Try this:

      Code:
      sudo apt-get install build-essential
      If it installs something, that's a good sign. If it says it's already the newest version, that means I need to keep looking...

      Comment


      • #4
        Originally posted by shill View Post
        Try this:

        Code:
        sudo apt-get install build-essential
        If it installs something, that's a good sign. If it says it's already the newest version, that means I need to keep looking...
        Also, what does "config.log" say?

        Comment


        • #5
          Originally posted by shill View Post
          Try this:

          Code:
          sudo apt-get install build-essential
          If it installs something, that's a good sign. If it says it's already the newest version, that means I need to keep looking...
          Yep, it did.

          homeseer@HomeTrollerZeeS2 /usr/local/src/mono-3.12.1 $ sudo apt-get install build-essential
          Reading package lists... Done
          Building dependency tree
          Reading state information... Done
          build-essential is already the newest version.
          The following package was automatically installed and is no longer required:
          cli-common
          Use 'apt-get autoremove' to remove it.
          0 upgraded, 0 newly installed, 0 to remove and 99 not upgraded.

          Had to put the config.txt into doc format. Website having issues uploading txt files which is kind of strange. Thank you for your help.

          Lyle
          Attached Files

          Comment


          • #6
            Originally posted by kf6dlq View Post
            Yep, it did.

            homeseer@HomeTrollerZeeS2 /usr/local/src/mono-3.12.1 $ sudo apt-get install build-essential
            Reading package lists... Done
            Building dependency tree
            Reading state information... Done
            build-essential is already the newest version.
            The following package was automatically installed and is no longer required:
            cli-common
            Use 'apt-get autoremove' to remove it.
            0 upgraded, 0 newly installed, 0 to remove and 99 not upgraded.

            Had to put the config.txt into doc format. Website having issues uploading txt files which is kind of strange. Thank you for your help.

            Lyle
            I'm thinking this is the issue:

            Code:
            In file included from /usr/include/stdio.h:28:0,
                             from conftest.c:11:
            /usr/include/features.h:356:25: fatal error: sys/cdefs.h: No such file or directory
            Some research pointed to a need for libc6 and libc6-dev, so try this and see if it installs some new stuff:

            Code:
            sudo apt-get install libc6 libc6-dev

            Comment


            • #7
              Originally posted by shill View Post
              If you're using an ARM-based device on a debian-based OS (like raspbian), the version of Mono that's included in the repository (3.2.8) is a bit out of date and has a significant defect relating to making web requests that prevents this plugin from working.

              First, check what version of Mono you're running and verify you have the broken version:

              Code:
              root@sydney:~# mono --version
              Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-10)
              Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
              The defect was fixed in 3.8, but packages for ARM processors aren't available in the snapshot repository for anything above 3.2.8, so there are no easy command line tools you can use to get these. There is a way to upgrade to a newer 4.X version using apt, but HomeSeer doesn't work with Mono 4.X yet, so you can't use that approach either.

              The only approach I've been able to find that seems to resolve this problem is to compile Mono 3.12.1 from source yourself. It's actually very easy, but it will take somewhere around 10-12+ hours (depending on what you've set your clock speed to with raspi-config).
              Not so I just setup a new RPi3 this weekend and have mono 4.2.3.4.

              I have HSPro3 .291 Windows and a Windows backup config and imported into a Linux RPi3 running HSPro3 .291 running 4.2.3.4 Mono. See my posting here explaining some problems with the import of backup data from Windows to Linux.
              http://board.homeseer.com/showpost.p...&postcount=231

              Basic process was this:

              Code:
              Downloaded Jessie RPi3 from the Raspberry site and setup SD card: https://www.raspberrypi.org/downloads/raspbian/
              
              then 
              
              sudo apt-get update
              sudo apt-get upgrade
              sudo apt-get install raspberrypi-ui-mods
              
              sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
              
              echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
              
              echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
              
              echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
              
              sudo apt-get update
              sudo apt-get install mono-complete
              sudo apt-get install mono-vbnc
              sudo apt-get update
              
              
              pi@raspberrypi:~ $ mono --version
              Mono JIT compiler version 4.2.3 (Stable 4.2.3.4/832de4b Wed Mar 16 13:34:50 UTC 2016)
              
              pi@raspberrypi:~ $ vbnc
              Visual Basic.Net Compiler version 0.0.0.5943 (Mono 4.0.1 - tarball)
              Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.
              
              installed HS3Pro Linux in /usr/local/Homeseer
              sudo tar xfv hs3_linux_3_0_0_291.tar.gz
              After I got every thing running I followed a few other tips I found in the forums like installing screen and Webmin. Of course this is with a new setup not upgrading any existing setup on a Zee.

              Might try backing up config form one HS setup and importing it to a newer one running a newer Mono and see if it works rather than just copy over older db that get hung up on different mono incompatibilities.

              Comment


              • #8
                Yes, that worked, it installed some packages, and I have just finished with "sudo ./configure --prefix=/usr/local/" command
                without issues

                Now the long last two, will let you know. Thank you for the help! Hopefully this works, really looking forward to using your product!

                Lyle

                Comment


                • #9
                  Originally posted by srodgers View Post
                  Not so I just setup a new RPi3 this weekend and have mono 4.2.3.4.

                  I have HSPro3 .291 Windows and a Windows backup config and imported into a Linux RPi3 running HSPro3 .291 running 4.2.3.4 Mono. See my posting here explaining some problems with the import of backup data from Windows to Linux.
                  http://board.homeseer.com/showpost.p...&postcount=231
                  That's interesting. I wonder if they did anything specific in one of the recent beta builds of HS3 to work better with Mono 4? These forums are littered with posts about people who've tried and had problem and had to revert, so it would be welcome news indeed if it's working properly now (seems many of the issues were with events?).

                  Comment


                  • #10
                    Originally posted by shill View Post
                    That's interesting. I wonder if they did anything specific in one of the recent beta builds of HS3 to work better with Mono 4? These forums are littered with posts about people who've tried and had problem and had to revert, so it would be welcome news indeed if it's working properly now (seems many of the issues were with events?).
                    Works fine after I fixed a few bugs in the Backup/Restore function. Just submitted bugzilla on them. Scripts did not get copied/restored over. I just copied them over manually.

                    Second problem is that the paths to scripts in the event that called scripts all has windows paths with forward slashes. Only had about 10 so I fixed those manually. Also submitted bugzilla on that. Backup process should export the .hsd file with paths relative to the HomeSeer folder instead of a hard absolute paths from Windows. Again pita but easy enough to fix. Everything else came over; devices, plugin settings, event etc and runs fine for the last couple of days.

                    Comment


                    • #11
                      Those sound like migration issues. The problems (at least historically) with mono 4 have been more systemic in nature.

                      Sent from my SAMSUNG-SM-G930A using Tapatalk

                      Comment


                      • #12
                        Well,

                        It finished pretty quick, in just about four hours, no major issues that I saw. Rebooted, and got the correct mono -V installed. However, Homeseer is NOT starting. When I manually type ./go to see the error, this is what it gives me..

                        homeseer@HomeTrollerZeeS2 /usr/local/HomeSeer $ ./go

                        Unhandled Exception:
                        System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
                        File name: 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
                        [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
                        File name: 'Microsoft.VisualBasic, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
                        homeseer@HomeTrollerZeeS2 /usr/local/HomeSeer $

                        Any Idea what is causing this?

                        Lyle

                        Comment


                        • #13
                          sudo apt-get install mono-vbnc
                          Last edited by srodgers; June 13th, 2016, 10:02 PM. Reason: Wrong reply

                          Comment


                          • #14
                            Seems like the mono source doesn't include the visual basic compiler. Looking into that now.
                            Last edited by shill; June 14th, 2016, 12:36 PM.

                            Comment


                            • #15
                              Originally posted by kf6dlq
                              OK, thanks for all your help Shill.

                              Well, since I did a backup, and didn't mind doing a restore, I went ahead and tried v4.2.3.4 with a slight variation on how I installed it.

                              sudo apt-get update
                              sudo apt-get upgrade
                              sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF

                              echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list

                              echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list

                              echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list

                              sudo apt-get update
                              sudo apt-get install mono-complete mono-dev


                              Your plug-in as well as HS3 is working. No weird issues with Events / Logs yet, but will keep my eye out, and, thank you for a great program!

                              UPDATE: Found a MAJOR error with events. All Triggers disappeared to all the events
                              Restoring the PI2, and Homeseer, and try again tomorrow.
                              What version of HS3 are you using?

                              Comment

                              Working...
                              X