Hi,
I am using the following code in a rule to update the switches associated with my Harmony hub.
HarmonyCtrl?.members.forEach(harmonyAction|
postUpdate(harmonyAction, if(harmonyAction.name.removeStart("Harmony") == HarmonyActivity.state.toString) ON else OFF)
)
This worked previously very well, however (since an Openhab Update?) the following error occurs in my log:
2016-04-29 13:17:52.749 [ERROR] [o.o.c.s.ScriptExecutionThread ] - Error during the execution of rule ‘HarmonyControl’: Could not invoke method: org.openhab.model.script.actions.BusEvent.postUpdate(org.openhab.core.items.Item,java.lang.Number) on instance: null
HarmonyCtrl is a group the is comprised of the following items:
Group HarmonyCtrl "Harmony Control"
Switch HarmonyAppleTVMusic “AppleTVMusic” (HarmonyGrp, HarmonyCtrl)
Switch HarmonyAppleTVMovie “AppleTVMovie” (HarmonyGrp, HarmonyCtrl, HarmonyBeamer)
Switch HarmonyDVDBluRay “DVDBluRay” (HarmonyGrp, HarmonyCtrl, HarmonyBeamer)
Switch HarmonyiMacMedia “iMacMedia” (HarmonyGrp, HarmonyCtrl)
Switch HarmonyiMacMovie “iMacMovie” (HarmonyGrp, HarmonyCtrl, HarmonyBeamer)
If I replace in the postUpdate command about HarmonyAction with e.g. HarmonyAppleTVMusic everything works (of course not iteration here then). Thus it seems the the HarmonyActions seems to be null.
Any ideas what went wrong here? Again, I could bet it worked before and iterating over a Group like above should really work.
BR,
wartel