Last month I announced the first beta of my new node-red-contrib-xterm node, which integrated a terminal window inside a custom node. That terminal window allowed users to execute command line commands, via your flow editor.
But Steve (@shrickus) suggested that this terminal window should have been inside the flow editor sidebar, instead of in a node's config screen. Very good proposal, but writing my first sidebar node became a hell of a job. Since I had to start from scratch again ( ), I have started this new discussion to avoid users becoming confused with the first beta ...
So LOTS of changes:
The terminal window is now inside a sidebar tabsheet.
You can manually start / stop / clean the terminal via buttons.
All kind of server side information and errors are now also displayed inside the terminal window.
It should run on macOS, Linux and Windows. I have only tested it on Windows and Raspbian, so would be nice if somebody could test it on macOS!
The look-and-feel of the terminal window is customizable.
Your favorite commands can be stored in Terminal Input nodes.
Critical commands can be secured with a confirmation dialog.
It is possible to store a sequence of multiple commands, to store your own scripts.
Pre-build libraries are included (for the pseudo terminal code) for a number of systems, to avoid headache during installation.
You can install it directly from my Github repository, since it is not published on NPM yet:
npm install bartbutenaers/node-red-contrib-xterm
First demo to show how the sidebar tabsheet works:
I assume your os isn't available in that table? Not sure if you can ask those guys to add your platform ...
So the first time you press on the "Start" button, you get a popup with a message? Or a message inside the terminal screen, or ... ?
And you still remember what is was about?
Could you please explain what you have done in between? So you have opened your flow editor, done something else (with terminal tabsheet still open or switched to another tabsheet?), and when you came back the pseudoterminal had been stopped.
There is also a heartbeat every 5 seconds, send by the flow editor to the backend: when the backend doesn't get a heartbeat signal within 5 seconds, it decides that the flow editor has been closed (so it will close the pseudo terminal). Don't know whether that is perhaps the cause... I will make a change tonight so it will display "Pseudoterminal has been stopped due to heartbeat" in that situation. Then we have at least a bit more information for troubleshooting.
Perhaps my 5 seconds are a bit too optimistic if you use a cloud solution...
Thought all you guys were Raspberry freaks
Almost all of my node-RED flows now run on the Oracle Cloud Free Instance.
It's faster, less downtime and has better web connectivity than my Pi.
I only use my pi as a MQTT broker and run node-RED locally purely for administrative functions such as updating my Pi's DNS IP. (you get a fixed IP address for the Oracle instances).