Flow to get CPU die temperature from EPIC PR1

Here’s a quick little flow that uses a shell command to grab the temperature directly from a groov EPIC-PR1 processor. Note that you do not need shell access for this to work, the command does not require root access so Node-RED can execute it without any special permissions!

Also note that the number comes back as a string in milli-Celsius units – but the “convert” function block takes care of that by parsing the string to be a float and dividing by 1,000 to change the output to be decimal value in standard °C. This way you can easily graph it or display it in a gadget.

Here’s the text to import the flow and try it for yourself:

[{"id":"1d8921e9.b5dd4e","type":"inject","z":"e02f10b4.235de","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":180,"y":1220,"wires":[["ca904b32.a11178"]]},{"id":"ca904b32.a11178","type":"exec","z":"e02f10b4.235de","command":"cat /sys/devices/virtual/thermal/thermal_zone0/temp","addpay":false,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"get temp","x":340,"y":1220,"wires":[["455f6901.a1b438"],[],[]]},{"id":"455f6901.a1b438","type":"function","z":"e02f10b4.235de","name":"convert","func":"// Value returned is a string in milli-Celsius,\n// so convert string->float, and divide by 1,000 to get standard degrees C:\nreturn { payload : parseFloat(msg.payload)/1000 }","outputs":1,"noerr":0,"x":500,"y":1220,"wires":[["a02ca7a2.ccfb98"]]},{"id":"a02ca7a2.ccfb98","type":"debug","z":"e02f10b4.235de","name":"temp (deg C)","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":670,"y":1220,"wires":[]}]

Happy coding!


Awsome! Thanks @torchard

Note that this is not air temperature, but actual CPU chip (die) temperature, so it will go up and down with the CPU load.

Just to be clear what temperature this getting, its this one from groov Manage;

1 Like

Awesome, what would be the most simple way to get this temperature as a PAC control variable?

Simply add to your Node-RED pallet the PAC Read/Write nodes.
Once you do that, drag over a write node and make a variable in your PAC Control strategy and add that variable into the Node-RED node.

Let me know if you need more of a step by step for this (I suspect if you have used Node-RED before, you know your way around it).

I am a newbie, so I dont have experience with Node-RED, its a good opportunity to start using it though, I just thought there might be a more simple way without using Node-RED

You need Node-RED to do both the reading of the temperature and sending it to PAC Control… So its a non-optional part of the process.

Give me a moment to write a ‘how-to’ add to this flow and get the data into PAC Control.

First open Node-RED from the groov Manage page.

Then from the Node-RED editor, click on the menu and then Manage Palette.

Next click on the Install Tab and then type in ‘opto’ to search for our nodes.

I have already installed the PAC nodes, but you can add just them or all our nodes.

Next go into PAC Control configure mode and make a new float variable.
Make sure that you check the public option and the write option.

Download the strategy and run it.

Now drag over a PAC write node and double click it.
Set up a localhost connection.
Select Float from the drop down list and enter the EXACT same name as your variable in PAC Control.

Connect it to Terrys flow at the top of this forum post and deploy in Node-RED.

1 Like

Thanks for the information, the process works perfect, and now I am using Node Red to send me an email with a CSV datalog attachment.

I have the groov Epic system integrated inside an enclosure, with a fan that cools down the system if the temperature requires it, its quite noisy, so I would like to have it running only when needed, what would be an acceptable operating temperature for the CPU? I am observing around 50degC after 3 hours, and has not increased since then.

Glad to hear that you got things working. Node-RED is really powerful in how flexible it is.

As for an ‘acceptable’ temperature, its going to be hard to say… You are looking at the die temperature, not air temperature (EPIC is rated for -20 to +70 C), so it will be dependent on how busy your EPIC is and that can vary between shifts or production runs etc.
I would say that you now have the data at your fingertips, just keep an eye on it since it will vary between installs quite a bit.

Is there an equivalent for the RIO?

In short. No.
RIO does not have any CPU temperature sensing hardware included.

@loren1 Ok, this is as close as we can get on the RIO…
We can read the IO board temperature.
Note that this is not supported and we reserve the right to change or remove the MMP address at any time.

Quick and dirty Node-RED flow to get and convert the raw temperature count. Result is I/O board temperature in Deg C.

[{"id":"dc4bab3e.690c9","type":"groov-io-input","z":"db434575.d7e828","device":"86920c38.358db","dataType":"mmp-address","moduleIndex":"","channelIndex":"","mmpAddress":"0xF180D120","mmpType":"int32","mmpLength":"1","mmpEncoding":"ascii","sendInitialValue":true,"deadband":"0","scanTimeSec":"1.0","name":"","x":240,"y":200,"wires":[["eb52473e.83e078"]]},{"id":"54660eca.812e88","type":"debug","z":"db434575.d7e828","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":590,"y":200,"wires":[]},{"id":"eb52473e.83e078","type":"function","z":"db434575.d7e828","name":"Get CJT","func":"msg.payload = ((((msg.payload*0.625)/32767) - 0.129) / 0.000403) + 25;  \nreturn msg;","outputs":1,"noerr":0,"x":420,"y":200,"wires":[["54660eca.812e88"]]},{"id":"86920c38.358db","type":"groov-io-device","z":"","address":"localhost","msgQueueFullBehavior":"DROP_OLD"}]

This makes me :slight_smile: like I have the secret decoder ring. A personal touring machine.


thanks for this - is the ONLY way of achieving this with shell access?

Not sure which bit you are referring to…
Here is Terry’s original post which your post quotes;

oh dear, dunno how I missed that!
Thanks for pointing out the obvious :joy:

any way of getting the internal temps that are displayed below CPU temp?

1 Like