Announcement

Collapse
No announcement yet.

Script Error

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

    Script Error

    I have a very simple script which sets two virtual devices.

    I am running the following:

    HomeSeer Version: HS3 Pro Edition 3.0.0.297
    Linux version: Linux RPi3-HS3PRO 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l GNU/Linux System Uptime: 0 Days 14 Hours 49 Minutes 52 Seconds
    Number of Devices: 155
    Number of Events: 145
    Available Threads: 396

    Enabled Plug-Ins
    2.0.34.0: BLLAN
    2.0.19.0: BLOccupied
    3.0.0.27: EasyTrigger
    3.0.0.22: EnvisaLinkAdemco
    3.0.0.103: HSTouch Server
    3.0.1.52: PHLocation
    0.0.0.25: Pushover 3P
    3.0.1.93: Z-Wave

    Over the weekend I rebuilt my system on Mono 4, my script worked perfectly under Mono 3.

    Code:
    Sub Main(ByVal Parms As Object)
    
        hs.SetDeviceString(170, hs.Sunrise, True)
        hs.SetDeviceString(169, hs.Sunset, True)
    
    End Sub
    The error in the log is

    Code:
    [COLOR=#FF0000]Compiling script /usr/local/HomeSeer/scripts/Sunrise-Sunset_hs3.vb:[/COLOR]
    No other detail is provided.

    Any help would be appreciated.

    Thanks,

    Jim

    #2
    Over the weekend I rebuilt my system on Mono 4, my script worked perfectly under Mono 3.
    Do any other scripts work or is it just this one? I would wonder whether or not you have a missing Mono library.

    Comment


      #3
      Originally posted by mrhappy View Post
      Do any other scripts work or is it just this one? I would wonder whether or not you have a missing Mono library.
      That's actually the only script I have.

      Anything simple I can create to test?

      Comment


        #4
        ssh to the box and try the compiler from the command-line:

        cd /usr/local/HomeSeer/scripts
        vbnc myscript.vb
        HS4Pro on a Raspberry Pi4
        54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
        Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

        HSTouch Clients: 1 Android

        Comment


          #5
          Originally posted by rmasonjr View Post
          ssh to the box and try the compiler from the command-line:

          cd /usr/local/HomeSeer/scripts
          vbnc myscript.vb
          Here are the results, I also show the contents of the directory:

          Code:
          pi@RPi3-HS3PRO:~ $ cd /usr/local/HomeSeer/scripts
          pi@RPi3-HS3PRO:/usr/local/HomeSeer/scripts $ ls -l
          total 104
          -rwxrwxrwx 1 root root  1516 Jun 15 18:38 Dim_To_OFF2.vb
          -rw-r--r-- 1 root root  1677 Jun 16 06:31 Dim_To_OFF3.vb
          -rw-r--r-- 1 root root  1371 Jun 14 20:42 Dim_To_OFF.vb
          -rw-r--r-- 1 root root 59876 Jul  5 13:09 Jon00GroupingASPX.vben
          -rw-r--r-- 1 root root   244 Feb 29  2016 PHLocation.vb
          -rw-r--r-- 1 root root  1300 Jun 15 05:56 Ramp_Up_Dimmer.vb
          -rw-r--r-- 1 pi   root   228 Nov 21  2014 ShutDown.txt
          -rw-r--r-- 1 root root  1711 Jun 16 07:05 Simple_Control.vb
          -rwxr-xr-x 1 pi   root   934 Nov 21  2014 Startup.vb
          -rw-r--r-- 1 root root   140 Nov  1 09:47 Sunrise-Sunset_hs3.vb
          -rw-r--r-- 1 root root  2359 Oct 11 11:56 Togglle_Flash_Device.vb
          -rw-r--r-- 1 root root   159 Mar 15  2016 weatherXML_HSPhone.vb
          pi@RPi3-HS3PRO:/usr/local/HomeSeer/scripts $ vbnc myscript.vb
          
          Unhandled Exception:
          System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Cecil.VB, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
          File name: 'Mono.Cecil.VB, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
          [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Cecil.VB, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
          File name: 'Mono.Cecil.VB, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
          There are other scripts in there that i never got to work. I don't see myscript.vb.

          Comment


            #6
            Originally posted by rmasonjr View Post
            ssh to the box and try the compiler from the command-line:

            cd /usr/local/HomeSeer/scripts
            vbnc myscript.vb
            Okay, I think you meant to run 'my script', here are the results:

            Code:
            pi@RPi3-HS3PRO:/usr/local/HomeSeer/scripts $ vbnc Sunrise-Sunset_hs3.vb
            
            Unhandled Exception:
            System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Cecil.VB, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
            File name: 'Mono.Cecil.VB, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'
            [ERROR] FATAL UNHANDLED EXCEPTION: System.IO.FileNotFoundException: Could not load file or assembly 'Mono.Cecil.VB, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies.
            File name: 'Mono.Cecil.VB, Version=0.9.5.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756'

            Comment


              #7
              Yeah, so vbnc is the compiler application that takes your VB script and compiles it. HS shells out that command and runs the executable. Since vbnc is dying, HS cant run the script.

              When you installed mono - was one of the packages mono-vbnc or mono-complete?
              HS4Pro on a Raspberry Pi4
              54 Z-Wave Nodes / 21 Zigbee Devices / 108 Events / 767 Devices
              Plugins: Z-Wave / Zigbee Plus / EasyTrigger / AK Weather / OMNI

              HSTouch Clients: 1 Android

              Comment


                #8
                Originally posted by rmasonjr View Post
                Yeah, so vbnc is the compiler application that takes your VB script and compiles it. HS shells out that command and runs the executable. Since vbnc is dying, HS cant run the script.

                When you installed mono - was one of the packages mono-vbnc or mono-complete?
                Usually I keep very good notes, this time I did not.

                I suspect I first did mono-complete then followed it up with mono-vbnc.

                Comment


                  #9
                  I tried these commands

                  Code:
                  sudo -i
                  
                  apt-get install mono-vbnc
                    apt-get install libmono-system-web4.0.cil
                    apt-get install libmono-system-design4.0.cil
                    apt-get install libmono-system-web-extensions4.0-cil
                    apt-get install libmono-system-runtime-caching4.0-cil
                  
                    sudo -i
                    apt-get install mono-xsp4
                  from this post

                  board.homeseer.com/showpost.php?p=1271368&postcount=320

                  did not fix my issue.

                  Anyone have any more ideas short of rebuilding with Jessie Lite from scratch?

                  Comment

                  Working...
                  X