Hi!
I want to set local images in dashboard too, but I have node-red installed in one Dell 3003 series, using Ubuntu Core. I'm extremely new on this (on ubuntu, I refer) and I don't know in where file dispose the httpStatic direction neither how open the window where the change is done. I've tried to change the file settings.js located in /root/snap/node-red/{version}/settings.js but the httpStatic parameter isn't there.
I search for info and see the comand src or put the /image file in C: and refer to /myimage.png, so I have set my /image folder in /home/admin/image and transfered one ."png" image to there, but this doesn't show the image so I think I'm forgetting something...
Also, I want to save the data in a .csv file. I have done this in Windows with the .csv and file nodes, and it works perfectly but, again, I don't know hot to do this in Ubuntu Core.
Normally on Ubuntu the settings.js file (and your flows file) would be in the folder .node-red under your home folder, but I don't know whether it is different in Ubuntu Core. If you can run node-red then look in the node red log (again, not sure where that will be). If you can run it from a terminal it may be there. When node red is started it will output messages starting with "Welcome to node red" and in the lines after that it will say where the files are.
Is there a reason you want to use Ubuntu Core? If you are not used to Linux then it will generally be easier to get help if instead you used Ubuntu Server or Ubuntu Desktop, then you can install node-red using the Pi upgrade script and everything should just go.
In terms of where to put the static files you can put them anywhere that is accessible to node red. I put them in a subfolder of .node-red (.node-red/static) then in settings.js I put
httpStatic: '/home/myusername/.node-red/static/`
which, once you work out where your .node-red folder is you can modify that. accordingly.
Hi Colin,
I'm programming this on my job and the PC there uses Ubuntu Core, only this reason.
Finally I set the pictures in base64 format, directly in the node as msg.payload, so this issue is solved for me.
On the other hand, still don't know where to set the folder to save data. I have already find the settings.js file and I'm able to change it, but the SSH client that I use displays the folder ".node-red" is on many folders... Which one I have to use?
Post the node red startup log, starting with the Welcome to Node Red message. Put a line with three backtick characters before it and another such line after to stop the forum reformatting it.
OK, so that shows us where the settings and flow files are. Did you edit that settings file and put the http static line in? If so then I presume that means that /home/admin/.node-red/static is where you want to put the images, did you have a good reason for putting them there? I don't understand what you mean by "the SSH client that I use displays the folder ".node-red" is on many folders". When you connect via ssh which folder does it open in? Run pwd to see, if you don't know.
Well, I only set this line because you said:
"In terms of where to put the static files you can put them anywhere that is accessible to node red."
So I assume this folder has to be set after a .node-red folder.
Can I set this route in /home/admin/Backup/ ? or where I want to?
To repeat my words that you quoted "In terms of where to put the static files you can put them anywhere that is accessible to node red." so yes you can put them wherever you like, provided that folder is accessible to node red. Which folders are accessible to node-red running in a snap in Ubuntu Core I have no idea. Presumably whoever decreed that the machine should have Ubuntu Core on it would know more about that environment.
The whereis command does not do what you think. You could use find or locate to do what you want.