Harmony Hub

I have a question for those running Homebridge. Using the method above, do you find it more reliable than the current Homebridge plugin? For me, the harmony-hub homebridge plugin crashes so often it forces me to restart it daily, which is more annoying than the convenience it should add. Also, if it’s reliable, has anyone integrated with homebridge using the homeassistant plugin? Thanks

Ok so I managed to get Maddox’s Harmony API working and set up MQTT using CloudMQTT. I can read the active states of my Harmony hub but I can’t seem to change an activity using Home Assistant. Anyone have any experience with CloudMQTT and know what I can try to troubleshoot?

@mefistofelis

everything is here:

just make sure to install build-essential before all the steps (sudo apt get -y install build-essential
)

I lost my config due to this:

I might have it stored somewhere but will have to look for that, first I want to resolve my broken hass … :frowning:

1 Like

THx for the reply, is there any way i can take a backup just to be sure that if something goes wrong i can restore it?
Or is it enough if i just backup the sd card of my pi???

Thx a lot for your help p0nts, i managed to get the commands working through the command line.
Your configuration from above (switches etc) is unfortunately not accessible, could you please repost it?

Yeah, will do this tomorrow because I am not at home now.

@mefistofelis

scenes:
https://paste.xsnews.nl/view/vA9m1LvjjwW8X

switches:
https://paste.xsnews.nl/view/Ajd9Amm7zvkk3w

customize:
https://paste.xsnews.nl/view/ndEaGEoYLNQndy

how it looks:
http:///shot.xsnews.nl/stefan/2f14afa9d9414899.png

activity ID’s are of-course different for everybody, you can find them by running “list_activities”

1 Like

Thx a lot!!! The onlz problem is now that i cannot use your code no matter what i tried because the path doesnt seem right. I have used the all in one installation script and the harmonyhub is in the pi user. This is waht i get wwhen i type sudo find . | grep HarmonyHubControl:

./code/HarmonyHubControl.vcxproj
./code/HarmonyHubControl.cpp
./HarmonyHubControl
./HarmonyHubControl/csocket.o
./HarmonyHubControl/.git
./HarmonyHubControl/.git/description
./HarmonyHubControl/.git/refs
./HarmonyHubControl/.git/refs/tags
./HarmonyHubControl/.git/refs/remotes
./HarmonyHubControl/.git/refs/remotes/origin
./HarmonyHubControl/.git/refs/remotes/origin/HEAD
./HarmonyHubControl/.git/refs/heads
./HarmonyHubControl/.git/refs/heads/master
./HarmonyHubControl/.git/index
./HarmonyHubControl/.git/HEAD
./HarmonyHubControl/.git/packed-refs
./HarmonyHubControl/.git/logs
./HarmonyHubControl/.git/logs/refs
./HarmonyHubControl/.git/logs/refs/remotes
./HarmonyHubControl/.git/logs/refs/remotes/origin
./HarmonyHubControl/.git/logs/refs/remotes/origin/HEAD
./HarmonyHubControl/.git/logs/refs/heads
./HarmonyHubControl/.git/logs/refs/heads/master
./HarmonyHubControl/.git/logs/HEAD
./HarmonyHubControl/.git/info
./HarmonyHubControl/.git/info/exclude
./HarmonyHubControl/.git/objects
./HarmonyHubControl/.git/objects/pack
./HarmonyHubControl/.git/objects/pack/pack-ac7503c78a6e4224d8d5be1b087df920623f662b.idx
./HarmonyHubControl/.git/objects/pack/pack-ac7503c78a6e4224d8d5be1b087df920623f662b.pack
./HarmonyHubControl/.git/objects/info
./HarmonyHubControl/.git/hooks
./HarmonyHubControl/.git/hooks/applypatch-msg.sample
./HarmonyHubControl/.git/hooks/update.sample
./HarmonyHubControl/.git/hooks/commit-msg.sample
./HarmonyHubControl/.git/hooks/prepare-commit-msg.sample
./HarmonyHubControl/.git/hooks/pre-push.sample
./HarmonyHubControl/.git/hooks/pre-applypatch.sample
./HarmonyHubControl/.git/hooks/pre-commit.sample
./HarmonyHubControl/.git/hooks/post-update.sample
./HarmonyHubControl/.git/hooks/pre-rebase.sample
./HarmonyHubControl/.git/branches
./HarmonyHubControl/.git/config
./HarmonyHubControl/HarmonyHub.AuthorizationToken
./HarmonyHubControl/README.txt
./HarmonyHubControl/harmonyhubcontrol-code
./HarmonyHubControl/harmonyhubcontrol-code/.git
./HarmonyHubControl/harmonyhubcontrol-code/.git/description
./HarmonyHubControl/harmonyhubcontrol-code/.git/refs
./HarmonyHubControl/harmonyhubcontrol-code/.git/refs/tags
./HarmonyHubControl/harmonyhubcontrol-code/.git/refs/remotes
./HarmonyHubControl/harmonyhubcontrol-code/.git/refs/remotes/origin
./HarmonyHubControl/harmonyhubcontrol-code/.git/refs/remotes/origin/HEAD
./HarmonyHubControl/harmonyhubcontrol-code/.git/refs/heads
./HarmonyHubControl/harmonyhubcontrol-code/.git/refs/heads/master
./HarmonyHubControl/harmonyhubcontrol-code/.git/index
./HarmonyHubControl/harmonyhubcontrol-code/.git/HEAD
./HarmonyHubControl/harmonyhubcontrol-code/.git/packed-refs
./HarmonyHubControl/harmonyhubcontrol-code/.git/logs
./HarmonyHubControl/harmonyhubcontrol-code/.git/logs/refs
./HarmonyHubControl/harmonyhubcontrol-code/.git/logs/refs/remotes
./HarmonyHubControl/harmonyhubcontrol-code/.git/logs/refs/remotes/origin
./HarmonyHubControl/harmonyhubcontrol-code/.git/logs/refs/remotes/origin/HEAD
./HarmonyHubControl/harmonyhubcontrol-code/.git/logs/refs/heads
./HarmonyHubControl/harmonyhubcontrol-code/.git/logs/refs/heads/master
./HarmonyHubControl/harmonyhubcontrol-code/.git/logs/HEAD
./HarmonyHubControl/harmonyhubcontrol-code/.git/info
./HarmonyHubControl/harmonyhubcontrol-code/.git/info/exclude
./HarmonyHubControl/harmonyhubcontrol-code/.git/objects
./HarmonyHubControl/harmonyhubcontrol-code/.git/objects/pack
./HarmonyHubControl/harmonyhubcontrol-code/.git/objects/pack/pack-ac7503c78a6e4224d8d5be1b087df920623f662b.idx
./HarmonyHubControl/harmonyhubcontrol-code/.git/objects/pack/pack-ac7503c78a6e4224d8d5be1b087df920623f662b.pack
./HarmonyHubControl/harmonyhubcontrol-code/.git/objects/info
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/applypatch-msg.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/update.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/commit-msg.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/prepare-commit-msg.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/pre-push.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/pre-applypatch.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/pre-commit.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/post-update.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/hooks/pre-rebase.sample
./HarmonyHubControl/harmonyhubcontrol-code/.git/branches
./HarmonyHubControl/harmonyhubcontrol-code/.git/config
./HarmonyHubControl/harmonyhubcontrol-code/HarmonyHub.AuthorizationToken
./HarmonyHubControl/harmonyhubcontrol-code/README.txt
./HarmonyHubControl/harmonyhubcontrol-code/PROTOCOL.md
./HarmonyHubControl/harmonyhubcontrol-code/Makefile
./HarmonyHubControl/harmonyhubcontrol-code/csocket.h
./HarmonyHubControl/harmonyhubcontrol-code/HarmonyHubControl.vcxproj
./HarmonyHubControl/harmonyhubcontrol-code/csocket.cpp
./HarmonyHubControl/harmonyhubcontrol-code/HarmonyHubControl.cpp
./HarmonyHubControl/PROTOCOL.md
./HarmonyHubControl/Makefile
./HarmonyHubControl/csocket.h
./HarmonyHubControl/HarmonyHubControl.o
./HarmonyHubControl/HarmonyHubControl.vcxproj
./HarmonyHubControl/csocket.cpp
./HarmonyHubControl/HarmonyHubControl.cpp
./HarmonyHubControl/HarmonyHubControl

How can i change that?

Same problem as someone else above, you forgot to build. please do the following:

sudo apt-get -y install build-essential cd /home/hass/.homeassistant/harmony make HarmonyHubControl

Make sure to change the paths to where your HarmonyHubCotrol make file is

When i am logged in to my pi and run sudo apt get -y install build-essential i get the following error>>

E: Invalid operation get

There’s a typo in the command try this:

sudo apt-get -y install build-essential

thx i figured it out!!!
Just one last question: how can i turn an activity off?

You can use start_activity -1 (its in the switches code)

Thx for the tip but if you have 2 activities active then only one can be closed…Is there a workaround for that?

Sry I dont have that, always have just 1 activity open and when I want to stop it I close it with -1. But yeah i guess when you have multiple activities you have to just activate the same activity one more time to close it? Not sure, never tried.

Has anyone figured out how to map one of the buttons to a HA command? I would like to control a few z-wave switches with my remote.

that would be the most awesome thing…

To answer my own question in case anyone else is interested, my issue was I had multiple harmony hubs and it was merging all activities into one hub. I worked with Maddox and he added a new version of the Harmony API and now it supports more than one harmony hub! I can confirm it tests well with MQTT using CloudMQTT WITHOUT having to change anything as described above. It works as is.

I also installed the homebridge plugin and whitelisted just the harmony activities I wanted. It now reliably works with HomeKit. If anyone needs help, ping me.

2 Likes

Ha, I just came here to mention Harmony API 2.0 and it’s support for multiple hubs but @Jer78 beat me to it.

It’s now available. Just keep in mind you need to change your MQTT topics to support the namespacing of your Harmony hub names! Make sure you read the README to see what the new topic and http endpoint formats look like. And as always, if you go to the main page of Harmony API while running it, it will show you all the endpoints.

A HUGE thanks goes to @Jer78 for providing me with a second hub so that I could get this feature added. So give him all the credit.

Thanks!

2 Likes

Thanks Jon for the update and thanks to @Jer78 for your contribution! There’s putting your money where your mouth is!