# Node Red in Home Assistant OS debug

**URL:** https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126
**Category:** General
**Tags:** docker, home-assistant
**Created:** [23 December 2024 21:28 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126 "2024-12-23T21:28:25Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![eerke2021](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eerke2021/32/83528_2.png) [@eerke2021](https://discourse.nodered.org/u/eerke2021)
#### Post date: [23 December 2024 21:28 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/1 "2024-12-23T21:28:25Z")

</div>

Hi, I have a function node that I’ve coded wrong and was going to use:

> **[node-red-contrib-inspector](https://flows.nodered.org/node/node-red-contrib-inspector)**
>
> A Node-RED node to (de)activate a NodeJs code inspector session

To figure out my mistake, because it allows connection to VS Code and the Google Chrome Developer debugger but they give an extra instruction for use in a docker:

```auto
docker run -it -p 1880:1880 -p 9229:9229 -v node_red_data:/data --name mynodered nodered/node-red

```

But in HA it’s not a docker, rather an “add on” but will I need to open a second port for it anyway? I can’t imagine HA leaves all ports open for use by Add Ons. And if so does anyone know the code? I have installed a terminal and a file manager add on.

I did ask over on the HA community page but no one knew.

Thanks

---

<div class="post-metadata">

### Author: ![marcus-j-davies](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/marcus-j-davies/32/103435_2.png) [@marcus-j-davies](https://discourse.nodered.org/u/marcus-j-davies)
#### Post date: [23 December 2024 21:41 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/2 "2024-12-23T21:41:39Z")

</div>

I’m not sure you gonna find the answer here.  
Most on these forums - choose not to use HA.

It’s not to say someone wont know - but you have to depend on a HA user in these forums - and there are not many here.

You could ask the author of the HA plugin - but I’m shocked that HA forums, don’t have the answer. So good luck.

The author of the node you want to use @BartButenaers may lend advise, but not HA it’s self… unless Bart you use HA 😃

---

<div class="post-metadata">

### Author: ![eerke2021](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eerke2021/32/83528_2.png) [@eerke2021](https://discourse.nodered.org/u/eerke2021)
#### Post date: [23 December 2024 22:03 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/3 "2024-12-23T22:03:55Z")

</div>

They may have the answer but haven’t told me. I may ask again as my question will have sank to near the bottom and I asked in the specific HA NR sub-forum. Or maybe I will just install the node and see if it works. Asking the Add On creator is a good idea though. I hadn’t thought of that.

My function node was not working merely because of an. “L” instead of an “l”. I liberally sprinkled node.warn messages to figure out what was going on. I’d still like to connect a proper debugger though as figuring it with node.warn was a lot more effort than is needed.

---

<div class="post-metadata">

### Author: ![BartButenaers](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bartbutenaers/32/10476_2.png) [@BartButenaers](https://discourse.nodered.org/u/BartButenaers)
#### Post date: [24 December 2024 15:30 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/4 "2024-12-24T15:30:56Z")

</div>

> [@marcus-j-davies](#):
>
> unless Bart you use HA 😃

Hi @marcus-j-davies,  
No not using HA. Very impressive stuff they make, but not (yet) my cup of tea.

> [@eerke2021](#):
>
> Or maybe I will just install the node and see if it works

@eerke2021,  
If those HA addons are not containerized, I don't see any reasons why it should not work. As long as your port 9992 is external accessible, that should be good. But if you say that HA is closing all other ports, then that indeed is a problem. That might indeed be the case, if you e.g. use the HA operating system. Don't know anything about that...

You could ask ChatGpt perhaps. He gave me this, but I have no idea whether it is a great solution or completely 100% bollocks:

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/9/9/9949bac6d427b437e2217eb1bb1c8f7d3d8e3f46.png)

Good luck with it!

---

<div class="post-metadata">

### Author: ![eerke2021](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eerke2021/32/83528_2.png) [@eerke2021](https://discourse.nodered.org/u/eerke2021)
#### Post date: [24 December 2024 17:06 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/5 "2024-12-24T17:06:18Z")

</div>

Thanks. I had a look in configuration of add on already and the current version says:

 ![IMG_1685](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/a/1a6089189bc08093b998284da6174c38c0bb6de3.jpeg)  
But I’ve now noted it says ports and not port. On mobile the HA app uses a number keyboard with no option of using a comma, but maybe when I have a computer I can see if adding a second port works. I have asked their discord server but there are loads of unanswered questions ahead of mine so I’m not sure it is much used.  
Home assistant add on are not fully containerised as they can use the HA core but I think some similar principles apply. For example accessing the NR flows requires a HA login and the settings file is amended.

Unfortunately when I was new, for simplicity, I am using the full Home Assistant Operating System, but you can also run it in a docker and connect different containers using docker compose. Then I’d just have a standard docker version of Node Red and this would be simple. If you do ever experiment with Home Assistant I’d just use the docker version. More faff initially but less in the long run and you get a extra computer.

---

<div class="post-metadata">

### Author: ![mikefila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikefila/32/95223_2.png) [@mikefila](https://discourse.nodered.org/u/mikefila)
#### Post date: [24 December 2024 20:39 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/6 "2024-12-24T20:39:49Z")

</div>

Home assistant addons are indeed containers preconfigured for home assistant. The port mapping option is for the web interface only. It is possible to add a docker command to the init section of the addon config. If it doesn't work changing your install type would be the way to go.

---

<div class="post-metadata">

### Author: ![eerke2021](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eerke2021/32/83528_2.png) [@eerke2021](https://discourse.nodered.org/u/eerke2021)
#### Post date: [24 December 2024 22:19 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/7 "2024-12-24T22:19:26Z")

</div>

I’m guessing you mean the init\_command bit of the configuration page and adding  
…  
-it -p 9229:9229  
…  
? The other parts of the command seem already part of the hidden command part.

---

<div class="post-metadata">

### Author: ![mikefila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikefila/32/95223_2.png) [@mikefila](https://discourse.nodered.org/u/mikefila)
#### Post date: [24 December 2024 22:36 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/8 "2024-12-24T22:36:17Z")

</div>

You could leave out the 1880 otherwise enter the entire command

```auto
docker run -it -p 9229:9229 -v node_red_data:/data --name mynodered nodered/node-red

```

Save and restart the addon, then watch the log on the log tab.

---

<div class="post-metadata">

### Author: ![eerke2021](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eerke2021/32/83528_2.png) [@eerke2021](https://discourse.nodered.org/u/eerke2021)
#### Post date: [24 December 2024 23:52 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/9 "2024-12-24T23:52:25Z")

</div>

Thanks: it is probably really obvious but if I’ve installed Node Red as an add on in Home Assistant how do I find its name and location?

I’m exploring the file structure now. I’ve found the amended setting file in this folder: addon\_configs/a0d7b94\_nodered

But am yet to find the docker image itself (for the last bit of the init code).

---

<div class="post-metadata">

### Author: ![mikefila](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/mikefila/32/95223_2.png) [@mikefila](https://discourse.nodered.org/u/mikefila)
#### Post date: [25 December 2024 01:00 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/10 "2024-12-25T01:00:13Z")

</div>

This is outside my knowledge. If you install this version of [portainer](https://github.com/alexbelgium/hassio-addons/tree/master/portainer) it will give you access to the OS. You should be able to see the file system structure.

Edit: you may notice that with portainer you can open a terminal in the NR container. IIRC you can't make changes that will persist through updates/restarts. You could use it for testing.

---

<div class="post-metadata">

### Author: ![eerke2021](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/eerke2021/32/83528_2.png) [@eerke2021](https://discourse.nodered.org/u/eerke2021)
#### Post date: [25 December 2024 03:13 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/11 "2024-12-25T03:13:30Z")

</div>

Thanks. I’m going to finish this on Boxing Day. I have installed Portainer and found the name and maybe the path. I didn’t know this was possible, but then I’m not sure I knew how like docker images Add ons were.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [25 March 2025 03:14 UTC](https://discourse.nodered.org/t/node-red-in-home-assistant-os-debug/94126/12 "2025-03-25T03:14:27Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
