Hello everyone,
I’m currently an apprentice working on a large IoT project, where I’m setting up a complete LoRaWAN network—from end devices to web applications—centered around ChirpStack. However, since I’m relatively new to networking and IoT, I find the vast amount of documentation and possible implementations a bit overwhelming.
I’m reaching out to the community for advice on best practices, particularly regarding data flow and infrastructure setup. Right now, I’m working on a demo with five different sensors configured within a Demo application in ChirpStack.
I’ve tried to organize my questions as clearly as possible:
1) Data Flow & Storage
Currently, uplinks are decoded using the Codec section in ChirpStack and stored via the InfluxDB integration. However, I’m unsure if this is the best approach.
- a) Should I:
- Decode uplinks first and then store them in a database (if so, which type of database is best suited)?
- Store uplinks as raw payloads and decode them later in my application (again, what type of database would be appropriate for this)?
- b) How is this usually handled in real-world implementations?
- Do you use Redis Streams to retrieve uplinks, process them, and then store them?
- Do you rely on MQTT to send uplinks to an application that handles decoding and storage?
- Do you use the gRPC API to retrieve uplinks and process them before storage?
- Maybe HTTP?
- What kind of database(s) do you prefer? InfluxDB, PostgreSQL, MongoDB, or something else?
- c) Handling device data:
- If multiple sensors of the same type exist, what’s the best way to retrieve and differentiate their data? Should I tag them somewhere (e.g., in ChirpStack, within the database itself, or in a separate table storing additional device information)?
- How can I efficiently retrieve data from devices located in the same area?
2) MQTT Integration
Would you consider MQTT a must-use technology in modern ChirpStack implementations? How is it typically used between the LNS and applications?
3) gRPC API
What are the practical use cases for gRPC in a ChirpStack-based setup?
- Is it commonly used for retrieving uplinks (from wich source?) and sending downlinks?
- Should it be custom developed for these interactions, or is it intended for other purposes?
4) Best Practices for Data Flow
What is considered a good or best-practice data flow for a LoRaWAN network?
- Option 1: Devices ⟷ Gateways ⟷ LNS ⟷ Persistent Database ⟷ Application
- Option 2: Devices ⟷ Gateways ⟷ LNS ⟷ Application ⟷ Persistent Database
- Other? More complex architectures?
I realize this is quite a few questions, but I’d greatly appreciate any insights or guidance on where to focus my efforts. Despite my research, the range of options is overwhelming, and I’m struggling to determine which approach is most effective. I believe answers to these questions could also help others who are trying to get a clearer understanding of ChirpStack and its components.
Looking forward to your thoughts!
Best regards,
Arthur