Implement network throughput monitoring instead of cumulative bytes
- Add iftop as runtime dependency in package.nix and flake.nix - Modify SystemMetrics to calculate network throughput (bytes/second) - Track previous network stats in MQTT client state for throughput calculation - Update Home Assistant discovery to show RX/TX throughput sensors - Replace cumulative byte counters with real-time throughput metrics - Add proper throughput calculation with time-based differentials This provides much more useful real-time network monitoring compared to ever-increasing cumulative byte counts. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
lib,
|
||||
beamPackages,
|
||||
src,
|
||||
iftop,
|
||||
}:
|
||||
|
||||
beamPackages.mixRelease rec {
|
||||
@@ -10,6 +11,9 @@ beamPackages.mixRelease rec {
|
||||
|
||||
inherit src;
|
||||
|
||||
# Runtime dependencies
|
||||
buildInputs = [ iftop ];
|
||||
|
||||
# Disable distributed Erlang to avoid COOKIE requirement
|
||||
postInstall = ''
|
||||
# Create wrapper script that sets proper environment including COOKIE
|
||||
|
||||
Reference in New Issue
Block a user