How-to
Move USB files from a Node-RED flow on groov EPIC
Short answer
Build one groov View page and one Node-RED flow: eight Data Store tags drive two five-row file lists, an API key with groov Manage permission drives the unmount call, and operators work from a single page after a one-time setup. Move means select, wait for the indication, Refresh; safe removal means Unmount, Refresh, and pull the drive only when the USB filenames disappear.

On this page
- How do I move USB files from a Node-RED flow on groov EPIC?
- How do I enable USB automount and create the Data Store tags?
- How do I import the groov View page and bind all the gadgets?
- How do I configure the Node-RED flow and its API key?
- How do I scroll and move files from the groov View page?
- How do I unmount the USB drive and know it is safe to pull?
- Why does the exec node report error:1 and the file stays put?
- Why did my flow disappear and my configuration stop working?
- Questions asked
One groov View page and one Node-RED flow give a groov EPIC operator complete USB file management: listing local files and an attached drive, moving files either way, and unmounting safely, all without opening groov Manage again after the initial setup. The page binds to eight Data Store tags that drive two five-row file lists, and the flow does the filesystem work and the unmount API call. Setup is a one-time pass through groov Manage and groov Build; this article walks it in the order you will meet it: automount and tags, page import and gadget binding, flow configuration, daily use, unmount verification, and the two failures you are most likely to hit, an exec node reporting error:1 and an edit that never got deployed.
How do I move USB files from a Node-RED flow on groov EPIC? #
You build one groov View page and one Node-RED flow: the page shows two five-row file lists bound to eight Data Store tags, and the flow lists directories, builds move commands, and calls the groov Manage API to unmount the drive. After that one-time setup, the operator never opens groov Manage again: local files live in /home/dev/unsecured, the automounted drive appears at /run/media/sdb1, and every list, move and unmount happens from the single View page.
The design targets one inserted drive. With several drives attached, both the Node-RED flow and the groov View page need changes this walkthrough does not define, so treat a single drive as the supported scope.
How do I enable USB automount and create the Data Store tags? #
In groov Manage open System, then Settings, then USB, and enable both USB and Automount; then add eight Data Store tags in groov Build: four booleans, boolean tables copyLOCAL and copyUSB of length 5, and string tables filesLOCAL and filesUSB of length 5.
Name the Data Store whatever suits the plant — nodered is the example used throughout — and spell it identically in groov Build and in the flow connection later, because the flow binds to it by exact name. The five-element tables carry the five file rows and five move buttons in each direction; the four single booleans run the page's remaining controls, the refresh button among them. Leave automount switched on: with it off, the drive never appears at the mount directory the flow reads.
How do I import the groov View page and bind all the gadgets? #
Import the page through groov Build, back up the current project first, then bind all twenty-four gadgets to their tags once: the four table tags each drive five row gadgets with Table Index 0 through 4, while single booleans such as the refresh button bind without an index.
The gadget count follows from the tag shapes: 4 tables × 5 rows = 20 row gadgets, plus 4 single booleans = 24 bindings in total. A gadget bound to a boolean table shows the Table Index field; a gadget bound to a single boolean hides it — the button type is identical, the tag shape decides. Give each row gadget the index of the row it sits beside, so a button writes to the row the operator sees.
How do I configure the Node-RED flow and its API key? #
Import the flow into Node-RED, copy an API key from the groov Manage user who holds groov Manage permission, then open the set headers function node and set host to the device hostname and apiKey to the key exactly as copied.
- If the same key will also configure the groov View nodes, choose a user that carries groov View permission as well.
- Double-click any groov node, open its Data Store connection, and select the Data Store spelled exactly as in groov Build,
noderedin this example. - In the groov Project settings leave the address at
localhost, paste an API key that has groov View permission, and select Update, then Done; every groov node now shares that one configuration. - If an imported groov node stays misconfigured, delete duplicate
localhostgroov Project configurations and keep exactly one. - Select Deploy and check that the blue change dots disappear from every edited node.
The set headers node stores its two values when you select Done. The same authenticated REST interface also works in the other direction: pushing files into groov EPIC storage from an outside machine is covered step by step by Manage REST API file-upload walkthrough.
How do I scroll and move files from the groov View page? #
Insert the drive, select Refresh to fill both lists, then page through with the arrows, each press jumping 5 items, and move a file with the arrow button beside its name; the button lights during the move and goes dark when the command completes.
The indication only says the command finished: select Refresh and watch the file appear in the other list, which is the confirmation that counts. For one-file-at-a-time scrolling, inject 1 into flow.scroll_offset; the change takes effect without a redeploy. The arithmetic is direct: a list of 12 files at the default offset of 5 needs three presses, 5 + 5 + 2, while an offset of 1 needs eleven. If you change the offset inside the function logic instead of injecting it, mirror the new value in the display LOCAL and display USB nodes too, because a mismatch makes a row's button move a different file than the one shown.
How do I unmount the USB drive and know it is safe to pull? #
Select Unmount, wait for its indication to return to green, give the call a moment to finish, then Refresh: remove the drive only when every USB filename has disappeared from the page, because a name still listed means the drive is busy.
The unmount button calls the groov Manage REST API, where unmounting is now an officially documented operation; firmware older than the 3.0 series did the same job without an official endpoint for it. When names persist, something is still reading or writing the drive — stop that application and run the unmount again. If a drive ever comes back with files you cannot change, it has usually returned mounted read-only, and read-only USB mount recovery walkthrough for groov EPIC covers the unmount and mount point rebuild. A successful unmount detaches the drive from the filesystem, so the only way to see its files again is to unplug it and plug it back in.
One safety note: pulling the drive before its names disappear can lose buffered writes and corrupt the files just moved, so treat the empty USB list as the only safe-removal signal.
Why does the exec node report error:1 and the file stays put? #
error:1 on an exec node is the generic command-failed return code — the shell found the command, ran it, and it exited nonzero — so wire a debug node to the exec node's second output, read the detail there, and check every source and destination path in the command strings.
In this flow the usual culprit is a subfolder the list stage knows but the command stage does not. Files parked under a Data subfolder need the folder added in three places: the path in the list LOCAL files switch node, and the returned command strings in both create move command nodes; the local base path then reads /home/dev/unsecured/Data. Read the message on that second output first, because it names the exact path that failed; selecting Restart Flows clears the error display but moves nothing.
Why did my flow disappear and my configuration stop working? #
Changes vanish when the editor closes without a Deploy — the blue dots on edited nodes are unsaved work — and a flow that still misbehaves after redeploying almost always traces to duplicate groov Project connections or the wrong Data Store spelling.
Open the Data Store connection and confirm the spelling matches groov Build letter for letter, then confirm the API key is the one from your own user account, because a key is unique to its user. If an imported or installed node leaves the editor unable to run the flow at all, the recovery is the same as for any crashed Node-RED install: Node-RED safe mode and rollback after a bad node install walks you out of a broken editor and back to a deployable flow. The decision order for every symptom on this page is fixed: Deploy until the dots clear, one localhost groov Project, the key that belongs to your user, and only then the paths.
Questions asked
Why does the groov Manage API key seem to change after every power cycle?
It should not: a key belongs to its user and persists across normal power cycles, changing only when you delete the key or the user or factory-reset the device. Check first that you are reading the same account, because a device with several admin accounts holds a separate key for each, and copying a different account's key looks exactly like a key that regenerated. A genuinely new key after every cycle, with no deletes or reset, is a case for the manufacturer's support.
Does the deployed flow keep running after I close the Node-RED editor?
Yes, once it is deployed: a deployed flow runs persistently in the background whether the editor is open or not. Do not read groov Manage showing Node-RED as running as proof your edits survived, because that status is the service, not your draft. The blue change dots are the only signal; close the editor only after a Deploy clears every one of them.
What happens if someone presses the unmount button by mistake?
Little harm at first: the unmount gadget carries a confirmation lock, so a stray press asks for confirmation before any API call goes out. The trap is a deliberate unmount you later regret. Once unmounted, the drive is detached from the filesystem and no page action remounts it; recovery means physically unplugging the drive and plugging it back in so it automounts again.
What does an exec return code of 127 mean compared with 1?
A 1 is the generic failed-command code: the shell found the command, ran it, and the command exited nonzero, which in this flow almost always points at a wrong path. A 127 means the shell never found the command at all, usually with a not-found message on stderr. If you see 127, the command string itself is broken or the program it names is missing, not the file path.


