Page 1 of 1

Reading Live Sensor Data Flask & Raspberry Pi

Posted: Thu Dec 12, 2019 4:54 pm
by mesand
Hi All,

I want to read live sensor data and plot it from my raspberry pi. I am using flask. Currently I have socket.io set up to try and read the live sensor data on my website and display it, but I am having trouble with it and I get the feeling maybe this is more complicated than it needs to be. Does anyone on here have any experience or an idea on how I could approach this problem? I want to have live plotting graphs that go back ~30 data points and will update at intervals. Anyone have any ideas? I've researched it a bunch and figured people on here could have some valuable input. Thanks!

Re: Reading Live Sensor Data Flask & Raspberry Pi

Posted: Thu Dec 12, 2019 6:06 pm
by neilgl
Maybe use rrdtool on the pi to create graphs (as png files) that you can then show on a webserver on the pi (apache2, nginx...)
Or use inlfuxdb on the pi to store values, and show them using grafana on the pi.
Both methods worked for me

Re: Reading Live Sensor Data Flask & Raspberry Pi

Posted: Thu Dec 12, 2019 6:58 pm
by mesand
can i intergrate grafana on my webserver and show the graphs over html?

Re: Reading Live Sensor Data Flask & Raspberry Pi

Posted: Sat Feb 01, 2020 10:41 pm
by d3noob
It's a good question about integtration of Grafana into an already established site (That is what I am presuming you were interested in). While I don't know the answer to that question, might I suggest that you check out the how-to(ish) that I wrote that explains the setup of Prometheus and Grafana and then uses a custom exporter to integrate with a Python project that I had running on a Pi. https://leanpub.com/rpcmonitor/read