richardl007 Posted January 11, 2014 Posted January 11, 2014 Is it possible that the ISY could send a command to the Harmony Ultimate? I can control it from my iPhone so it uses my network.
oberkc Posted January 12, 2014 Posted January 12, 2014 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"?
WetCoastWillie Posted January 12, 2014 Posted January 12, 2014 I know the hub can send commands to the ISY... I have my harmony ultimate controlling my lighting (insteon) and thermostat (z-wave), so I assume that it can communicate both ways, although I have not yet had a need to send from the ISY to hub.
elvisimprsntr Posted January 12, 2014 Posted January 12, 2014 Logitech does not have a public API for their products. It's the single most requested feature on the Logitech forums. You might find someone who has reverse engineered the protocol on github
huffmd1 Posted May 14, 2014 Posted May 14, 2014 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!
ferdies Posted May 14, 2014 Posted May 14, 2014 This might help. https://github.com/petele/pyharmony/ http://sourceforge.net/projects/harmonyhubcontrol/files/
huffmd1 Posted May 14, 2014 Posted May 14, 2014 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.
huffmd1 Posted May 15, 2014 Posted May 15, 2014 So this is what I have found so far: The command line for HarmonyHubControl is as follows: HarmonyHubControl.exe [password] [harmony_ip] [command (optional)] [primary_parameter (optional)] [secondary_parameter (optional)]\n"); where the and [password] parameters are the login credentials used to log into your Logitech Harmony account to update the device configuration. These are also the same credentials used with the Harmony app. [harmony_ip] is the IP address of the harmony device on your network [command] can be any of the following: get_current_activity_id list_devices list_activities start_activity [iD] issue_device_command [DEVICE_ID] [DEVICE_COMMAND] get_config Typical example usage would be as follows: 1) Query the device for a list of activities: HarmonyHubControl.exe your_email@your_email_server.com your_password 192.168.0.XXX list_activities 2) Start an activity based on the activity identifiers listed in step 1: HarmonyHubControl.exe your_email@your_email_server.com your_password 192.168.0.XXX start_activity For full argument information simply run the executablewith no parameters. I have tried to put something in but have nothing. I am very new at this and have very little experience with doing anything like this. I am going to post my screenshot so you can see what I have so far.
huffmd1 Posted May 15, 2014 Posted May 15, 2014 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.
Recommended Posts