Summary
This guide walks the user through configurating ChirpStack to connect to an external IOT cloud using its built in REST API. The use case enables remote storage and control dashboards.
The primary components are:
- Logging into ChirpStack
- Adding an HTTP Integration to Datacake
- Creating and adding a ChirpStack API Token in Datacake
Prerequisites
- Control Center ID / password - https://controlcenter.veea.co/
-
LoRa model Veea Hub
a. Check the 8th digit of your serial number
b. LoRa hubs have a designation of A, B, C representing the region.
- "0" None
- A LoRaWAN 470MHz
- B LoRaWAN 868MHz
- C LoRaWAN 915MHz
c. Example: H10CTW0C80E00000xxxx. (C is for USA 915 Mhz)
-
LoRa Application is Subscribed
a. In Control Center, click on Meshes tab.
b. Select your mesh
c. Scroll down until Subscriptions section
d. Verify LoRaWan for VeeaHubs > 4.6.0-3.4.x.x is installed
- If LoRaWan is not installed, click Add a Subscription, select the correct version and proceed to fill in the form for login credentials for the LoRa application and the File Browser.
- If you cannot find the Application, request to be added to the access control list through your administrator or through https://support.veea.com ticket.
- ChirpStack login / password
-
URL for specific VeeaHub ChirpStack RestAPI
a. https://vh-chirpstack-core-HnnCTWGC80E00000nnnn.services.veea.io:9081
- ChirpStack API Token
-
Datacake / IoThink / Other 3rd Party Integration
a. Login Credentials
b. URLs
c. API Token
-
LoRa Sensor
a. DevEUI
b. Appskey
c. Javascript downlink and uplink decoder from manufacturer
Part 1: Log Into ChirpStack
-
Open ChirpStack Web UI
a. Navigate to the URL of your ChirpStack instance through ControlCenter and the Services Link on the Meshes tab, and under the mesh you are managing (e.g., https://controlcenter.veea.co).
-
Log In
a. Enter your username and password.
b. Click “Login”.
If you don’t have an account, contact your administrator who subscribed the LoRaWAN application.
Part 2: Add HTTP Integration to Datacake
ChirpStack allows HTTP integrations that can forward uplink data (and optionally downlink acknowledgments) to a third-party like Datacake.
Step 1: Get Your Datacake Webhook URL
- Log in to Datacake.
- Navigate to your workspace and open the device you want to connect.
- Go to the "Integrations" tab.
- Select "ChirpStack Integration".
- Copy the Webhook URL provided (it should look like:
- https://api.datacake.co/integrations/lorawan/uplink/your-token
Step 2: Add HTTP Integration in ChirpStack
- In ChirpStack Web UI, go to your Application.
- Click “Integrations” > “Add Integration”.
- Choose “HTTP”.
Fill out the fields as follows:
- Payload marshaler: JSON
- Uplink data URL: Paste the Datacake Webhook URL
- Join notification URL (optional): Same URL or leave blank
- ACK notification URL (optional): Same URL or leave blank
- Error notification URL (optional): Same URL or leave blank
- Headers (optional): Leave blank unless Datacake asks for a custom header
- Click “Submit”.
You have now added an HTTP integration from ChirpStack to Datacake.
Part 3: Add ChirpStack API Token in Datacake
The API token is needed for Datacake to fetch device metadata (like names) from ChirpStack.
Step 1: Create API Token in ChirpStack
- In ChirpStack Web UI, click on your username in the top-right.
- Go to “API Keys”.
- Click “Create API Key”.
- Add a name like "Datacake Integration" and give it the appropriate permissions:
- At minimum: Read access to applications and devices
- Click “Create” and copy the API token (you won't be able to see it again).
- Optionally: Veea created a token you may use called JWT. It is found in the File-browser from ControlCenter > Meshes> LoRa mesh > Services section. The file name is api-key.txt.
Step 2: Add API Token in Datacake
- Go back to Datacake, into your ChirpStack Integration.
- Paste the API Token from ChirpStack into the API Key field.
- This is found under device> Configuration, then select the Product and Hardware tab.
- Scroll down to LoRaWAN section
- Click change. It may have a red note that says “Not Configured” or a green “Configured” next to it.
- On this menu make sure Chirpstack is selected.
- Select Version 4 (REST API)
- Enter your ChirpStack Base URL (e.g., https://vh-chirpstack-core-HnnCTWGC80E00000nnnn.services.veea.io:19080 . Note port 19080
- Enter your API Token
- Save the configuration.
Datacake will now be able to pull metadata (e.g., device names) from ChirpStack using the API key.
Integration Complete!
You’ve successfully connected ChirpStack to Datacake using an HTTP integration and API token. Your device uplinks should now show up in Datacake, and device metadata will sync.
Troubleshooting Tips
| Problem | Solution |
|---|---|
| No data in Datacake | Check the ChirpStack logs for failed webhook posts. Verify the Webhook URL. |
| API token error | Ensure the token has correct permissions and hasn’t expired. |
| Incorrect Base URL | Make sure your ChirpStack API endpoint is accessible from the internet if needed. |