I receive a string of data from my sensor via MQTT but I do not know how to retrieve a specific variable (e.g. temperature) from the string.
From the debug window:
msg.payload : string[323]
{'data_format': 10, 'humidity': 66.0, 'temperature': 21.6, 'pressure': 1002.83, 'acceleration_total': 0.005, 'acceleration_x': 0.003, 'acceleration_y': 0.004, 'acceleration_z': 0.0, 'v_bat': 3.199, 'v_cap': 0.0, 'rspi': 0.0, 'mic': 46, 'freq': 1.0, 'counter': 228, 'dropPackets': 194, 'time': '2021-02-16T08:22:22:866734Z'}
I often use the JSON converter and simply set my message to msg.payload.temperature and I will be able to get the temperature data. However, now there is an error when I use the converter or the payload is undefined without the JSON converter. Please help!