Import the received data of my gateway.

Home Forums General Import the received data of my gateway.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #31073
    Perico
    Participant

    Hi 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.

    #31076
    Jason Reiss
    Keymaster

    Can 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.git

    #31082
    Perico
    Participant

    I’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.

    #31083
    Jason Reiss
    Keymaster

    How 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.

    #31085
    Perico
    Participant

    About 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 3 years, 8 months ago by Perico.
    #31087
    Jason Reiss
    Keymaster

    These 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 3 years, 8 months ago by Jason Reiss.
    #31089
    Jason Reiss
    Keymaster

    The 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==”}

    #31094
    Perico
    Participant

    Dear Jason,
    My problem was that I put wrong the commands:
    $ lora-query -x packet list json
    $ lora-query -x packet up json

    Now 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 3 years, 8 months ago by Perico.
Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.