metric_id, converts it to the catalogue unit and posts it to the Device API, one reading per field. This page covers the mapping. The bridge template covers the posting.
You need a claimed device and its key from the quickstart, a probe registered on your network server, and a payload formatter for it. Every mainstream probe vendor publishes a formatter for The Things Stack and ChirpStack. Use the vendor’s rather than decoding the byte table yourself.
What The Server Hands You
A webhook from the network server carries the decoded fields under a single object. On The Things Stack that object isuplink_message.decoded_payload; on ChirpStack it is object. A soil probe reporting moisture, temperature, conductivity and battery arrives like this:
The Mapping
Each decoded field becomes one reading with ametric_id from the shared catalogue. Pick the id whose unit matches what you post. The catalogue does not convert units, so the bridge does it before posting.
The full catalogue is on the quickstart. The ids you are most likely to use:
Battery has two ids on purpose. Post
200 when the probe reports a percentage and 2 when it reports volts. Never scale one into the other with a guessed curve.
The Bridge
The network server calls your bridge on every uplink. The bridge looks up the AgriHub360 device for that probe, walks the mapping and posts one request per field.Connect The Network Server
1
Register the probe
OTAA, with the DevEUI and AppKey from the probe’s label.
2
Add the payload formatter
The vendor’s decoder for that model. Send a test uplink and check the decoded fields appear with sensible values.
3
Add a webhook
Point the uplink event at your bridge’s URL.
4
Map and run
Fill in the mapping for the decoded field names, set the device id and key, and start the bridge.
Check The First Readings
- Scale. A wrong scale factor gives plausible numbers that are wrong by ten. Compare the first readings with a handheld meter in the same soil.
- Unit. Conductivity arrives in µS/cm from some decoders and mS/cm from others. Check which before you post to
224. - Timestamp. The server sets the timestamp on arrival. A delayed uplink or a backlog flushed after an outage is stored at the time it reached the API.
- Interval. The EU868 and US915 plans both limit airtime. Fifteen minutes is the fastest sensible interval for soil; hourly is enough.
- One device per probe. Claim each probe as its own device and give each its own key, so one lost key exposes one probe.