Announcement

Collapse
No announcement yet.

Help with start making plugin

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

    Help with start making plugin

    For a long time I’m looking for a way to control ‘Modbus devices’ with Homeseer. Unfortunately the doesn’t seems to be a way for this. However i'm completely inexperienced, i decided to try to make my own project for this.
    At the moment I have a working DLL which can control my Homeseer devices.
    The last few days i’ve read a lot about connecting this DLL to Homeseer and use it in Homeseer, but I don’t understand a lot of things.
    Can anyone please give me a helping hand and advice where to start?

    #2
    Download the HomeSeer 2 SDK from the HomeSeer updater. It comes with a sample plugin that should get your started.
    💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

    Comment


      #3
      I found it a very steep learning curve and not for the faint hearted. There is a lot to think about, I would recommend writing down what you want out of a plugin, how you want to do it, what you need to do it and then start writing some code. I would also recommend compiling the blank plugin first just so you can get an idea how things work even without any proper programming code inside.

      Comment


        #4
        Jaco, what language are you planning to write in? If you're using VB, go with the HomeSeer sample plugin. If you want to use C# then Stipus has a very good C# plugin template he sells. It's well worth the money.

        In either case, when you build the installer, I would recommend NOT using the MSI installer package that comes with the HomeSeer sample plugin. It works just fine, but won't be compatible with HS3. Instead I would recommend using the "old" zip installer method described in the SDK documentation.
        HS Pro 3.0 | Linux Ubuntu 16.04 x64 virtualized under Proxmox (KVM)
        Hardware: Z-NET - W800 Serial - Digi PortServer TS/8 and TS/16 serial to Ethernet - Insteon PLM - RFXCOM - X10 Wireless
        Plugins: HSTouch iOS and Android, RFXCOM, BlueIris, BLLock, BLDSC, BLRF, Insteon PLM (MNSandler), Device History, Ecobee, BLRing, Kodi, UltraWeatherWU3
        Second home: Zee S2 with Z-Wave, CT101 Z-Wave Thermostat, Aeotec Z-Wave microswitches, HSM200 occupancy sensor, Ecolink Z-Wave door sensors, STI Driveway Monitor interfaced to Zee S2 GPIO pins.

        Comment


          #5
          First of all; thanx for your reactions.
          I downloaded the Homeseer 2 SDK and opened the project in VB-express 2010, but I still don’t know where to start now.
          What I just want to do is make a little plugin with a simple project and expand the project little by little and learn more bit by bit. The example looks quite big and complicated, can you please help me making a start?

          I planned to use .NET as programming language.

          Comment


            #6
            I compiled the empty plugin first and then enabled the debug mode, from there I went through the actions/triggers/conditions and made sure I understood what was being passed between the plugin and HS. It really depends on what you want your plugin to do, if you intend on building for example an X10 plugin then you can cut all of the stuff about conditions/triggers/actions/IR/IO/webpage/etc out of the plugin but you need to go through the SDK to look what you do and don't need.

            I would not try to do too much all at once, I have been there and tied myself up in knots trying to figure out what it was trying to do.

            Be aware of if you intend on upgrading to HS3 then the API is changing and your plugin may have a limited life.

            Comment


              #7

              Comment


                #8
                Your .vb file (there may be additional files in your porject) that contains all of the plugin functions needs to be compiled into a .dll file for HS to read and think that it is a plugin, you can't just copy the .vb files across.

                Comment


                  #9
                  After a lot of struggling I finally know how to create a .dll out of the homeseer sample plugin files. I even got the compiled .dll file working in homseer.
                  But now I have the next problem; To get my Modbus devices working, I’ll need a third-party .dll to be imported in the homeseer .dll.
                  Can anybody help me realize this?

                  Comment


                    #10
                    to add an external dll go into projects and add as reference

                    Comment


                      #11
                      Thanx Aksor,

                      What do you mean with: 'go into projects'?
                      Dou you mean something in homeseer or in visual studio?

                      Thanx already.

                      Comment


                        #12
                        Sorry I mean't visual studio

                        Comment


                          #13
                          It is a steep learning curve I was in the same boat a few month ago but now I'm mastering it almost :0

                          Self taught programing and learned how to use Visual Studio, I can program in both VB.Net and C just enough to be dangerous.

                          Don't give up Google is your friend!!!

                          Cheers

                          Comment


                            #14
                            Look here: http://board.homeseer.com/showthread.php?t=109798
                            Attached Files


                            ~Bill

                            Comment


                              #15
                              I find one of the hardest parts coding actions and event triggers. The coding to create the form in HS is rather cryptic. Combine that with the concepts of devicestats, devicevalue, and the core being based primarily on X10 devices and events makes matters even more confusing.

                              Stick with it though - it will be worthwhile and rewarding.

                              The best thing is there are a good number of developers on this board that are very generous with their time.
                              Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                              Comment

                              Working...
                              X