chirpstack-network-server icon indicating copy to clipboard operation
chirpstack-network-server copied to clipboard

I want to store the uplink-data into Postgresql,where is the proper location to put my code

Open yzk0281 opened this issue 10 years ago • 5 comments

Is it in func handleCollectedDataUpPackets() ? Good news is that it seems the PHYPayload decrypt already done. Anyone already do this job?

yzk0281 avatar Jul 14 '16 02:07 yzk0281

Normally you would like to have a separate application that subscribes on some MQTT topic (see this for more information) and that pushes the data to the database.

If you don't want to create another application, you can add implementation of ApplicationBackend (check this one for example), but then you might have problems merging when the loraserver changes in future versions...

ivajloip avatar Jul 14 '16 07:07 ivajloip

in func handleCollectedDataUpPackets() how to read the content of macPL.FRMPayload?

yzk0281 avatar Jul 15 '16 02:07 yzk0281

Best would, as @ivajloip already mentioned, to subscribe to your node(s) MQTT topic(s) (application/[AppEUI]/node/[DevEUI]/rx) and persist the data yourself.

brocaar avatar Jul 18 '16 05:07 brocaar

I would expect peristemcy to be handled by the application server. In my case, I grab the data from Mqtt, interpret it, insert it into InfluxDB and then connect Grafana to it for visual presentation. With InfluxDB you can control retention period etc, so you could have different classes of service etc.

VirTERM avatar Jul 18 '16 10:07 VirTERM

@VirTERM how you are connecting from mqtt to influxdb? Using python?

tusharvb19 avatar Aug 27 '18 09:08 tusharvb19