# Reading String of Hex from T-zone RD05 problem

**URL:** <https://discourse.nodered.org/t/reading-string-of-hex-from-t-zone-rd05-problem/14679>\
**Category:** General\
**Created:** [23 August 2019 03:44 UTC](https://discourse.nodered.org/t/reading-string-of-hex-from-t-zone-rd05-problem/14679 "2019-08-23T03:44:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)\
**Post date:** [23 August 2019 08:42 UTC](https://discourse.nodered.org/t/reading-string-of-hex-from-t-zone-rd05-problem/14679/6 "2019-08-23T08:42:18Z")

</div>

If the string always follows the same format, couldn't you use `slice()` to extract whatever you need from it?  
I'm assuming that you probably only need the battery, temperature & humidity.  
Try this example where I extract the battery voltage `0E10`;

```auto
[{"id":"c0167800.11f068","type":"inject","z":"c53060.842a0fa","name":"","topic":"","payload":"AB2375GG3655K0E10J87B","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":210,"y":970,"wires":[["f3d7b97a.f156b8"]]},{"id":"f3d7b97a.f156b8","type":"function","z":"c53060.842a0fa","name":"","func":"var batt = msg.payload;\nbatt = batt.slice(11, -4); // Get battery voltage 0E10\nmsg.payload = parseInt(batt);\nreturn msg;","outputs":1,"noerr":0,"x":420,"y":970,"wires":[["bca2271.0c202d8"]]},{"id":"bca2271.0c202d8","type":"debug","z":"c53060.842a0fa","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":630,"y":970,"wires":[]}]

```

Good luck with **node-red-contrib-binary**. I tried. I failed!!

---

_[View the full topic](https://discourse.nodered.org/t/reading-string-of-hex-from-t-zone-rd05-problem/14679)._
