Reading String of Hex from T-zone RD05 problem

This may get you started...

[{"id":"da83610d.0f233","type":"inject","z":"1d34d3c1.70a2dc","name":"simulate TZ data","topic":"","payload":"7E 0D 12 34 56 62 16 01 79 00 0E 10 00 EC 4F 72 03","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":420,"y":580,"wires":[["2d8bf6a5.5e34aa"]]},{"id":"2d8bf6a5.5e34aa","type":"function","z":"1d34d3c1.70a2dc","name":"Parse data","func":"let parsed = {} \nlet p = msg.payload\nparsed.parts = p.split(\" \");\nparsed.data = p;\nparsed.datalength = parseInt(parsed.parts[1],16);\nparsed.id = parsed.parts[2] + parsed.parts[3] + parsed.parts[4] ;\nparsed.tagId = parsed.parts[5] + parsed.parts[6] + parsed.parts[7] + parsed.parts[8] ;\nparsed.tagStatus = parseInt(parsed.parts[9] ,16);\nparsed.batteryVoltage = parseInt(parsed.parts[10] + parsed.parts[11] ,16);\nparsed.temperature = parseInt(parsed.parts[12] + parsed.parts[13] ,16);\nparsed.humidity = parseInt(parsed.parts[14],16);\nparsed.checkCode = parseInt(parsed.parts[15],16);\n\nmsg.payload = parsed \nreturn msg;","outputs":1,"noerr":0,"x":530,"y":620,"wires":[["1a1b15d4.375f1a"]]},{"id":"1a1b15d4.375f1a","type":"debug","z":"1d34d3c1.70a2dc","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":650,"y":660,"wires":[]}]
1 Like