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

value as string, not number #24

Closed
DonatoD opened this issue Sep 17, 2021 · 4 comments
Closed

value as string, not number #24

DonatoD opened this issue Sep 17, 2021 · 4 comments

Comments

@DonatoD
Copy link

DonatoD commented Sep 17, 2021

Hi, I'm trying to send messages as string, since I would like to use mqtt with different panels other then time series, and I need text string
I tried with different syntax but nothing. I always get a very old data )(something like " 1750 ... ") and value 0.
Is that possible?

@atifali
Copy link
Contributor

atifali commented Oct 5, 2021

Hi @DonatoD can you please provide a sample of what the messages exactly look like.
Just to clarify currently this data source only supports the format as mentioned here: https://github.com/grafana/mqtt-datasource/blob/main/README.md#known-limitations
We are working on an enhancement to provide support for more complex messages. Follow here: #8

@DonatoD
Copy link
Author

DonatoD commented Oct 5, 2021

Hi thanks for your reply. I mean any kind of string, text. The format it's not a problem, it,s possible to arrange it as the mqtt datasource requires. This because I would like to use it with other panel, like html, svg, and so on so that I can have more control and custom result
So whatever kind of string/words not just number. Fo example if I try sto send "start" as payload, I see 0, or nothing. I have tryed with several format, includin json
{
"value1": "start",
"value2": "in_progress",
"value3": "unavailable"
}
Or even base64 that can be later on manipulated in a simple html. This is one thing really common and useful via mqtt

@atifali
Copy link
Contributor

atifali commented Oct 6, 2021

yes - agreed - this will be a super useful addition to what we are currently naively supporting in terms of just float64 values. strings are not currently supported. but this is coming soon with much better processing for any arbitrary JSON as mentioned here:
#8 (comment)

this is related to an earlier issue raised before as well: #19

closing this now since it's related to: #8

@atifali atifali closed this as completed Oct 6, 2021
@DonatoD
Copy link
Author

DonatoD commented Aug 7, 2022

Sorry, which the state of this integration? I tried to understand it by clicking on the various links: closed, enhancement, open ....
It's Like a stuck loop

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

No branches or pull requests

2 participants