# NR+XBee Conection

**URL:** <https://discourse.nodered.org/t/nr-xbee-conection/48450>\
**Category:** Hardware\
**Created:** [15 July 2021 10:25 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450 "2021-07-15T10:25:09Z")\
**Posts on this page:** 20\
**Page:** 3

<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:** [18 July 2021 12:58 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/42 "2021-07-18T12:58:27Z")

</div>

Martin, is your docker instance of node-red running again & causing you to get confused with which instance of node-red is actually running?

> [@Riot-nodes error](https://discourse.nodered.org/t/riot-nodes-error/47239/160):
>
> This is why you have port 1880 occupied. Stop that container.

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [18 July 2021 12:58 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/43 "2021-07-18T12:58:46Z")

</div>

Are you running node-red under node using n or nvm or some other way ?

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 July 2021 13:02 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/44 "2021-07-18T13:02:22Z")

</div>

No, i delete docker.  
I don't know what is "n or nvm"

---

<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 July 2021 13:15 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/45 "2021-07-18T13:15:37Z")

</div>

I asked you to post the output when you start node-red.

---

<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 July 2021 14:03 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/47 "2021-07-18T14:03:43Z")

</div>

```auto
18 Jul 15:50:46 - [debug] C:\Users\Martin\node_modules\node-re
d-contrib-xbee

```

Note that is in the wrong folder, you have been installing modules from the Martin folder as well as .node-red. Remove the folder c:/Users/Martin/node\_modules, and also the package.json and package-lock.json that you will probably find in the Marting folder. Then restart node-red again. If it still is wrong post the log again (the whole startup log this time please).

**[Edit]** I am assuming the node-red does not get installed into that folder on windows, if I am wrong there then just `npm remove` the node from that folder.

---

<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 July 2021 14:55 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/49 "2021-07-18T14:55:39Z")

</div>

Have you possibly got two folders `C:\Users\Martin`, one with a trailing space or something else on the end?

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 July 2021 15:03 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/51 "2021-07-18T15:03:26Z")

</div>

No, i don't have

---

<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:** [18 July 2021 15:13 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/52 "2021-07-18T15:13:00Z")

</div>

> [@Colin](#):
>
> ```auto
> 18 Jul 15:50:46 - [debug] C:\Users\Martin\node_modules\node-re
> d-contrib-xbee
> 
> ```
> 
> Note that is in the wrong folder, you have been installing modules from the Martin folder as well as .node-red. Remove the folder c:/Users/Martin/node\_modules,

> [@Martin10](#):
>
> Actually, it das get installed into that folder, because all other nodes are there. The funny thing is that i don't see this folder (node-re  
> d-contrib-xbee) in this directory, but it appeared in the terminal.

If your main node-red installation files are in `"C:\Users\Martin "` then it should NOT be there. When you follow the windows install guide node-red gets installed to the global npm folder. On windows, unless you change it, that is (in your case) `"C:\\Users\Martin \AppData\Roaming\npm\node_modules\node-red"`

Only when you launch node-red for the first time do you get the `.node-red` folder - in your case `"C:\Users\Martin \.node-red"`

All node-red contrib nodes **MUST** get installed inside the `\.node-red\node_modules` folder - no exceptions (unless you know what you are doing)

* * *

#### ISSUE!

Is your user folder _REALLY_ `"Martin "` ← With a space at the end? This is probably messing some NPM nodes up.

#### Recommendations

- If there is a space in your user name, create a new account, log into that, install node-red again following the windows install TO THE LETTER

---

<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 July 2021 15:24 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/53 "2021-07-18T15:24:51Z")

</div>

> [@Martin10](#):
>
> No, i don't have

> [@Martin10](#):
>
> ```auto
> 18 Jul 17:26:05 - [debug] C:\Users\Martin \node_modules\node-re
> d-contribe-xbee-api
> 18 Jul 17:26:05 - [debug] Module: node-red-dashboard 2.21.0 *ignored due to loca
> l copy*
> 18 Jul 17:26:05 - [debug] C:\Users\Martin\node_modules\node-re
> d-dashboard
> 
> ```

Well something is horribly confused, as you can see by the fact that the above appears to suggest that there is a folder with a space (and possibly more) and one without.

I remember you started off with your full name as the user name with a space in, are you sure that (or something related to it) is not still present?

I suggest you follow @Steve-Mcl's advice and start again.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [18 July 2021 17:06 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/54 "2021-07-18T17:06:24Z")

</div>

There is no problem with my name folder.  
I found the duplicate .node-red folder, delete it and solve the problem (in it was the xbee folder). I also find the `"C:\\Users\Martin\AppData\Roaming\npm\node_modules\node-red"`, and in node\_modules folder i found less sub-folders with nodes, compared to this directory .node-red folder `"C:\Users\Martin\.node-red"`

So, i suppuse there is no point to have both? So, what i have to do:

To copy one into other?

Or to reinstall NR?

Or something else?

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 July 2021 17:36 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/55 "2021-07-18T17:36:55Z")

</div>

It would be better to have all of the extra nodes you install to be under `C:\Users\Martin\.node-red`.

The fact you have some under `C:\\Users\Martin\AppData\Roaming\npm\node_modules\node-red` suggests you used the `-g` flag when running `npm install` and they have been installed as global modules.

First you should uninstall those global modules: `npm remove -g <module-name>`.

Then reinstall them in the `.node-red` directory - remember to **not** use the -g flag this time.

---

<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 July 2021 19:45 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/56 "2021-07-18T19:45:26Z")

</div>

@knolleary do you understand how this output can be seen on starting node red when there is only one `c:\Users\Martin*` folder and it doesn't have a trailing or embedded space. The first line appears to suggest there is a space or unprintable character.

```auto
18 Jul 17:26:05 - [debug] C:\Users\Martin \node_modules\node-re
d-contribe-xbee-api
18 Jul 17:26:05 - [debug] Module: node-red-dashboard 2.21.0 *ignored due to loca
l copy*
18 Jul 17:26:05 - [debug] C:\Users\Martin\node_modules\node-re
d-dashboard

```

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [18 July 2021 19:48 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/57 "2021-07-18T19:48:19Z")

</div>

To be frank, no I don't. But nor do I, at this point, think it's worth pursuing.

We've been going in circles here trying to get Xbee working. The fact @Martin10 is back on a Windows machine when we spent a few days getting his RaspberryPi working is something I'm not going to spend any more of my time on.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [19 July 2021 19:06 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/58 "2021-07-19T19:06:02Z")

</div>

I know my questions sound stupid, but that is because i don't have enough experience.  
After i reinstall, it seems like it work, but backward.  
So, i have to write something in dashboard node, so i can see it in console -- debug node. Rather than vice versa.

 ![NR-Xbee Q](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/3/43ba069eb29cd8e088ca595906f4929e6af5973b.jpeg)

---

<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:** [19 July 2021 19:45 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/59 "2021-07-19T19:45:42Z")

</div>

> [@Martin10](#):
>
> i have to write something in dashboard node, so i can see it in console -- debug node.

That sentence means nothing to me. Please explain what you mean.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [20 July 2021 13:04 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/60 "2021-07-20T13:04:47Z")

</div>

When i use the inject node to trigger the function node and send the ''hello'' message, i see this ''hello'' message in debug node (like in the pic), but not in the dashboard. But if i type some message (like ''XBBE'', in the pic) on dashboard, i can see it in the debug node (like in the pic).  
That's make me wonder- how can i be sure, that the message i send are transmitted from one xbee-tx to the xbee-rx?

About the [knolleary](https://discourse.nodered.org/u/knolleary) comment:  
It was easier for me to test the Xbee-NR connection on Win first, because the xbee modules i use have drivers and libraries, that i don't know how to install on RPI. When i learn how to do it, i will try in RPI

---

<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:** [20 July 2021 13:21 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/61 "2021-07-20T13:21:30Z")

</div>

> [@Martin10](#):
>
> When i use the inject node to trigger the function node and send the ''hello'' message, i see this ''hello'' message in debug node (like in the pic), but not in the dashboard

In the screenshot of the flow you posted there does not appear to be a connection between the inject node and the dashboard node so there is no way anything will appear in the dashboard.

> [@Martin10](#):
>
> if i type some message (like ''XBBE'', in the pic) on dashboard, i can see it in the debug node

That is not possible as there is no connection between the dashboard node and any debug nodes.

For any further images you post please make sure that all debug nodes have names so that it is clear which node shows each message.

---

<div class="post-metadata">

**Author:** ![Martin10](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@Martin10](https://discourse.nodered.org/u/Martin10)\
**Post date:** [21 July 2021 14:44 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/62 "2021-07-21T14:44:01Z")

</div>

> [@Martin10](#):
>
> if i type some message (like ''XBBE'', in the pic) on dashboard, i can see it in the debug node

> [@Colin](#):
>
> That is not possible as there is no connection between the dashboard node and any debug nodes.

Yes, it is possible and it can be seen in the pic. Probably the code inside the function nodes make some connection.

I re-connect the nodes in variety of ways, but the results are almost the same...but not exactly  
I connect debug node to all parts of the flow.  
The results are in the pic (i can't understand everything in it, i uderstand only the xbee frame )

 ![NR-Xbee Q2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/c/1c590cac3b93aa050492dab691941bca43358ff0.jpeg)

---

<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:** [21 July 2021 20:47 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/63 "2021-07-21T20:47:54Z")

</div>

That is not the same flow you posted a few posts ago that you said had the problem. The new flow you post does obviously have such a connection.

---

<div class="post-metadata">

**Author:** ![Peter](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/peter/32/25135_2.png) [@Peter](https://discourse.nodered.org/u/Peter)\
**Post date:** [21 July 2021 21:26 UTC](https://discourse.nodered.org/t/nr-xbee-conection/48450/64 "2021-07-21T21:26:06Z")

</div>

Hey @knolleary, You are right !! this is a Node-red Forum, not a Xbee forum, have some respect @Martin10 for the great work these guys had put in to have a fantastic product as Node-Red!!

If its RPI related, I am will to advise as far I can, unfortunately, it seems you have a comms-related issue on the TX side.

[Previous page](https://discourse.nodered.org/t/nr-xbee-conection/48450.md?page=2)

[Next page](https://discourse.nodered.org/t/nr-xbee-conection/48450.md?page=4)
