thomasnordquist / MQTT-Explorer

An all-round MQTT client that provides a structured topic overview
https://mqtt-explorer.com
Other
3.09k stars 291 forks source link

Unable to show the graph when the sensor data is under another layer of JSON level #694

Open khgoh99 opened 1 year ago

khgoh99 commented 1 year ago

With the JSON data as below,

{ "deviceid": "WIRIO3_68B6B329DECC", "rssi": -44, "pktno": 1231379212, "sec": 1672980864, "t.envsensor.param": { "sht4x_temp": 30.1, "sht4x_hum": 68.2, "bmp280a_pressure": 1013 } }

When I want to show the graph for attribute "sht4x_temp", the graph will show "NO DATA".

Mynijo commented 1 year ago

I have tested it and get a graph even of values that are 3 layers deep.

It looks like the problem are the dots in the key "t.envsensor.param"

khgoh99 commented 1 year ago

As I understand, JSON format do not limit the use of dot in the key. Does this mean that this is consider bug in the code?

Mynijo commented 1 year ago

Without looking into the code I would at least assume that.

Until then, you probably only have a dirty quick fix by throwing the dots out of the key or send the information additionally without dots.