Parse data from AHT1X-0x38

Hi can please someone help my parse data from AHT1X-0x38. Message is:

	"topic": "tele/tasmota_E9B332/SENSOR",
	"payload": "{\"Time\":\"2022-06-23T10:08:05\",\"AHT1X-0x38\":{\"Temperature\":27.2,\"Humidity\":47.7,\"DewPoint\":15.1},\"TempUnit\":\"C\"}",
	"qos": 0,
	"retain": false,
	"_msgid": "bcebcc7a418e0045"

i have use this but now this not work

problem ist sensor name
Thanks you wery much.

There’s a great page in the docs (Working with messages : Node-RED) that will explain how to use the debug panel to find the right path to any data item.

Pay particular attention to the part about the buttons that appear under your mouse pointer when you over hover a debug message property in the sidebar.


because AHT1X-0x38 has the special minus character in the object property
you have to access it instead with this alternative syntax

var c = msg.payload["AHT1X-0x38"].Temperature

which, as Steve showed, is what you get using the Copy path command

Thanks you Steve.

  • i have forget conversion between json string and json object after this conversion is possible to copy the path.

Yes, thanks you.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.