Waziup / WaziGate

Waziup LoRa Edge gateway
21 stars 20 forks source link

LoRa: support multi-field sensors (e.g. GPS) #45

Open cdupont opened 4 years ago

cdupont commented 4 years ago

Currently, the gateway doesn't support sensors that provides tuple-values. For example GPS provides a pair of values: (longitude, latitude). Currently, those value are sent in as two different sensor values in the LoRa frame: \!LONG:40/LAT:20. However, this will result in the creation of two different sensors in the Cloud ("LONG" and "LAT"). It would be better to create only one sensor with two fields (to keep things together).

cdupont commented 4 years ago

A solution would be to send JSON structures in the LoRa frame: \!GPS/{longitude:40,latitude:20}. This should result in the creation of one "GPS" sensor with two values. It can be further decoded as GPS values and added to a map.