Announcement

Collapse
No announcement yet.

Really simple C# sample plugin available here!

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

  • alexdresko
    replied
    Originally posted by MrMxyzptlk View Post
    Working great! 2 notes, when in VS and you click on 'more info' for your template, the URL you have is non existent...404.

    If you manually look through all of the VS templates (100's), that are installed, the HSPI template does not show up? Maybe I missed it? I had to type HSPI in the search box for installed templates to find it...may be me...maybe not?
    ]
    Updated to include a TON of fixes and enhancements, including the suggestion by dmurphy. There's now a second template called HSPIPluginB that integrates the base class from https://forums.homeseer.com/showthread.php?t=184086. PageBuilder is also included in HSPI.

    See https://github.com/alexdresko/HSPI/milestone/1?closed=1

    Leave a comment:


  • alexdresko
    replied
    Originally posted by MrMxyzptlk View Post
    Working great! 2 notes, when in VS and you click on 'more info' for your template, the URL you have is non existent...404.

    If you manually look through all of the VS templates (100's), that are installed, the HSPI template does not show up? Maybe I missed it? I had to type HSPI in the search box for installed templates to find it...may be me...maybe not?

    Thanks once again, looking forward to your updates.

    Here is a pic of it running in HS3...

    https://dl.dropboxusercontent.com/u/...e%20Plugin.PNG
    https://github.com/alexdresko/HSPI/issues/24https://github.com/alexdresko/HSPI/issues/25

    Leave a comment:


  • MrMxyzptlk
    replied
    Working great! 2 notes, when in VS and you click on 'more info' for your template, the URL you have is non existent...404.

    If you manually look through all of the VS templates (100's), that are installed, the HSPI template does not show up? Maybe I missed it? I had to type HSPI in the search box for installed templates to find it...may be me...maybe not?

    Thanks once again, looking forward to your updates.

    Here is a pic of it running in HS3...

    https://dl.dropboxusercontent.com/u/...e%20Plugin.PNG

    Leave a comment:


  • alexdresko
    replied
    Originally posted by MrMxyzptlk View Post
    Love this, but I couldn't get it installed.
    When I searched in VS marketplace it didn't find anything on homeseer.
    When I manually downloaded it, and tried to install it says: "This extension is not installable on any currently installed products".

    I'm running VS 2017RC...
    Good find. I created https://github.com/alexdresko/HSPI/issues/21 to track the issue and marked it high priority in the current milestone.

    For anyone else paying attention, the current milestone, called "Good enough to use" has had a couple enhancements since my last post here. https://github.com/alexdresko/HSPI/milestone/1?closed=1

    And here's what's left in the current milestone: https://github.com/alexdresko/HSPI/milestone/1

    It's coming along very nicely.

    Leave a comment:


  • MrMxyzptlk
    replied
    Love this, but I couldn't get it installed.
    When I searched in VS marketplace it didn't find anything on homeseer.
    When I manually downloaded it, and tried to install it says: "This extension is not installable on any currently installed products".

    I'm running VS 2017RC...

    Leave a comment:


  • alexdresko
    replied
    UPDATE: Long story short: **YOU MAY HAVE TO UNINSTALL THE OLD PLUGIN AND INSTALL THE NEW PLUGIN TO CONTINUE GETTING UPDATES** I thought I configured the original extension incorrectly in the Visual Studio marketplace, and Microsoft doesn't provide a way to change the setting I thought I messed up. So I removed the old extension from the gallery. That's why you get a 404 when you to go https://marketplace.visualstudio.com...eSeerTemplates. The new location's forever home is at https://marketplace.visualstudio.com/items?itemName=thealexdresko.HomeSeerTemplates2 (arrrggg). I'm pretty frustrated by the whole experience and -- worse -- it doesn't even look like the setting makes a difference. I'm trying to automate publishing of the VSIX to the marketplace from the CI build, but I just don't think it's possible anymore.

    ---

    Here's what I did today: https://github.com/alexdresko/hspi is now a utility library used to assist with HomeSeer development. It's based on the original code in this thread, but has been converted into a nuget package.

    I then created a Visual Studio template that uses the HSPI nuget package (and the aforementioned HomeSeer nuget package) to get a developer up to speed quickly.

    The template was packaged as a VSIX and uploaded to the Visual Studio Marketplace. You can therefore install the template from directly within Visual Studio. Go to "Tools > Extensions & Updates" then search for "Homeseer". OR just go to https://marketplace.visualstudio.com/items?itemName=thealexdresko.HomeSeerTemplates2 (I'm writing this before the extension has been indexed into the Marketplace, and I don't know how long it will take)

    Once installed, you can "File > Add new project" and create a "HSPIPluginA" project (I wasn't sure what to call the template just yet, especially since dmurphy recommended another template in the forums). Once the project is created, you should be able to F5 in VS immediately and the console will connect to HS (assuming HS is on 127.0.0.1 using the default port).

    It works great in my tests, but there's still a lot I can think of to do. The nice thing is that we can add/fix things in the HSPI nuget package and everyone will benefit.

    Honestly, I'm fairly proud of what I accomplished on this today. Please let me know what you think so I don't feel like it was a waste of time.

    Also, thanks for the tip dmurphy. I'll look at incorporating that soon.
    Last edited by alexdresko; November 6th, 2018, 06:57 PM.

    Leave a comment:


  • dmurphy
    replied
    Maybe an opportunity to leverage some of this work.....
    https://forums.homeseer.com/showthread.php?t=184086

    I've been trying to move my plugin to use this HSPIBase.cs and the pagebuilder.cs --- both are quite useful

    Leave a comment:


  • TeleFragger
    replied
    i have started college and cant wait till i get to the C# part!!!!!!!! then yall gonna hate me!!!!!!!

    Leave a comment:


  • alexdresko
    replied
    Got tired of talking about it and did it.

    First, I created https://github.com/alexdresko/HomeSeerNuget. This repo creates a nuget package (https://www.nuget.org/packages/Homeseer/) which is used by the next repo. It's basically just HomeSeerAPI.DLL, HSCF.dll, and Scheduler.dll. Prevents from having to install HomeSeer just to do HomeSeer development. It is the latest version of those assemblies as of this writing.

    https://github.com/alexdresko/HSPI basically contains the original code that was posted in this thread. From here, we can work it however we want. Personally, I think we should break out the tester into its own nuget package, and then create a base, abstract plugin from the HSPI.cs class.

    Please make your way to the two repos and let's begin some conversation about it all.

    Leave a comment:


  • fuzzysb
    replied
    Originally posted by mulu View Post
    I think there will be a good number of people who will feel GitHub is another hurdle to get started. So I would advocate a thread where the latest plugin sample is updated as a downlodable zip file in the very first post (and hopefully it will be made sticky).

    Having said that, while this is a really great starting point, there is still room for improvement (there always is). For instance I have added a lot of the comments from the SDK documentation to the functions. I also wish the example shows how to add configuration pages, etc. If the original author is not responding anymore, then maybe we should consider starting something new based on that code...
    and for those like me with quite a bit of dev experience on other platforms, not having Github is a hinderance as that help with he normal dev workflow immensely as well as allowing others to learn from the just the changes to versions

    Leave a comment:


  • davros
    replied
    Originally posted by mulu View Post
    Having said that, while this is a really great starting point, there is still room for improvement (there always is). For instance I have added a lot of the comments from the SDK documentation to the functions. I also wish the example shows how to add configuration pages, etc. If the original author is not responding anymore, then maybe we should consider starting something new based on that code...
    Hi, can you share your updated example please?

    Leave a comment:


  • alexdresko
    replied
    Originally posted by mulu View Post
    I think there will be a good number of people who will feel GitHub is another hurdle to get started. So I would advocate a thread where the latest plugin sample is updated as a downlodable zip file in the very first post (and hopefully it will be made sticky).

    Having said that, while this is a really great starting point, there is still room for improvement (there always is). For instance I have added a lot of the comments from the SDK documentation to the functions. I also wish the example shows how to add configuration pages, etc. If the original author is not responding anymore, then maybe we should consider starting something new based on that code...
    You don't know to know how to use git. Github already provides a downloadable zip file of the source code.

    Leave a comment:


  • mulu
    replied
    I think there will be a good number of people who will feel GitHub is another hurdle to get started. So I would advocate a thread where the latest plugin sample is updated as a downlodable zip file in the very first post (and hopefully it will be made sticky).

    Having said that, while this is a really great starting point, there is still room for improvement (there always is). For instance I have added a lot of the comments from the SDK documentation to the functions. I also wish the example shows how to add configuration pages, etc. If the original author is not responding anymore, then maybe we should consider starting something new based on that code...

    Leave a comment:


  • alexdresko
    replied
    aXis

    Would you be interested in putting this up on github for others to contribute to? I have several ideas for improvements, but passing around a file in the forum doesn't seem optimal.

    Leave a comment:


  • kriz83
    replied
    Thanks for this sample project, it has helped me a LOT !
    If only I could get the actions to work now :-)

    Leave a comment:

Working...
X