MQTT Dash, Tasmota and exract data from Json and shows on mobile

652 views
Skip to first unread message

Dejan Škrinjar

unread,
Jan 14, 2020, 2:15:25 PM1/14/20
to Routix
Hi,

My ESP8266 runs Tasmota 8.1.0 and send data to Mosquitto MQTT on Raspberry. From Tasmota console I see it sends data in format:

08:00:45 MQT: tele/tasmota/SENSOR =
{
"Time":"2020-01-13T08:00:45",
"ANALOG":{"Moisture":18},
"DS18S20-1":{"Id":"000800BF631E","Temperature":21.9},
"DHT11":{"Temperature":21.0,"Humidity":34.0},"TempUnit":"C"
}


On Windows MQTT client I see that data arrives to MQTT server and also to Windows client in same shape

So I would want to show Time in MQTT DASH but don't know how to handle that?
I try to add topic:  tele/tasmota/SENSOR
then below Extract from JSON...  $.Time <- but no result

I try also with:  tele/tasmota/SENSOR
and then $.ANALOG  $.ANALOG.Moisture   <- also no show that "18" ?

What I am doing wrong?

Please answer me also hopw to extract values from
21.9           from "DS18S20-1":{"Id":"000800BF631E","Temperature":21.9},
21.0 and 34.0  from "DHT11":{"Temperature":21.0,"Humidity":34.0},"TempUnit":"C"

If I try to create one button to ON/OFF led that on ESP works excellent!

Thank you in advance!


Vadim Mostovoy

unread,
Jan 14, 2020, 2:23:28 PM1/14/20
to clownfis...@gmail.com, Routix
Did you try to not extract any data from JSON and see if received data as expected and to be sure that data received at all?
Also note that JSON value extraction and topic names are case sensitive. So, please double check this as well.
Also, tele/tasmota/SENSOR should be sub topic, not pub.

And another question: what kind of metric are you using? I believe this is "Text" metric.
--
Thanks,
Vadim Mostovoy


--
You received this message because you are subscribed to the Google Groups "Routix" group.
To unsubscribe from this group and stop receiving emails from it, send an email to routix+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/routix/3fef39a7-e7b9-4757-88ea-50a48eba476b%40googlegroups.com.

Dejan Škrinjar

unread,
Jan 14, 2020, 3:54:25 PM1/14/20
to Routix
>> Did you try to not extract any data from JSON and see if received data as expected

Yes I made test with http://www.jsonquerytool.com/ and there this works normally.


>> and to be sure that data received at all?

In windows MQTT client I see that data is received in JSON shape same as in Tasmota console so that prove as information is in MQTT broker but in MQTT Dash I don't know where to check if data is received and in what shape. Where and how to check that?


>> Also note that JSON value extraction and topic names are case sensitive. So, please double check this as well.

Yes I check that but no result.


>> Also, tele/tasmota/SENSOR should be sub topic, not pub.

Uff If I would know what is that difference? I am quite new in this area.


>> And another question: what kind of metric are you using? I believe this is "Text" metric.

Don't know what metrics. That are results measurments from different sensors ?

BR

Vadim Mostovoy

unread,
Jan 15, 2020, 12:30:46 AM1/15/20
to clownfis...@gmail.com, Routix
Just try to use "Text" type of control to see if data arrives at all.

--
Thanks,
Vadim Mostovoy

--
You received this message because you are subscribed to the Google Groups "Routix" group.
To unsubscribe from this group and stop receiving emails from it, send an email to routix+un...@googlegroups.com.

Burek Murek

unread,
Jan 16, 2020, 3:20:24 AM1/16/20
to Routix

Hi,

 

I found where was my problem.

In Tasmota send of JSON package was by default set to 300sec or 5mins and I newer wait so long.

Now when I set frequency to 5 seconds numbers and data appears and became visible :)

 

Thank you !

Reply all
Reply to author
Forward
0 new messages