OH3 DSL Rule changes regarding Groups?

Have there been changes somehow to the DSL Rule Engine that there are problems when using Groups? I have a rule where i have following in the “When” part:

BLIND_D.allMembers.

The log throws me a:

“The name ‘BLIND_D’ cannot be resolved to an item or type”

It is configured as Group inside my Items file and also “linked” to the Items (visible correctly in MainUI)
So is this kind a JS part which won’t work anymore in OH3 or am i missing something?

I think we ought to see the whole rule here.
Form like
BLIND_D.allMembers.
has never been supported in the ‘when’ section, i.e. as a DSL rule trigger.
There is a ‘Member of xxx’ rule trigger for use with Groups.

Oh yea my mistake. Thought i did paste the whole section.
Here you go:

rule “TimeSchedule”

when
Time cron “0 0/10 * 1/1 * ? *”

then
var String json = SavedSchedule.state.toString

var id = “?”
val tage = newArrayList(‘mo’, ‘di’, ‘mi’, ‘don’, ‘fr’, ‘sa’, ‘so’)
val String actTime = now.toString(“HHmm”)
val String actDay = now.toString(“E”)
var r_lam1 = “”
var r_lam2 = “”
var r_auf = “”
var r_zu = “”

BLIND_D.allMembers.forEach[ i |

id = “?”
switch(i.name) {
case “W_Raffstore_1”: { id = “WZ1” }
case “W_Raffstore_2”: { id = “WZ2” }
case “W_Raffstore_3”: { id = “WZ3” }
case “K_Raffstore_1”: { id = “K1” }
case “K_Raffstore_2”: { id = “K2” }
case “K_Raffstore_3”: { id = “K3” }
case “B_Raffstore”: { id = “B” }
case “Zimmer_1_Jalousie1”: { id = “Mi1” }
case “Zimmer_1_Jalousie2”: { id = “Mi2” }
case “Zimmer_1_Jalousie3”: { id = “Mi3” }
case “Zimmer_2_Jalousie1”: { id = “Ma1” }
case “Zimmer_2_Jalousie2”: { id = “Ma2” }
case “Zimmer_2_Jalousie3”: { id = “Ma3” }
case “Zimmer_3_Jalousie”: { id = “E” }
}

  var day = actDay.toLowerCase
  if (day == "do") {day = "don"}
  var req1 = "$." + id + "." + day + ".LAM1"
  var req2 = "$." + id + "." + day + ".LAM2"
  var req3 = "$." + id + "." + day + ".AUF"
  var req4 = "$." + id + "." + day + ".ZU"
  r_lam1 = transform("JSONPATH", req1, json)
  r_lam2 = transform("JSONPATH", req2, json)
  r_auf = transform("JSONPATH", req3, json)
  r_zu = transform("JSONPATH", req4, json)

  logDebug("TimeSchedule", "Raffstore: " + i.name + " | " + day + " | Werte: " + r_lam1 + " | " + > r_lam2 + " | " + r_auf + " | " + r_zu + " | ")
  
  if (actTime == r_lam1 && (id == "WZ1" || id == "WZ2" || id == "WZ3" || id == "K1" || id == "K2" || > id == "K3" || id == "B" || id == "E")) { sendCommand(i.name + "_Lam", '60')}
  else if (actTime == r_lam1 && (id == "Ma1" || id == "Ma2" || id == "Ma3" || id == "Mi1" || id == "Mi2" || id == "Mi3")) {  sendCommand(i.name + "_Lam", '70') }
  else if (actTime == r_lam2 && (id == "WZ1" || id == "WZ2" || id == "WZ3" || id == "K1" || id == "K2" || id == "K3" || id == "B" || id == "E")) { sendCommand(i.name + "_Lam", '40') }
  else if (actTime == r_lam2 && (id == "Ma1" || id == "Ma2" || id == "Ma3" || id == "Mi1" || id == "Mi2" || id == "Mi3")) { sendCommand(i.name + "_Lam", '60') }
  else if (actTime == r_auf) { sendCommand(i.name, 'UP')}
  else if (actTime == r_zu) {sendCommand(i.name, 'DOWN')}
    else {logDebug("TimeSchedule", "OOPS")}   

]

end

Its not perfect but it did its job under 2.5.8. Did hope that it maybe would work also in OH3 with habpanel for the moment till i have time to re-do it and use it on the MainUI

Well, the plain meaning of the message is that you do not have a Group type Item named BLIND_D
Having sorted out the when-section confusion, I see nothing in your rule that looks like a problem cause, and take the error at face value.

Yea i know but its correctly defined inside my items file and also visible in MainUI.

Group BLIND_D

Rollershutter Wohnzimmer_Raffstore_Couch “Raffstore Couch” (EG , BLIND_D) [ “Switchable” ] { channel=“knx:device:LOX:JRAS823051_2:Channel_F_Move” }

so it should work 'cause everthing is there. Checked everything multiple times before reaching out here. It also works if i set up a fresh OH2.5 with same items and rules file.

Add another log before your allMembers attempt, to make sure your Group Item is visible to the rule
logInfo("test", "item " + BLIND_D.name)

Does this Group contain nested Groups? It’s possible there is a OH3 bug in allMembers if there are none, or something.
Try simpler
BLIND_D.members.forEach[ i |

1 Like

Thanks for your help. The items are in no nested groups. Indeed changing allMembers tomembers did the job, so there seems to be kind a bug.