Logitech Harmony removes local API

Logitech has disabled the local API of the Harmony Hub with their latest software update (v4.15.206). For privacy and speed it is important that home automation devices communicate locally, without data leaving the network. With the latest update to the Logitech Harmony Hub, this is no longer possible.

We hope that this was an oversight on their end and that it will be reverted shortly. We have reached out to Logitech for a clarification and will update this post when available.

If you have already updated your Harmony Hub to v4.15.206, you have probably noticed that Home Assistant and other products communicating with the local API have stopped working. Don’t worry, it’s (still?) possible to downgrade to a previous version using the following steps (source: Reddit 1, Reddit 2):

  1. Download the MyHarmony Computer Application.
  2. Launch the MyHarmony app.
  3. Before clicking anywhere inside the window:
    • Windows users: Press Alt+F9.
    • Mac users: Press Fn+Option+F9 or Option+F9 (depending on Mac model, either one will work).
  4. Scroll the window to find your Harmony model.
  5. Select “Factory Reset” for the appropriate model. This does not do anything immediately.
  6. Steps 1-4 will be displayed for completing a Factory Reset. We are only doing Step 1. “Restore” here means “Rollback”.
  7. Connect your Harmony hub to the PC via micro-USB. Within a few minutes, it will be detected by MyHarmony and display Remote Model, Firmware Version, and Hardware revision. The Restore 1. button will be enabled.
  8. Click “Restore” and wait. (Now is the first time that it actually describes that it’s a rollback!)
  9. When it completes, you should be on Firmware Version 4.15.193. Disconnect the hub from the PC and return it to its original location. And the final, important step: eliminate the ability for the Harmony hub to access these domains, or the internet altogether. I used 1. DD-WRT’s Access Restrictions feature to disable all internet access, because my specific implementation is entirely intranet-based. YMMV.
    • svcs.myharmony.com
    • content.dhg.myharmony.com
    • logging.dhg.myharmony.com
    • myharmony.com
    • sus.dhg.myharmony.com

Until this is resolved, we will no longer recommend buying or using Logitech products.


This is a companion discussion topic for the original entry at https://www.home-assistant.io/blog/2018/12/17/logitech-harmony-removes-local-api/
7 Likes

a note, if you block internet access on the hub, the iphone/android app will no longer work, it hangs at “verfifying configuration”

If this is not reverted, no more Logitech for me. Thanks for the rollback instructions!

5 Likes

What about the harmony elite remote controler? Anyone have any info on this?

same boat.

Would someone be willing to tackle a new implementation using Web sockets? That method appears to still work and is what the iOS app is using via port 8088/tcp… See the post below:

I don’t use the emulated hue (yet) but would that stop working as well? I’d think that would still work. If so it will be annoying but maybe a group of input_booleans and emulated hue could be used for at least some control.

Edit: similar question what about emulated Roku? Just curious how these work with the hub?

@ptdalen Both the emulated Hue and Roku components allow the Harmony Hub to initiate communication to Home Assistant to perform an action. Harmony removing their API prevents actions going the other way, from Home Assistant to Harmony. As a result, those components should continue working as expected.

My USG/firewall will only let me block IP’s so had to lookup the ip’s from each of the 5 address’s for reference for others:

54.165.126.61

52.7.206.211

52.20.135.112

52.85.219.13

52.72.173.123

52.85.219.46

52.85.219.35

52.85.219.49

18.233.49.59

34.232.159.209

52.203.122.90

34.201.213.138

34.192.1.193

52.7.176.14

34.192.104.176

100.26.13.108

1 Like

@mtannerauo Some of these hosts are backed by CDNs, it’s not safe to expect these IPs to remain static or even be the same globally. For example, myharmony.com resolves to different IPs by region: https://dnschecker.org/#A/myharmony.com

It’s a bit fussy, but you can add static host mappings to the USG to route to resolve those logitech domains to 0.0.0.0. I’ve done this on my Edgerouter and so far it’s working: https://community.ubnt.com/t5/UniFi-Routing-Switching/USG-static-host-record-in-DNS-forwarder/td-p/1389361

1 Like

There are reports that something is still happening via the websocket on local port 8088; as soon as I can get back to my device, I’ll do a quick scan.

EDIT: following up. When I launch the iOS app, Charles Proxy initially detects lots of outbound traffic to both http://svcs.myharmony.com and http://sl.dhg.myharmony.com. After those initial volleys, the mobile app then starts communicating with the device locally via port 8088. I scoped 9 request/response pairs; not sure if they are sufficient to initiate an equal-functionality PR to pyharmony, but they’re worth a look. I’ll continue to investigate.

1 Like

That is what I’m seeing also. I wont’ be able to spend much time on this. But as an example, here is a call to the hub to return all of the devices. Need to replace YOUR_HUB_ID with your real hub id leaving single and double quotes in tact. I couldn’t figure out how to put a variable in the middle of raw strings. So anyway…

I have a Wireshark of an activity firing off. If I have time, I will test sending the commands to do that also. If you uncomment the last print(ws_data), you can see everything is there (devices, id’s, activities, etc…).

    from time import sleep
    import json
    import websocket
    from websocket import create_connection

    hub_ip = '192.168.5.5'
    hub_port = '8088'
    hub_id = 'YOUR_HUB_ID'

    #websocket.enableTrace(True)
    ws = create_connection('ws://' + hub_ip + ':' + hub_port + '/?domain=svcs.myharmony.com&hubId=' + hub_id)

    ws.send(r'{"hubId":"YOUR_HUB_ID","timeout":30,"hbus":{"cmd":"vnd.logitech.connect\/vnd.logitech.deviceinfo?get","id":"0","params":{"verb":"get"}}}')
    ws_data = ws.recv()
    #print(ws_data)

    ws.send(r'{"hubId":"YOUR_HUB_ID","timeout":30,"hbus":{"cmd":"vnd.logitech.connect\/vnd.logitech.statedigest?get","id":"0","params":{"verb":"get","format":"json"}}}')
    ws_data = ws.recv()
    #print(ws_data)

    ws.send(r'{"hubId":"YOUR_HUB_ID","timeout":60,"hbus":{"cmd":"vnd.logitech.harmony\/vnd.logitech.harmony.engine?config","id":"0","params":{"verb":"get"}}}')
    ws_data = ws.recv()
    #print(ws_data)

    hub_data = json.loads(ws_data)

    print('Printing JSON Data')
    for item in hub_data['data']['device']:
    	print(item['label'])

Why don’t you just block outbound access for your hub IPs - wouldn’t that be easier?

Logi_WillWong created a separate post for status updates.

https://community.logitech.com/s/question/0D55A00008D2zYDSAZ/harmony-hub-fw-415206

1 Like

Also…

https://support.myharmony.com/en-us/release-notes

I can’t think of another set of release notes that had said so little with so many words…

1 Like

For anyone looking to work on a websockets based implementation instead: https://github.com/jlynch630/Harmony.NET

This is a .NET implementation of that protocol implementation. Confirmed working with this firmware release. You can probably comb through his implementation and figure out what needs done. The actual payloads don’t look that different (besides being JSON instead of XMPP XML). The WebSocket implementation has a real annoying “feature” though where to connect you have to know the device’s “remote id”… which seemingly isn’t published anywhere, and requires a bonjur style discovery call to get the hubs to advertise themselves.

It’s not perfect, but confirmed its functional. I maintain a different .NET Harmony library, and HomeAutio.Mqtt.Harmony (Harmony to MQTT bridge). I just got that working using this library, though I’m kind of waiting to hear what the official line is before committing to it.

The one thing I’m finding a little sticky is that there seems to be some introduced lag here, but I’m not completely sure if I’m imagining it, its an artifact of the protocol / harmony, or the implementation.

Oh, also his approach doesn’t give you push based updates when Activities change outside the library. That probably needs changes, but I think he needs a bit of a refactor to get there.

2 Likes

Well, this clears up a lot for me as to why my hub wasn’t responding today!

I’m trying to roll back the firmware but in the instructions it says to launch the myharmony software then press F9 & ALT before clicking on the screen. All that does on my pc is turn the screen off and on. I’m I missing something?

Actually, I just got in the advanced settings, but it says my device isn’t supported? I’m very confused as I do have the hub and basic remote (Smart Control) so for the sake of argument I tried all of them with the same results. Any ideas would be appreciated!

This must be why all the harmony devices just took a decent drop in price recently.

Go to Logitech harmony support site and log your complaint.
https://community.logitech.com/s/question/0D55A00008D2zYDSAZ/harmony-hub-fw-415206
Hopefully with lots of noise they will pay attention.

1 Like

Thank you for this guide!