Skip to content

[Bug] Port Traffic Statistic show incorrect values depending on Integration Update Intervall #319

@Zarox666

Description

@Zarox666

Describe the issue

When decreasing the Update Intervall the reported Mbit/s increases.

I have 1 leg up to my Multi-WAN Router. When I saturate my WAN Connection (Speedtest, large Downloads) the Mikrotik Switch shows traffic on this Interface as ~90Mbits/s.
When I use the default 30 Second Update intervall this gets reported in HA as ~90Mbits/s.
However when I reduce the Update interval of the Integration to 10 Seconds it gets reported as ~135Mbits/s and when I further drop it to 5 Seconds it shows as 160Mbits/s.

So something is not quite right with the calculation of these Values.
The Switch shows ~90Mbits/s for all these tests.
( I am aware that a 5 second update interval is redicoulously short if the update itself takes 5+ seconds, but this is for illustration purposes only)

How to reproduce the issue

  1. Set up a Port Traffic Sensor and put a measurable / consistent amount of traffic overt his port.
  2. Change the Update intervall of the Mikrotik Router Integration and compare values reported by RouterOS vs. HA

Expected behavior

Throughput per Second Values should not change dependant on the duration between updates.

Screenshots

One WAN link was down, so I only got ~50Mbit/s but nevertheless the difference in the reported Values is starkly visbile.
This was with a 5 Second Update intervall.
image

The Diagnostic Logs are from this test.
The Data has been stopped and connected while the Bandwitdh test was still running.

Software versions

Home Assistant 2023.10.0
Supervisor 2023.10.0
Operating System 10.5
Frontend 20231002.0 - latest
Mikrotik Router integration version: v.2.1.4
RouterOS version: v6.49.7 (stable)

Diagnostics data

home-assistant_mikrotik_router_2023-10-16T05-39-33.491Z.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingplannedTo be implemented in future release

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions