Import the received data of my gateway.
- This topic has 7 replies, 2 voices, and was last updated 5 years, 2 months ago by
Perico.
-
AuthorPosts
-
August 13, 2020 at 2:59 am #31073
Perico
ParticipantHi all!
I have a temperature sensor connected with my gateway and I’m receiving the data. As I checked the data is stored at my gateway: /var/config/lora/lora-network-server.db
Now my intention is to import this data in a file or similar, but I’ve tried it with python, java and others and I’m not able to have permisions to obtain this data. Somebody knows how I can get it? I need it to deal with the data in real time.*http://www.multitech.net/developer/software/lora/lora-network-server/ I’m trying to obtain as a json format looking this web, but the command it doesn’t works.
August 13, 2020 at 8:24 am #31076Jason Reiss
KeymasterCan you share an example of the command you are trying to use?
Realtime data can be obtained with an MQTT client application.
See an example here.
https://github.com/trong63/mqtt_sample.gitAugust 14, 2020 at 5:20 am #31082Perico
ParticipantI’ll take a look on it but my intention is to do it simpler, I thought I only need to be able to have acces in the database archive and with this I can export the data.
August 14, 2020 at 7:41 am #31083Jason Reiss
KeymasterHow is that more simple than direct json data as requested?
/var/run/lora/lora-network-server.db is the active file. /var/config/lora is a periodic backup.
August 14, 2020 at 10:16 am #31085Perico
ParticipantAbout your first question I used the lora-query json comand and it doesn’t works, first I think that with this I can get the data, but it seems to be wrong. This folliwing the webpage: http://www.multitech.net/developer/software/lora/lora-network-server/
I can’t answer your last question, honestly I’m a bit lost in all of this. For the moment I’m working on your proposal with MQTT.
Thanks Jason.
-
This reply was modified 5 years, 2 months ago by
Perico.
August 14, 2020 at 10:31 am #31087Jason Reiss
KeymasterThese commands are used by the UI to get the list of packets received.
$ lora-query -x packet list json
$ lora-query -x packet up json
What results are you see to make you say it does not work?
-
This reply was modified 5 years, 2 months ago by
Jason Reiss.
August 14, 2020 at 10:57 am #31089Jason Reiss
KeymasterThe mosquitto_pub and mosquitto_sub commands are helpful when working with MQTT.
$ mosquitto_sub -v -t lora/#
$ moquitto_pub -t lora/0011223344556677/down -m {“data”:”AQ==”}
August 18, 2020 at 2:23 am #31094Perico
ParticipantDear Jason,
My problem was that I put wrong the commands:
$ lora-query -x packet list json
$ lora-query -x packet up jsonNow I’ve seen that the data that appears with this comands is not instantaneously,somebody knows the actualization period time? Neverthless it’s usefull for me but now I need to see the data at real time, I’m going to try it with node-red, saving the instantaneous data in a file.
-
This reply was modified 5 years, 2 months ago by
Perico.
-
This reply was modified 5 years, 2 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.