Embedding scripts in an edge MC

Hello, I’ve been requested to partially or fully automate the way a device ID assignment is done on one of our manufacturing lines. Currently, there is a script that is manually run by someone on the manufacturing line, which generates a CSV of components for the device identifier, including a security key, which is then manually entered into a label printer.

Entering the CSV into tulip has been made pretty simple with the looper widget, which I just use to manually divide up the CSV. And the label printer is compatible with ZPL II so I’ve just got to prepare a ZPL string that generates the label.

Where I’m stuck is doing the PIN generation. It’s possible to rewrite the script (python) into JS and embed it into a Node-RED function block, but I’d really rather just use the script as-is and get an Edge-MC to call it and return the CSV to the operator.

Is it possible to access the Edge MC’s file structure and load files onto it to be referenced by Node’s Execute block, or is that not a supported operation?

1 Like

Hi @David2 ,

Currently, access to the file system or mounting USB devices to load files onto the devices is not supported.

It might be possible to use node red to add the script to the /data/node-red/ directory though, if you have a way to host the script in a networked manner. It doesn’t sound like it requires root permissions to run, but there could be some permissions issues along those lines.

Okay, I expected it probably wouldn’t be supported but thanks for the clarification. It occurred to me that another option would be install a Node-RED instance on a small PC we control and just configure it to accept a PUT from the factory instance, then just write something back to the factory.

…or I could just rewrite the script in JS.

Anyway, thanks.