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

Unify filter mechanism #4600

Open
spacemanspiff2007 opened this issue Feb 16, 2025 · 0 comments
Open

Unify filter mechanism #4600

spacemanspiff2007 opened this issue Feb 16, 2025 · 0 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@spacemanspiff2007
Copy link
Contributor

spacemanspiff2007 commented Feb 16, 2025

During the discussion of #4550 @kaikreuzer argued that using RegEx is not typically used in "the web".
However openHAB API users already know how to use a RegexFilter when requesting item metadata.

Image

I know it seems the world is getting dumber every day but I don't think that applies to the openHAB users who are obviously the most brilliant and intelligent individuals and thus exempt from the general cognitive decline.
[In case you are already getting your pitchforks and torches ready: this is a joke]

How can it be that in a simple api endpoint regex is not too complicated yet when setting up a websocket filter which is a magnitude harder regex suddenly is too difficult. It just doesn't make any sense.

In #3764 another user explicitly requested a regex filter which was conveniently ignored.

The migration argument when switching over from SSE is void because currently there is already a filter mechanism which does apply to the event type. Websockets exist since some time so any possible migration would have already been done long ago.
Additionally if the filter is set up wrong it will not return any event so it's immediately clear that there is an issue and thus it's not possible to make an error unnoticed.
There is also a clear and easy migration path which can easily added to the docs: replace * with .*

It's very strange and misleading that there is a custom openHAB implementation to filter topics.
I was already confused and assumed that the * wildcard will only match one level in the topic, yet it matches anything.

Please either directly expose the regex or adhere to a topic filtering standard (e.g. the topic filtering used MQTT).

@spacemanspiff2007 spacemanspiff2007 added the bug An unexpected problem or unintended behavior of the Core label Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

No branches or pull requests

1 participant