Cannot get the numeric data type in Mqtt sub topic
-
Hello
I suscribed a topic and send me information in json format, I´m tring read information but, it´s not posible. The message send for example is:
"{"time":1588587782,"sensor":782}"
if I read the same topic with alphabetical data type I get this
My configuration in data point is this :
I also tried $.sensor but not working, can someone help me?
-
Hi
I don't believe you need the "/" on the JSON pointer. Have you tried without it?
-
Yes not working...
-
Please provide your Mango version and MQTT module version.
also, can you be more specific with your description of not working?
What value do you get?
Are there errors in the ma.log file?
What alarms are being generated by the data source? -
hi,
the actual core version I'm using is 3.4.4, MQTT module version. 3.4.0the error is : the actual point has no value
I suscribed to the same topic with 2 data points:
a) first data point I selected data time Alphanumeric - Subscribed topic type: Plain
I get for example {"time":1588587782,"sensor":782} so is 100% working
b) second data point I selected data time: Numeric - Subscribed topic type: JSON - Json pointer for value: /sensor or $.sensor or just sensor
I get no data while the datapoint a is getting all the points correctly
I don't know where to find the ma.log please help so I can give you more info
Thanks
-
You can get the log file in your mango home directory/logs/ma.log
Did you check if there are any alarms being generator on the data source? in the current alarms -
hi,
in the end the datapoint started working by itself and seem to work 100%,
I used /value as JSON pointer for value in this message:{"tsE":1589204279000,"tsM":"20200511153800","value":23118}
I also need to use the topic type "JSON with Timestamp" but I could not get the right value as timestamp so for example for the message:
{"tsE":1589204279000,"tsM":"20200511153800","value":23118}
tsM = timestamp in format yyyyMMddHHmmss
I used the following parameters but is not working:
the error is:
MQTT Client':
Error during read topic: "gipo/inv7/wh/eday"
datapoint: "MQTT Client - 0gipo/inv7/wh/eday -- /tsM"
payload: "{"tsE":1589207111000,"tsM":"20200511162512","value":25105}"
error: "Text '20200511162512' could not be parsed: Unable to obtain Instant from TemporalAccessor: {},ISO resolved to 2020-05-11T16:25:12 of type java.time.format.Parsed"I also want to upgrade the Mqtt module but in the modules pages I see:
What I can do?
Thanks for your help
Rgards