Node-Red FTP Output

Home Forums General Node-Red FTP Output

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #12143
    Chris Friedel
    Participant

    Hey guys.

    After processing data on the conduit from the mDot, we’d like to FTP it to a target destination.

    Is there a way to do this with node-red? If not, is there either documentation on adding an output type to node-red, as well as I’d be open to non node-red ways to do this, but honestly I don’t know the first place to start getting the conduit to do anything without node-red (I’m stuck in node-red jail right now it seems 🙂 )

    Thanks!

    #12153
    Jeff Hatch
    Keymaster

    Chris,

    We do not have the FTP node module installed the AEP Conduit. We do have both the FTP and SCP client programs installed. You could write a simple script that reads a directory and uploads any new files that get created. There are plenty of examples of bash scripts that use ftp or scp to upload files to a remote server.

    I don’t think that an npm install of one of the available ftp node modules will work on the Conduit at this time due to the dependencies required.

    Jeff

    #12216
    Chris Friedel
    Participant

    Thanks Jeff,

    We did get a proof of concept working with, but found it a pretty PITA to troubleshoot sftp well stuck in AEP jail 🙂

    Ultimately we just switched to mqtt instead (by the way, was about the easiest things in the world via node-red, so that was very nice).

    Thanks again for the help.
    Chris

    #12217
    Jeff Hatch
    Keymaster

    Chris,

    Thank you for the feedback. While I’m not sure we’ll be adding the FTP module for node, using mqtt as an alternative was a good approach. Are you still sending a file via mqtt, or did you just send the information in a custom protocol?

    Jeff

    #12219
    Chris Friedel
    Participant

    Hi Jeff,

    We’re actually doing both for right now, and deciding which we prefer long term.

    In one method we completely decode the message from the mDot on the conduit, and transmit back JSON encoded data. Our typical M2M plans with our Telco vendors are 5MB, so this is a little less than ideal, but has been very nice for troubleshooting and such. In this case, the node-red application has a bunch of “protocol decoders” built into it to standardize each type of message (for example, the payload on the mdot dev board is different than the data being sent by our own product).

    In the second method we are passing the binary message back directly to our IoT platform. While this is very efficient, the downside for us is now our IoT platform needs to be told what decoding mechanism should be used for each individual wireless card; it’s putting a lot more of the configuration burden onto our customer. Ultimately though, I’m sure this is the approach we will be taking simply for the reduction in cellular comms.

    #16409
    Eliz
    Participant

    Hi

    I know this post was pretty long ago but I am sitting with the same initial problem – wanting to ftp a file from the conduit to the ftp server. Before it got very technical 🙂 I saw you said that one can use mqtt to transmit the file? How does one do that? Also you spoke of a FTP client program already installed on the conduit? How does one use and access that within node red?

    #16413
    Jeff Hatch
    Keymaster

    You would probably use a function node and javascript to execute the ftp command in a similar manner as is being done with the examples here:

    http://stackoverflow.com/questions/1880198/how-to-execute-shell-command-in-javascript

    There are quite a few examples of how to do this online. Use the method in javascript that best fits what you are trying to do.

    Jeff

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.