Hello again,
I successfully integrated my Harmony Hub into openhab and I am even able to switch the actions.
Since the thing discovery also detected the single devices, I was eager to implement some features by using the buttonPress cha.nnel.
The first switch works flawlessly, the second one not at all.
All I get is the following logfile:
23:03:23.778 [INFO ] [smarthome.event.ItemCommandEvent ] - Item 'HarmonyHubWZBose' received command Volume Up
23:03:23.792 [TRACE] [monyhub.handler.HarmonyDeviceHandler] - Command Volume Up for harmonyhub:device:Wohnzimmer:14363514:buttonPress
23:03:23.795 [DEBUG] [monyhub.handler.HarmonyDeviceHandler] - Pressing button Volume Up on 0
23:03:23.798 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyHubWZBose changed from UNDEF to Volume Up
23:03:24.381 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyHubWZBose changed from Volume Up to UNDEF
No error, everything seems fine. Can anyone figure out whatâs wrong here?
Thanks!
Update: Seems like the button names of the device are not correct (e.g. âVolume upâ).
When I use âMuteâ, the device goes silent.
The question is: How can I know the names of the buttons per device?
In OH1 there was some information at the startup to be found in the logfile.
But where do I find this in OH2? Inside the admin-panels I did not see anything (unless Iâm blind)
The harmony-java-client project on GitHub provides a simple shell for querying a Harmony Hub, and can be used to retrieve the full configuration of the hub to determine ids of available activities and devices as well as device commands (buttons).
@rlkoshak, thank you. Iâve seen this before, but I stopped as I saw I had to install approx 150MB of Java development libraries to compile the binaries.
I am afraid, my openhab-Installation goes corrupt by installing these libraries. Is there really no interference on the same machine?
Looking at the Switch mapping for the second item, your switch is configured with strings, but your item is a Number type, you could try changing it to a string?
@t65shd, thank you - that happened because I tried everything to get it working. Iâve corrected it now. @Kai, @rlkoshak: I solved my problem by using an old openhab1 image starting in debug mode. Because in this mode, the Harmony hub binding prints out all actions, devices and available keys. For the Bose device it was âVolumeUpâ and âVolumeDownâ:
Donât know it thereâs a âdebugging modeâ in OH2, but it would be great to have the same option for looking up these informations easily without having to install a ~ 150MB develoment environment.
Possible values for the âbuttonPressâ channel can be determined via the REST API for channel-types, http://YourServer:8080/rest/channel-types. Search the JSON for âharmonyhub:deviceâ.
Click on âchannel-typesâ and next blue GET button, and in âResponse Bodyâ you will see all channels like this:
2017-08-11 21:26:43.432 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while calling handler: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@64838d rejected from java.util.concurrent.ScheduledThreadPoolExecutor@88878c[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
java.util.concurrent.ExecutionException: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@64838d rejected from java.util.concurrent.ScheduledThreadPoolExecutor@88878c[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:220)[99:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:189)[99:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[99:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[99:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager.receiveCommand(ThingManager.java:374)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
at org.eclipse.smarthome.core.items.events.AbstractItemEventSubscriber.receive(AbstractItemEventSubscriber.java:47)[99:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:192)[99:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:1)[99:org.eclipse.smarthome.core:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)[99:org.eclipse.smarthome.core:0.9.0.b5]
at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_121]
at java.lang.Thread.run(Thread.java:745)[:1.8.0_121]
Caused by: java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@64838d rejected from java.util.concurrent.ScheduledThreadPoolExecutor@88878c[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2047)[:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:823)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:326)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:533)[:1.8.0_121]
at java.util.concurrent.ScheduledThreadPoolExecutor.execute(ScheduledThreadPoolExecutor.java:622)[:1.8.0_121]
at java.util.concurrent.Executors$DelegatedExecutorService.execute(Executors.java:668)[:1.8.0_121]
at org.openhab.binding.harmonyhub.handler.HarmonyHubHandler.pressButton(HarmonyHubHandler.java:334)[184:org.openhab.binding.harmonyhub:2.1.0]
at org.openhab.binding.harmonyhub.handler.HarmonyDeviceHandler.handleCommand(HarmonyDeviceHandler.java:97)[184:org.openhab.binding.harmonyhub:2.1.0]
at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:377)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
at org.eclipse.smarthome.core.thing.internal.ThingManager$4.call(ThingManager.java:1)[106:org.eclipse.smarthome.core.thing:0.9.0.b5]
at org.eclipse.smarthome.core.common.SafeMethodCaller.executeDirectly(SafeMethodCaller.java:218)[99:org.eclipse.smarthome.core:0.9.0.b5]
⊠12 more
==> /var/log/openhab2/events.log <==
2017-08-11 21:26:43.446 [ItemCommandEvent ] - Item âOnkyoAVTest_SendButtonPressâ received command PowerToggle