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

Add %topic% to rules #5522

Closed
to-scho opened this issue Mar 25, 2019 · 9 comments · Fixed by #7106
Closed

Add %topic% to rules #5522

to-scho opened this issue Mar 25, 2019 · 9 comments · Fixed by #7106
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended

Comments

@to-scho
Copy link

to-scho commented Mar 25, 2019

Have you look for this feature in other issues and in the wiki?
yes

Is your feature request related to a problem? Please describe.
One need device specific rules to have consistent MQTT topic namings like "stat/my-sonoff/my-stat when publishing MQTT in rules. I have 10+ devices using same rules and run out of var/mem when working around.

Describe the solution you'd like
Allow usage of %topic%, %prefix" and %grouptopic% in rules.

Describe alternatives you've considered
Store %topic% in e.g. %mem1% allows same rules and easy update for a bunch of devices.

Additional context
Add any other context or screenshots about the feature request here.

(Please, remember to close the issue when the problem has been addressed)

Repository owner deleted a comment from pgollor Mar 25, 2019
@ascillato2 ascillato2 changed the title Usage of %topic% in rules Add %topic% to rules Mar 25, 2019
@arendst
Copy link
Owner

arendst commented Mar 25, 2019

Storing a topic in %mem% won't be implemented any time soon as currently mem variables allow up to 10 characters while %topic% could be up to 33 characters. Mems were meant for numbers only.

@arendst arendst added the enhancement Type - Enhancement that will be worked on label Mar 25, 2019
@to-scho
Copy link
Author

to-scho commented Mar 25, 2019

That's why I currently need multiple mems to store topic. Sorry to not been precise enough, request is not to store %topic% in mem but to allow usage of %topic% in publish command.

@il300
Copy link

il300 commented Apr 7, 2019

This functionality is also needed. I have several identical devices with the same rules. It is necessary to distinguish them. The best way through the settings. Different rules are not the best choice.

@gooman-uk
Copy link

Likewise - would be very useful for the same reason as mentioned by @il300

@andikt
Copy link

andikt commented Apr 26, 2019

Yes, please, this would be a valuable feature. I also have multiple devices and want to use the same rules...

@gemu2015
Copy link
Contributor

have a look at this tread =>#5689

its easy with a script

@Jason2866
Copy link
Collaborator

Please close this issue. Script is supported now by Tasmota

@ascillato2
Copy link
Collaborator

Closing this issue as there is now a workaround using scripting. Please, check the documentation for an example for doing this. Thanks

@ascillato2 ascillato2 added the requested feature (hold over) Result - Feature that will not be added soon (out of scope) label Jun 3, 2019
@ascillato2 ascillato2 removed the requested feature (hold over) Result - Feature that will not be added soon (out of scope) label Dec 4, 2019
@ascillato2
Copy link
Collaborator

ascillato2 commented Dec 4, 2019

Merged PR #7106 for adding %topic% as a new variable for rules.

@ascillato2 ascillato2 added the fixed Result - The work on the issue has ended label Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Type - Enhancement that will be worked on fixed Result - The work on the issue has ended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants