This page last changed on Feb 22, 2015 by glennl.
I have only recently found out about OpenRemote but since I have found it found it, I have done some great things.
Including compiling from source, controlling HAI Omnilink, Yamaha Amps, Sonos, WDTV's and now the Harmony Hub.
I don't have a great knowledge of OpenRemote but hopefully people can expand on what I have written to add additional features like sensors
as some of the responses are on, off.
It is quite an easy thing to do once you figure it out how to do it.
We start by downloading the HarmonyHubControl project
Put it in a folder such as /harmonyhub/
Before you go into the designer test that the examples work from command line.
We launch the designer and a "shell execution protocol".
We fill path with "/harmonyhub/HarmonyHubControl".
We have various options to fill command parameter with.
It follow the following guide email password harmony\_ip command \(optional\) primary\_parameter \(optional\).
== Examples from Project site ==
Typical example usage would be as follows:
1) Query the device for a list of activities:
HarmonyHubControl your_email@your_email_server.com your_password 192.168.0.XXX list_activities
2) Start an activity based on the activity identifiers listed in step 1:
HarmonyHubControl your_email@your_email_server.com your_password 192.168.0.XXX start_activity activity id (eg -1 for power off)
For full argument information simply run the executable with no parameters.
== Additional Notes ===
I highly suggest you add logging in the controller by adding the following to log4j.properties (edit per your circumstance)
log4j.logger.OpenRemote.Controller.protocol.SHELLEXE = ALL, shell-file
log4j.appender.shell-file = org.apache.log4j.RollingFileAppender
log4j.appender.shell-file.File = /var/log/openremote/controller/shell.log
log4j.appender.shell-file.Threshold = DEBUG
log4j.appender.shell-file.MaxFileSize = 500KB
log4j.appender.shell-file.MaxBackupIndex = 1
log4j.appender.shell-file.layout = org.apache.log4j.PatternLayout
log4j.appender.shell-file.layout.ConversionPattern = %p %d (Shell): %m%n
I'm new to Open Remote and I've been digging into this yesterday. I'm running Open Remote on a Raspberry Pi.
You should be able to send individual command but I haven't been able to do this from Open Remote.
In this example using volume control of my Marantz receiver.
When you have Harmonyhubcontrol running, issue the following command to list all the devices;
./HarmonyHubControl email password hub ipaddress password list_devices
You'll get the following information:
LOGITECH WEB SERVICE LOGIN : BYPASSED
HARMONY COMMUNICATION LOGIN : SUCCESS
HARMONY COMMAND SUBMISSION : SUCCESS
PARSE ACTIVITIES AND DEVICES : SUCCESS
Devices Controllable via Harmony :
20686775 - Device 1
20779809 - Device 2
20686760 - Device 3
20671327 - Device 4
21160666 - Device 5
20674970 - Device 6
20671404 - Device 7
20672634 - Marantz AV Receiver
Write down the device Id of the receiver: 20672634
Next issue the command to list the Harmony hub configuration:
./HarmonyHubControl email password hub ipaddress password get_config
You'll get a complete listing of the configuration.
Now look for the device ID in combination with the word "command". In this example "VolumeUp"
./HarmonyHubControl email password hub ipaddress password issue_device_command 20672634 "Mute"
./HarmonyHubControl email password hub ipaddress password issue_device_command 20672634 "VolumeDown"
./HarmonyHubControl email password hub ipaddress password issue_device_command 20672634 "VolumeUp"
Posted by boefje at Feb 24, 2015 09:41
You know you can control Marantz devices that support IP directly, its built into openremote just use the Denon telnet commands they are the same for Marantz
Posted by glennl at Feb 26, 2015 05:25
Yes, I got that working Glenn but I used the Marantz as an example.
I'm struggling now however to call the HarmonyHubControl. I get the following error:
2015-02-25 22:38:23,673 INFO HTTP-Thread-3: Querying changed state from ChangedStatus table...
2015-02-25 22:38:23,674 INFO HTTP-Thread-3: Found: [device => null, sensorIDs => 106903182] in ChangedStatus table.
2015-02-25 22:38:23,675 INFO HTTP-Thread-3: ChangedStatusRecord:null-106903182 sensorID:106903182 statusChangedSensorID:Waiting...
2015-02-25 22:39:03,231 ERROR HTTP-Thread-4: Could not execute shell command: /home/pi/HarmonyHubcontrol/HarmonyHubControl
java.io.IOException: Cannot run program "/home/pi/HarmonyHubcontrol/HarmonyHubControl ": error=2, No such file or directory
I know it can't find the command but my Linux knowledge is next to nothing so I'm hoping someone could help me here.
I installed the HarmonyHubControl under /home/pi/HarmonyHubControl and the command to activate is called HarmonyHubControl.
pi@raspberrypi ~/HarmonyHubControl $ ls -d -1 $PWD/*
When I run it from the Pi command line, it works perfectly.
These are the settings I've used in Open Remote
Name: Volume Down Harmony
Protocal: Shell execution protocol
Command parameter: userid password logitech_hub_ip_address issue_device_command 20672634 "VolumeDown"
Polling interval: empty
Regular Expression : empty
Sensor Names: empty
Posted by boefje at Feb 26, 2015 06:30
Sorry for the late reply I have now had a chance to test this out myself on a Pi.
I recompiled mine for ARM as the version on that site was x86. - Here is the ARM version, but if you got it to open already you don't need this file http://wikisend.com/download/426710/HarmonyHubControl
Maybe the file isn't executable.
Have you tried doing cd /home/pi/HarmonyHubControl
chmod a+x HarmonyHubControl
Also I have tried running multiple commands via macros.
Having a 50ms delay enables me to change the cable channel to 111
Do you need "VolumeDown" in quotes i think it should work without quotes
Posted by glennl at Mar 01, 2015 09:48