I am running Node-RED on a raspberry pi 4. For future projects I would like a reliable way to read files from other raspberry pi's on the same network, as well as, windows 10 computers.
To give a little context, I have a different node-RED program running on a Windows 10 PC that uses the file in node to read the contents of a file on another Windows 10 PC on our network. In the file in path I use "\\hostname\C$\path-to-file" to access the contents of the file. This works as expected.
I'm not able to use this method for Windows-Pi, Pi-Windows, or Pi-Pi. It only works Windows-Windows.
Is there another format that will allow me to do this? Or is there a limitation using the file in node?
I have also tried using node-red-contrib-scp to read Pi-Pi, and Pi-Windows with no luck.
I know about how to setup share folders both on the Windows side and the Pi side but this is not an acceptable solution in my situation.
Is there a node package or method that will allow me to achieve this task?
You can't get a C: path on a pi becase the linux fs's don't use drive letters. The reason you can't access the c$ windows device path from a pi will be because node-red is running under a user id that isn't allowed access to the Windows C: drive.
You should create a new shared drive on the windows device and give permission for the pi user to access it.
requires the pi's filing system to already have the shared drive mounted.
requires you to have set up OpenSSH on the Windows device.
Since you are running NR on Winodws, why not use it to stream the data over on request?
I was able to access a share on a PC using the Pi's file manager pointed to the address smb://hostname/share a prompt opened asking me to enter the user, domain, and password. I entered my credentials and was able to access the subsequent folders and files successfully. However I have not been able to access using Node-RED.
I tried using node-red-contrib-filebrowser and node-red-contrib-smb and couldn't get either of them working. For the file path on each of them I tried various iterations such as \\hostname\share, //hostname/share, smb://hostname/share, but none of them were able to access the share. I realize this explanation is a little vague but I wanted to see if someone could suggest the right way, rather than me explain details of all the wrong ways I have tried. But I will provide detailed steps I've tried if it will help.
It appears to me after doing some investigation that both of the packages I mentioned in my last post have not been updated for over 2 years. I have seen others run into the same issues I have with no resolutions and the authors of the packages are nowhere to be found.
Is there another convenient way to access the smb share? I would like to stay away from mounting and using a local address because it could be possible that I would need to mount up to 56 different shares at a time and that sounds messy.
My last attempt to avoid mounting, is there any way to use an smb uri or something to access the location? Is there any point in posting the errors I get when using the node packages I've mentioned?
Otherwise, I'm not familiar with DFS. Could you give me some direction?
Also when I first accessed the smb share using the file manager on the Pi, it created a shortcut on the desktop that allows me to access that share again quickly. I usually mount through the command line but I just wanted to verify that this is not an alternative way to mount?
try cifs://sharename instead of smb:// would be my only other thought
It really is not that messy to mount all the shares at once in Linux though - you would have them mount at startup and have each mount under a single mountpoint (say) /mnt/Windows/1, /mnt/Windows/2 etc etc