Harmony Hub plugin

Posted on
Sat Sep 17, 2016 3:49 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Harmony Hub plugin

Baby steps.

I get this in the Indigo log
Code: Select all
 Indigo Cocoa client connected
  Reloading plugin "Harmony Hub 0.2.8"
  Starting plugin "Harmony Hub 0.2.8" (pid 13716)
  Harmony Hub Error               Error in plugin execution InitializeMain:

Traceback (most recent call last):
  File "plugin.py", line 8, in <module>
ImportError: No module named sleekxmpp

  Stopping plugin "Harmony Hub 0.2.8" (pid 13716)
  Stopped plugin "Harmony Hub 0.2.8"

though I did this:
Code: Select all
Office-Mini:~ macadmin$ sudo -H  pip install sleekxmpp
Collecting sleekxmpp
  Downloading sleekxmpp-1.3.1.tar.gz (831kB)
    100% |████████████████████████████████| 839kB 484kB/s
Installing collected packages: sleekxmpp
  Running setup.py install for sleekxmpp ... done
Successfully installed sleekxmpp-1.3.1

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Sep 17, 2016 4:42 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub plugin

You're probably installing the package for Python 2.7, which is the default. You need to install it for Python 2.6. You need to install pip-2.6 (or is it pip2.6), then use it to install the package.

I know this was discussed somewhere in this ungodly long thread.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Sep 17, 2016 4:55 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Harmony Hub plugin

OK, I figured it out.

For those following in the future:

Go here. Read. http://stackoverflow.com/questions/2429 ... python-2-6

Assuming it downloads to Downloads then:

Code: Select all
Office-Mini:~ macadmin$ cd ~/Downloads/
Office-Mini:Downloads macadmin$ sudo python2.6 get-pip.py

There will be many results in terminal, and warnings about deprecations.
Code: Select all
Office-Mini:Downloads macadmin$ sudo pip2.6 install requests

Ditto about deprecation warnings.
Code: Select all
Office-Mini:Downloads macadmin$ sudo pip2.6 install sleekxmpp

Ditto ditto.

Disable and reload the Harmony Hub plugin in Indigo. Check the log for errors.

You should be golden.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Sep 17, 2016 5:26 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Harmony Hub plugin

And on to confusion about the functioning plugin!

Created the device, logged in, getting statuses of what's happening.

But I don't see a way to have any thing beyond ANY activity change be a trigger for Indigo. And I don't understand the proper choice to make in sub menus when creating an Action Group to send an activity. Is the attached right?
Attachments
Screen Shot 2016-09-17 at 7.24.58 PM.png
Screen Shot 2016-09-17 at 7.24.58 PM.png (16.47 KiB) Viewed 4405 times

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Sep 17, 2016 6:21 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub plugin

Different Computers wrote:
And on to confusion about the functioning plugin!

Created the device, logged in, getting statuses of what's happening.

But I don't see a way to have any thing beyond ANY activity change be a trigger for Indigo. And I don't understand the proper choice to make in sub menus when creating an Action Group to send an activity. Is the attached right?


The only thing that the hub broadcasts are activity messages, basically. There's AV activities and HA activities. So you can set up actions based on what Activity the hub has started (or ended).

I don't have enough info about the HA activity type messages to implement usable actions for them. If you want your Hub to control Indigo devices, use my LIFX Bridge plugin to create pseudo-devices (real devices or action groups) that appear (to the Hub) to be LIFX devices. Then you can add them to activities defined for the Hub.

As for creating Indigo actions to send through the Hub, you've got it right. You're basically selecting a command that the Hub knows for a specific activity or device. Like if you were assigning a command to a button on the remote.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sat Sep 17, 2016 8:04 pm
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Harmony Hub plugin

I don't have enough info about the HA activity type messages to implement usable actions for them. If you want your Hub to control Indigo devices, use my LIFX Bridge plugin to create pseudo-devices (real devices or action groups) that appear (to the Hub) to be LIFX devices. Then you can add them to activities defined for the Hub.

I don't want my hub to control anything beyond my AV. But I don't understand how to tell the hub to start an activity. I'm also missing how to use the Hub's activity as a trigger.

As for creating Indigo actions to send through the Hub, you've got it right. You're basically selecting a command that the Hub knows for a specific activity or device. Like if you were assigning a command to a button on the remote.

Glad to know I've got it right, but again, I don't understand what the Command Group and Command options represent. As I attempted to configure it in the screen shot, it did not work. All I wanted was to make the top level activity start.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sat Sep 17, 2016 8:27 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub plugin

To start an Activity from Indigo, create an action (group, trigger, whatever) that does "Device Actions -> Harmony Hub Controls -> Start Activity". Select the Hub you're commanding, then the Activity name.

To trigger on an Activity change, it's a "Harmony Hub Event". You probably want "Activity Finished Notification", then do a condition based on the currentActivityName (or number) state value.

Command Group and Command are if you want to send keypresses to your devices. Like Pause when the doorbell rings. :)

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Sep 18, 2016 6:42 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Harmony Hub plugin

Command Group and Command are if you want to send keypresses to your devices. Like Pause when the doorbell rings. :)


Trouble is, my attempt to set up changing an activity won't let me set it up without also specifying a command group and command.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Sun Sep 18, 2016 7:12 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub plugin

Different Computers wrote:
Command Group and Command are if you want to send keypresses to your devices. Like Pause when the doorbell rings. :)


Trouble is, my attempt to set up changing an activity won't let me set it up without also specifying a command group and command.


You want to use "Start Activity", not "Send Activity Command". The first tells the Hub to run the sequence to activate a specific Activity. The latter is for sending a command (keypress) associated with the running Activity.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Sep 18, 2016 9:06 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Harmony Hub plugin

Duh. I had blasted right past that selection.

Thank you very much!! This is really the missing piece for a huge chunk of potential automation.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Thu Sep 29, 2016 4:16 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Harmony Hub plugin

Feature Request (Well assuming it's not already possible and i've just missed it)

I'd love the ability to have a single action (for use on control pages) that'd map to the current activity automatically. EG if i press a pause on a control page it'd invoke the pause function on the activity currently active. This can be done already by way of having an action group for all the different functions and then have a script for each one that pulls that action group of the button is pressed for the relevent activity running at that time. It'd just be much easier to have it all in the plugin than having about 200-300 different action groups and scripts setup :)

Computer says no.

Posted on
Thu Sep 29, 2016 5:20 pm
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub plugin

durosity wrote:
Feature Request (Well assuming it's not already possible and i've just missed it)

I'd love the ability to have a single action (for use on control pages) that'd map to the current activity automatically. EG if i press a pause on a control page it'd invoke the pause function on the activity currently active. This can be done already by way of having an action group for all the different functions and then have a script for each one that pulls that action group of the button is pressed for the relevent activity running at that time. It'd just be much easier to have it all in the plugin than having about 200-300 different action groups and scripts setup :)


I'll see how hard that would be to do.



Sent from my iPhone using Tapatalk

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Thu Sep 29, 2016 5:37 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Harmony Hub plugin

Cool. It would make life so much easier. I'm currently transitioning away from using the GC100/iTach combo I've been using the last few years to using two hubs and everything has went exceptionally smoothly except this part. I already have lots of action groups for this stuff so I COULD go through and modify them accordingly, BUT it'd be so much easier to ditch all the action groups and just have it all go through the plugin. It's kinda the last puzzle in simplifying my indigo system.. (at least until I7 comes along and I have to start work alllll over again)

Computer says no.

Posted on
Sun Oct 09, 2016 10:26 am
nev offline
Posts: 48
Joined: Aug 19, 2015

Re: Harmony Hub plugin

How could I script a reload of this plugin?

Posted on
Sun Oct 09, 2016 10:30 am
FlyingDiver offline
User avatar
Posts: 7189
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Harmony Hub plugin

nev wrote:
How could I script a reload of this plugin?


Code: Select all
plugin = indigo.server.getPlugin("com.flyingdiver.indigoplugin.harmonyhub")
if plugin.isEnabled():
   plugin.restart()

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Who is online

Users browsing this forum: No registered users and 3 guests