more G-Labs products

Author Topic: New MIG-interface for Logitech Harmony Hub (universal-remote)  (Read 2582 times)

April 26, 2016, 09:38:34 PM
Read 2582 times

swaner

  • *
  • Information
  • Newbie
  • Posts: 21
For all of you owning the great harmony hub it can now be controlled from HomeGenie. Almost ;), there is still some work in progress and I ran out of time.
Currently the mig-interface support starting, and stopping activities.
After installing the package the activities should show up in homegenie as regular devices that you can add to any group or module.

What to improve in next version:
1. Adding the settings to the GUI, this should be straight forward
2. Improving Session handling (currently have an experimental setting which seems to be working better)
3. Add support for remote control buttons (again, should be an easy task)
4. Custom widget
5. Refactoring and bugfixes, not very clean at the moment  ::)

Anyway, the package can be found at https://github.com/swaner/HomeGenieHarmonyInterface.

Thanks to https://github.com/hdurdle/harmony for making the harmony library!

April 27, 2016, 01:32:11 PM
Reply #1

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer
Please if you have some spare time, push this interface to the homegenie repository so it can be installed from the hg package manager:

https://github.com/genielabs/homegenie-packages/tree/master/packages/Remote%20Control

Cheers,
g.

April 27, 2016, 08:05:07 PM
Reply #2

Gene

  • *****
  • Information
  • Administrator
  • Posts: 1472
  • Tangible is the future!
    • Yet Another Programmer

April 27, 2016, 11:29:46 PM
Reply #3

swaner

  • *
  • Information
  • Newbie
  • Posts: 21
Wonderful  ;D, thanks Gene! I have merged the pull request.

When testing the settings is shown in the GUI, but when changing them noting happends.
I can see that a request gets triggered and I get a 200 result back:
http://10.0.0.4/api/MIGService.Interfaces/HomeAutomation.Harmony/Option.Set/Username/myusername

But when looking at the systemconfig.xml nothing is updated.
Anyway, not I big deal. I will try to clean up the code and do a pull request to the package repo soon.

Thanks for all the hard work on HomeGenie, I can't even imagine how many hours you must have spent on this project ???


May 16, 2016, 06:10:43 AM
Reply #4

saue0

  • **
  • Information
  • Jr. Member
  • Posts: 40
I install the mig. but do not work.  do not keep the config info.

Do we have to install an other package to mate it work ??

May 16, 2016, 07:03:32 PM
Reply #5

saue0

  • **
  • Information
  • Jr. Member
  • Posts: 40
Ok add my info manually in the systemconfig.xml. and is working.

January 28, 2017, 09:34:40 PM
Reply #6

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Hi!

I was install the MIG interface, and I add my IP,username,password to the systemconfig.xml. But it's not working.
What is the installations steps?!

Thanks!
« Last Edit: January 28, 2017, 09:37:37 PM by KaZe »

January 28, 2017, 10:13:31 PM
Reply #7

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
The log:
Code: [Select]
"2017-01-28 21:13:14.3221 Info WebServiceGateway 10.1.1.98 HTTP GET 200 /api/MIGService.Interfaces/HomeAutomation.Harmony/IsEnabled.Set/1// [OPEN]"
2017-01-28 21:13:14.3221 Debug Enabling Interface HomeAutomation.Harmony
System.IO.FileNotFoundException: Could not load file or assembly 'System.Web.Extensions
File name: 'System.Web.Extensions
  at MIG.Interfaces.HarmonyController.LoginToLogitech (System.String email
  at MIG.Interfaces.HarmonyController.Connect () <0x41c98290 + 0x000b3> in <filename unknown>:0
  at MIG.Interfaces.HarmonyController.Connect (System.String username
  at MIG.Interfaces.HomeAutomation.Harmony.Connect () <0x41c974c0 + 0x00577> in <filename unknown>:0
  at MIG.MigService.EnableInterface (System.String domain) <0x41992dd0 + 0x0008b> in <filename unknown>:0
  at MIG.MigService.Gateway_PreProcessRequest (System.Object sender
  at MIG.Gateways.WebServiceGateway.OnPreProcessRequest (MIG.MigClientRequest request) <0x41adb710 + 0x0009a> in <filename unknown>:0
  at MIG.Gateways.WebServiceGateway.Worker (System.Object state) <0x419b4cc0 + 0x01fb5> in <filename unknown>:0
"2017-01-28 21:13:14.7213 Info WebServiceGateway 10.1.1.98 HTTP GET 200 /api/MIGService.Interfaces/HomeAutomation.Harmony/IsEnabled.Set/1// [CLOSED AFTER 0"

January 30, 2017, 12:27:36 AM
Reply #8

Orkspalter

  • *
  • Information
  • Newbie
  • Posts: 6
It does not work for me either, even when i try to force IP password and username into the systemconfig.xml.

February 13, 2017, 11:45:42 AM
Reply #9

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Ok add my info manually in the systemconfig.xml. and is working.

Hi!

Which HG version do you use?

February 13, 2017, 06:51:02 PM
Reply #10

saue0

  • **
  • Information
  • Jr. Member
  • Posts: 40
I think it's v1.1-beta.525

I found soming strange in my user name (Logitech Email account). It dosent containt the @ char.
« Last Edit: February 13, 2017, 06:55:38 PM by saue0 »

February 13, 2017, 09:51:02 PM
Reply #11

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
I think it's v1.1-beta.525

I found soming strange in my user name (Logitech Email account). It dosent containt the @ char.

Which platform do you use? Win/linux/rpi?

Your systemconfig.xml is the same?!

<Interface Domain="HomeAutomation.Harmony" IsEnabled="false" AssemblyName="Harmony">
        <Options>
          <Option Name="Username" Value="email" />
          <Option Name="Password" Value="password" />
          <Option Name="IPAddress" Value="ip" />
          <Option Name="CacheToken" />
        </Options>
        <Description>Logitech Harmony Interface</Description>

I changed the bold parameters. Did you change something else?

February 14, 2017, 06:57:45 PM
Reply #12

saue0

  • **
  • Information
  • Jr. Member
  • Posts: 40
The error you have is a missing file "System.Web.Extensions"
I'm running on a  RPI with mono...


February 14, 2017, 09:05:51 PM
Reply #13

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
The error you have is a missing file "System.Web.Extensions"
I'm running on a  RPI with mono...

I try it under windows 10.

The error was that:
Code: [Select]
2017-02-14 21:04:02.9031|ERROR|MIG.MigService|System.NullReferenceException: Object reference not set to an instance of an object.
   at HarmonyHub.HarmonyLogin.GetUserAuthToken(String username, String password)
   at MIG.Interfaces.HarmonyController.LoginToLogitech(String email, String password, String ipAddress, Int32 harmonyPort)
   at MIG.Interfaces.HarmonyController.Connect()
   at MIG.Interfaces.HarmonyController.Connect(String username, String password, String ipAddress, Boolean cacheToken)
   at MIG.Interfaces.HomeAutomation.Harmony.Connect()
   at MIG.MigService.EnableInterface(String domain)
   at MIG.MigService.StartService()

I set the parameters in systemconfig.xml, but nothing changed. :(