more G-Labs products

Author Topic: MIG Skelleton project.  (Read 3216 times)

December 07, 2015, 09:17:41 PM
Read 3216 times

despo

  • *
  • Information
  • Newbie
  • Posts: 2
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/.

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

December 07, 2015, 11:04:53 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
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.



December 09, 2015, 12:04:13 AM
Reply #2

despo

  • *
  • Information
  • Newbie
  • Posts: 2
Ok, thanks i'll look in to that!
Keep up the good work!

//Tobias

December 10, 2015, 08:16:33 PM
Reply #3

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
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

December 11, 2015, 01:50:12 AM
Reply #4

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
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>

January 26, 2016, 04:30:00 PM
Reply #5

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
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.


February 01, 2016, 02:41:50 PM
Reply #6

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
are there any examples of how to get Modules from within an Interface? ideally the object itself.. rather than just a string :)


February 03, 2016, 03:41:40 PM
Reply #7

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
If not is there an API call for this where I can get the properties via JSON or similar?

February 07, 2016, 05:13:11 AM
Reply #8

jjennings308

  • *
  • Information
  • Newbie
  • Posts: 9
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.

February 08, 2016, 03:14:04 PM
Reply #9

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
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?

February 08, 2016, 03:27:25 PM
Reply #10

jjennings308

  • *
  • Information
  • Newbie
  • Posts: 9
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.

February 13, 2016, 01:31:42 PM
Reply #11

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
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?

February 29, 2016, 10:06:07 AM
Reply #12

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
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...

March 02, 2016, 11:05:33 PM
Reply #13

[email protected]

  • *****
  • Information
  • Hero Member
  • Posts: 271
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.