Harmony Hub Controller Add-On
#1
Is anyone aware of any documentation for the Harmony Hub Controller Add-On?  I can't locate any.  I need to know the format or syntax the commands need to be in for Kodi to communicate with my Harmony Hub.

Thanks,
Jeff
#2
Sorry, the documentation isn't done yet.  OK, I haven't started it yet.  Let me see if there is a short version I can do here.

With the default settings, if you put in the IP address of your hub, then you can run only pre-defined Harmony Activities. To do that go to the Harmony Hub setting, and then EDIT MAPPINGS, and then type a name for Kodi to use, and then the exact name of the Activity (capitalization will count).

If you enable advanced Harmony hub control, then you can start an activity, or send a string of remote commands to a specific device, or both.  The trick here is that you can leave the activity or remote command blank, giving you the three options: activity only, remote commands only, and both.  Here's the format for the commands:

<device name>:command|command|command

The device name is whatever name you gave your device in the Harmony hub.  There is a pause between each command (250ms by default). If you need more time between commands you can just do two (or more) pipes together ("|||" would be a 500ms delay).  The advanced control can be a bit tricker, as you need to know the name of the command you want to send.  This should be whatever you see as the command name in the Harmony hub.  So, as an example, here's a string that tells my Vero 4K+ to do the Win+2 command:

Vero 4K+:Win+2

I hope that helps get you started.  I think you're the first person besides me to actually use this besides me, so I'm happy to help anyway I can. Helping you might actually help me figure out the best way to write the documentation.
#3
Hi,
I just tried to use your add on as it seems a very nice idea, however I get an error "Harmony hub controller error", and it says "check the log for more information", but I do not know where to check. I am sure I entered the IP address correctly and I created two of the activities of my Hub with "Edit Mapping" with the same names they have on the Logitech App (Edit Action) and assigned the exact same name. No additional command to run. Any help is much appreciated.
#4
(2021-04-05, 17:17)pierocol Wrote:
Code:
Hi,
I just tried to use your add on as it seems a very nice idea, however I get an error "Harmony hub controller error", and it says "check the log for more information", but I do not know where to check. I am sure I entered the IP address correctly and I created two of the activities of my Hub with "Edit Mapping" with the same names they have on the Logitech App (Edit Action) and assigned the exact same name. No additional command to run. Any help is much appreciated.

Actually, I discovered where the log file is, enabled logging for this add on, and this is what I get

2021-04-05 17:36:01.010 T:8028     INFO <general>: [Harmony Hub Control] script version 0.2.1+matrix.1 started
2021-04-05 17:36:01.028 T:10484    INFO <general>: Loading skin file: C:\Users\piero\AppData\Roaming\Kodi\addons\script.harmony.control\resources\skins\skin.estuary\1080i\script.harmony.control-menu.xml, load type: LOAD_ON_GUI_INIT
2021-04-05 17:36:01.050 T:10484   ERROR <general>: Control 10070 in window 13000 has been asked to focus, but it can't
2021-04-05 17:36:06.519 T:8028    ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'TypeError'>
                                                   Error Contents: append() takes exactly one argument (2 given)
                                                   Traceback (most recent call last):
                                                     File "C:\Users\piero\AppData\Roaming\Kodi\addons\script.harmony.control\default.py", line 4, in <module>
                                                       Main()
                                                     File "C:\Users\piero\AppData\Roaming\Kodi\addons\script.harmony.control\resources\lib\harmonycontrol.py", line 35, in __init__
                                                       self._pick_activity()
                                                     File "C:\Users\piero\AppData\Roaming\Kodi\addons\script.harmony.control\resources\lib\harmonycontrol.py", line 133, in _pick_activity
                                                       self._run_activity( activity, cmds )
                                                     File "C:\Users\piero\AppData\Roaming\Kodi\addons\script.harmony.control\resources\lib\harmonycontrol.py", line 140, in _run_activity
                                                       result, loglines = self.MYHUB.startActivity( activity )
                                                     File "C:\Users\piero\AppData\Roaming\Kodi\addons\script.harmony.control\resources\lib\api\harmony.py", line 65, in startActivity
                                                       activities = self._get_activities()
                                                     File "C:\Users\piero\AppData\Roaming\Kodi\addons\script.harmony.control\resources\lib\api\harmony.py", line 95, in _get_activities
                                                       self.LOGLINES.append( 'added activity:', activities[label] )
                                                   TypeError: append() takes exactly one argument (2 given)
                                                   -->End of Python script error report<--
                                                   
2021-04-05 17:36:06.607 T:8028     INFO <general>: Python interpreter stopped
#5
(2021-04-05, 17:42)pierocol Wrote:
(2021-04-05, 17:17)pierocol Wrote:
Code:
Hi,
I just tried to use your add on as it seems a very nice idea, however I get an error "Harmony hub controller error", and it says "check the log for more information", but I do not know where to check. I am sure I entered the IP address correctly and I created two of the activities of my Hub with "Edit Mapping" with the same names they have on the Logitech App (Edit Action) and assigned the exact same name. No additional command to run. Any help is much appreciated.
Please don't post log snippets to the forum. In the future, if you need to post any debug information, place the entire debug log into something like pastebin and then post a link to it. That said, I see what the issue is and have corrected it.  I'll try to get an updated version posted in the next couple of days.

And just as an FYI, I have asked the mods to merge this thread with the actual support thread so I can keep everything in one place. So don't be surprised when this moves.
#6
OK, another quick update. Because this thread is older than the official support thread, merging them would have created more problems. So please use the following thread for support moving forward:

https://forum.kodi.tv/showthread.php?tid=361342

This thread will be locked after this post so that folks go the right place for support.

Logout Mark Read Team Forum Stats Members Help
Harmony Hub Controller Add-On0