Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Recursive group membership found on an item #2916

Closed
jimtng opened this issue Apr 16, 2022 · 5 comments · Fixed by #2918
Closed

Recursive group membership found on an item #2916

jimtng opened this issue Apr 16, 2022 · 5 comments · Fixed by #2918

Comments

@jimtng
Copy link
Contributor

jimtng commented Apr 16, 2022

See https://community.openhab.org/t/recursive-group-membership-found/135192

I noticed this on 3.3.0-SNAPSHOT - Build #2852

Error log:

2022-04-16 22:10:20.165 [ERROR] [rest.core.item.EnrichedItemDTOMapper] - Recursive group membership found: BackPorch_Light2 is both, a direct or indirect parent and a child of gOutsideLights.
2022-04-16 22:10:20.166 [ERROR] [rest.core.item.EnrichedItemDTOMapper] - Recursive group membership found: BackPorch_Light1 is both, a direct or indirect parent and a child of gOutsideLights.
2022-04-16 22:10:20.166 [ERROR] [rest.core.item.EnrichedItemDTOMapper] - Recursive group membership found: BackYard_Light is both, a direct or indirect parent and a child of gOutsideLights.
2022-04-16 22:10:20.166 [ERROR] [rest.core.item.EnrichedItemDTOMapper] - Recursive group membership found: BackPorch_Light3 is both, a direct or indirect parent and a child of gOutsideLights.

Items:

Group gLights
Group gOutsideLights  (gLights)

Group:Switch:OR(ON,OFF) gBackYardLights "Backyard Lights" (gOutsideLights) {ga="Light", synonyms="Back Porch Lights, Back Yard Lights"}

Group:Switch:OR(ON,OFF) gBackPorch_Switch2 


Switch             BackPorch_Light2                         "Back Porch Light 2"                                                   <switch>           (gOutsideLights, gBackPorch_Switch2, gBackYardLights, gBackPorch)                                                                      ["Lightbulb"]                      { channel="mqtt:topic:backporch-switch2:power1", autoupdate="false", ga="Light", alexa="Light" }
Switch             BackPorch_Light1                         "Back Porch Light 1"                                                   <switch>           (gBackPorch, gOutsideLights, gBackYardLights, gBackPorch_Switch2)                                                                      ["Lightbulb"]                      { channel="mqtt:topic:backporch-switch2:power2", autoupdate="false", ga="Light", alexa="Light" }
Switch             BackYard_Light                           "Back Porch Light 4"                                                   <switch>           (gBackPorch, gOutsideLights, gBackYardLights, gBackPorch_Switch2)                                                                      ["Lightbulb"]                      { channel="mqtt:topic:backporch-switch2:power3", autoupdate="false", ga="Light" }
Switch             BackPorch_Light3                         "Back Porch Light 3"                                                   <switch>           (gBackPorch, gOutsideLights, gBackYardLights, gBackPorch_Switch2)                                                                      ["Lightbulb"]                      { channel="mqtt:topic:backporch-switch2:power4", autoupdate="false", ga="Light", alexa="Light" }
@jimtng
Copy link
Contributor Author

jimtng commented Apr 16, 2022

Pinging @J-N-K

@J-N-K
Copy link
Member

J-N-K commented Apr 16, 2022

I‘ll provide a fix later today.

@Rossko57
Copy link

Rossko57 commented Apr 17, 2022

The underlying trigger here is that the Item (a Switch type) is a direct member of more than one Group in the same hierarchy i.e. a direct member of a 'parent' and a direct member of a 'child'.
I don't think that is anything most people would want to do deliberately - would it make sense to re-word the message for this case, and still report, but as WARN rather than ERROR ?

@J-N-K
Copy link
Member

J-N-K commented Apr 17, 2022

The check was originally implemented to prevent an exception when parsing the data and there is no technical problem in the situation you describe. Are you aware of any negative/unexpected side-effects of this configuration?

@Rossko57
Copy link

Rossko57 commented Apr 25, 2022

Well, single commands issued through the 'parent' Group would be sent to the Item twice. openHAB doesn't mind, other stuff might.
Updates of the Item state would cause quite a bit of thrashing about re-calculating Group aggregations. Again, it should all work, but.

I just can't imagine the reason for a user to structure group membership like this by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants