# SM RTD stackable card with raspberry Pi and node red for measuring the temperature of PT 100

**URL:** <https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103>\
**Category:** General\
**Created:** [13 December 2022 05:44 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103 "2022-12-13T05:44:56Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [13 December 2022 05:44 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/1 "2022-12-13T05:44:56Z")

</div>

Hi there,  
I had a run the program which is in the document and in the NodeRED forum topic the thing is that i added 16 nodes RTD , 16 nodes of timestamp, 16 nodes of gauge , but now the problem is when i use one Hat i only need 8 nodes of each and when i use 2 i need 16 nodes of each, but is it possible to change this node in a code using function node where i can specify when i use 1 HAT it reads from 8 nodes and when i put 2 HAT it reads from 16 or etc HAT, second thing is that when the solution i got it used i2c in node which i have to find RTD address using i2c status and when i get it i have a problem with that because I have to check it repeatedly wheather it has the same address when i remove 2 HAT or not is there any solution for that to code using function node to find how many HAT are connected. Please help with this issue.

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [14 December 2022 06:00 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/2 "2022-12-14T06:00:17Z")

</div>

Anyone to reply this topic please reply

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [14 December 2022 09:26 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/3 "2022-12-14T09:26:35Z")

</div>

Have a read of this and follow what it tells you to do:

> [@Note to new Forum members](https://discourse.nodered.org/t/note-to-new-forum-members/71295):
>
> How to get the most help from the Forum Many new users come here for help with an issue they are having with Node-RED. I hope no one will be offended if I offer some unsolicited advice that might help them get the help they need. Many members of this group are willing to volunteer to assist others, as long as it is recognized that their time is valuable and should be treated with respect. They will generally provide guidance and encouragement, but do not expect complete solutions or large amoun…

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [14 December 2022 16:36 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/4 "2022-12-14T16:36:22Z")

</div>

What should I do now please tell me

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [14 December 2022 17:05 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/5 "2022-12-14T17:05:03Z")

</div>

Have you provided all the information suggested in the linked post? In particular show us what you have already done so that we can understand better.

Also, if you are a beginner to node red then please watch this playlist: [Node-RED Essentials](https://www.youtube.com/playlist?list=PLyNBB9VCLmo1hyO-4fIZ08gqFcXBkHy-6). The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [14 December 2022 17:35 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/6 "2022-12-14T17:35:23Z")

</div>

I read your post and really tried to understand it.

> What should I do now please tell me?

Which program did you run? Which document? Which forum post? Links please.

It would help if you give the details of the add-on boards, including URLs so we can see what they are.

It would help if you break up your question into short sentences with fewer "and"s.

Clearly state what you want to achieve, what you have tried and any successes so far.

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [14 December 2022 20:10 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/7 "2022-12-14T20:10:04Z")

</div>

@jbudd, @Colin  
I am using this device  
[8-Channel RTD Data Acquisition 8-Layer Stackable for Raspberry Pi – Sequent Microsystems](https://sequentmicrosystems.com/products/rtd-data-acquisition-card-for-rpi)  
then i connected PT 100 to RTD  
[61tAriSEv9L._SX522_.jpg (522×294) (media-amazon.com)](https://m.media-amazon.com/images/I/61tAriSEv9L._SX522_.jpg)  
and now what i have the flow which i am using as trial there are two types of flows and  
I have to use **i2c node and sequent microsystem node** which i have place the link of github  
[rtd-rpi/node-red-contrib-sm-rtd at master · SequentMicrosystems/rtd-rpi · GitHub](https://github.com/SequentMicrosystems/rtd-rpi/tree/master/node-red-contrib-sm-rtd)  
now what i have got the example from the forum and from github they are as follows  
1). This is Github Example which i edited as my needs

```auto
[{"id":"dedb85dc.b133d8","type":"tab","label":"Flow 2","disabled":false,"info":""},{"id":"1cbd1095.05225f","type":"ui_gauge","z":"dedb85dc.b133d8","name":"","group":"6d0e4a93.472f74","order":1,"width":6,"height":5,"gtype":"gage","title":"RTD 3","label":"°C","format":"{{value | number:0}}","min":0,"max":"300","colors":["#00b500","#e6e600","#ca3838"],"seg1":"","seg2":"","className":"","x":930,"y":480,"wires":[]},{"id":"63b12e71.9367c","type":"exec","z":"dedb85dc.b133d8","command":"rtd 2 read 3","addpay":false,"append":"","useSpawn":"false","timer":"","winHide":false,"oldrc":false,"name":"","x":570,"y":500,"wires":[["71453aabacce54fc"],[],[]]},{"id":"d75976cd.56d598","type":"inject","z":"dedb85dc.b133d8","name":"","repeat":"1","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":130,"y":240,"wires":[["705b3583.6e855c"]]},{"id":"705b3583.6e855c","type":"delay","z":"dedb85dc.b133d8","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":200,"y":500,"wires":[["63b12e71.9367c"]]},{"id":"71453aabacce54fc","type":"function","z":"dedb85dc.b133d8","name":"","func":"var newMsg = msg.payload;\nnewMsg ={payload: msg.payload};\nif (parseFloat(msg.payload) > 300 || parseFloat(msg.payload) < -60)\n{\n newMsg.payload = \"0.0\";\n}\nreturn newMsg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":747,"y":490.20001220703125,"wires":[["1cbd1095.05225f","75a349b67ce954de"]]},{"id":"75a349b67ce954de","type":"debug","z":"dedb85dc.b133d8","name":"debug 3","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":900,"y":560,"wires":[]},{"id":"6d0e4a93.472f74","type":"ui_group","name":"TEMPERATURE3","tab":"501903b1.f40adc","order":3,"disp":false,"width":"6","collapse":false},{"id":"501903b1.f40adc","type":"ui_tab","name":"RTD","icon":"dashboard","order":3,"disabled":false,"hidden":false}]

```

2). this is the example

```auto
[{"id":"40b1d6b4f29aaaf7","type":"tab","label":"Flow 1","disabled":false,"info":"","env":[]},{"id":"fbd74ccd506b91b3","type":"rtd","z":"40b1d6b4f29aaaf7","name":"Sensor 1","stack":"2","channel":"3","resistance":false,"payload":"payload","payloadType":"msg","x":540,"y":220,"wires":[["1cf60b3e2f029bcf"]]},{"id":"b16d20f32b014fd7","type":"inject","z":"40b1d6b4f29aaaf7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":280,"y":520,"wires":[["322c1f0cf8874247"]]},{"id":"53e8e537c0748614","type":"inject","z":"40b1d6b4f29aaaf7","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"1","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":210,"y":220,"wires":[["4a18a01eafe57521"]]},{"id":"322c1f0cf8874247","type":"i2c scan","z":"40b1d6b4f29aaaf7","name":"","busno":"1","x":460,"y":520,"wires":[[],["76664ce7c05cc423"]]},{"id":"76664ce7c05cc423","type":"debug","z":"40b1d6b4f29aaaf7","name":"debug 1","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":720,"y":520,"wires":[]},{"id":"1cf60b3e2f029bcf","type":"debug","z":"40b1d6b4f29aaaf7","name":"debug 2","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":780,"y":220,"wires":[]},{"id":"4a18a01eafe57521","type":"i2c in","z":"40b1d6b4f29aaaf7","name":"","busno":"1","address":"66","command":"","count":"1","x":390,"y":220,"wires":[["fbd74ccd506b91b3"]]}]

```

and this is the forum link  
[RTD 8 channel hat with Raspberry Pi 4 (Need help to read temperature from PT100) - General - Node-RED Forum (nodered.org)](https://discourse.nodered.org/t/rtd-8-channel-hat-with-raspberry-pi-4-need-help-to-read-temperature-from-pt100/50272)

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [15 December 2022 08:07 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/8 "2022-12-15T08:07:37Z")

</div>

@Colin @jbudd,  
I have provided the details regarding example, but the thing is that i have to add 24 nodes of rtd and gauges for this project if i place three HAT [8-Channel RTD Data Acquisition 8-Layer Stackable] ([8-Channel RTD Data Acquisition 8-Layer Stackable for Raspberry Pi – Sequent Microsystems](https://sequentmicrosystems.com/products/rtd-data-acquisition-card-for-rpi)) on raspberry pi, so I need a function where it should detect the HAT and define how many nodes should it require as it is multiple of 8.

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [15 December 2022 09:19 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/9 "2022-12-15T09:19:28Z")

</div>

Do you already have three of these stackable hats?  
You have to set jumpers to give them a unique "stack level" 0, 1 & 2.

There is a command line tool **rtd**.  
**rtd -list** shows "the connected cards, number of boards and stack level for every board"  
I imagine that this command will tell you which boards are attached to your Pi.

What does the **rtd -list** command show you when just one is connected to your Pi?  
When 2? 3?  
When none are connected?

From a glance at the documentation provided by Sequent, node-red-contrib-sm-rtd, which I think you have installed, is basically a wrapper for the rtd command.

I do not have one of these boards nor an internet connection at the moment so it's unlikely I can help any more. Good luck 🙂

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [15 December 2022 19:36 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/10 "2022-12-15T19:36:54Z")

</div>

anyone else who can provide me some solution on this.

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [18 December 2022 20:14 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/11 "2022-12-18T20:14:21Z")

</div>

@Steve-Mcl @Colin can you help me

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [18 December 2022 21:41 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/12 "2022-12-18T21:41:48Z")

</div>

You haven't answered the questions from @jbudd

Also, to me at least, it is not at all clear what you are having difficulty with. Note, though, that I am not familiar with these devices.

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [19 December 2022 05:30 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/13 "2022-12-19T05:30:13Z")

</div>

@Colin , ok i understand that you are not familiar with the device it's ok but i need help to create a function where if i am having a condition of 3 in function node i would have get a 24 nodes of gauge and if i use condition 1 i would only get 8 nodes of gauges. Actually the problem is that if I added the 24 gauges nodes it is very time consuming to edit and write the things in that so is there any simple way to add automatically if possible using function node. Because there is the problem if i add 24 nodes and i only need 8 nodes to see the remaining shows me different temperatures. Therefore it would be great if there is a solution on it.

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [19 December 2022 05:35 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/14 "2022-12-19T05:35:29Z")

</div>

@jbudd yes I tried as you told about the RTD. And i got the values as i testing my hat

the rtd -list command show me 0 when one hat is connected to Pi

When 3 Hat are connected it shows me 0,1,2 like this and says 3 connected  
When none are connected it doesn't show anything

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [19 December 2022 08:09 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/15 "2022-12-19T08:09:23Z")

</div>

Excellent. You have a way to tell which hats are connected.

> [@akshayjain](#):
>
> there is the problem if i add 24 nodes and i only need 8 nodes to see the remaining shows me different temperatures.

So if only one hat is connected you want 8 gauges to show on the dashboard. If two, 16 gauges and if three, 24 gauges.

I suggest that you define three dashboard groups: "Hat0", "Hat1", "Hat2". Then you can hide/show each group using a ui\_control node.

Let's say node-red-contrib-sm-rtd shows you that just the hat with ID zero is connected.  
Then you need to send to ui\_control a msg.payload like this

```auto
{ "group": { "show": ["TabName_Hat0"], "hide": ["TabName_Hat1","TabName_Hat2"]}}

```

> [@akshayjain](#):
>
> Actually the problem is that if I added the 24 gauges nodes it is very time consuming to edit and write the things in

I think that Flexdash, an alternative dashboard, does allow you to dynamically create widgets like this.  
No idea if it's more or less effort than copy/paste 8 gauges

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [19 December 2022 18:08 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/16 "2022-12-19T18:08:40Z")

</div>

@jbudd i have to show in one window means 1 hat consist of 8 Temp sensor like that i have to continue it till 24 Temp sensors so i cannot create dashboard groups because it will make a separate HAT1, HAT2, HAT3

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [19 December 2022 18:39 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/17 "2022-12-19T18:39:38Z")

</div>

Are you referring to the group names and/or space between groups?

 ![Untitled 2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/0/f07f7afcd0b67211b0c2acb7661ca5fa930724de.jpeg)

Pretty straightforward to remove both of these features of the dashboard.

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [19 December 2022 18:46 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/18 "2022-12-19T18:46:40Z")

</div>

@jbudd can you explain me i need to remove unwanted temp reading to 0 as i did not connected the temp sensor and second thing is that i added ui\_control but i dont know where to put the code you have gave me

---

<div class="post-metadata">

**Author:** ![jbudd](https://avatars.discourse-cdn.com/v4/letter/j/5f8ce5/32.png) [@jbudd](https://discourse.nodered.org/u/jbudd)\
**Post date:** [19 December 2022 18:53 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/19 "2022-12-19T18:53:30Z")

</div>

> [@akshayjain](#):
>
> can you explain me i need to remove unwanted temp reading to 0 as i did not connected the temp sensor

I have no idea what that means.

This is a commercial / industrial project I believe?

> i am using it [Node-red] for industrial purpose

So you are being paid for your expertise in Node-red.  
Who do you think is paying me and the others who have tried to help you?

> [@akshayjain](#):
>
> i added ui\_control but i dont know where to put the code you have gave me

If you search the forum for "ui\_control" I expect you will find examples of it's use.

---

<div class="post-metadata">

**Author:** ![akshayjain](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@akshayjain](https://discourse.nodered.org/u/akshayjain)\
**Post date:** [19 December 2022 18:59 UTC](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103/20 "2022-12-19T18:59:19Z")

</div>

@jbudd , I Think so that you are thinking that I haven't Mentioned it

> i am using it [Node-red] for industrial purpose

Also Note that the topic that you might be comparing is different and therefore i have mentioned on that topic and this topic is for my personal use where i have to monitor my children health also the room temperature i having two different sensors for monitoring them and you think that i am expertise in node red why would someone pay me for this to monitor my own children.

[Next page](https://discourse.nodered.org/t/sm-rtd-stackable-card-with-raspberry-pi-and-node-red-for-measuring-the-temperature-of-pt-100/72103.md?page=2)
