Announcement

Collapse
No announcement yet.

HomeSeer 2 VB.Net Template [Version 1.0]

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

    HomeSeer 2 VB.Net Template [Version 1.0]

    I am releasing a HomeSeer 2 VB.NET HomeSeer 2 Plugin template in an effort to kick-start more plugins written in VB.Net 2003. I have written the following HomeSeer 2 plugins using this template:
    • UltraLog HSPI
    • UltraMon HSPI
    • UltraStatus/UltraView HSPI
    • HA7E HSPI


    If you have used triggers/actions/conditions in your own plug-in, it would be appreciated if updates could be done to this template to make the example easier to understand.

    I am request that all code corrections/suggestions be posted to this thread. I will roll them into the template and post an update.

    If you find this plugin template useful, please consider a paypal donation to Ultrajones at http://www.automatedhomeonline.com/welcome.html

    Regards,
    Ultrajones
    Last edited by Ultrajones; April 21, 2012, 02:21 PM.
    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

    #2
    UltraJones,

    Thanks. I hope to take a more carefull look at your samples in a few days (busy with other stuff). You're contribution is greatly appreciated. I'd like to collaborate with you to help out the HS2 / .NET effort. I'll supply anything I can from my end.

    Regards,

    Comment


      #3
      Personally, I think this is a great idea. The current SDK 2.52 is very hard to follow and seems to be missing certain things. ie. access_level().

      I downloaded the free version of visual studio 2005 express about a week ago and my only formal program training is in machine language.

      After converting your template from vb6 (with I'm sure some errors) Ive found it to be an excellent source of information.

      I'd love to see more comments ' explaining how things work
      ' or how things can be changed
      ' This could be SDK 3.0
      Anyways, thanks. If I manage to get the simplest of pluggins working I'll be more than happy to donate some $.
      https://forums.homeseer.com/forum/de...plifier-plugin

      Comment


        #4
        Let me know how that 2005 works out for you! My experience with it is that, because it uses .NET runtime 2.0, it won't work with HS (or anything else). Also, it broke my Norton Antispam....

        Comment


          #5
          Originally posted by firtha
          Also, it broke my Norton Antispam....
          You say this like it's a bad thing... I'm failing to see the downside...

          I haven't gotten a plugin built in 2005 to work yet. Has anyone else?

          Dan

          Comment


            #6
            I have vb2005 (which installed v2.net) and homeseer running on a pc that i'm using for development only. Every thing seems to be coexisting ok. The template loads into homeseer and opens the connection to the database with no error messages, there is a link to the template with status, device, and options listed. it adds a trigger and action pull down menu in the proper place ( however pull down menues are blank...I think I need to configure those) The only problem I see is that it doesnt seem to be automatically assigning house code devices(I might need to configure that too)

            The important thing to keep in mind here is that I have absolutely no idea what I'm doing!
            https://forums.homeseer.com/forum/de...plifier-plugin

            Comment


              #7
              Can this be done in vb.net 2002?

              My vb.net is version 2002... The only vb projects I can create are console application, windows application, .net web service and .net web application.

              I can't open the supplied project or solution files, because they're in version 2003.

              I tried building the .vb files as a windows application, just for yuks, and here's what I got:

              2006/01/05 18:54:59 ~!~Error~!~Class not found in plugin DLL: hspi_skeleton.exe Class: HSPI_SKELETON.HSPI
              2006/01/05 18:54:59 ~!~Info~!~Registering hspi_skeleton.exe with Windows
              2006/01/05 18:55:01 ~!~Error~!~Unable to access plugin: hspi_skeleton.exe, try reinstalling plug-in
              Any ideas? Or am I hooped?

              Comment


                #8
                2005 has a conversion wizard that automatically ran when I opened the template and a message said that the conversion was succesful. I don't think the guys at microsoft could write a conversion wizard for 2002 to import 2003 files without a time machine:-)
                https://forums.homeseer.com/forum/de...plifier-plugin

                Comment


                  #9
                  Under the templates link for devices when running under homeseer it asks for the "devices name:" and the "Device Key:" before you can click add device.

                  Whats a device key?
                  https://forums.homeseer.com/forum/de...plifier-plugin

                  Comment


                    #10
                    Originally posted by happnatious1
                    Under the templates link for devices when running under homeseer it asks for the "devices name:" and the "Device Key:" before you can click add device.

                    Whats a device key?
                    A device key is a method I created to store additional information in an underlying INI file related to the HomeSeer device. I typically populate the key via code with the HomeSeer ref ID. I'll review the template to see if that needs to be updated.

                    Regards,
                    Ultrajones
                    Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                    Comment


                      #11
                      Originally posted by dantelope

                      I haven't gotten a plugin built in 2005 to work yet. Has anyone else?

                      Dan
                      It sort of works, but I kept getting odd errors. Rich or Rich are going to have to help resolve this error:

                      Code:
                      Initializing interface: HSPI TEMPLATE->System.Runtime.Remoting.RemotingException: 
                      This remoting proxy has no channel sink which means either the server 
                      has no registered server channels that are listening, or this application has
                      no suitable client channel to talk to the server.
                      Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                      Comment


                        #12
                        Nice job on the template! I've been looking / learning how you configured the project to build for use with HS, and I noticed the "Register for COM interop" option enabled under project properties. Must this always be enabled when building a plug-in for HS2, or is it required only for certain plug-in functions?

                        Edit: Moved 2nd question about RS232 access in vb.NET to a separate thread:
                        http://board.homeseer.com/showthread.php?t=110038

                        Thanks,
                        Don
                        Last edited by dschoppe; January 6, 2006, 11:22 AM.

                        Comment


                          #13
                          Ultrajones,

                          I am seeing the same error under 2005 and I thought it was something I was doing wrong with the device key.

                          Bill
                          https://forums.homeseer.com/forum/de...plifier-plugin

                          Comment


                            #14
                            With debuging on I never see the reference to" strMessage = "Entered RegisterCallback() function."" in the homeseer log.

                            I see this compiler warning in the register callback function:

                            Access of shared member through an instance; qualifying expression will not be evaluated

                            It suggests:
                            Use the name of the class or structure that defines the Shared member to access it.

                            According to the software SDK a succesful register callback is needed to set the proper program ID so create object can find it (SDK pg. 4).

                            If the Register callback function is being skipped it could explain the previous error of not being able to open a channel between a pluggin and homeseer.

                            ON the other hand I have absolutely no Idea how this stuff works (but I'm trying)!
                            https://forums.homeseer.com/forum/de...plifier-plugin

                            Comment


                              #15
                              Originally posted by happnatious1
                              With debuging on I never see the reference to" strMessage = "Entered RegisterCallback() function."" in the homeseer log.
                              You won't see this debug message because the reference to HomeSeer doesn't exist yet. In the HomeSeer directory, you should see a file called hspi_template_debug.log (I think that's the name). If there is an issue attempting to write a message using hs.writelog, then the plug-in will write to that file.

                              Regards,
                              Ultrajones
                              Plug-ins: UltraMon, UltraM1G, UltraCID, Ultra1Wire, UltraLog, UltraWeatherBug, UltraPioneerAVR, UltraGCIR

                              Comment

                              Working...
                              X