IoT Device connectivity to Azure via FTP

%3CLINGO-SUB%20id%3D%22lingo-sub-2031098%22%20slang%3D%22en-US%22%3EIoT%20Device%20connectivity%20to%20Azure%20via%20FTP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2031098%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3EI'm%20working%20with%2030%2B%20waterflow%20meters%20and%20the%20connectivity%20option%20is%20limited%20to%20FTP%20(I'm%20hoping%20SFTP%20is%20supported%20but%20haven't%20found%20a%20definitive%20yes%2Fno%20in%20the%20Doc).%20The%20data%20to%20be%20passed%20is%20simply%20csv%20files%20from%20several%20sensors.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20current%20method%20of%20retrieving%20data%20is%20via%20a%20Tech%20visiting%20once%20a%20month%20and%20downloading%20the%20data%20via%20USB-to-Serial.%20They%20visit%20to%20check%20status%20and%20clear%20debris%20as%20well%2C%20so%20data%20collection%20is%20not%20the%20only%20task.%20The%20meters%20all%20have%20Cellular%20Modems%20and%20can%20connect%20to%20the%20Internet.%20Limiting%20factor%20is%20FTP%20being%20the%20only%20data%20transfer%20method%20supported.%20What%20are%20options%20for%20getting%20Data%20into%20Azure%20via%20FTP%20(ideally%20into%20IoT%20Hub%20to%20match%20the%20workflows%20we%20use%20for%20other%20sensors)%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2031098%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFTP%20into%20Azure%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2037011%22%20slang%3D%22en-US%22%3ERe%3A%20IoT%20Device%20connectivity%20to%20Azure%20via%20FTP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2037011%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280295%22%20target%3D%22_blank%22%3E%40PBradz%3C%2FA%3E%26nbsp%3BI'll%20work%20through%20some%20possible%20solutions%20and%20hopefully%20this%20may%20be%20beneficial%20to%20someone%20else.%3C%2FP%3E%3CP%3EI%2Fwe%20are%20looking%20at%204%20options%20to%20resolve%20our%20connectivity%20issue.%20The%20workflow%20for%20other%20devices%2C%20that%20fortunately%20support%20more%20than%20just%20FTP%2C%20is%20as%20follows%3B%3C%2FP%3E%3CUL%3E%3CLI%3EConnect%20to%20Azure%20IoT%20Hub%20(via%20one%20of%20the%20supported%20methods)%2C%20connection(mostly%20JSON%20data)%20passed%20to%20Azure%20Logic%20App%3C%2FLI%3E%3CLI%3EAzure%20Logic%20App%20identifies%20connection%2Fdata%20and%20routes%20data%20to%202%20locations%3B%20a%203rd%20party%20Platform(integrates%20to%20SalesForce%2C%20and%20external%20partner%20Orgs)%20and%20our%20internal%20db%3C%2FLI%3E%3CLI%3EWeb%20Services%20use%20the%20internal%20db%20info%20to%20present%20data%20to%20internal%20and%20external%20users%20via%20webpages%2C%20visualizations%2C%20map%20overlays%2C%20etc.%3C%2FLI%3E%3C%2FUL%3E%3CP%3EThe%204%20options%20so%20far%20are%20as%20follows%2C%20in%20a%20successively%20more%20complex%20order%20(for%20us)%3A%3C%2FP%3E%3COL%3E%3CLI%3ERoute%20data%20in%20via%20another%20path%3B%20possibilities%20include%20going%20to%20our%203rd%20Party%20Platform%20or%20the%20Web%20Services%20platform%2C%20and%20pulling%20the%20data%20into%20our%20db%20from%20there.%3C%2FLI%3E%3CLI%3EUtilizing%20an%20App%20Services%20Web%20App%20for%20the%20FTP%20upload%2C%20have%20our%20Logic%20App%20monitor%20the%20folders%20for%20changes%20(uploads)%20and%20move%20that%20data%20per%20other%20workflows.%3C%2FLI%3E%3CLI%3EUse%20an%20Azure%20ACI%20with%20Azure%20persistent%20Storage%20as%20the%20FTP%20target%2C%26nbsp%3Bhave%20our%20Logic%20App%20monitor%20the%20folders%20for%20changes%20(uploads)%20and%20move%20that%20data%20per%20other%20workflows.%3C%2FLI%3E%3CLI%3EBuild%20a%20custom%20Azure%20IoT%20Protocol%20Gateway%20to%20act%20as%20a%20Bridge%20to%20Azure%20IoT%20Hub%3B%20accept%20FTP%20via%20the%20Gateway%20and%20pass%20to%20IoT%20Hub%20via%20AMQP.%20From%20there%20the%20workflow%20is%20the%20same%20as%20other%20devices.%3C%2FLI%3E%3C%2FOL%3E%3CP%3EHappy%20to%20hear%20any%20other%20suggestions%20or%20recommendations!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2387016%22%20slang%3D%22en-US%22%3ERe%3A%20IoT%20Device%20connectivity%20to%20Azure%20via%20FTP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2387016%22%20slang%3D%22en-US%22%3EHi%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F280295%22%20target%3D%22_blank%22%3E%40PBradz%3C%2FA%3E%2C%3CBR%20%2F%3EI%20am%20currently%20having%20the%20same%20problem%20in%20my%20company%20where%20we%20want%20to%20let%20weather%20stations%20ingest%20data%20via%20FTP.%20Currenlty%20the%20folder%20structure%20on%20the%20FTP%20server%20offers%20one%20folder%20per%20device.%20So%20my%20idea%20was%20to%20use%3A%3CBR%20%2F%3Eyour%20option%203)%3CBR%20%2F%3EHost%20a%20FTP%20server%20which%20provides%20FTP%20protocol%20support%20via%20a%20Azure%20Service%20%2F%20VM.%20The%20backing%20storage%20is%20monitored%20by%20some%20serverless%20logic%20on%20Azure%20and%20%22microbatched%22%2Fparsed%2Fforwared%20to%20the%20streaming%20(fast%20path)%20architecture.%3CBR%20%2F%3EMy%20idea%20hear%20is%20to%20use%20IoT%20Hub%20also%20for%20%22provisioning%22%20the%20FTP%20server%20by%20having%20each%20weather%20station%20defined%20as%20%22Iot%20device%22.%20The%20device%20agent%20(sideloaded%20with%20the%20ftp%20server)%20would%20react%20to%20new%20%22device%20registrations%22%20and%20create%20a%20new%20folder%20in%20the%20FTP%20server%20data%20store%20as%20well%20as%20provision%20the%20ACLs%20for%20the%20folder.%3CBR%20%2F%3E%3CBR%20%2F%3Eor%3CBR%20%2F%3E%3CBR%20%2F%3Eyour%20option%204)%3CBR%20%2F%3Eforget%20about%20a%20%22real%22%20ftp%20server%20but%20write%20a%20%22facade%20FTP%20Bridge%20to%20Azure%20IoT%20Hub%22%20which%20from%20the%20outside%20looks%20like%20a%20FTP%20server%20but%20has%20no%20storage%20built-in.%20But%20this%20would%20only%20allso%20for%20%22write%22%20scenarios%20not%20if%20some%20other%20user%20whats%20to%20use%20the%20FTP%20to%20read%20weather%20data%20from.%3CBR%20%2F%3E%3CBR%20%2F%3EDid%20you%20choose%20one%20solution%20for%20your%20use-case%3F%20If%20yes%2C%20did%20you%20re-use%20opensource%20components%20for%20is%3F%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%20in%20advance%2C%3CBR%20%2F%3EDominic%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2625191%22%20slang%3D%22en-US%22%3ERe%3A%20IoT%20Device%20connectivity%20to%20Azure%20via%20FTP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2625191%22%20slang%3D%22en-US%22%3EDominic%2C%20apologies%20for%20delay%20in%20responding...I'll%20go%20back%20and%20check%20for%20correct%20info%2C%20however%2C%20as%20I%20remember%20it%20we%20ended%20up%20with%20a%20linux%20VM%20w%2F%20IoT%20Edge%20installed%3B%20FTP%20went%20to%20Linux%20VM%20and%20Edge%20would%20transfer%20%22new%22%20files%20added%20to%20a%20Dir%20into%20IoT%20Hub%20which%20would%20direct%20as%20needed.%20For%20your%20case%20you%20could%20also%20have%20files%20copied%20to%20Azure%20Blob%20storage%20that%20is%20shared.%20I'll%20dig%20up%20my%20notes%20and%20add%20any%20details%20or%20corrections....%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi All,

I'm working with 30+ waterflow meters and the connectivity option is limited to FTP (I'm hoping SFTP is supported but haven't found a definitive yes/no in the Doc). The data to be passed is simply csv files from several sensors.

 

The current method of retrieving data is via a Tech visiting once a month and downloading the data via USB-to-Serial. They visit to check status and clear debris as well, so data collection is not the only task. The meters all have Cellular Modems and can connect to the Internet. Limiting factor is FTP being the only data transfer method supported. What are options for getting Data into Azure via FTP (ideally into IoT Hub to match the workflows we use for other sensors)?

3 Replies

@PBradz I'll work through some possible solutions and hopefully this may be beneficial to someone else.

I/we are looking at 4 options to resolve our connectivity issue. The workflow for other devices, that fortunately support more than just FTP, is as follows;

  • Connect to Azure IoT Hub (via one of the supported methods), connection(mostly JSON data) passed to Azure Logic App
  • Azure Logic App identifies connection/data and routes data to 2 locations; a 3rd party Platform(integrates to SalesForce, and external partner Orgs) and our internal db
  • Web Services use the internal db info to present data to internal and external users via webpages, visualizations, map overlays, etc.

The 4 options so far are as follows, in a successively more complex order (for us):

  1. Route data in via another path; possibilities include going to our 3rd Party Platform or the Web Services platform, and pulling the data into our db from there.
  2. Utilizing an App Services Web App for the FTP upload, have our Logic App monitor the folders for changes (uploads) and move that data per other workflows.
  3. Use an Azure ACI with Azure persistent Storage as the FTP target, have our Logic App monitor the folders for changes (uploads) and move that data per other workflows.
  4. Build a custom Azure IoT Protocol Gateway to act as a Bridge to Azure IoT Hub; accept FTP via the Gateway and pass to IoT Hub via AMQP. From there the workflow is the same as other devices.

Happy to hear any other suggestions or recommendations!

Hi @PBradz,
I am currently having the same problem in my company where we want to let weather stations ingest data via FTP. Currenlty the folder structure on the FTP server offers one folder per device. So my idea was to use:
your option 3)
Host a FTP server which provides FTP protocol support via a Azure Service / VM. The backing storage is monitored by some serverless logic on Azure and "microbatched"/parsed/forwared to the streaming (fast path) architecture.
My idea hear is to use IoT Hub also for "provisioning" the FTP server by having each weather station defined as "Iot device". The device agent (sideloaded with the ftp server) would react to new "device registrations" and create a new folder in the FTP server data store as well as provision the ACLs for the folder.

or

your option 4)
forget about a "real" ftp server but write a "facade FTP Bridge to Azure IoT Hub" which from the outside looks like a FTP server but has no storage built-in. But this would only allso for "write" scenarios not if some other user whats to use the FTP to read weather data from.

Did you choose one solution for your use-case? If yes, did you re-use opensource components for is?

Thanks in advance,
Dominic
Dominic, apologies for delay in responding...I'll go back and check for correct info, however, as I remember it we ended up with a linux VM w/ IoT Edge installed; FTP went to Linux VM and Edge would transfer "new" files added to a Dir into IoT Hub which would direct as needed. For your case you could also have files copied to Azure Blob storage that is shared. I'll dig up my notes and add any details or corrections....
www.000webhost.com