-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Publish to MQTT Topic with the space character #10258
Comments
Nice issue. The MQTT standard does indeed support spaces in topics but:
In the case of the publish command I use the space to seperate the topic from the payload. The easiest approach I think would be if I introduce a special character as space replacement (not %space% as it wastes too many characters.) Let me think about a useful character to use and see if this can work... |
@arendst you're friggin awesome, thank you! Don't get me wrong, the fix was super simple, just NodeRED with MQTT in then out using same payload. However, internal Tasmota space character ability would eliminate one of the thousand things already being maintained :) |
Add support character `#` to be replaced by `space`-character in command ``Publish`` topic (#10258)
Pls give it a try. |
Use Separator(like..@,#,$,&,*) instead of %Space% |
@Yash1903 I definitely saw that necessity and Theo's warning above about topics. However, with an already established environment with MANY things plugged in and some that automatically pass the space (SmartThings MQTT Bridge). It's just not realistic for me to start renaming stuff with underscores --- and it looks ugly :) @arendst I'll check it out ASAP and get back to you. |
@arendst I'm very impressed, mostly with your speed :) it worked like a charm, which I kinda expected with your level of work. Thanks for sharing your amazing firmware. The reliability and flexibility of local control is off the charts. Quick question: have you ever considered releasing tasmota.bin with SUPPORT_MQTT_EVENT enabled... or maybe tasmota-mqttsub.bin... just wondering if there has been enough interest for that or if I'm alone with that request. All the best! EDIT, forgot the output:
|
Closing this issue as it has been fixed. Support InformationSee Docs for more information. |
PROBLEM DESCRIPTION
I created a simple rule to publish to MQTT when the button is pressed multiple times. However, I cannot get the space character to work correctly in the MQTT topic. For folks using SmartThings MQTT Bridge, it literally takes the device name with the spaces and turns that into a topic. It would be great if something like %space% was as valid as %topic% is inside of rules, etc.
REQUESTED INFORMATION
Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
Try to publish from the console to a topic with a space character.
EXPECTED BEHAVIOUR
To have some ability for special character recognition.
SCREENSHOTS
If applicable, add screenshots to help explain your problem.
ADDITIONAL CONTEXT
Add any other context about the problem here.
(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: