Looking around the web it surprises me that there are no search results showing any succes on controlling a gopro camera with node-red.
Does anyone have experience with this?
I am not sure I am the right person to be advising on this But I did something similar with a nodejs dependency and it worked great. I added the dependency to the settings.js file, then used a function node to test small snippets of the example code to get basic functions and then expanded this to provide the functions I wanted. Once this is working it would be possible to create a node for the community
I’m also very interested in learning how to use another node.js modules in node red but have no clue, will be great if someone someday makes a bit of tutorial.
This will drastically increase the capabilities of node red for those who have not a deep knowledge.
The main route to using any node module in Node-RED is for someone to wrap the module in a node-red node. That requires some time and effort to do right.
You do it by loading the module in your settings.js file, and adding it to the functionGlobalContext setting. The Function node can then access the module via global context. The docs have an example of doing that with the built-in os module.
As an example of the sort of function Nick describes, here is one that uses the suncalc library to give sunrise and sunset times. The settings.js file contains suncalc:require('suncalc') in the functionGlobalContext setting. In this case the necessary library is already loaded, but in general this will not be the case.
While we are on the subject could I ask a question again (I have posted this before). I have used the approach to add a dependency to the settings.js and then created a function node that works fine. When I try to create a node with this functionality node red crashes. The logic is that a function node in a flow must execute this differently. Is there anywhere I could read to understand what these differences may be to fix the problem. Thanks