Jump to content

Harmony Ultimate question


richardl007

Recommended Posts

I am near certain that it can, but am only superficially aware of how that works. It has something to do with the ISY network module and sending the correct network commands to the hub. I understand that finding the correct commands involves observing network traffic during times when your remote or smartphone is sending commands to the hub ultimate, for the purposes of finding the correct commands.

 

I suspect you are not the first to try. Have you searched this forum for "logitech" or "ultimate"?

Link to comment
  • 4 months later...

Hey I am in the same boat as the guy who started this post. I want to tell my hub to start up one of my activities when I open the door so I can play music.

 

Seems like something we should be able to do but it is proving more difficult than I thought. I looked at github and it looks like some people have cracked the code in C# code or something. I am not a programmer and cannot understand that stuff. If there is anyone out there that can help I would be very grateful!

Link to comment

source forge

 

I went to source forge and read some there but I am not a programmer. I see some of the commands down at the bottom of the page. I am assuming I might can take these and make a program to try and control some of the activities of the hub.

 

I am gonna purchase the network module and give it a try. If anyone else has some suggestions let me know.

Link to comment

I also found this stuff but unsure about how to use it.

 

Logitech Harmony Protocol

 

This document describes the Logitech Harmony protocol used for communicating with the Harmony Link device.

 

Harmony Link Device

The Logitech Harmony Link connects to your home wireless network and obtains an IP address. It runs an XMPP server that listens on port 5222.

 

Authentication

Obtaining Login Token

The first step in authenticating is sending a Logitech username and password to a Logitech web service. The endpoint for getting an authentication token is:

 

https://svcs.myharmony.com/CompositeSec ... rAuthToken

A POST request is sent to this URL with a payload of JSON. The Content-Type request header must be set to application/json; charset=utf-8 and the body of the request should contain JSON like this:

 

{

"password": "secret",

"email": "foo@example.com"

}

The response will also be JSON of the form:

 

{

"GetUserAuthTokenResult": {

"AccountId": 0,

"UserAuthToken": "xyzxyz"

}

}

The value of UserAuthToken is a base64 string containing 48 bytes of data. This token, which I will call the "Login Token", is used in the next step.

 

Obtaining Session Token

Once the login token is obtained, a session token must be obtained. This is done by logging into the Harmony device with username guest@x.com and password guest. The login process uses the XMPP SASL PLAIN authentication standard (XEP-0034).

 

Once logged in as guest, the XMPP IQ Query Action Protocol standard (XEP-0099) is used to send an XML stanza to the server. The XML looks like this:

 

token=y6jZtSuYYOoQ2XXiU9cYovqtT+cCbcyjhWqGbhQsLV/mWi4dJVglFEBGpm08OjCW:name=1vm7ATw/tN6HXGpQcCs/A5MkuvI#iOS6.0.1#iPhone

 

The important part here is the content of the tag. It comes in the format token=:name=# where T is the base64-encoded Login Token, N is any unique identifier (doesn't seem to matter in my tests), and D is a client device description. The server appears to validate these device descriptions, as no other value besides iOS6.0.1#iPhone seemed to work when I tried it. I assume it might do some sort of validation checking for one of iPhone, Android, etc.

 

After this stanza is sent, the server sends back a response that looks like:

 

identity=753b4836-2093-4c56-b4cf-eb6db9da28cb:status=succeeded

 

The important part here is the content of the tag. It contains the "identity" string, which I will call the Session Token. It is a UUID version 4 string that contains 16 bytes of information. This is what's used to login to the device as an authenticated user.

 

Logging In

Once the Session Token is obtained, it can be used to login to the harmony device as an authenticated XMPP user. The username for logging in is @x.com and the password is . Example:

 

username: 764b97db-f883-4ccd-b1db-26bb9b20aee8@x.com

password: 764b97db-f883-4ccd-b1db-26bb9b20aee8

Once logged in with this session token, commands can be sent to the device.

 

Sending Commands

Once logged in with the session token, commands can be sent to the device. The XMPP command for sending a "volume down" press event looks like this:

 

action={"type"::"IRCommand","deviceId"::"11586428","command"::"VolumeDown"}:status=press

I have verified that this does send the volume down press event. A followup release event would have to be sent to stop the volume from continuing to go down. It looks like the deviceId parameter is some numeric identifier of the device you're sending the command for. I assume this can be obtained from the sync protocol but have not yet investigated.

 

Retrieving devices and command list

You can send an IQ query with an tag to ask for ?config:

 

The response contains a CDATA body that has a JSON string containing the list of devices and their available commands.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...