• dev
  • Inserting real time telemetry data from Flespi HTTP Stream To Mysql database

Hello,
I setup http stream receiver at my http server and I can able to get .json file but I don't know how can I insert in real-time telemetry data to the mysql server.

Note : My .json file from felspi in the http server root only store real time data.

Kindly help step by step please.

Regards,

theinhtite You have an array of messages in JSON format. You may insert them one by one into your database. How to insert greatly depends on the programming language of your server and columns defintion of your database.

Alternatively you may allow flespi to take care about telemetry database, in that case you may later access messages history and analytics calculations for each registered device. See this article for more information.

    shal
    My question is how can I insert real time data to the mysql database. Now I can able to insert with php script but I need to run the PHP file on the browser.

    Is there any code that I can directly insert .json to the mysql without running PHP script on browser.

      shal Yes, I have tried, that script creates message.json at the httpd root folder of my server.
      What I have done now is I created another php script and open that message.json file at my root server and insert to the mysql database in my own php script, but I needed to run my php script to insert .json to the mysql.

        theinhtite
        Hmm... You can just combine these scripts and replace the code of writing into the file by your code that sends received data directly into the database.

          dexif Do you have any sample code which is directly send data to the mysql database, not write to the .json file.

          dexif Thanks for your hardwork. I really appreciate it.

          Write a Reply...