Home

Gene

PROJECT HOMEPAGE

http://generoso.info/homegenie

DEVELOPING HOMEGENIE

When using Monodevelop/Xamarin Studio open the HomeGenie\HomeGenie.sln file.
When using Visual Studio C# 2010 Express open HomeGenie_VS10\HomeGenie_VS10.sln file.

Monodevelop download http://monodevelop.com/download
Xamarin Studio download http://xamarin.com/studio
Visual Studio C# 2010 Express download http://www.microsoft.com/visualstudio/eng/downloads#d-2010-express

Adding a new automation interface driver

The file MIG\Interfaces\Automation\ExampleDriver.cs contains commented example code for implementing an interface driver for HomeGenie.
Also you can look to the source code of X10 and ZWave drivers for a real working example. These two classes are located in the same folder as the example driver one.

Customizing/Adding features to UI front-end

All UI frontend pages are sent to the client as a SPA (Single Page Application) though are internally organized into a convenient folders tree.

Frontend source code is located into HomeGenie/html folder:
- html/js/api : javascript classes for calling homegenie api web services
- html/pages : html pages and ui logic js files organized into subfolders
- html/index.html : main index file

The design approach used is MVC. Each page is splitted in two files:
- mypage.html
- _mypage.js

The .html file should contain html code only and just a javascript call to the "InitializePage" class method (eg. HG.WebApp.MyPage.InizializePage() ).
The .js file contains page class methods and props for binding ui elements events (InitializaPage) and implementing ui business logic.

All UI .js files are then included into the main homegenie webapp include file:
- html/js/api/homegenie.webapp.js

Web server directive for including files is:

       {include <relative_path_to_file>}

HomeGenie Web Service API
HomeGenie User Documentation