mirror of
https://github.com/tomaae/homeassistant-mikrotik_router.git
synced 2025-07-08 00:14:31 +02:00
Fix icons for accounting sensors, update accounting docs
This commit is contained in:
parent
6978652cce
commit
f141c6915b
3 changed files with 6 additions and 13 deletions
11
README.md
11
README.md
|
@ -49,7 +49,7 @@ You can add this integration several times for different devices.
|
||||||

|

|
||||||
* "Host" - Use hostname or IP
|
* "Host" - Use hostname or IP
|
||||||
* "Port" - Leave at 0 for defaults
|
* "Port" - Leave at 0 for defaults
|
||||||
* "Name of the integration" - Friendy name for this router
|
* "Name of the integration" - Friendly name for this router
|
||||||
* "Unit of measurement" - Traffic sensor measurement (bps, Kbps, Mbps, B/s, KB/s, MB/s)
|
* "Unit of measurement" - Traffic sensor measurement (bps, Kbps, Mbps, B/s, KB/s, MB/s)
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
|
@ -68,11 +68,4 @@ For per-IP throughput tracking Mikrotik's accounting feature is used.
|
||||||
|
|
||||||
Feature will be automatically used if accounting is enabled in Mikrotik. Feature is present in Winbox IP-Accounting. Make sure that threshold is set to reasonable value to store all connections between user defined scan interval. Max value is 8192 so for piece of mind I recommend setting that value. Web Access is not needed, integration is using API access.
|
Feature will be automatically used if accounting is enabled in Mikrotik. Feature is present in Winbox IP-Accounting. Make sure that threshold is set to reasonable value to store all connections between user defined scan interval. Max value is 8192 so for piece of mind I recommend setting that value. Web Access is not needed, integration is using API access.
|
||||||
|
|
||||||
Integration will scan DHCP Lease table and ARP table to generate all known hosts and create two sensors for WAN traffic (mikrotik-XXX-wan-rx and mikrotik-XXX-wan-tx). If the parameter *account-local-traffic* is set in Mikrotik's accounting configuration it will also create two sensors for LAN traffic (mikrotik-XXX-lan-rx and mikrotik-XXX-lan-tx).
|
Integration will scan DHCP Lease table and ARP table to generate all known hosts. For every host aleast two sensors for WAN traffic (mikrotik-XXX-wan-rx and mikrotik-XXX-wan-tx) are created. If the parameter *account-local-traffic* is set in Mikrotik's accounting configuration it will also create two sensors for LAN traffic (mikrotik-XXX-lan-rx and mikrotik-XXX-lan-tx).
|
||||||
|
|
||||||
Device's name will be determined by first available string in this order:
|
|
||||||
1. DHCP hostname
|
|
||||||
2. DNS static entry
|
|
||||||
3. Device's MAC address
|
|
||||||
|
|
||||||
Devices attributes contain IP Address, MAC address and Comment (filled by comment of devices DHCP lease, fallbacks to device name in definition above)
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ SENSOR_TYPES = {
|
||||||
},
|
},
|
||||||
"accounting_lan_tx": {
|
"accounting_lan_tx": {
|
||||||
ATTR_DEVICE_CLASS: None,
|
ATTR_DEVICE_CLASS: None,
|
||||||
ATTR_ICON: "mdi:download-network",
|
ATTR_ICON: "mdi:upload-network",
|
||||||
ATTR_LABEL: "LAN TX",
|
ATTR_LABEL: "LAN TX",
|
||||||
ATTR_GROUP: "Accounting",
|
ATTR_GROUP: "Accounting",
|
||||||
ATTR_UNIT: "ps",
|
ATTR_UNIT: "ps",
|
||||||
|
@ -91,7 +91,7 @@ SENSOR_TYPES = {
|
||||||
},
|
},
|
||||||
"accounting_lan_rx": {
|
"accounting_lan_rx": {
|
||||||
ATTR_DEVICE_CLASS: None,
|
ATTR_DEVICE_CLASS: None,
|
||||||
ATTR_ICON: "mdi:upload-network",
|
ATTR_ICON: "mdi:download-network",
|
||||||
ATTR_LABEL: "LAN RX",
|
ATTR_LABEL: "LAN RX",
|
||||||
ATTR_GROUP: "Accounting",
|
ATTR_GROUP: "Accounting",
|
||||||
ATTR_UNIT: "ps",
|
ATTR_UNIT: "ps",
|
||||||
|
@ -101,7 +101,7 @@ SENSOR_TYPES = {
|
||||||
},
|
},
|
||||||
"accounting_wan_tx": {
|
"accounting_wan_tx": {
|
||||||
ATTR_DEVICE_CLASS: None,
|
ATTR_DEVICE_CLASS: None,
|
||||||
ATTR_ICON: "mdi:download-network",
|
ATTR_ICON: "mdi:upload-network",
|
||||||
ATTR_LABEL: "WAN TX",
|
ATTR_LABEL: "WAN TX",
|
||||||
ATTR_GROUP: "Accounting",
|
ATTR_GROUP: "Accounting",
|
||||||
ATTR_UNIT: "ps",
|
ATTR_UNIT: "ps",
|
||||||
|
@ -111,7 +111,7 @@ SENSOR_TYPES = {
|
||||||
},
|
},
|
||||||
"accounting_wan_rx": {
|
"accounting_wan_rx": {
|
||||||
ATTR_DEVICE_CLASS: None,
|
ATTR_DEVICE_CLASS: None,
|
||||||
ATTR_ICON: "mdi:upload-network",
|
ATTR_ICON: "mdi:download-network",
|
||||||
ATTR_LABEL: "WAN RX",
|
ATTR_LABEL: "WAN RX",
|
||||||
ATTR_GROUP: "Accounting",
|
ATTR_GROUP: "Accounting",
|
||||||
ATTR_UNIT: "ps",
|
ATTR_UNIT: "ps",
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
Loading…
Add table
Add a link
Reference in a new issue