Getting CPU temperature as a number in node red
<p>I need to get the CPU temperature from a raspberry pi to the Watson IoT Platform quickstart service.I am doing this by using an exec node in node red with the command <code>vcgencmd measure_temp</code>. I want to send this temperature value as a <strong>number</strong> to the Watson IOT node but my exec node returns the CPU temperature as <code>"temp=45.2</code>C"`
I want to get the temperature as a floating point number. For this I tried to use a function node to substring the temperature part from the string and use the parseFloat() function in javascript. But the function is notified as invalid. Can someone suggest me on how this should be done. I am a beginner in node-red.</p>