Once Node-RED has started, point a browser at http://192.168.0.41:1880
On Pi Node-RED works better with the Firefox or Chrome browser
Use node-red-stop to stop Node-RED
Use node-red-start to start Node-RED again
Use node-red-log to view the recent log output
Use sudo systemctl enable nodered.service to autostart Node-RED at every boot
Use sudo systemctl disable nodered.service to disable autostart on boot
Starting as a systemd service.
6 Mar 14:39:32 - [info]
Welcome to Node-RED
6 Mar 14:39:32 - [info] Node-RED version: v3.0.2
6 Mar 14:39:32 - [info] Node.js version: v16.19.0
6 Mar 14:39:32 - [info] Linux 5.15.84-v7+ arm LE
6 Mar 14:39:34 - [info] Loading palette nodes
6 Mar 14:39:44 - [info] Dashboard version 3.3.1 started at /ui
6 Mar 14:39:45 - [info] Settings file : /home/pi/.node-red/settings.js
6 Mar 14:39:45 - [info] Context store : 'default' [module=localfilesystem]
6 Mar 14:39:45 - [info] User directory : /home/pi/.node-red
6 Mar 14:39:45 - [warn] Projects disabled : editorTheme.projects.enabled=false
6 Mar 14:39:45 - [info] Flows file : /home/pi/.node-red/flows.json
6 Mar 14:39:45 - [info] Server now running at http://127.0.0.1:xxxx/
6 Mar 14:39:45 - [warn] Using unencrypted credentials
6 Mar 14:39:46 - [info] Starting flows
6 Mar 14:39:46 - [info] ttsultimate-config 595102db6902593e: Autodiscover current IP 192.168.0.41
6 Mar 14:39:46 - [info] ttsultimate-config 595102db6902593e: TTS cache set to /home/pi/.node-red/sonospollyttsstorage/ttsfiles
6 Mar 14:39:46 - [info] ttsultimate-config 595102db6902593e: google credentials path set to /home/pi/.node-red/sonospollyttsstorage/ttsultimategooglecredentials
6 Mar 14:39:46 - [info] ttsultimate-config 595102db6902593e: hailing path set to /home/pi/.node-red/sonospollyttsstorage/hailingpermanentfiles
6 Mar 14:39:46 - [info] ttsultimate-config 595102db6902593e: permanent files path set to /home/pi/.node-red/sonospollyttsstorage/ttspermanentfiles
6 Mar 14:39:46 - [info] ttsultimate-config 595102db6902593e: Node-Red node.js Endpoint will be created here: http://192.168.0.41:xxxx/tts
Does that folder exist? The file node expects the folder to exist.
Are you relying on the OS auto mount feature to mount the stick or have you put the mount details in /etc/fstab? Automount only happens if you are logged in to the pi, so if you are not currently logged in then it will not be mounted.
In Linux, I can make folder there as user pi, with sudo mkdir <foldername>.
But even then write file node is permission denied to write the file.
I think I cannot use write file node here, because doesn't work with sudo internally or something?
I guess have to use exec node to get the job done....
You need to give pi permission to write to the stick. Remove the settings folder then run sudo chown pi:pi /media/pi/BU
Remove the settings folder and try to create it again, now you should be able to create it without sudo and node-red should be able to write to it.
Please copy/paste output rather than screenshot, if possible. Use the </> button at the top of the forum entry window when pasting it so that the forum does not mess with the format.
No you are right, you can't change the ownership of the device mount point. You will have to create a folder on the stick and then use that. So make a folder backups, or whatever on the stick and chown it to pi as shown. Then you should be able to write to that without sudo and it should work from node-red.
I wonder if it is because the stick is formatted as vfat that you can't change the permisssions. I format mine as ext4 so as to be fully compatible with linux.
I have chosen for a pragmatic solution. My motto is always:
If it doesn't want it the way it should, then it should be the way it wants.
So I use the node-red folder as temporary storage to write the file to with file write node .
Then with exec node move file with sudo mv <source> <destination> to final usb-destination.
This works great for me!!
Thanks for all your help, guys. Keep up the good work.