HomeGenie Forum

Automation Program Plugins and Wizard Scripting => APP Contributions => Topic started by: swaner on April 26, 2016, 09:38:34 PM

Title: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: swaner on April 26, 2016, 09:38:34 PM
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!
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: Gene on April 27, 2016, 01:32:11 PM
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.
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: Gene on April 27, 2016, 08:05:07 PM
You've got a pull request: https://github.com/swaner/HomeGenieHarmonyInterface/pulls

 ;)
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: swaner on April 27, 2016, 11:29:46 PM
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 (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 ???

Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: saue0 on May 16, 2016, 06:10:43 AM
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 ??
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: saue0 on May 16, 2016, 07:03:32 PM
Ok add my info manually in the systemconfig.xml. and is working.
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: KaZe on January 28, 2017, 09:34:40 PM
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!
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: KaZe on January 28, 2017, 10:13:31 PM
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"
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: Orkspalter on January 30, 2017, 12:27:36 AM
It does not work for me either, even when i try to force IP password and username into the systemconfig.xml.
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: KaZe on February 13, 2017, 11:45:42 AM
Ok add my info manually in the systemconfig.xml. and is working.

Hi!

Which HG version do you use?
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: saue0 on February 13, 2017, 06:51:02 PM
I think it's v1.1-beta.525

I found soming strange in my user name (Logitech Email account). It dosent containt the @ char.
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: KaZe on February 13, 2017, 09:51:02 PM
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?
Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: saue0 on February 14, 2017, 06:57:45 PM
The error you have is a missing file "System.Web.Extensions"
I'm running on a  RPI with mono...

Title: Re: New MIG-interface for Logitech Harmony Hub (universal-remote)
Post by: KaZe on February 14, 2017, 09:05:51 PM
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. :(