Hi, I have a function node that I’ve coded wrong and was going to use:
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:
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.
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.
Hi @marcus-j-davies,
No not using HA. Very impressive stuff they make, but not (yet) my cup of tea.
@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:
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.
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.
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.
This is outside my knowledge. If you install this version of 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.
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.