Latest Harmony breaking Home Assistant component?

i will update also later today
i blocked the MAC address in my router as well as the domains

but not sure how we can update settings on the remote now :frowning: if internet is blocked on it
maybe with the android phone, with the app, not sure if the windows software myharmony works

I am running pihole, and added the various domains to the block list. After rebooting my harmony hub, it returned to green. I’ll try the downgrade later today.

were you also running 206 version ?

Well that’s really good to hear. I’ll have to try again. Which OS are you running (I’m on Mac)? Also, which type of device did you select (I chose “other”)?

I’m on Windows. I chose “Harmony Home Control”. When listing my remotes (when first opening the app), myHarmony calls my hub “Harmony Companion / Home Control”.

you press first ALT + F9 , when opening myharmony app?

Yes, I got the surprise. For me its more of an annoyance for now. I only have one automation tied to my harmony remote for vacation mode.

Alt-F9 is what gives you the recovery menu.

ok, wondering how the APP on android/iphone still commmunicates to the HUB if upgraded to 206
maybe its another port then 5222 , and we just have to enter that “new” port in HA config ??

how can we sniffer this?

any1 an idea? i installed wireshark on my laptop, but dont see any traffic from my phone to the ip of the hub
also dont see any traffic from HA to the hub
strange :slight_smile:

The app still works from my iphone with the hub on 206 and the domains blocked from DNS. It just requires that my iPhone have wifi turned on so it can access the local network.

Doing a quick nmap, shows
8088/tcp open radan-http
8222/tcp open unknown

If I explicitly check 5222
5222/tcp closed xmpp-client

ok, so you are on 206 , so your HA is not working anymore now with harmony hub ?
probalby also this error

2018-12-17 08:28:54 WARNING (MainThread) [homeassistant.components.remote] Platform harmony not ready yet. Retrying in 180 seconds.

so can you maybe try in your config file, something like

remote:
  - platform: harmony
    name: Bedroom
    host: 10.168.1.13
    port: 8222 

or port: 8088 ?

8088 is for Websockets. The iOS application connects to the Hub this way. You can connect an iPhone to your computer via USB, and do the command: rvictl -s to establish an interface that wireshark can use to caputre the iPhone traffic while using the app.

I did this last week to see how the app talks to the hub. And sure enough, it’s websockets. I was able to put together a simple script to send IR commands to the hub. The reason was my LED candles would turn on fine when blasting them in the iOS app (holding down the ON button). But not with HA component. I noticed the HA component would only send commands at a certain rate (green light on hub just flashed slowly). When holding down the buttons in the app, the green light on hub would flicker at a much faster rate. The difference was the iOS app sending multiple hold commands over and over. After doing this script, they would blast the candles just like the app and they would turn on.

EDIT: I had something wrong in the script I posted. My old script is still working. I will post that back in about an hour. Have to step out for a few.

EDIT:

Ok, this code still works for me now talking to Hub via Websockets.

    #!/Library/Frameworks/Python.framework/Versions/3.7/bin/python3

    # -*- coding: utf-8 -*-

    from time import sleep
    import websocket
    from websocket import create_connection

    # NOTE: 18322921 is an example of what your hubId might look like
    # NOTE: 57216229 is the deviceId found in the harmony conf for the device you are controlling


    # The code opens a websocket to the hub, and in the example here, sends a PRESS for PowerOn
    # Next, just runs a loop to blast the HOLD action for PowerOn action (ensures the candles turn on)
    # Finally, send the release command
    #
    # PowerOn was one of the listed commands from my harmony conf file

    websocket.enableTrace(True)
    ws = create_connection("ws://192.168.2.3:8088/?domain=svcs.myharmony.com&hubId=18322921")


    max_holds = 10
    count = 0

    # Send the PowerOn button a 'press'
    ws.send(r'{"hubId":"18322921","timeout":30,"hbus":' \
    	    r'{"cmd":"vnd.logitech.harmony\/vnd.logitech.harmony.engine?holdAction",' \
    	    r'"id":"1537395108","params":{"status":"press","timestamp":"0","verb":"render",' \
    	    r'"action":"{\"command\":\"PowerOn\",\"type\":\"IRCommand\",\"deviceId\":\"57216229\"}"}}}')
    sleep(.002)

    # Send the PowerOn button a 'hold'
    while count < max_holds:
    	ws.send(r'{"hubId":"18322921","timeout":30,"hbus":' \
    		    r'{"cmd":"vnd.logitech.harmony\/vnd.logitech.harmony.engine?holdAction","id":"1022244803",' \
    		    r'"params":{"status":"hold","timestamp":"201","verb":"render","action":' \
    		    r'"{\"command\":\"PowerOn\",\"type\":\"IRCommand\",\"deviceId\":\"57216229\"}"}}}')
    	sleep(.002)
    	count += 1

    # Send the PowerOn button a 'release'
    ws.send(r'{"hubId":"18322921","timeout":30,"hbus":' \
    	    r'{"cmd":"vnd.logitech.harmony\/vnd.logitech.harmony.engine?holdAction",' \
    	    r'"id":"858970808","params":{"status":"release","timestamp":"659","verb":"render",' \
    	    r'"action":"{\"command\":\"PowerOn\",\"type\":\"IRCommand\",\"deviceId\":\"57216229\"}"}}}')
3 Likes

I just tried changing the port. By default it checks on 5222. Actually, it looks like it ignores the port parameter from the config.yaml file. I also tried 8088 and restarted HA. When I tailed the HA log, it still shows attempting and failing to connect on 5222.

i blocked internet access on the hub on my router
commands are still working from HA, thats good…
but my android app wont connect anymore to the hub, same wifi offcourse, it hangs at “verifying configuration”
so is internet needed for the app to work?? thats a shame

can any1 confirm this?

I’ve the same issue and I’m not amused. The Harmony App shows me a pop-up window to upgrade the firmware and run the upgrade as suggested.

I’ve tried to downgrade my firmware with the MyHarmony desktop app, but three times the downgrade failed.https://i.ibb.co/dGxZ0zH/Harmony-Hub.png

What’s going wrong?

I notice when I try to add an activity on my iOS app, the first thing the app says is “Contacting harmony servers…”

I also notice in the Wireshark captures the app talks to Harmony, gets some sort of authentication token, and uses that to talk to the hub directly via websockets. However, I don’t know what the auth requirements are for interacting with the hub. In my previous post, my script sends commands to the hub with no auth and works fine. Auth may just be used when performing certain functions. Not sure…

Another quick update. I deleted the iOS app off my phone and re-installed it. Then captured all of the communication occurring between the iOS app and the hub when I first launch the app. In the Wireshark captures I can see the app asking the hub for all of the information. The hub responds with all of the activities, devices, id’s, etc… I also created and ran an activity. Which again, you see all of the commands needed to run activities via Web sockets. Most everything is sent and received in json data structures.

Based on this information, I imagine the implementation could be re-written using the Web socket method.

ok, confirmed, if you block internet access on the harmony hub; your android/iphone app, will no longer work!

Can someone give a few examples of what can and cannot be done with HA once the update is applied ?

Currently I do the following with HA and harmony hub

When the hub changes to “on” I kick off a lighting scene. And when it turns to off I change to a different scene

A goodbye routine that turns off the TV and Sonos regardless of the hub activity. Sometimes I ran my Sonos just using the app so this was a quick easy way to turn it off. I guess I can just do that with the Sonos integration if needed

I guess that’s about it. Mostly just checking the state of the hub being on/off is what would be missed if it’s no longer available.

you cant do anything anyrmore, there is no connection anymore to the hub from HA