Announcement

Collapse
No announcement yet.

VB Script Error - New Updates just installed

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

    VB Script Error - New Updates just installed

    Getting error message since I upgraded HomeSeer to 2.5.0.52 and this plugin to the latest version.

    X10IntStat = hs.Plugin("Insteon").InterfaceStatus

    What became invalid?

    Thanks
    Frank

    #2
    The may not help with your problem, but just so you know, 2.5.0.52 is not the latest HomeSeer 2 version. The latest is 2.5.0.81. I've been running it with the PLM plug-in for a long time now. You can find it here: (I don't know why they never updated the updater)

    http://homeseer.com/downloads/legacy.htm

    Comment


      #3
      Originally posted by franklnc View Post
      Getting error message since I upgraded HomeSeer to 2.5.0.52 and this plugin to the latest version.

      X10IntStat = hs.Plugin("Insteon").InterfaceStatus

      What became invalid?

      Thanks
      Frank
      what error are you getting? InterfaceStatus is a required method so its there and working otherwise hs2 would complain
      Mark

      HS3 Pro 4.2.19.5
      Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
      Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
      Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

      Comment


        #4
        I tried it and got a result of "0" and no error.

        Comment


          #5
          X10IntStat = hs.Plugin("Insteon&quot.InterfaceStatus

          HomeSeer Version is now 2.5.0.80

          This line use to return a value of 0 until I updated.

          Error Message is...

          Object required: 'hs.Plugin(...)'X10IntStat=hs.Plugin("Insteon").InterfaceSta tus

          Comment


            #6
            Originally posted by franklnc View Post
            HomeSeer Version is now 2.5.0.80

            This line use to return a value of 0 until I updated.

            Error Message is...

            Object required: 'hs.Plugin(...)'X10IntStat=hs.Plugin("Insteon").InterfaceSta tus
            can you post the complete script where this line is executed
            Mark

            HS3 Pro 4.2.19.5
            Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
            Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
            Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

            Comment


              #7
              Pretty basic stuff....

              Sub main()

              Dim varTextTo
              Dim varMailFrom
              Dim strTextBody
              Dim strTextSubject
              Dim strUpTime, X10IntStat, strVistaAlarm
              Dim strDeviceCode, varDeviceValue, strDeviceName
              Dim strDevicelist, strDeviceType

              varTextTo = hs.GetINISetting("Settings","wsDomainEmailTo","")
              varMailFrom = hs.GetINISetting("Settings","smtp_from","")
              strMailBody = "HomeSeer Event"
              strTextBody = ""

              ***** Next line now errors ******

              X10IntStat = hs.Plugin("Insteon").InterfaceStatus

              If X10IntStat <> 0 Then
              strTextSubject = "PowerLinc USB Communication Failure"
              hs.speak strTextSubject, True, "TETRIS:PARENTS"
              hs.sendemail varTextTo,varMailFrom,strTextSubject,strTextBody
              End If

              ***** Does a bunch of stuff here ******

              End Sub

              Comment


                #8
                Try setting as a string and see if it works for you then. This is the Test code that I tried that works (for me).




                Public Sub InsteonStatus (ByVal parm as Object)

                dim Istat as String = hs.Plugin("Insteon").InterfaceStatus
                hs.WriteLog("Insteon Status", Istat)

                End Sub

                Comment


                  #9
                  Originally posted by franklnc View Post
                  Pretty basic stuff....

                  Sub main()

                  Dim varTextTo
                  Dim varMailFrom
                  Dim strTextBody
                  Dim strTextSubject
                  Dim strUpTime, X10IntStat, strVistaAlarm
                  Dim strDeviceCode, varDeviceValue, strDeviceName
                  Dim strDevicelist, strDeviceType

                  varTextTo = hs.GetINISetting("Settings","wsDomainEmailTo","")
                  varMailFrom = hs.GetINISetting("Settings","smtp_from","")
                  strMailBody = "HomeSeer Event"
                  strTextBody = ""

                  ***** Next line now errors ******

                  X10IntStat = hs.Plugin("Insteon").InterfaceStatus

                  If X10IntStat <> 0 Then
                  strTextSubject = "PowerLinc USB Communication Failure"
                  hs.speak strTextSubject, True, "TETRIS:PARENTS"
                  hs.sendemail varTextTo,varMailFrom,strTextSubject,strTextBody
                  End If

                  ***** Does a bunch of stuff here ******

                  End Sub
                  not sure what's happening here, but joegr may be on the right path.

                  can you convert the vbscript to a vb.net script (.vb) so you can 'type' each variable.
                  Mark

                  HS3 Pro 4.2.19.5
                  Hardware: Insteon Serial PLM | AD2USB for Vista Alarm | HAI Omnistat2 | 1-Wire HA7E | RFXrec433 | Dahua Cameras | LiftMaster Internet Gateway | Tuya Smart Plugs
                  Plugins: Insteon (mine) | Vista Alarm (mine) | Omnistat 3 | Ultra1Wire3 | RFXCOM | HS MyQ | BLRadar | BLDenon | Tuya | Jon00 Charting | Jon00 Links
                  Platform: Windows Server 2022 Standard, i5-12600K/3.7GHz/10 core, 16GB RAM, 500GB SSD

                  Comment


                    #10
                    Revisted....

                    I finally got a chance to revisit this problem.
                    Converting the script to vb.net and additional tweaks did not work.

                    I created a script that listed all of the plugins.
                    There was one plugin that was listed with no name value.

                    So, I modified the script to call out a different plugin....

                    X10IntStat = hs.Plugin("Vista Alarm").InterfaceStatus

                    .... and it worked!

                    My original code is still valid, however, the "Insteon" value must be the null value.
                    (Fully registered plugin and working perfectly in Homeseer. No log errors.)

                    X10IntStat = hs.Plugin("Insteon").InterfaceStatus

                    Where does Homeseer look for this variable?
                    (database or ini file)

                    Thanks

                    Comment

                    Working...
                    X