Announcement

Collapse
No announcement yet.

HSPI_SAMPLE Sung in C#

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

  • HSPI_SAMPLE Sung in C#

    Attached is a project directory that was developed in C# VS Express 2010. It is the functional equivalent to the VB version for all you C# aficionados. I have tried to change as little as possible of the structure of the plugin so that they can be compared more easily.
    The sample has very limited miles on the odometer but the only issue I have found so far is internally creating the two test triggers ( I also had trouble with the VB version).

    Enjoy!

    Kirby

    Sorry, The file Upload has failed continuously. I'll try again tomorrow.
    I'm having the same problem this morning. The file is a ZIP file that is approximately 2.4 MEG. Should not be a problem.

    Update: I tried to contact the webmaster but the email was undeliverable. I don't know what else to try.
    Last edited by Kirby; May 21st, 2014, 03:20 PM. Reason: File Upload Failed.

  • #2
    Kirby. +10 for creative use of music reference

    Comment


    • #3
      Hate to bump a 5 month old post but is there any chance you (Kirby) would be willing to try uploading your C# sample code again? I would really be interested in this. I am much more comfortable working with C# than VB.

      Comment


      • #4
        Steve,
        As luck would have it, it worked. I have moved quite a ways past this and have put an HAI thermostat plugin out for testing.

        What kind of plugin are you looking at developing?
        Attached Files
        Last edited by Kirby; November 1st, 2014, 03:36 PM. Reason: Uploaded the wrong file

        Comment


        • #5
          C# Sample does not successfully compile

          Thanks for providing the example C# Solution.

          When I try to compile the sample (using Visual Studio 2013), I am getting 197 errors and the references to the Homeseer dlls (HomeSeerAPI, HSCF, and Scheduler) are resolving fine to my Homeseer3 install directory.

          Is this expected?

          Comment


          • #6
            ooops. I uploaded the wrong file. The correct one is now there.

            Sorry about that. I didn't finish converting the Basic example.

            Comment


            • #7
              Geez, I just finished my own conversion of the VB sample to C#.

              I ended up using VS 2014 to take advantage of C# 6's new static using statements feature. That made things much easier since the HS dev team is taking advantage of certain VB features that haven't existed in C# previously.

              Their use of VB's parameterized properties feature was a pain to convert to C# as well...

              They're also keen on taking advantage of the fact that VB doesn't require parameters on methods.

              Overall, it was a very time consuming conversion.

              I'm building a framework based on the SDK's current requirements to make it much easier to develop HS3 plugins...

              Comment


              • #8
                I've just started trying to convert a VB plugin to C# too, and am finding it a lengthy and frustrating process. alexdresko, are you in a position to share your work at all?
                Author of Highpeak Plugins | SMS-Gateway Plugin | Blue Iris Plugin | Paradox (Beta) Plugin | Modbus Plugin | Yamaha Plugin

                Comment


                • #9
                  Sorry to revive this old thread, but I would be interested in it too !

                  Comment


                  • #10
                    Originally posted by kriz83 View Post
                    Sorry to revive this old thread, but I would be interested in it too !
                    Me too. I've worked in C# for over 10 years, and I'm about to start writing a plugin for HS3 for a JSON irrigation controller, but it's not going to happen if I have to use VB. I've got the HSPI_SAMPLE below running, but would be interested in seeing your framework.
                    Last edited by dzee; May 28th, 2015, 07:53 PM.

                    Comment

                    Working...
                    X