Closed kimifish closed 2 months ago
I'm not sure I understand the issue. Can you describe which behavior you would have expected and what the current behavior is?
Also this should probably
self.listen_event(self.player, self.command_received, ValueUpdateEventFilter())
be this:
self.listen_event(self.player, self.command_received, ItemCommandEventFilter())
When I press widget's Play and Pause, I see events in openhab's events.log and corresponding lines in habapp log as above. But when I press "Previous" and "Next" buttons, I see events in events.log, but callback method from my HABApp rule isn't called and no habapp logs printed out. Yes, event filter must be more specific, I've changed it just in case i was missing another event type.
Sorry, my fault. Changed event type to ItemCommandEvent, and everything works now. It turned out, that play and pause events are of type "ItemStateChangedEvent", and Prev/Next are of "ItemCommandEvent", and the last is not in inheritance with ValueUpdateEvent. So consistent, but so unobvious...
Test code like this
after pressing default player widget buttons "Previous", "Play/Pause", "Next" in mainUI outputs only this:
No Prev and Next events. =( Maybe I'm missing something?
events.log output does have those events: