Announcement

Collapse
No announcement yet.

no CodeDom provider defined for the language

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

    no CodeDom provider defined for the language

    I've installed a Mini-Bee device on a remote computer, Speaker Client and Script Connector. I've installed Jon00's Mini-Bee plugin and am trying to run a event on the server which runs the Mini-Bee VBEN script on the remote computer to activate the Mini-Bee device.

    However when I run the script from the event I get the following error:

    04/09/2012 19:31:49 - LAPTOP - Compile Error : Scripts\MiniBee.vben : There is no CodeDom provider defined for the language.

    Do you know what this error means? Is it a script connector error message or Mini-Bee? Or is this something that I would need to refer to Jon00?

    Thanks for your help
    Simon

    #2
    I don't think you can run a .vben script on the remote computer.

    As far as I can remember, the Script Connector plugin only supports .vb and .cs extensions for scripts.
    --
    stipus

    Comment


      #3
      I'm now working on creating my own script for Mini-Bee which works fine when run locally on HS server but when run through Script Connector gives the following error:

      05/09/2012 01:03:26 LAPTOP Compile Error : Scripts\mb.vb : CompilerError[s] : line:4 error:BC30451 'Name 'Instr' is not declared.' line:4 error:BC30451 'Name 'params' is not declared.' line:7 error:BC30451 'Name 'Left' is not declared.' line:7 error:BC30451 'Name 'params' is not declared.' line:7 error:BC30451 'Name 'InStr' is not declared.' line:7 error:BC30451 'Name 'params' is not declared.' line:9 error:BC30451 'Name 'Right' is not declared.' line:9 error:BC30451 'Name 'params' is not declared.' line:9 error:BC30451 'Name 'InStr' is not declared.' line:9 error:BC30451 'Name 'params' is not declared.' line:44 error:BC30451 'Name 'params' is not declared.'


      the vb script so far is :

      Code:
      Declare Function InitMbee Lib "mb.dll" () As Boolean
      Declare Function SetOutputs Lib "mb.dll" (ByVal outputs As Integer) As Boolean
      Public Sub Main(ByVal params As String)
          If Instr(params, "-") > 0 Then
              InitMbee()          ' initialise the Mini-Bee USB comms
              Dim Output As String
              Output = Left(params, (InStr(params, "-") - 1))
              Dim Status As String
              Status = Right(params, (InStr(params, "-") - 1))
              Hs.writelog("MiniBee", "Output=" & Output & " Status=" & Status)
              Select Case Output
                  Case "1"
                      SetOutputs(1)
                  Case "2"
                      SetOutputs(2)
                  Case "3"
                      SetOutputs(4)
                  Case "4"
                      SetOutputs(8)
                  Case "5"
                      SetOutputs(10)
                  Case "6"
                      SetOutputs(20)
                  Case "7"
                      SetOutputs(40)
                  Case "8"
                      SetOutputs(80)
                  Case "9"
                      SetOutputs(100)
                  Case "10"
                      SetOutputs(200)
                  Case "11"
                      SetOutputs(400)
                  Case "12"
                      SetOutputs(800)
                  Case "13"
                      SetOutputs(1000)
                  Case "14"
                      SetOutputs(2000)
      
              End Select
      
          Else
              hs.writelog("MiniBee", "Invalid values passed in - " & params)
          End If
      
      
      End Sub
      I'm sure I'm missing something simple

      Thanks
      Simon

      Comment


        #4
        It must be VB.NET code.

        I think Instr() is a VB Script instruction, and not VB.NET
        --
        stipus

        Comment


          #5
          Replace this:
          Code:
          If Instr(params, "-") > 0 Then
          with this:
          Code:
          If params.Contains("-") Then
          and save the script with a .vb extension....
          HSPro 3.0.0.458, Z-NET with Z-wave plugin 3.0.1.190, RFXCOM + 2x RFXtrx433E, HSTouch, Squeezebox plugin, iTach IP/WF2IR & GC-100-6 with UltraGCIR, BLDenon, NetcamStudio, Jon00s Webpage builder, Harmony Hub plugin, SCSIP (with FreePBX), Arduino plugin, IFTTT, Pushalot plugin, Device History plugin.
          Running on Windows 10 (64) virtualized
          on ESXi (Fujitsu Primergy TX150 S8).
          WinSeer (for Win10) - TextSeer - FitbitSeer - HSPI_MoskusSample

          Are you Norwegian (or Scandinavian) and getting started with HomeSeer? Read the "HomeSeer School"!

          Comment


            #6
            I'm not 100% certain, but it's possible the "Declare" statements are not compatible with the script connector.

            Check the script connector documentation for the #IMPORT or #USING statements. However, the DLL you want to use has to be a .NET assembly... I don't think it's compatible with a native dll.
            --
            stipus

            Comment

            Working...
            X