Having issues with python3 and HA node red add-on

Hi all, so I have a RPi 4 installed with HAOS on it, and have added node-red as an add-on.

I'm trying to run a python script to communicate with my sofar solar inverter called sofar.py. When I run the script in terminal using "python3 /home/pi/Documents/sofar.py" it returns all the values fine but when I run the same command in an exec node I get the error.

Any idea what the issue is? From what I can see I need to call the full path to python3 but when I run an exec node with the common "pwd" I get back '/opt'. Don't know where to go from here :frowning:

Welcome to the forum @Bydandie

You can use the command
which python
to find out where it is, probably something like /usr/bin/python. Then use that in the exec node.

1 Like

I think that this "HAOS" is using docker containers for things like node-red ? no way to break out of a container.

2 Likes

If it is using a docker container for node red then, if you open a console in the container, can you run your command?

1 Like

Cheers, how do I run a console in there?

I have no idea. That is a Docker or HA question. Perhaps ask on an HA forum.