Announcement

Collapse
No announcement yet.

For those who have written plugin?

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

    For those who have written plugin?

    When you are writing your plugins in VB6, how are you testing them?

    Do you have to create an ocx file everytime and then shutdown and restart HS to test it or is there an easier way to test a plugin?

    TIA
    Cheers,
    Bob
    Web site | Help Desk | Feature Requests | Message Board

    #2
    Smaller segments (i.e. Procedures/Subs) are tested in immediate debug mode in the VB6 environment. Major segments of the logic are tested with a stub written specifically to test it. After that it is a lot of HS restarts

    Comment


      #3
      Michael,

      I have seen some plugins (DooMotion, RCS X10 Thermostat, etc) that have there own method calls.

      How do you write something the methods in the plugin so that it can be referenced from a HS script?

      Do you just create a public Function? If so, is there a certain spot in the code that it needs to go?

      TIA
      Cheers,
      Bob
      Web site | Help Desk | Feature Requests | Message Board

      Comment


        #4
        Once again here's the opportunity to have a sample plugin (OK HSPI_NETSAMPLE.HSPI is supposed to be an example... and the code is simple, but getting it to work is not)

        It would be really helpful to know how HS starts a plugin ....

        Comment


          #5
          The public methods are declared as Public in the hspi class module for .exe plugins and in the hspi user control for .ocx.

          The mcsMovement plugin from the Updater contains full source code and it was put up there as a source for others to learn various plugin techniques.

          Comment


            #6
            Awesome! Thanks!

            Comment


              #7
              Michael,

              Is the mcsMovement plugin written in vb .net?

              I am trying to write one in vb .net. I compile it as a dll, but HS complains of the following:

              7/27/2005 3:24:58 PM ~!~Error~!~Class not found in plugin DLL: hspi_DatabaseAccess.dll Class: HSPI_DATABASEACCESS.HSPI
              7/27/2005 3:24:58 PM ~!~Error~!~Cannot access plug-in HSPI_DATABASEACCESS.HSPI ActiveX component can't create object
              7/27/2005 3:24:58 PM ~!~Warning~!~Unable to access plugin: hspi_DatabaseAccess.dll, file may not be registered with Windows

              I tried to register it but it gave an error registering it. I have never registered a dll plugin before.

              I used the sample .net plugin as a basis.

              Any idea what is wrong?
              Cheers,
              Bob
              Web site | Help Desk | Feature Requests | Message Board

              Comment


                #8
                Here is the error I get when registering:
                Attached Files
                Cheers,
                Bob
                Web site | Help Desk | Feature Requests | Message Board

                Comment


                  #9
                  OK I got rid of that error in the HS log and I enabled the plugin.

                  BUT... it appears to be wanting a com port in the config of it. I did use the sample plugin as my template.

                  What would the capabilities of the plugin be if I just want to have it running so that I can execute public functions in the plugin?

                  I do not want to do any IO or IR or X10 with it
                  Cheers,
                  Bob
                  Web site | Help Desk | Feature Requests | Message Board

                  Comment


                    #10
                    I can't win, I tell ya... now the updater page is broken...

                    Comment


                      #11
                      I got my plugin to initialize in HS 2.0, but when I try to access a public function from a script, it does not call anything, but I do not see any errors

                      I am using the proper format (i think):

                      hs.GetPlugins("PluginName").publicFunctionName(parameter1, parameter2)
                      Cheers,
                      Bob
                      Web site | Help Desk | Feature Requests | Message Board

                      Comment


                        #12
                        Never mind. I am just stunned.

                        It might help if I used the proper plugin name in the hs.plugins calls


                        Cheers,
                        Bob
                        Web site | Help Desk | Feature Requests | Message Board

                        Comment


                          #13
                          mcsMovement is VB6. The hs.GetPlugins syntax shown is correct. I have used it under both HS1 and HS2 with success.

                          Comment


                            #14
                            When HS 2.0 lists all of the plugins found, what does it use to get the version number of the plugin?
                            Cheers,
                            Bob
                            Web site | Help Desk | Feature Requests | Message Board

                            Comment


                              #15
                              Originally posted by Blade
                              When HS 2.0 lists all of the plugins found, what does it use to get the version number of the plugin?
                              The version that is set in the AssemblyInfo.vb file
                              💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                              Comment

                              Working...
                              X