I just got SNMP working so I now get internet throughput from my router, yay! I was excited to see what the history chart looked like but when I finally displayed it I was bummed out:
The spikes drown out all the low bandwidth activity so it’s hard to look at the chart and decide if it is good or bad. Thinking about this more, I think the best way to visualize throughput over time is to accumulate the number of bits or bytes over a period of time and bar chart it: now I’d like to make a chart of the last 7 or so days of daily accumulated data but I’m finding myself stumped on doing that with HA… anyone have an idea how I can create such a chart to make this data more readable?
Thanks @pocket, I’ve really got my heart set on a bar chart but Googling around searching this forum I’m coming up empty handed… so maybe Grafana and logarithms are the only way.
Check out the mini-graph card. You can group by date:
Or if you don’t want to use Grafana and you want a logarithmic scale you can use a template sensor to take the log() of the values and graph that. I used to use that for my lux meter.
Thanks @tom_l, I just installed the custom card and I stood up a graph for it. I really would like to do this without custom components but this card does appear to mostly do it. I was hoping to make hard cutoffs for each day 00:00:00-23:59:99 and this card seems to start from now and look backwards by an interval. I’ll watch it over the next few days and see how I like it (looks like I need to change the icon tho):
type: 'custom:mini-graph-card'
name: Data Throughput
group_by: interval
hours_to_show: 48
points_per_hour: 0.25
aggregate_func: sum
entities:
- entity: sensor.daily_download
name: Download
- entity: sensor.daily_upload
name: Upload
show:
graph: bar
Ooh, I’m so close. I have it like this now but I’d really like to stack the bars in the chart and it doesn’t look like that’s possible with mini-graph-card.
type: 'custom:mini-graph-card'
group_by: date
hours_to_show: 168
aggregate_func: max
entities:
- entity: sensor.daily_download
name: Download
- entity: sensor.daily_upload
name: Upload
show:
graph: bar
icon: 'mdi:download-network'