Starting harmony activity with zwave wall plug

Hello,
I have a Yamaha AV Receiver setup with my Logitech Harmony to hear radio. It works.

Now I try to first switch on the yamaha receiver with a wallplug and than start the harmony hub activity

here are my items

Switch Z_way_switch_WallPlug3 "WallPlug3" <poweroutlet> (group_groundfloor_livingroom_switch_wallplug) { channel="zway:zwayDevice:smarthome:3:switchPowerOutlet-ZWayVDev_zway_3-0-37" }

String HarmonyWohnzimmerActivity  "Current Activity [%s]" { channel="harmonyhub:hub:wohnzimmer:currentActivity" }

my sitemap:

Text item=HarmonyWohnzimmerActivity
    Switch item=HarmonyWohnzimmerActivity label="Power Off" mappings=[ PowerOff="PowerOff", Radio="Radio", Film="Film", Fernsehen="Fernsehen" ]

my rules

rule "switch av receiver onoff"
    when
        Channel "harmonyhub:hub:wohnzimmer:activityStarting" triggered Radio
    then
        sendCommand(Z_way_switch_WallPlug3, ON)
        createTimer(now.plusSeconds(120), [ | sendCommand(HarmonyWohnzimmerActivity, Radio) ])
        logInfo("Harmony", "Hub is setting to Radio...")
end

But the harmony activity is not starting. What do I wrong???

Logs?

Events log

2019-02-26 19:29:30.239 [vent.ChannelTriggeredEvent] - harmonyhub:hub:wohnzimmer:activityStarting triggered Radio
2019-02-26 19:29:33.617 [ome.event.ItemCommandEvent] - Item 'Z_way_switch_WallPlug3' received command ON
2019-02-26 19:29:33.626 [nt.ItemStatePredictedEvent] - Z_way_switch_WallPlug3 predicted to become ON
2019-02-26 19:29:43.688 [vent.ChannelTriggeredEvent] - harmonyhub:hub:wohnzimmer:activityStarted triggered Radio

But this harmony events are coming from my remote…i want to retrigger the activity “Radio”

Error

2019-02-26 19:43:15.918 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'switch av receiver onoff': The name 'Radio' cannot be resolved to an item or type; line 20, column 48, length 5

You have a String item for current activity, me too

String HarmonyWohnzimmerActivity  "Current Activity [%s]" { channel="harmonyhub:hub:wohnzimmer:currentActivity" }

This string should change, at least that’s what it does for me.
So, I trigger a rule like this:

when 	Item HarmonyWohnzimmerActivity changed to Fernsehen

Or which part of your rule doesn’t work?

However you want to turn ON/OFF the Harmony Activity with the switch right? Why you have Harmony trigger in the when section?

Sorry, now I saw your Error.

Try

createTimer(now.plusSeconds(120), [ | HarmonyWohnzimmerActivity.sendCommand("Radio") ])

That’s a good question :wink:

I want to first switch on the wall plug and after a 120s it should trigger the activity “Radio” on my harmony hub…

But this

createTimer(now.plusSeconds(120), [ | HarmonyWohnzimmerActivity.sendCommand("Radio") ])

is not working

Let me understand:
You take your hand and push the button, so Radio should start?

Then your rule is really confusing

I want to press “Radio” Activity on my Harmony this should turn on my wallplug and after some seconds it should start the Activity “Radio”…

my wallplugs are zwave and i can’t start them with the harmony directly…

But this works for me.
Is it possible you are using the wrong “”?

If I do it Like this

rule "switch av receiver onoff"
    when
        Channel "harmonyhub:hub:wohnzimmer:activityStarting" triggered Radio
    then
        sendCommand(Z_way_switch_WallPlug3, ON)
        sendCommand(HarmonyWohnzimmerActivity, "Radio")
        logInfo("Harmony", "Hub is setting to Radio...")
end

In the event log I see
2019-02-26 19:29:30.239 [vent.ChannelTriggeredEvent] - harmonyhub:hub:wohnzimmer:activityStarting triggered Radio
2019-02-26 19:29:33.617 [ome.event.ItemCommandEvent] - Item ‘Z_way_switch_WallPlug3’ received command ON
2019-02-26 19:29:33.626 [nt.ItemStatePredictedEvent] - Z_way_switch_WallPlug3 predicted to become ON
2019-02-26 19:29:43.688 [vent.ChannelTriggeredEvent] - harmonyhub:hub:wohnzimmer:activityStarted triggered Radio

2019-02-26 20:29:30.239 [vent.ChannelTriggeredEvent] - harmonyhub:hub:wohnzimmer:activityStarting triggered Radio
2019-02-26 20:29:33.617 [ome.event.ItemCommandEvent] - Item ‘Z_way_switch_WallPlug3’ received command ON
2019-02-26 20:29:33.626 [nt.ItemStatePredictedEvent] - Z_way_switch_WallPlug3 predicted to become ON
2019-02-26 20:29:43.688 [vent.ChannelTriggeredEvent] - harmonyhub:hub:wohnzimmer:activityStarted triggered Radio

But with the timer only once…