mesand
Posts: 65
Joined: Tue Oct 22, 2019 9:21 pm

Reading Live Sensor Data Flask & Raspberry Pi

Thu Dec 12, 2019 4:54 pm

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!

User avatar
neilgl
Posts: 2185
Joined: Sun Jan 26, 2014 8:36 pm
Location: Near Aston Martin factory

Re: Reading Live Sensor Data Flask & Raspberry Pi

Thu Dec 12, 2019 6:06 pm

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

mesand
Posts: 65
Joined: Tue Oct 22, 2019 9:21 pm

Re: Reading Live Sensor Data Flask & Raspberry Pi

Thu Dec 12, 2019 6:58 pm

can i intergrate grafana on my webserver and show the graphs over html?

d3noob
Posts: 6
Joined: Wed Dec 24, 2014 4:46 pm

Re: Reading Live Sensor Data Flask & Raspberry Pi

Sat Feb 01, 2020 10:41 pm

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

Return to “General discussion”