I'm having trouble with trying to get node-red to run my Python code and using I2C nodes on node-red.
I used the following nodes so far, yet none of them work on my end for reasons explained below.
I tested my python code on the terminal before trying to run it in node-red. If I run my python code in the terminal, it recognizes that my I2C device is connected and prints my I2C data to the terminal. But if I use the exec node with my python code (python code handles I2C), node-red hangs and my code doesn't output anything at all. Likewise, if I use the daemon node, I get a "command not found" error despite using the same command I'd use on the terminal to run my code (e.g. python /home/pi/mycode.py).
If I use the I2C nodes, those nodes complain that I have a "remote I/O error" despite having a device connected on the I2C pins. I even ran i2cdetect -y 1 (default I2C bus address) and I found the I2C address used. Likewise, if I use the Johnny 5 nodes, I get an error that "no such file/directory" exists despite having installed Johnny 5 on node-red.
Any help would be appreciated, as I've been trying this for almost a whole day to no avail.
There have been numerous discussions around the contrib-i2c node(s). You can do a search in the forum for that. That node appears to be fairly persnickety to install and get to work. Several have reported it doesn't want to install from pallete manager and when they did get in that way it didn't work. You may have to drop to the command line to get it in and working. Again, do a forum search for that node. As for johnny5 I can offer no suggestions.
Using an exec node in this way has proved successful for others, so I suggest you try this route again, then report back with the exact problem you are seeing. Show us how you have configured the exec node and show us the node red log from the time node red is started to the point where it runs the exec node.