Announcement

Collapse
No announcement yet.

Plugins - How to write one/where to start?

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

    Plugins - How to write one/where to start?

    Before you tell me to: Yes, I've already seen the documentation.

    And the documentation is very good. However, it seems to be lacking something for the complete beginner in writing plugins! I'm familiar with VB.net so the coding itself is not a problem.


    However, I was wondering if there's some very basic examples out there?

    I like learning by looking at code.
    I have several ideas for some plugins, but I need to learn how to write them...
    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"!

    #2
    Originally posted by Moskus View Post
    Before you tell me to: Yes, I've already seen the documentation.

    And the documentation is very good. However, it seems to be lacking something for the complete beginner in writing plugins! I'm familiar with VB.net so the coding itself is not a problem.


    However, I was wondering if there's some very basic examples out there?

    I like learning by looking at code.
    I have several ideas for some plugins, but I need to learn how to write them...
    If you download the developer SDK, there is a sample plug-in there. It's not the best for a beginner, but that's where I started.

    Paul..

    Comment


      #3
      Yes, I've seen that plugin. But thanks.

      I was just hoping that there was some examples that were even "lighter" or easier to look at...
      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


        #4
        Here is an old thread to a template that was created. I'm not sure if this template will still work anymore, but it still might be helpfull to take a look.

        http://board.homeseer.com/showthread...emplate&page=3
        HS: 2.5.0.60
        Environment: Virtual XP as guest in VMWare Server running under Win 7
        Plug-ins: MLHSPlugin|RCS Serial Thermostat|UltraLog|UltraMon|
        Misc: 303 Devices, 313 Events, 68+ Scripts

        HSeer: 3.0.0.54
        Environment: Virtual XP as guest in VMWare Server running under Win 7
        Plug-ins: BLGData|BLRF|BLRadar|BLRandom|BLSpeech
        UltraM1G3|UltraECM3|UltraMon3|UPBSpud|Z-Wave
        Misc: 148 Devices, 116 Events, 9+ Scripts (so far, still converting)

        Comment


          #5
          I'd love someone to build a condition, or action builder. I think it's kind of crazy that we have to build strings for conditions using some invented cryptic method that will be parsed later by HS. debugging that is just a mess.

          I'm sure some of you think it might be easy, but I just want to add plugin action. And the ability to configure it. One wrong keystroke and you won't find out till runtime.

          Maybe just a .net wrapper class that would build this string for you. I started to work on a one a couple years back before I knew much .NET stuff, seems plausible.
          Joe (zimmer62)

          BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

          Comment


            #6
            Moskus
            Just started into plugin programing myself. Read for quite a while and now have the HS sample installed and running in VS debugger. I am studing the source and still reading, its a lot to take in.

            Comment


              #7
              Originally posted by jstaab View Post
              Here is an old thread to a template that was created. I'm not sure if this template will still work anymore, but it still might be helpfull to take a look.

              http://board.homeseer.com/showthread...emplate&page=3
              Excellent! I'll check it out!



              Originally posted by Gerard View Post
              Moskus
              Just started into plugin programing myself. Read for quite a while and now have the HS sample installed and running in VS debugger. I am studing the source and still reading, its a lot to take in.
              You shouldn't have a quick step-by-step list in how to achieve that?
              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


                #8
                Originally posted by Moskus View Post
                Excellent! I'll check it out!

                You shouldn't have a quick step-by-step list in how to achieve that?
                Moskus
                Here a shot at the get started steps. If you havent done it yet then we can validate it for others.

                1) Install HS on a dev box( could us production box but scarry)
                2) Install Visual Studio on same box as HS
                3) Download Sample plugin from HS developer page
                4) Using updater install developer package
                --- a) Icould not get this to correctly install the dev help files, hadtodo that from the zip by hand
                --- b) Help files are alsoavalible online at HS website on the dev page
                5) Open help desk ticket to get developer REG patch and install patch
                6) Make sure HS is not set to run on startup
                7) open sample plugin in VS
                ---a) In solution explorer right click on HSPI_NETSAMPLE and bring up properties tab
                ---b) On the complie tab select advance options button ans set debug to FULL

                ---c) On the complie tab set the build output path to your HS directory where plugins go
                ---d) On Debug tab set Start External Program to Homeseer.exe. This allows HS plugin to run under the debugger
                8) Build the pluging and run, it should spawn HS and youshould see log entries for the sample plugin.

                Test Debuger

                9) Stop plugin in VS
                10) look for one of the writelogs towards the top of the code and change some text( I just added my initals)
                11) build project
                12) set a breakpoint where you made your change
                13) Run project and it should break at your changed code
                14) Continue from breakpoint and init should complete and you should see yuor changed text in the log.

                This should ensure your changes and debuging are funtional.

                Comment


                  #9
                  Wow, excellent guide! Thank you very much!
                  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


                    #10
                    This is a great guide. I think most of use struggled with all of that at some point or another.

                    I wish there were the ability to remote debug plug-ins having the process run on another machine, but for most of us this should work just fine.
                    Joe (zimmer62)

                    BLSecurtiy, AC-RF2, RCS Serial Thermostats, RFXCOM SMarthome SwitchLinc, mcsXap, Global Cache GC100, SqueezeBox, TWA_ONKYOINTEGRA, BLLogMonitor, BLPlugins, BLRadar, BLSpeech, BLZLog.aspx, HSTouch (Windows, iPhone, iPod), USB Mimo touchscreens, VMWare Server, Vortexbox, Windows Home Server, MyMovies, Windows Media Center, X10, ZWave, and much much much more.

                    Comment


                      #11
                      Why not just make the reg and install patches part of the SDK? If you're intending to write a plug-in, you're going to want a debugger. I was all set to write my plug-in this weekend and now I have to wait until Monday to get my ticket processed

                      Comment


                        #12
                        Well, still not sure of the reason why the reg fix just isn't included (there are better approaches such as a developer cert if because the reg patch bypasses signing requirement which is just secure by obfuscation) but kudos to HomeSeer helpdesk for getting me what I needed so quickly. Even on a late Friday evening I was getting repsonses back!

                        Thanks much,

                        -Roland.

                        Comment


                          #13
                          Originally posted by rolanday View Post
                          Well, still not sure of the reason why the reg fix just isn't included (there are better approaches such as a developer cert if because the reg patch bypasses signing requirement which is just secure by obfuscation) but kudos to HomeSeer helpdesk for getting me what I needed so quickly. Even on a late Friday evening I was getting repsonses back!

                          Thanks much,

                          -Roland.
                          I'm a little confused.. Why do I need this REG patch in the first place..

                          Thanks,
                          Regards,

                          Rien du Pre
                          The Netherlands
                          Using:
                          Homeseer PRO latest HS4 BETA on a Raspberry
                          Plugin's:
                          RFXCOM, mcsMQTT, Z-Wave

                          Comment


                            #14
                            You need it if you want to use the debugger in Visual Studio. But it don't work on 64-bit systems...
                            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


                              #15
                              OKay clear.

                              One other question. I renamed the sample to my own names and now I keep getting this error:
                              3/21/2010 1:53:57 PM - Error - Class not found in plugin DLL: HSPI_XTREAMER.dll Class: HSPI_XTREAMER.HSPI

                              Any ideas ?
                              Regards,

                              Rien du Pre
                              The Netherlands
                              Using:
                              Homeseer PRO latest HS4 BETA on a Raspberry
                              Plugin's:
                              RFXCOM, mcsMQTT, Z-Wave

                              Comment

                              Working...
                              X