Hi @Mr_Wonder_Why ,
All of the ctrlX UI functions can be executed via REST API. The mounting portion can be handled this way. See this post for more discussion.
You can also use this API to get the available storage media. You can execute this cyclically in Node-RED to check for the SD card insertion. An example request and response is below. You can check for an unmounted device and then call the mount request using the API.
curl -X 'GET' \
'https://192.168.1.100/storage/api/v1/media' \
-H 'accept: application/json' \
-H 'Authorization: Bearer eyJhbGciOiJFUzM4NCIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MTgzOTk3MTgsImlhdCI6MTcxODM3MDkxOCwiaWQiOiIxMDAwIiwibmFtZSI6ImJvc2NocmV4cm90aCIsIm5vbmNlIjoiOThhNjA0MzgtZGE1Ny00ODgxLWEwNDctMzU4NjlkYWU4MWUyIiwicGxjaGFuZGxlIjowLCJyZW1vdGVhdXRoIjoiIiwic2NvcGUiOlsicmV4cm90aC1kZXZpY2UuYWxsLnJ3eCJdfQ.DE5VFK8vxHnXL7BclcPOx7VZHX04Ddhn-JmC_YWiKR1bh6732Tou8r5Rp5I6rCdhSO7pbC-lAbz1EMCH7MqP5cKLPxrpkkhRmkhbV6aJKXC7rEJxDP2cbBHXbHCA-9K7' [
{
"uuid": "0b43e894-29e1-48d7-bb58-fbde4c3f40c1",
"label": "ubuntu-data",
"mounted": true,
"format": "ext4",
"size": 2917068800,
"used": 1981390848,
"device": "mmcblk0p4",
"internal": true,
"parent": "mmcblk0"
},
{
"uuid": "CEA7-20D6",
"mounted": false,
"format": "fat32",
"size": 16294871040,
"device": "mmcblk1p1",
"parent": "mmcblk1"
}
]
... View more