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

[feature request] Select ID dialog should respect MQTT-style ID strings #330

Open
thohoj opened this issue Sep 4, 2022 · 3 comments
Open

Comments

@thohoj
Copy link

thohoj commented Sep 4, 2022

Since the topic of ioBroker nodes can be formatted as MQTT it should be possible to select IDs in the same format.

Current behavior is:
Changing an MQTT-style topic by invoking the SelectID dialog (...) does not initially locate the topic in the dialog. You have to navigate to the new topic and select it. After the dialog closes the new ID found in the topic is not in MQTT-style anymore. Instead you have to replace all '.' manually with '/'.

@Apollon77
Copy link
Contributor

I'm not sure if this makes sense that much ... It is still ioBroker and states and objkects have a defined structure with "." and no "/" ... Magically sonverting entered strings can also lead to very unexpected results for other users.

Additionally the selectID dialog is generic to be used by many adapters and is coming from Admin for that and this is a very special convenience wish for node-red in my eyes ...

@thohoj
Copy link
Author

thohoj commented Sep 4, 2022

Mmmh, I thought this would be a simple string replace in the callback function (iobroker.html, where newId is put into node-input-topic). I would have always replaced '.' with '/' there if oldId contains a '/'.

Since version 3.0.1 the default value for 'Topic format' was 'MQTT style'. I thought: ok, it's the future how topics will be handled by ioBroker.node-red, so let's use it everywhere in my flows. No need to distinguish between ioBroker and MQTT. But more and more I get the feeling to be mistaken.

In this case I think reverting my flows to ioBroker format is the best I can do now. It's just annoying to then have to remember to set this default value for 'Topic format' back to ioBroker every time I place an ioBroker node in my flows.

@Apollon77
Copy link
Contributor

basically I understand your thoughts ... and maybe yes it could be that easy (but then it gets pot even more unexpected for some users that were used to that it is different ...

We need to check and think about this

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

No branches or pull requests

2 participants