Harmony issue sending multiple button presses

I am new so please do not assume anything, it is extremely possible that I am the issue here.

I am sending a button presses to my Nvidia Shield TV using the Harmony binding.
I can successfully send button presses for individual single actions but currently struggling for the correct outcome when there is a sequence of key presses.

Below is I believe all the relevant OH2 config AND the log output that shows the
event sequence. I am trying to press the home key followed by down arrow, and then select. Instead what I see is the home screen appears fine, pressing then I see down followed by a return (back up), then right with a return (goes left) and then it selects; which is of course the incorrect item as it has not really gone anywhere.

I am thinking the UNDEF log entries correspond to the return but not sure how to stop it from happening.

item:

// Nvidia Shield 
String HarmonyLivingRoomNvidia  "Shield" (gMain) { channel="harmonyhub:device:LivingRoom:44390365:buttonPress" }

rules:

rule "scene-watch"
when
//Item sleep_state changed to ON
Item SCN_Watch received command
then
if (receivedCommand == 0) {
	logInfo("scene.rules", "Scene Watch Initialsed")
	}
if (receivedCommand == 1) {
	// Kodi
	logInfo("scene.rules", "Scene Watch KODI Start")
	HarmonyLivingRoomNvidia.sendCommand("Home")
	logInfo("scene.rules", "Pressed Home")
	logInfo("scene.rules", "Pressed Down")
	Thread::sleep(1000)
	logInfo("scene.rules", "Pressed sleep")
	HarmonyLivingRoomNvidia.sendCommand("DirectionRight")
	logInfo("scene.rules", "Pressed Right")
	logInfo("scene.rules", "Scene Watch KODI End")
	}
end

sitemap:

	Frame label="Scenes" {
		Switch item=Lights mappings=[OFF="All Off"]
		Switch item=sleep_state label="Sleep Mode" mappings=[OFF="Bedtime", ON="Wake Up"]
		Switch item=SCN_Watch label="Watch" icon="television" mappings=[1="Kodi", 2="Plex", 3="Netflix"]
	}

Log Output:
16:23:11.222 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘SCN_Watch’ received command 1
16:23:12.205 [INFO ] [e.smarthome.model.script.scene.rules] - Scene Watch KODI Start
16:23:12.210 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘HarmonyLivingRoomNvidia’ received command Home
16:23:12.211 [INFO ] [e.smarthome.model.script.scene.rules] - Pressed Home
16:23:12.213 [INFO ] [e.smarthome.model.script.scene.rules] - Pressed Down
16:23:12.452 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyLivingRoomNvidia changed from UNDEF to Home
16:23:12.454 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyLivingRoomNvidia changed from Home to UNDEF
16:23:13.220 [INFO ] [e.smarthome.model.script.scene.rules] - Pressed sleep
16:23:13.230 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘HarmonyLivingRoomNvidia’ received command DirectionRight
16:23:13.241 [INFO ] [e.smarthome.model.script.scene.rules] - Pressed Right
16:23:13.245 [INFO ] [e.smarthome.model.script.scene.rules] - Scene Watch KODI End
16:23:13.578 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyLivingRoomNvidia changed from UNDEF to DirectionRight
16:23:13.667 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyLivingRoomNvidia changed from DirectionRight to UNDEF
16:23:15.291 [INFO ] [marthome.event.ItemStateChangedEvent] - NetworkDevice1921680252_Online changed from OFF to ON

Hi,

i think it’s a problem with the binding.
Try using the latest snapshot from the binding. You can find it here.

First you have to uninstall the binding and then put the *.jar file into the addons folder.

Thanks for the link.

I have downloaded the .jar file
uninstall the OH2 harmonhub binding 2.0.0 using paperui

copied the jar file to /usr/share/openhab2/addons
set permissions to 774 bundle:start org.openhab.binding.harmonyhub
set ownership to openhab:openhab
I rebooted my raspberry pi
at the console I checked the bundle:list

242 | Active | 80 | 2.1.0.201705311713 | HarmonyHub Binding

the new snap shot shows up

I also tried: bundle:start org.openhab.binding.harmonyhub
it accepted the command without complaint.

checking the paperui it still shows HarmonyHub binding 2.0.0 in the addons
section.
Anything else I need to do?

Thanks

Paul

.

242 | Active | 80 | 2.1.0.201705311713 | HarmonyHub Binding

That looks good.
Does the behavior with the fast buttonpress still exist?

Btw: My harmony binding is shown as not installed in the paperui.

Ok so I have install the harmonyhub and then run the same sort of tests again.
The actual movement observed has not changed. i.e. I if I send home, down,down I will see home, down, up, down.

The log does not quite match up with the rules, not sure if thats important.

16:25:16.695 [INFO ] [e.smarthome.model.script.scene.rules] - Scene Watch KODI Start
16:25:16.700 [INFO ] [e.smarthome.model.script.scene.rules] - Pressed Down
16:25:16.702 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘HarmonyLivingRoomNvidia’ received command DirectionDown
16:25:16.705 [INFO ] [e.smarthome.model.script.scene.rules] - Pressed Down
16:25:16.707 [INFO ] [e.smarthome.model.script.scene.rules] - Scene Watch KODI End
16:25:16.715 [INFO ] [smarthome.event.ItemCommandEvent ] - Item ‘HarmonyLivingRoomNvidia’ received command DirectionDown
16:25:16.736 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyLivingRoomNvidia changed from UNDEF to DirectionDown
16:25:16.738 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyLivingRoomNvidia changed from UNDEF to DirectionDown
16:25:16.743 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyLivingRoomNvidia changed from DirectionDown to UNDEF
16:25:16.748 [INFO ] [marthome.event.ItemStateChangedEvent] - HarmonyLivingRoomNvidia changed from DirectionDown to UNDEF

Here is the relevant section fro the rules:

if (receivedCommand == 1) {
	// Kodi
	logInfo("scene.rules", "Scene Watch KODI Start")
	HarmonyLivingRoomNvidia.sendCommand("DirectionDown")
	logInfo("scene.rules", "Pressed Down")
	HarmonyLivingRoomNvidia.sendCommand("DirectionDown")
	logInfo("scene.rules", "Pressed Down")
	logInfo("scene.rules", "Scene Watch KODI End")
	}

After further playing.
I can confirm that using the buttons in my sitemap I can send multiple commands one after another. I can also do so using the console; I just cannot do it using rules.

Any workaround you can think of while this is investigated?

Thanks

Paul