# Rflink, Node Red and Gladys

**URL:** <https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844>\
**Category:** Tutoriels\
**Tags:** node-red\
**Created:** [January 22, 2022, 10:51pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844 "2022-01-22T22:51:45Z")\
**Posts on this page:** 9\
**Page:** 6

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [January 26, 2025, 7:33am UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/154 "2025-01-26T07:33:54Z")

</div>

> [@elfedagger](#):
>
> I also have this problem

Hello @elfedagger  
Which ports are your devices connected to?

---

<div class="post-metadata">

**Author:** ![elfedagger](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/elfedagger/32/13658_2.png) [@elfedagger](https://community.gladysassistant.com/u/elfedagger)\
**Post date:** [January 26, 2025, 12:25pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/155 "2025-01-26T12:25:38Z")

</div>

On USB0 I have my Zigbee dongle, on USB1 I have my RFlink and on USB2 my Bluetooth dongle.

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [February 20, 2025, 12:19pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/156 "2025-02-20T12:19:15Z")

</div>

21 messages have been split into a new topic: [Node-RED integration: Give the Docker container access to USB ports](https://community.gladysassistant.com/t/integration-node-red-donner-acces-aux-ports-usb-au-container-docker/9392)

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [January 28, 2025, 5:29pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/164 "2025-01-28T17:29:17Z")

</div>

> [@Psoy](#):
>
> If you have time look at what I wrote and tell me if it suits you( it’s located just above paragraph 7)

Hello,  
I corrected some comments to remove the accents.

```auto
let input = msg.payload; // message received by the Serial node ; exemple : 20;26;Oregon TempHygro;ID=2D6D;TEMP=800f;HUM=61;HSTATUS=0;BAT=LOW; . Temperature is equal to -1.5deg
var Sign = input.substring(36,37); // read the 1st character of the temperature, to know if the temperature is \u003c 0
var Neg = 0; // digit to add at the beginning if temperature \u003c 0
var Temp = input.substring(36, 40); // read the temperature as an integer over 4 characters, the 1st being the positive (0) or negative (8) indicator
var TempNeg = input.substring(37, 40); // read the last 3 digits, those relevant for the temperature value

// Handling negative temperatures
if (Sign == 8) { // if the first character is 8, we are dealing with a negative temperature
var CreationTempNeg = Neg.toString() + TempNeg; // transform the temperature to have it over 4 relevant characters ; replace the first character with a 0
var NouvelleTempNeg = parseInt(CreationTempNeg, 16); // convert the temperature value from hex to decimal
msg.payload = -1 * (NouvelleTempNeg / 10); // divide the decimal temperature value by 10, because it arrives 10 times larger, but above all multiply by -1 to make it negative
}
// Handling positive temperatures
if (Sign == 0) { // if the 1st character of the temperature value is 0, the temperature is positive
Temp = parseInt(Temp, 16);
msg.payload = Temp / 10;
}
return msg;

```

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [January 28, 2025, 5:37pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/165 "2025-01-28T17:37:56Z")

</div>

> [@Psoy](#):
>
> By the way, I’d appreciate it if you could explain it to me — how do you transform the frame into an array?

Here’s how I did it :

 ![01_Gaetan_Node-red_RFlink_Flow-1](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/c/4/c4a7759ecd28c9e850e14786ad42e33ead37be28.png)  
 ![02_Gaetan_Node-red_RFlink_ChangeNode](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/7/3/73d0e8b16d55c84eef24e66c346c7dee11ccc675.png)  
 ![03_Gaetan_Node-red_RFlink_SwitchNode-1](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/4/4/4448385ab76046ee4eb077094e05d8c1ca29711d.png)  
 ![04_Gaetan_Node-red_RFlink_Debug-1](https://gladys-assistant-community.b-cdn.net/uploads/default/original/3X/9/e/9e4185879e421cdba8588e8f4d80423d8391afdb.png)

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [January 28, 2025, 7:25pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/167 "2025-01-28T19:25:14Z")

</div>

> [@gaetanb76](#):
>
> Hello,  
> I corrected some comments

Thanks @gaetanb76  
I thank you for your correction, I hope I didn’t write anything stupid. One small clarification, you can’t modify the tutorial yourself? I have to copy/paste, right?

> [@gaetanb76](#):
>
> Here’s how I did it:

Je te remercie, je vais etudier ta methode  
Thank you very much, have a good evening.

---

<div class="post-metadata">

**Author:** ![gaetanb76](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/gaetanb76/32/5911_2.png) [@gaetanb76](https://community.gladysassistant.com/u/gaetanb76)\
**Post date:** [January 28, 2025, 7:27pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/168 "2025-01-28T19:27:58Z")

</div>

> [@Psoy](#):
>
> One small clarification: you can’t edit the tutorial yourself? Do I have to copy/paste, right?

Exactly.

> [@Psoy](#):
>
> Thank you, I’ll study your method

You’re welcome.  
Have a good evening

---

<div class="post-metadata">

**Author:** ![pierre-gilles](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/pierre-gilles/32/5886_2.png) [@pierre-gilles](https://community.gladysassistant.com/u/pierre-gilles)\
**Post date:** [February 20, 2025, 12:28pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/169 "2025-02-20T12:28:51Z")

</div>

Hi everyone!

To keep this thread clear and structured, I did two things:

- I created a new thread dedicated to development: [Intégration Node-RED: Donner accès aux ports USB au container Docker](https://community.gladysassistant.com/t/integration-node-red-donner-acces-aux-ports-usb-au-container-docker/9392)

- I deleted about fifty messages that were not essential to this tutorial.

In the future, please keep this thread reserved only for discussions about the tutorial 🙂

👉 For any development request, create a thread in **#Demande de fonctionnalités**

👉 For any questions or debugging help, open a thread in **#Configuration**

A forum remains readable when one thread = one specific topic.

Don’t hesitate to create new threads instead of reusing old discussion threads; this avoids confusion and makes it easier to follow the conversations!

---

<div class="post-metadata">

**Author:** ![Psoy](https://gladys-assistant-community.b-cdn.net/user_avatar/community.gladysassistant.com/psoy/32/9005_2.png) [@Psoy](https://community.gladysassistant.com/u/Psoy)\
**Post date:** [February 20, 2025, 12:48pm UTC](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844/170 "2025-02-20T12:48:07Z")

</div>

> [@pierre-gilles](#):
>
> 👉 For any development request, create a topic in **#Demande de fonctionnalités**
> 
> 👉 For any question or debugging help, open a topic in **#Configuration**
> 
> A forum remains readable when each thread covers a specific topic.

It would be nice to have a guide to orient us when posting messages. I often wonder whether I’m in the right topic, 🤔

[Previous page](https://community.gladysassistant.com/t/rflink-node-red-et-gladys/6844.md?page=5)
