Use Grafana to graph motion sensor triggers

I once saw how someone set up a Grafana display to show when a motion sensor was triggered over a 24 hour period. It was like an occupancy record. I can’t find it again.

Has anyone done this? Or can someone point to an example?

Here’s what mine looks like so far. Each data point is not equally spaced as the graph suggests.

It doesn’t look anything like your example and it’s not grafana, but is https://flows.nodered.org/node/@cgjgh/node-red-dashboard-2-ui-state-timeline what you had in mind?

That looks cool, I’ll check it out.

Thanks!

If you use InfluxDB you could use a simple query to aggregate the events by location, so the data gets sampled down to a readable scale based on your time range.

SELECT count("value") AS "count" FROM "movement" WHERE $timeFilter GROUP BY time($__interval), "location"