Skip to content

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Oct 17, 2025

Example log lines in events.log:

2025-10-17 11:20:41.052 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'TestSwitch1' received command ON (source: org.openhab.core.io.console$openhab)
2025-10-17 11:28:59.527 [INFO ] [openhab.event.ItemCommandEvent      ] - Item 'TestSwitch1' received command OFF (source: org.openhab.io.homekit$15680270-F69A-C8A8-863A-2B6697D83A35)

@ccutrer ccutrer requested a review from a team as a code owner October 17, 2025 17:29
Signed-off-by: Cody Cutrer <cody@cutrer.us>
@ccutrer ccutrer force-pushed the event-source-logging branch from d71abe2 to d07161d Compare October 17, 2025 17:30
@ccutrer ccutrer changed the title include source with item event descriptions when present Include source with item event descriptions when present Oct 17, 2025
@rkoshak
Copy link

rkoshak commented Oct 17, 2025

That looks good and is easy to read. Thank you for addressing my request.

This raises a question. Does autoupdate add itself to the chain? When enabled it becomes a source for updates/changes to the Item in response to the command. Knowing that could be useful I would think.

@ccutrer
Copy link
Contributor Author

ccutrer commented Oct 17, 2025

autoupdate already sets its source to org.openhab.core.thing.autoupdate.

Do you think I should change that to org.openhab.core.thing$autoupdate (it technically comes from within the org.openhab.core.thing bundle, so treat AutoUpdateManager as the actor)?

And second, do you think AutoUpdateManager should append to the existing source, so that you'll see the source for the command that triggered the autoupdate? I'll admit I'm having a hard time deciding at which points the source should "reset" and which points it should append. I worry that once we have source getting set in commands from rules, and if that does appending from whatever triggered the rule, the source string could get surprisingly long. Especially if a rule accidentally triggers itself (but maybe that presents an opportunity for the framework to automatically prevent that?).

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 this pull request may close these issues.

2 participants