# Convert hex string to float

**URL:** <https://discourse.nodered.org/t/convert-hex-string-to-float/28893>\
**Category:** General\
**Created:** [24 June 2020 14:35 UTC](https://discourse.nodered.org/t/convert-hex-string-to-float/28893 "2020-06-24T14:35:45Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [25 June 2020 10:02 UTC](https://discourse.nodered.org/t/convert-hex-string-to-float/28893/20 "2020-06-25T10:02:22Z")

</div>

Good spot.

Updated the demo flow to use msg.payload.d.value...

```auto
[{"id":"46f2e36d.79332c","type":"debug","z":"8712f97c.b302e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1110,"y":100,"wires":[]},{"id":"5c3a833c.59b90c","type":"function","z":"8712f97c.b302e8","name":"","func":"msg.payload = Buffer.from(msg.payload.d.value,\"hex\").toString()\nreturn msg;","outputs":1,"noerr":0,"x":1110,"y":160,"wires":[["b874a36c.dd7ef"]]},{"id":"b874a36c.dd7ef","type":"debug","z":"8712f97c.b302e8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1290,"y":160,"wires":[]},{"id":"f1adb05f.c5deb","type":"inject","z":"8712f97c.b302e8","name":"","topic":"fake ibmiot","payload":"{\"d\":{\"value\":\"32352e3339\"}}","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":830,"y":100,"wires":[["5c3a833c.59b90c","46f2e36d.79332c"]]},{"id":"1cf837b5.8c22b8","type":"ibmiot in","z":"8712f97c.b302e8","authentication":"apiKey","apiKey":"8b357272.1f43","inputType":"evt","logicalInterface":"","ruleId":"","deviceId":"36C664","applicationId":"","deviceType":"+","eventType":"+","commandType":"","format":"json","name":"value","service":"registered","allDevices":false,"allApplications":"","allDeviceTypes":true,"allLogicalInterfaces":"","allEvents":true,"allCommands":"","allFormats":false,"qos":0,"x":870,"y":160,"wires":[["5c3a833c.59b90c"]]}]

```

---

_[View the full topic](https://discourse.nodered.org/t/convert-hex-string-to-float/28893)._
