Commit graph

165 commits

Author SHA1 Message Date
Ivan Pavlina
023f45cf26 Modified variable hostname to host-name to keep inline with Mikrotik API 2020-04-08 16:53:20 +02:00
Ivan Pavlina
1bb90d51cd Fixed broken merge 2020-04-08 16:31:26 +02:00
Ivan Pavlina
f141c6915b Fix icons for accounting sensors, update accounting docs 2020-04-08 16:01:27 +02:00
Ivan Pavlina
6978652cce Fix for static ARP entries that aren't present in DHCP, could use a check on that.
Multiple fixes for accounting calculation and availability check.
2020-04-08 15:44:28 +02:00
Ivan Pavlina
b8d311978b Changed accounting sensor attribute 2020-04-08 14:16:19 +02:00
Ivan Pavlina
e8d2efe956 Fix for sensor type attr 2020-04-08 14:14:09 +02:00
Ivan Pavlina
32b93cc8cc Removed redundant get_dhcp call from update method. Removed unnecessary calls to Mikrotik API for accounting hosts build, reusing new hosts dict. Removed unnecessary variables from mikrotik_controller.py. Reused new dhcp-networks dict. Simplified accounting throughput calculation. Added accounting 'available' and 'local_enabled' parameters for each host. Implemented new parameters on sensor availability. 2020-04-08 13:41:03 +02:00
Ivan Pavlina
63f188b732 Merge branch 'master' of https://github.com/ivanpavlina/homeassistant-mikrotik_router into pr/2 2020-04-08 12:31:02 +02:00
tomaae
4d02e9123a fixed comment 2020-04-08 10:37:24 +02:00
tomaae
b962a5ee85 removed temp debug 2020-04-08 10:33:32 +02:00
tomaae
b0918fd782 add data from arp to host 2020-04-08 10:32:02 +02:00
tomaae
8b9f63c7b7 added IPv4Network to dhcp-network data point, requirement to accounting 2020-04-08 10:19:29 +02:00
tomaae
4a871af73a added data["dhcp-network"] data point 2020-04-08 10:09:31 +02:00
tomaae
d075e31a13 PEP8 fix 2020-04-08 10:01:41 +02:00
tomaae
c9a9e3e776 reordered update functions 2020-04-08 10:01:31 +02:00
tomaae
7b2087f834 added data["arp"] data point 2020-04-08 10:01:09 +02:00
tomaae
d568a7ca13 renamed current arp datapoint to arp_tmp 2020-04-08 09:59:55 +02:00
tomaae
004fc56269 removed temp debug 2020-04-08 09:48:52 +02:00
tomaae
65074df370 host device_tracker calculate time since last successful availability check 2020-04-08 09:48:16 +02:00
tomaae
e4e128ab4b changed host device_tracker from dhcp to host data point 2020-04-08 09:44:00 +02:00
tomaae
a9c0be0b2c removed temporary debug line 2020-04-08 09:21:26 +02:00
tomaae
b267943ba7 added custom data["host"] data point 2020-04-08 09:17:25 +02:00
tomaae
6ab2df8ef1 added comment to data["dhcp"] data point 2020-04-08 09:16:05 +02:00
tomaae
9c6712b511 added data["dns"] data point 2020-04-08 09:15:26 +02:00
tomaae
f0fc6f3c25 separated DHCP data point from host processing 2020-04-08 07:15:14 +02:00
Ivan Pavlina
cd9e30682c Add comment as accounting sensor attribute 2020-04-07 20:31:16 +02:00
Ivan Pavlina
a9b72434e2 Remove trailing commas 2020-04-07 15:07:23 +02:00
Ivan Pavlina
3c44445cd1 Fix for naming of static DNS entries without host-name and static DNS entry. Fallback value is not mac-address 2020-04-07 14:57:29 +02:00
Ivan Pavlina
069897c32c Removed manual accounting enable/disable checkbox, now it dinamically creates entites depending on state in Mikrotik. Reverted config flow to version 1.
Reused ARP call in accounting hosts building.
2020-04-07 14:50:26 +02:00
Ivan Pavlina
39c31cb84a Fixed grouping of accounting entities 2020-04-07 14:19:22 +02:00
Ivan Pavlina
aee33b8c13 Removed building hosts from ARP table for accounting devices - will use only DHCP leases.
Removed unnecessary code, put all accounting sensors in the same group, set accounting sensors key to mac-address
2020-04-07 13:33:48 +02:00
Ivan Pavlina
8244a146de Build hosts dynamically on every update 2020-04-07 13:02:01 +02:00
Ivan Pavlina
e51304a5e3 Fixed imports, changed primary key for accounting hosts from ip address to mac address 2020-04-07 11:32:38 +02:00
Ivan Pavlina
aa8f41f6fe Merge branch 'master' into pr/1 2020-04-07 10:54:19 +02:00
tomaae
6515fa8ef5 Reordered host device tracker attributions on UI card #24 2020-04-07 04:15:23 +02:00
tomaae
94eed1fba3 Moved interface and available fields to ensure_val #24 2020-04-07 04:01:33 +02:00
tomaae
052d532fe0 Preliminary support for host tracking #24 2020-04-07 03:55:38 +02:00
tomaae
03d1162e7d remove duplicate NAT rules to prevent crash #20 2020-04-06 22:50:01 +02:00
Ivan Pavlina
2c577116f9 Removed unnecessary logging 2020-04-05 23:23:07 +02:00
Ivan Pavlina
ca39617aaf Update docs and comments 2020-04-05 23:15:53 +02:00
Ivan Pavlina
03e70e521c Accounting initialize fix 2020-04-05 18:32:48 +02:00
Ivan Pavlina
887e645553 Fix dynamic build of local tx/rx sensors. 2020-04-05 18:29:51 +02:00
Ivan Pavlina
d5ddbc7772 Allow for dynamic check of local_traffic enabled in Mikrotik. 2020-04-05 18:08:34 +02:00
Ivan Pavlina
1c0b3018ed Fix 2020-04-05 16:04:17 +02:00
Ivan Pavlina
a1eee6f698 Initialize wan/lan accounting data on startup 2020-04-05 16:00:30 +02:00
Ivan Pavlina
f9a458bbfb Add ability to automatically determine if the LAN accounting sensor should be created depending on account-local-traffic in Mikrotik API 2020-04-05 15:03:17 +02:00
tomaae
fc3ad56044 added slovak translation 2020-04-05 04:28:02 +02:00
tomaae
dcb1ec36cf updated english translation 2020-04-05 04:27:20 +02:00
tomaae
5a845ba07b PEP8 2020-04-05 00:38:29 +02:00
tomaae
f89a263691 removed unused variable 2020-04-05 00:33:04 +02:00