Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Templates/HomeSeerTemplates/Packages/HSPI.1.0.0.nupkg
Binary file not shown.
Binary file added docs/source/_static/HS-Button_400x400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/connection-success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/file-new-project.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_static/remote-plugin-connected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions docs/source/change-log.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Change Log
==========
12 changes: 8 additions & 4 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
# import sys
import os
import sys
# sys.path.insert(0, os.path.abspath('.'))

import sphinx_rtd_theme

# -- General configuration ------------------------------------------------

Expand All @@ -39,6 +39,8 @@
'sphinx.ext.ifconfig',
'sphinx.ext.viewcode']

disqus_shortname = 'hspi'

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

Expand All @@ -56,6 +58,7 @@
copyright = u'2017, Alex Dresko'
author = u'Alex Dresko'


# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
Expand Down Expand Up @@ -89,7 +92,8 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'default'
html_theme = 'sphinx_rtd_theme'
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down
29 changes: 29 additions & 0 deletions docs/source/features.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Features
========

.. _the-templates:

The templates
-------------

Until we have awesome names for the templates, you’ll have to use this key to determine which template is most appropriate for your project.

* **HSPIPluginA**

This template, based on the code at https://forums.homeseer.com/showthread.php?t=178122, is as close as you can get to inheriting directly from HomeSeer’s ``IPluginAPI`` interface while still retaining the benefits of HSPI.

The plugin created in this template inherits from ``Hspi.HspiBase``.

It’s a venerable sea of code – intimidating for new HomeSeer developers.

* **HSPIPluginB**

This template requires the smallest amount of code out of the box. It’s based on the code at https://forums.homeseer.com/showthread.php?t=184086.

The plugin created in this template inherits from ``Hspi.HspiBase2`` which inherits from ``Hspi.HspiBase``.

You get all of the benefits of HSPI, without having to implement everything in HomeSeer’s ``IPluginAPI`` interface. The base class implements suitable defaults for basic plugins, preventing you from having to understand everything in ``IPluginAPI``. The flip side to such minimalistic code is that it’s not obvious which methods you *can* override.

The framework
-------------

30 changes: 30 additions & 0 deletions docs/source/getting-started.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Getting Started
###############

These instructions assume you have a default HomeSeer installation on the same computer that you’ll be developing on. If that is not the case, you can still follow these instructions, and then refer to the remaining HSPI documentation to adapt the project for your environment.

1. In Visual Studio, open “Tools > Extensions and Updates”

.. figure:: _static/tools-extensions-and-updates.png

#. Click the “Online” tab, search for “HomeSeer”, and click “Download”.

.. figure:: _static/extensions-and-updates-search.png

Alternatively, download it from https://marketplace.visualstudio.com/items?itemName=thealexdresko.HomeSeerTemplates

#. Once installed, you can “File > New Project” to create a HomeSeer plugin. The templates can be found under “Templates > Visual C# > HomeSeer”.

.. figure:: _static/file-new-project.png

Refer to the :ref:`templates list <the-templates>` to determine which template is most appropriate.

#. F5 to launch the project and verify connectivity to HomeSeer.

If all goes well, you should see a success message in the console window:

.. figure:: _static/connection-success.png

Further, you should see your plugin listed under "PLUG-INS > MANAGE > Remote Plug-Ins":

.. figure:: _static/remote-plugin-connected.png
14 changes: 14 additions & 0 deletions docs/source/how-to-contribute.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
How to contribute
=================

Prerequisites
-------------

Setting up your development environment
---------------------------------------

Development process
-------------------

Integrations
------------
56 changes: 42 additions & 14 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
.. HSPI documentation master file, created by
sphinx-quickstart on Sun Feb 26 17:22:42 2017.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
==================================
Welcome to the HSPI documentation!
==================================

Welcome to HSPI's documentation!
================================
Summary
=======
HSPI aims to make extending HomeSeer significantly easier by empowering developers with awesome tools and a collaborative community.
Learn more at https://github.com/alexdresko/HSPI

.. toctree::
:maxdepth: 2
:caption: Contents:
* **New to HSPI and looking for documentation?** We’ve got that.
http://hspi.readthedocs.io/en/latest/
* **Got a question about HSPI?** Ask on Stack Overflow and tag with “HSPI”. We’re watching and waiting for your questions.
http://stackoverflow.com/questions/ask?tags=HSPI

*Using Stack Overflow, as opposed to the HomeSeer forums, allow us to more easily track questions related to HSPI and their status.*
* **Found a bug or want to submit a feature request?** We’re actively improving this thing.
https://github.com/alexdresko/HSPI/issues

*Using the Github issues, as opposed to the HomeSeer forums, allows us to more easily track issues and their status.*
* Want to chat in real time with other HSPI developers or view a real-time feed of everything happening in HSPI? The live feed is especially cool.
https://gitter.im/HSPI/Lobby

Other Helpful Links
===================

* HomeSeer’s HS3 developer forum:
https://forums.homeseer.com/forumdisplay.php?f=1138
* HomeSeer’s original plugin samples:
https://forums.homeseer.com/showthread.php?t=160064
* HomeSeer’s SDK documentation:
http://homeseer.com/support/homeseer/HS3/SDK/default.htm


.. toctree::
:maxdepth: 3
:caption: Contents:

self
what-is-it
getting-started
features
how-to-contribute
change-log
meta

Indices and tables
==================
.. image:: _static/HS-Button_400x400.png
:width: 200px

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
5 changes: 5 additions & 0 deletions docs/source/meta.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Meta
====

HSPI stands for HomeSeer Plugin Interface, and also happens to be the mandatory class name that must be used when creating a HomeSeer plugin. In hindsight, it’s probably not the best project name I ever came up with.

35 changes: 35 additions & 0 deletions docs/source/what-is-it.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
What is it?
===========

HSPI consists of the following:

Project templates for Visual Studio 2015 and Visual Studio 2017
---------------------------------------------------------------

With HSPI, getting started with HomeSeer development is as simple as:

1. Locate and install the HSPI extension in Visual Studio via “Tools > Extensions and Updates” or download it from https://marketplace.visualstudio.com/items?itemName=thealexdresko.HomeSeerTemplates
2. File > New Project > HomeSeer > Select a template
3. F5 to launch the project and verify connectivity to HomeSeer.

HSPI comes with a growing list of project templates you can use to accelerate your HomeSeer development.

The HSPI framework and nuget package
------------------------------------

I imagine most HomeSeer development efforts end in failure. Mine did. Out of the box, it’s just painful.

So, I scoured the HomeSeer developer forums, collecting all the code and tips possible. I then crammed everything into a nuget package (https://www.nuget.org/packages/HSPI) and used my coder nerd wizardry to bring it all together.

With HSPI, we can continue to refine this framework into something that makes HomeSeer plugin development mind-numbingly simple.

HomeSeerNuget
-------------

A nuget package containing the three assemblies required for HomeSeer development:

* HomeSeerAPI.dll
* HSCF.dll
* Scheduler.dll

Many first time HomeSeer developers get stumped working with the HomeSeer-developed plugin samples (https://forums.homeseer.com/showthread.php?t=160064) due to these assemblies not being included with the samples. **This nuget package is not specific to HSPI and can be used in any HomeSeer plugin, including the HomeSeer-developed plugin samples.** Because of its generic nature, HomeSeerNuget (https://www.nuget.org/packages/Homeseer/) is maintained in a separate repository (https://github.com/alexdresko/HomeSeerNuget).
20 changes: 20 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const gulp = require('gulp');
const browserSync = require('browser-sync').create();
const shell = require('gulp-shell')

gulp.task('default', () => {});

gulp.task('browser-sync', () => {
browserSync.init({
server: {
baseDir: "./docs/build/html",
},
files: "./docs/build/html/*.html"
});
});

gulp.task('watch', ['browser-sync'], () => {
gulp.watch('./docs/source/**/*.rst', ['build']);
});

gulp.task('build', shell.task('docs\\make.bat html'));
34 changes: 34 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"name": "hspi",
"version": "1.0.0",
"description": "HomeSeer plugin helper framework",
"main": "index.js",
"directories": {
"doc": "docs"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/alexdresko/HSPI.git"
},
"keywords": [
"homeseer",
"hspi",
"home",
"automation"
],
"author": "Alex Dresko",
"license": "MIT",
"bugs": {
"url": "https://github.com/alexdresko/HSPI/issues"
},
"homepage": "https://github.com/alexdresko/HSPI#readme",
"devDependencies": {
"browser-sync": "^2.18.8",
"eslint": "^3.16.1",
"gulp": "^3.9.1",
"gulp-shell": "^0.6.1"
}
}