HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: despo on December 07, 2015, 09:17:41 PM

Title: MIG Skelleton project.
Post by: despo on December 07, 2015, 09:17:41 PM
Hi!

I'd like to start by saying thanks for a great application..
I am about to integrate my heatpump (IVT X10) with the Husdata H1 communication interface..
So far i have got a working commandline test, and i'm about to port it to a MIG device..  check out the hardware @ http://www.husdata.se/. (http://www.husdata.se/.)

The h1 interface supports the following heatpumps: IVT Greenline / Optima 900, IVT 490, IVT Premiumline X, Optima/290-AW, IVT Greenline HE/HC/HA, NIBE xx45, NIBE Fighter series, Thermia Diplomat series *, Thermia Villa series * and i'd guess a few Bosch heatpumps (with can-bus) also...

Is there a "project skelleton" to use as a startingpoint?
If not, i think it would be a great idea to release one to get people to start integrating more devices..

//Tobias
Title: Re: MIG Skelleton project.
Post by: Gene on December 07, 2015, 11:04:53 PM
https://github.com/genielabs/MIG-MqttBroker
https://github.com/swaner/HomeGenieTelldusInterface
https://github.com/genielabs/MIG-WeecoBoard

perhaps none of them is a "clean" code example, but can be still useful to understand how to "package" a mig plugin that can be then imported from "Configure->Settings->Add-On Install".
For further examples of mig interfaces also see the ones built-in in mig, e.g.:
https://github.com/genielabs/mig-service-dotnet/blob/master/MIG.HomeAutomation/X10.cs

g.


Title: Re: MIG Skelleton project.
Post by: despo on December 09, 2015, 12:04:13 AM
Ok, thanks i'll look in to that!
Keep up the good work!

//Tobias
Title: Re: MIG Skelleton project.
Post by: [email protected] on December 10, 2015, 08:16:33 PM
I'll ask in here as it seems to be read :) - but how do you do a text input field in configlet.html?

All the examples seem to be adding additional option value entries to the bottom of a list..

Thanks

David
Title: Re: MIG Skelleton project.
Post by: [email protected] on December 11, 2015, 01:50:12 AM
ok got a bit closer with this but still not quite correct...

its late so going to sleep on it and have another google tomorrow and it bit more inspecting hg page elements :)

Code: [Select]
            <div class="ui-field-contain">
                <label for="authtoken">Auth Token:</label>
                <input data-ui-field="authtoken" name="authtoken" data-locale-id="configure_interfaces_nest_authtoken" type="text" data-mini="true" data-clear-btn="true" />
            </div>
Title: Re: MIG Skelleton project.
Post by: Gene on January 26, 2016, 04:30:00 PM
A skelton project for writing a mig interface is now available:

https://github.com/genielabs/mig-interface-skelton

some bit of documentation will be possibly added later. In the meantime look at other interfaces to figure out how to bundle a .zip package that will install from package repository.

https://github.com/genielabs/homegenie-packages

g.

Title: Re: MIG Skelleton project.
Post by: [email protected] on February 01, 2016, 02:41:50 PM
are there any examples of how to get Modules from within an Interface? ideally the object itself.. rather than just a string :)

Title: Re: MIG Skelleton project.
Post by: [email protected] on February 03, 2016, 03:41:40 PM
If not is there an API call for this where I can get the properties via JSON or similar?
Title: Re: MIG Skelleton project.
Post by: jjennings308 on February 07, 2016, 05:13:11 AM
When I try to compile the Skeleton project I get a namespace error.  Any help would be appreciated.  I am trying to develop and interface to the wired security system already installed in my house.  Taking baby steps, it has been quite a few years since I programmed.
Title: Re: MIG Skelleton project.
Post by: [email protected] on February 08, 2016, 03:14:04 PM
What version of visual studio are you using, works fine here? - Can you do a screenshot and attach?

Also what alarm system are you trying to integrate with?
Title: Re: MIG Skelleton project.
Post by: jjennings308 on February 08, 2016, 03:27:25 PM
I got it to work finally.  I was only building the interface and not the total project.  But now I am getting a reference issue with NLog.
Title: Re: MIG Skelleton project.
Post by: [email protected] on February 13, 2016, 01:31:42 PM
Are you using visual studio 2015 and is it resolving nuget dependancies.. check output window when building the solution.. or post a screenshot..

Any answers to my question about getting modules Gene?
Title: Re: MIG Skelleton project.
Post by: [email protected] on February 29, 2016, 10:06:07 AM
Bump for:

"are there any examples of how to get Modules from within an Interface? ideally the object itself.. rather than just a string" or an call where I can get the properties to construct my own object...
Title: Re: MIG Skelleton project.
Post by: [email protected] on March 02, 2016, 11:05:33 PM
Sorted it, made an API call instead and then did paste special with the JSON body to create classes and then deserialize into a list of modules.