I have a Raspberry PI collecting data from a break beam sensor I wish to use as part of an already developed Laravel application. I was just wondering what would the best way to transfer the data be.
I was thinking of creating an JSON file uploading it to a directory then running a cron job hourly to pick up on new files before running them through the Laravel controller to update the database and send emails.
I would like to pass the data through the Laravel application rather than sending from Python for management purposes. Could anyone see any issues with my way/ know a better way?
Use python to extract data from the serial ports of rasberry pi and json encode it and store it in the web directory of your laravel project files. Later json decode and present the data on the web end via laravel php. This is all good . Beind said that another way is to get data from python and then make a curl Post request to your php project and collect data
What is the best way to send Python generated data to PHP?