LOGIN  |  REGISTER
Smart Living Made Brilliant!
CASTLEOS FORUM

HomeScripting

A forum for information about scripting with CastleOS. Get samples, suggestions, and other help here

Logitech Harmony Hub scripting Messages in this topic - RSS

Michael Wallace
Michael Wallace
Posts: 52


1/27/2016
Michael Wallace
Michael Wallace
Posts: 52
I'd like to start this off with a huge thank you to the pyharmony, harmonyhubclient, harmony c# git users that laid the ground work.

That being said, below is how I implemented the harmony c# project code with CastleOS.

First download the attached Harmony.zip. It is the built version of this git repository:https://github.com/hdurdle/harmony

Second: My recommendation is to register HarmonyConsole in the registry. Go to run (Windows + R) and type regedit,. Hit Enter.
Go to: HKLM (HKEY-LOCAL-MACHINE)\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths. Right click on App Paths and Add new Key. Name it HarmonyConsole.exe. In the right side of the registry editor, double click on Default. Type the path to HarmonyConsole.exe (e.g. C:\ProgramData\CastleOS\Harmony\HarmonyConsole.exe). Hit Enter. Close the registry editor.

Okay, now to learn the activity and device ids. Download HarmonyHubControl.exe1 and rename it to remove the 1. (Note, the other program may work for you instead of this one, but this one definitely worked for me). Run the command prompt (Windows + R then type cmd and hit enter). Navigate to where harmonyhubcontrol.exe is located. Type the following: Harmonyhubcontrol.exe myemail@domain.com my_password harmony.hub.ip.address get_config > C:\harmony.txt (Yes type the > and all).

The above command sends everything on your hub to that text file. In it are your activity and device ids, as well as potential commands to send to the hub (e.g. VolumeUp on the TV). You are now done with HarmonyHubControl.exe. You will have some sifting to do to determine which devices are which, but if you search by manufacturer or device name it is fairly straightforward.

Now, FINALLY time to link up with CastleOS. Attached is a script with 4 sample commands to the hub. Replace activity and device id with the NUMBER not the phrase (e.g. 12345678 not WatchTV). Load the script in as you would any other.


Edit: Steps 1 and 2 would need to be done on EACH computer that controls a Kinect that you wish to use to control a Harmony Hub in addition to loading the scripts on each computer. Sorry. I tried to use the RemoteAppLaunchClient, but it would not work correctly.
edited by rpiwally on 1/28/2016


0 link
Damon Brodie
Damon Brodie
Posts: 9


1/15/2017
Damon Brodie
Damon Brodie
Posts: 9
I did a search for Harmony on the castleos forums and this is basically the only thread that mentions integration with Harmony. I guess there is no tighter integration with Harmony than to use external binaries? Is that true?
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284


1/15/2017
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284
At this very second, it is true. Later tonight when I push the next update, we'll have full Harmony integration smile

I saw your other post and comment on Reddit too, but was waiting to reply until I post the update.

If you're super eager to try it out right now, I can post a build for you to download early...
0 link
Damon Brodie
Damon Brodie
Posts: 9


1/15/2017
Damon Brodie
Damon Brodie
Posts: 9
Chris Cicchitelli wrote:
At this very second, it is true. Later tonight when I push the next update, we'll have full Harmony integration smile

I saw your other post and comment on Reddit too, but was waiting to reply until I post the update.

If you're super eager to try it out right now, I can post a build for you to download early...


Well that's just all kinds of awesome! I can wait for the normal build :-)
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284


1/15/2017
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284
It has been posted! You can get it from the download page.

In addition to manual control of Activities, you can change the Activity as part of a Scene or Event, as well as use the Activity as a Trigger or Condition in an Event. Changing an Activity via the Harmony remote will result in CastleOS being notified of the change.

For instance, you can have a Scene in CastleOS called Movie Mode that starts the Movie Activity in Harmony, or you can have the Movie Activity trigger the Scene in CastleOS to activate. Or both!

We'll also be adding support for control devices directly once we finish the GUIs for that (i.e. volume, channel, etc), but for now it's just Activities (which is all the official Harmony supports currently as well).

Thanks!
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284


1/15/2017
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284
To set it up, go to Settings > Harmony, enter your My Harmony username and password, and then enter the IP address of your Harmony hub(s). The rest is automatic!
0 link
Damon Brodie
Damon Brodie
Posts: 9


1/16/2017
Damon Brodie
Damon Brodie
Posts: 9
Chris Cicchitelli wrote:
To set it up, go to Settings > Harmony, enter your My Harmony username and password, and then enter the IP address of your Harmony hub(s). The rest is automatic!


Awesome. Thanks!
0 link
Tommy Long
Tommy Long
Posts: 202


1/16/2017
Tommy Long
Tommy Long
Posts: 202
Any particular Harmony hub needed?
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284


1/16/2017
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284
No, as far as I know all of them support the API and thus are supported.
0 link
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284


1/18/2017
Chris Cicchitelli
Chris Cicchitelli
Administrator
Posts: 3284
Update: an update has been posted for the Kinect Services to allow control of the Harmony via voice control (along with other features).

Let's say you rename your Harmony hub simply, "Harmony". And you have an activity called "Watch TV".

To activate the activity, just say:

"Computer, turn on Harmony Watch TV"

Likewise, to turn it off simply swap on for off, or just say, "Computer, turn off Harmony".


You can use the same natural language command variations for that you would for any other device, as well.
0 link