Announcement

Collapse
No announcement yet.

HS3 SEL: Scripts not running / compiling after mono upgrade

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

    HS3 SEL: Scripts not running / compiling after mono upgrade

    Hi,

    I have an issue where scripts dont run on my Hometroller SEL after mono Upgrade.

    **** First som info on how i upgraded mono ****

    Info on my Hometroller SEL:
    running command lsb_release -a
    Distributor ID: Ubuntu
    Description: Ubuntu 14.04.1 LTS
    Release: 14.04
    Codename: trusty

    Before mono upgrade it was running a very old version of mono:
    running command mono --version
    Mono JIT compiler version 3.2.8 (Debian 3.2.8+dfsg-4ubuntu1)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors.
    www.mono-project.com
    TLS: __thread
    SIGSEGV: altstack
    Notifications: epoll
    Architecture: x86
    Disabled: none
    Misc: softdebug
    LLVM: supported, not enabled.
    GC: sgen

    I had read that upgrading the mono could be tricky so i contacted HomeSeer support and the gave me this recipe:
    THIS WILL ONLY WORK ON THE HOMETROLLER SEL.
    Some plug-ins require Mono version 5 or higher. If you purchased your SEL after 03/01/18, you do not need this script.
    DO NOT RUN THIS SCRIPT ON A SYSTEM THAT ALREADY HAS MONO 5 OR HIGHER.
    To check, follow steps 1-2, and 7. If you do not feel comfortable running the following commands, please contact support and we can remote in and do it for you
    To check the systems current mono version run the command "mono --version" from the Linux tools page or from putty.
    1) Navigate to Tools > System > Linux Tools
    2) Login with the system password that you created when you first set up the device
    3) Download the update script using the following command, without quotes "sudo wget
    homeseer.com/linux/sel/selmono5.sh
    "
    4) Run the script "sudo sh selmono5.sh"
    5) The system will automatically reboot, once it is online, test to make sure the error in your log is gone.
    7) After completion, connect back to your SEL and run the following command in Linux Tools (Steps 1-2), "mono --version".
    *This procedure can also be performed using SSH (putty)
    If you run the above script and get dependency errors (such as libglib2.0 missing). Do the following:
    1) Download the update script using the following command, without quotes "sudo wget
    homeseer.com/linux/sel/selmonocomplete.sh
    "
    2) Run the script "sudo sh selmonocomplete.sh"
    3) The system will automatically reboot, once it is online, test to make sure the error in your log is gone.

    I had to go through all the steps (1-7 and then 1-3) but atleast mono was upgraded:
    homeseer@hometrollerSEL:~$ mono --version
    Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:14:25 UTC 2019)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS: __thread
    SIGSEGV: altstack
    Notifications: epoll
    Architecture: x86
    Disabled: none
    Misc: softdebug
    Interpreter: yes
    LLVM: yes(600)
    Suspend: hybrid
    GC: sgen (concurrent by default)


    **** Now to the problem with running / compiling cscripts ****

    After getting mono upgraded none of my scripts would run, not even startup.vb.
    I got this error in the log from both immediate scripts and script files:
    Error Compiling script Startup.vb: Error running vbnc: Cannot find the specified file
    All these scripts had been running fine for a long time.

    After reading som more on this forum I learned that it could be an issue with vbnc.
    I tried installing / updating vbnc with this command:
    sudo apt-get install mono-vbnc

    After that I still get error but now the following error in the log:
    Example from a immediate script:
    Jul-18 10:29:46 Error Compiling script /tmp/K2.vb:
    Jul-18 10:29:46 Event Running script statement immediately: &hs.SetDeviceString(976, NOW.ToString("HH:mm"),True)
    Anyone know what to do?

    Best regards,
    Torkil

    #2
    Mono of old has always been difficult to remove and update. I would try to delete Mono installed and try it again.

    Do a manual deletion of Mono then the documented installation of mono per the mono website.

    Disable Homeseer from starting while doing this:

    sudo apt-get purge mono-runtime
    sudo apt-get purge mono-complete
    sudo apt remove --purge --auto-remove mono-runtime
    sudo apt-get purge libmono* libgdiplus cli-common libglitz-glx1 libglitz1
    sudo rm -rf usr/lib/mono /usr/local/bin/mono /usr/local/etc/mono /usr/local/lib/mono

    also install gtkorphan (if you have a desktop) to remove lingering packages.

    Personally I would also upgrade the Ubuntu to Ubuntu 18.04. That said I think that the Trusty on your computer is 32 bit so save the Homeseer build to a USB stick before upgrading. Also upgrade the memory to max on the computer.

    Well even easier would be to upgrade to a new SSD, keep the old old and install new Ubuntu on the new SSD. 32Gb SSD will suffice.

    This is what I am running on my Homeseer computers (testing 4 at this time). Tinker more with Hardware here.
    Started first HS3 computer here with Ubuntu 16.04 64 bit. I also have tested a mini AMD cube computer with a dual AMD / 2Gb of RAM.

    1 - Intel i3 / 16Gb of RAM

    HS3Pro:~# lsb_release -a
    LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.2 LTS
    Release: 18.04
    Codename: bionic

    HS3Pro:~# mono -V
    Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:02:17 UTC 2019)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

    2 - Intel Z8350 Atom / 4 Gb of RAM

    BTPro:~# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.2 LTS
    Release: 18.04
    Codename: bionic

    BTPro:~# mono -V
    Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 09:02:17 UTC 2019)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

    3 - S912 Octocore ARM TV Box running Armbian / 3 Gb RAM

    TX9:~# lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.2 LTS
    Release: 18.04
    Codename: bionic

    TX9:~# mono -V
    Mono JIT compiler version 5.20.1.19 (tarball Thu Apr 11 08:59:52 UTC 2019)
    Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com

    The above is just a list of currently testing hardware and not related to your issue.

    - 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


      #3
      There a bug with mono vbnc and msbuild. I had to wiped out mono completly and install an older release.

      Comment


        #4
        I would advice to not run apt upgrade fo a while..

        Comment


          #5
          Seriously thinking about buying a nuc for hs3 on windows. But i do not think i ll have the time this summer

          Comment


            #6
            See end of the topic here : https://forums.homeseer.com/forum/ho...ge-compilation


            they started to send msbuild alone . which completely broke the install. After that they rectified it . Then they put 5.2.1.34 out... seems fine. But a little later they decided to update vbnc alone ...and voila a non usable build ( tryied to whipe all fille of my computer which has the name mono xamarin msbuild in it and desisntalled all the mono package on the system. But no luck. Was not able to compile any scripts. + of course aspx page are broked again

            i pinned my self to 5.18.x.x

            Comment


              #7
              Quote from them
              Annoyingly, replacing a directory with a symlink, when that directory has files written to it from binary packages produced by multiple source packages, is the singular most difficult thing to express in either RPM or Debian packaging metadata. Changes were needed to msbuild, mono and core-setup all together.

              In the end, the raspbian builds took 9.5 hours, rather than the more usual 2 or 3, which is why the fixed packages took so long to publish.

              5.20.1.34 published to stable at 5:50am Boston time (about 4 hours ago)

              5.18.1.28 published to vs at 4:35am Boston time (about 5 hours ago)

              So we have to wait I guess.

              Comment


                #8
                Thank you Matt.

                Earlier this morning did an update on three Homeseer 3 Ubuntu 18.04 computers running Homeseer.

                Just noticed that all three are erroring out so that I am down right now. What a PITA to deal with this.

                Jul-18 7:16:00 AM Error Compiling script /opt/HomeSeer/scripts/timedate.vb: Could not load type of field 'vbnc.Scanner:m_PeekedChars' (21) due to: Could not resolve type with token 010000d1 from typeref (expected class 'System.Collections.Generic.Queue`1' in assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089') assembly:mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.Collections.Generic.Queue`1 membernull) at vbnc.Main.Main (System.String[] CmdArgs) [0x00016] in :0 Failed compilation took 00:00:00.0294270
                Jul-18 7:17:00 AM Error Compiling script /opt/HomeSeer/scripts/timedate.vb: Could not load type of field 'vbnc.Scanner:m_PeekedChars' (21) due to: Could not resolve type with token 010000d1 from typeref (expected class 'System.Collections.Generic.Queue`1' in assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089') assembly:mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.Collections.Generic.Queue`1 membernull) at vbnc.Main.Main (System.String[] CmdArgs) [0x00016] in :0 Failed compilation took 00:00:00.0274460
                Jul-18 7:17:31 AM Error Compiling script /opt/HomeSeer/scripts/Jon00RSSHS3.vben: Could not load type of field 'vbnc.Scanner:m_PeekedChars' (21) due to: Could not resolve type with token 010000d1 from typeref (expected class 'System.Collections.Generic.Queue`1' in assembly 'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089') assembly:mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 type:System.Collections.Generic.Queue`1 membernull) at vbnc.Main.Main (System.String[] CmdArgs) [0x00016] in :0 Failed compilation took 00:00:00.0272120

                What are your recomendations to roll back Mono. Can I just roll back VBNC mono?


                - 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


                  #9
                  Just noticed that my scripts are still running even showing the VB errors in the HS log. The errors though are filling up my logs here.
                  - 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


                    #10
                    Personally i just remove anything related to mono. And started fresh on mono 5.18.1.3

                    Comment


                      #11
                      Here is my ppa


                      echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic/snapshots/5.18.1.3/. main" | sudo tee /etc/apt/sources.list.d/mono-snap.list

                      Comment


                        #12
                        Thank you Matt.

                        So far still running here BUT tons of errors in the log files. That said my events are still triggering fine...

                        Just did another update and upgrade and it looks to be updating MONO again this afternoon here near Chicago.

                        Looks like Mono 6.0 ...shut down HS3 and will reboot...wow that was a quick fix....

                        ICS-HS3Pro:~# mono -V
                        Mono JIT compiler version 6.0.0.313 (tarball Sun Jul 14 09:57:59 UTC 2019)
                        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(600)
                        Suspend: hybrid
                        GC: sgen (concurrent by default)

                        Updating other two HS3 computers.

                        Checking logs now and see no mono errors while running HS3.
                        - 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
                          So mono 6 is now mainline?

                          Comment


                            #14
                            How is your memory usage on mono 6.0.0.313 ? Pete

                            Mine is crazy.

                            I already had a memory leak, but I am wondering if it the problem express itself in an exponential manner, or if everybody is affected (so it would be another problem)?
                            Attached Files

                            Comment


                              #15
                              This is the lite box (Atom Z8350 / 4Gb DDR3 RAM / 40 Gb eMMC) running:

                              1 - Homeseer 3 (Zee2 version)
                              2 - Docker Home Assistant
                              3 - Docker OmniBridge
                              4 - VirtualBox (W7e)


                              Webmin
                              Click image for larger version  Name:	webmin.jpg Views:	0 Size:	14.0 KB ID:	1316492

                              Homeseer HTop

                              Click image for larger version  Name:	HSHTOP.jpg Views:	0 Size:	92.4 KB ID:	1316493

                              Docker HTop

                              Click image for larger version  Name:	dockerhtop.jpg Views:	0 Size:	62.2 KB ID:	1316494

                              Virtualbox Windows 7E

                              Click image for larger version  Name:	vb-htop.jpg Views:	0 Size:	54.8 KB ID:	1316495

                              I'll leave it be for a while. Today just updated Mono on it. (and dist-update)
                              - 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

                              Working...
                              X