diff --git a/app.py b/app.py index e3284c1..7632b7e 100644 --- a/app.py +++ b/app.py @@ -83,13 +83,23 @@ class UnifiAPI: diagnostics = { 'state': details.get('state', 'unknown'), - 'system': { - 'cpu': details.get('system_stats', {}).get('cpu', 0), - 'memory': details.get('system_stats', {}).get('mem', 0), - 'temperature': details.get('general_temperature', 0) - }, - 'interfaces': self._parse_interfaces(details.get('port_table', [])) + 'interfaces': { + 'ports': {} + } } + + # Parse port information + for port in details.get('port_table', []): + diagnostics['interfaces']['ports'][f"Port {port.get('port_idx')}"] = { + 'state': 'up' if port.get('up') else 'down', + 'speed': { + 'current': port.get('speed', 0), + 'max': port.get('max_speed', 0) + }, + 'poe': port.get('poe_enable', False), + 'media': port.get('media', 'unknown') + } + return diagnostics def _parse_interfaces(self, interfaces): diff --git a/log.txt b/log.txt index bdcc5be..8c69447 100644 --- a/log.txt +++ b/log.txt @@ -1,18 +1,23 @@ -root@gandalf:/var/www/html/prod# systemctl restart gandalf -root@gandalf:/var/www/html/prod# journalctl -u gandalf -f -Feb 08 00:13:26 gandalf systemd[1]: Stopped gandalf.service - Gandalf Network Monitor. -Feb 08 00:13:26 gandalf systemd[1]: gandalf.service: Consumed 1.063s CPU time. -Feb 08 00:13:26 gandalf systemd[1]: Started gandalf.service - Gandalf Network Monitor. -Feb 08 00:13:26 gandalf python3[4977]: [2025-02-08 00:13:26 -0500] [4977] [INFO] Starting gunicorn 20.1.0 -Feb 08 00:13:26 gandalf python3[4977]: [2025-02-08 00:13:26 -0500] [4977] [INFO] Listening at: http://127.0.0.1:8000 (4977) -Feb 08 00:13:26 gandalf python3[4977]: [2025-02-08 00:13:26 -0500] [4977] [INFO] Using worker: sync -Feb 08 00:13:26 gandalf python3[4978]: [2025-02-08 00:13:26 -0500] [4978] [INFO] Booting worker with pid: 4978 -Feb 08 00:13:26 gandalf python3[4979]: [2025-02-08 00:13:26 -0500] [4979] [INFO] Booting worker with pid: 4979 -Feb 08 00:13:26 gandalf python3[4980]: [2025-02-08 00:13:26 -0500] [4980] [INFO] Booting worker with pid: 4980 -Feb 08 00:13:26 gandalf python3[4981]: [2025-02-08 00:13:26 -0500] [4981] [INFO] Booting worker with pid: 4981 -Feb 08 00:13:29 gandalf python3[4978]: DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): 10.10.10.1:443 -Feb 08 00:13:29 gandalf python3[4978]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device HTTP/1.1" 200 None -Feb 08 00:13:29 gandalf python3[4978]: DEBUG:app:Raw device data: {'access_devices': [], 'apollo_devices': [], 'connect_devices': [], 'drive_devices': [], 'led_devices': [], 'network_devices': [{'_id': '648b6a79e0dce15429a77871', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'displayable_version': '2.2.6', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': 0, 'ip': '10.10.10.243', 'ipv4_lease_expiration_timestamp_seconds': 1739067793, 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738991602, 'last_uplink': {'type': 'wireless', 'uplink_device_name': 'AP', 'uplink_mac': 'd0:21:f9:42:65:54'}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': 'd0:21:f9:ca:ee:04', 'model': 'UP6', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'USP Strip', 'num_sta': 0, 'port_table': [], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 97, 'spectrum_scanning': False, 'state': 1, 'support_wifi6e': False, 'sys_stats': {'loadavg_1': 0.0, 'loadavg_15': 0.0, 'loadavg_5': 0.0, 'mem_buffer': 0, 'mem_total': 98304, 'mem_used': 84720}, 'system-stats': {'cpu': 0.0, 'mem': 0.0, 'uptime': 0}, 'tags': ['connection_type_wireless_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'uap', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'ap_mac': 'd0:21:f9:42:65:54', 'essid': 'element-e4935af3c573761f', 'radio_band': 'ng', 'type': 'wireless', 'uplink_device_name': 'AP', 'uplink_mac': 'd0:21:f9:42:65:54'}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 150545, 'usage_bytes': 0.0, 'vap_table': [], 'version': '2.2.6.532'}, {'_id': '63780dc5eec8d7076eee4cd6', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'discovered_via': 'l2', 'displayable_version': '7.1.26', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': 659093285, 'ip': '10.10.10.107', 'ipv4_lease_expiration_timestamp_seconds': 1739045795, 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738991583, 'last_uplink': {'port_idx': 1, 'type': 'wire', 'uplink_device_name': '24RJ45-POE', 'uplink_mac': '78:45:58:b1:bd:3a', 'uplink_remote_port': 7}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': '60:22:32:ab:de:07', 'model': 'USPPDUP', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'RPDU', 'num_sta': 0, 'port_table': [{'aggregated_by': False, 'autoneg': False, 'enable': True, 'full_duplex': True, 'is_uplink': True, 'media': 'FE', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 1, 'port_poe': False, 'rx_bytes': 457881379, 'rx_bytes-r': 1586, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 3371001, 'satisfaction': 100, 'speed': 100, 'speed_caps': 1048591, 'tx_bytes': 50483903, 'tx_bytes-r': 112, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 146421, 'up': True}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 100, 'spectrum_scanning': False, 'state': 1, 'sys_stats': {'loadavg_1': 0.01, 'loadavg_15': 0.0, 'loadavg_5': 0.0, 'mem_buffer': 0, 'mem_total': 61648896, 'mem_used': 18890752}, 'system-stats': {'cpu': 1.3, 'mem': 30.6, 'uptime': 445843}, 'tags': ['connection_type_wired_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'usw', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'mac': '60:22:32:ab:de:07', 'name': 'eth0', 'port_idx': 1, 'speed': 100, 'type': 'wire', 'uplink_device_name': '24RJ45-POE', 'uplink_mac': '78:45:58:b1:bd:3a', 'uplink_remote_port': 7}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 445843, 'usage_bytes': 0.0, 'vap_table': [], 'version': '7.1.26.15869'}, {'_id': '63f1de4d22f7604a2bd71cc8', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'displayable_version': '4.1.13', 'download_speed_bytes_per_second': 24201, 'ethernet_overrides': [{'ifname': 'eth0', 'networkgroup': 'LAN'}, {'ifname': 'eth1', 'networkgroup': 'LAN'}, {'ifname': 'eth2', 'networkgroup': 'LAN'}, {'ifname': 'eth3', 'networkgroup': 'LAN'}, {'ifname': 'eth4', 'networkgroup': 'LAN'}, {'ifname': 'eth5', 'networkgroup': 'LAN'}, {'ifname': 'eth6', 'networkgroup': 'LAN'}, {'ifname': 'eth7', 'networkgroup': 'LAN'}, {'ifname': 'eth8', 'networkgroup': 'WAN'}, {'ifname': 'eth9', 'networkgroup': 'WAN2'}, {'ifname': 'eth10', 'networkgroup': 'LAN'}], 'fw_caps': -487784915, 'ip': '172.14.74.7', 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'lan_ip': '10.10.10.1', 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738991609, 'last_uplink': {'port_idx': 9, 'type': 'wire', 'uplink_mac': '5a:07:f8:31:85:ee'}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': 'e0:63:da:80:55:2d', 'model': 'UDMPRO', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'Dream Machine Pro', 'num_sta': 7, 'port_table': [{'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth0', 'is_uplink': False, 'media': 'GE', 'name': 'eth0', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 1, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth9', 'is_uplink': False, 'media': 'SFP+', 'name': 'SFP+ 1', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 10, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048864, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'ifname': 'eth10', 'ip': '10.10.10.1', 'is_uplink': False, 'media': 'SFP+', 'name': 'Downlink to USW-Aggregation', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 11, 'port_poe': False, 'rx_bytes': 204125851923, 'rx_bytes-r': 187122, 'rx_dropped': 0, 'rx_errors': 2225, 'rx_packets': 271128441, 'satisfaction': 0, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 325840604545, 'tx_bytes-r': 136742, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 334616185, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth1', 'is_uplink': False, 'media': 'GE', 'name': 'eth1', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 2, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth2', 'is_uplink': False, 'media': 'GE', 'name': 'eth2', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 3, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth3', 'is_uplink': False, 'media': 'GE', 'name': 'eth3', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 4, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth4', 'is_uplink': False, 'media': 'GE', 'name': 'eth4', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 5, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth5', 'is_uplink': False, 'media': 'GE', 'name': 'eth5', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 6, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'ifname': 'eth6', 'is_uplink': False, 'media': 'GE', 'name': 'eth6', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 7, 'port_poe': False, 'rx_bytes': 79372911211, 'rx_bytes-r': 99366, 'rx_dropped': 71, 'rx_errors': 2, 'rx_packets': 150215220, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 153328291866, 'tx_bytes-r': 123409, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 197372481, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth7', 'is_uplink': False, 'media': 'GE', 'name': 'eth7', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 8, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'ifname': 'eth8', 'ip': '172.14.74.7', 'is_uplink': True, 'media': 'GE', 'name': 'eth8', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 9, 'port_poe': False, 'rx_bytes': 247671688589, 'rx_bytes-r': 24201, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 186791985, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 52600701846, 'tx_bytes-r': 96835, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 74507847, 'up': True}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 0, 'spectrum_scanning': False, 'state': 1, 'support_wifi6e': False, 'sys_stats': {'loadavg_1': 2.3, 'loadavg_15': 2.2, 'loadavg_5': 2.26, 'mem_buffer': 300474368, 'mem_total': 4137807872, 'mem_used': 2950451200}, 'system-stats': {'cpu': 13.3, 'mem': 71.3, 'uptime': 445858}, 'tags': ['connection_type_gateway_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'udm', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'name': 'eth8', 'port_idx': 9, 'speed': 1000, 'type': 'wire', 'uplink_mac': '5a:07:f8:31:85:ee'}, 'uplink_table': [], 'upload_speed_bytes_per_second': 96835, 'uptime': 445859, 'usage_bytes': 0.0, 'vap_table': [], 'version': '4.1.13.20906'}, {'_id': '6377ff4beec8d7076eee4bad', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'discovered_via': 'l2', 'displayable_version': '7.1.26', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': -1488390619, 'ip': '10.10.10.238', 'ipv4_lease_expiration_timestamp_seconds': 1739045824, 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738991575, 'last_uplink': {'port_idx': 7, 'type': 'wire', 'uplink_device_name': 'Dream Machine Pro', 'uplink_mac': 'e0:63:da:80:55:2d', 'uplink_remote_port': 11}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': '78:45:58:6d:11:6a', 'model': 'USL8A', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': '8SFP-AGG', 'num_sta': 6, 'port_table': [{'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'SFP+', 'name': 'SFP+ 1', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 1, 'port_poe': False, 'rx_bytes': 5540882418546, 'rx_bytes-r': 571239, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 1755923437, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 9478594827739, 'tx_bytes-r': 11894763, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 2551204188, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'SFP+', 'name': 'SFP+ 2', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 2, 'port_poe': False, 'rx_bytes': 169990, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 1781, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 481443645, 'tx_bytes-r': 980, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 3439397, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'SFP+', 'name': 'SFP+ 3', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 3, 'port_poe': False, 'rx_bytes': 168798, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 1769, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 477102070, 'tx_bytes-r': 981, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 3402701, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'SFP+', 'name': 'SFP+ 4', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 4, 'port_poe': False, 'rx_bytes': 10526087306528, 'rx_bytes-r': 23888000, 'rx_dropped': 0, 'rx_errors': 5, 'rx_packets': 2936325873, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 8103545517313, 'tx_bytes-r': 503009, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 2482734268, 'up': True}, {'aggregated_by': False, 'autoneg': False, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'SFP+', 'name': 'Downlink to 24RJ45-POE', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 5, 'port_poe': False, 'rx_bytes': 455211323097, 'rx_bytes-r': 827776, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 565719794, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 344901969024, 'tx_bytes-r': 287232, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 568466415, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'SFP+', 'name': 'SFP+ 6', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 6, 'port_poe': False, 'rx_bytes': 8792452890175, 'rx_bytes-r': 214205, 'rx_dropped': 0, 'rx_errors': 3, 'rx_packets': 2562277014, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 7272398884335, 'tx_bytes-r': 12278261, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 2225014068, 'up': True}, {'aggregated_by': False, 'autoneg': False, 'enable': True, 'full_duplex': True, 'is_uplink': True, 'media': 'SFP+', 'name': 'SFP+ 7', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 7, 'port_poe': False, 'rx_bytes': 327536854895, 'rx_bytes-r': 250728, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 334569418, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 204684617764, 'tx_bytes-r': 332319, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 271079390, 'up': True}, {'aggregated_by': False, 'autoneg': False, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'SFP+', 'name': 'Downlink to NVR-Pro', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 8, 'port_poe': False, 'rx_bytes': 17936219095, 'rx_bytes-r': 37548, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 235909990, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 251624106120, 'tx_bytes-r': 497525, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 300293682, 'up': True}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 100, 'spectrum_scanning': False, 'state': 1, 'sys_stats': {'loadavg_1': 0.51, 'loadavg_15': 0.56, 'loadavg_5': 0.52, 'mem_buffer': 0, 'mem_total': 129777664, 'mem_used': 43851776}, 'system-stats': {'cpu': 4.4, 'mem': 33.8, 'uptime': 445797}, 'tags': ['connection_type_wired_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'usw', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'mac': '78:45:58:6d:11:6a', 'name': 'eth0', 'port_idx': 7, 'speed': 10000, 'type': 'wire', 'uplink_device_name': 'Dream Machine Pro', 'uplink_mac': 'e0:63:da:80:55:2d', 'uplink_remote_port': 11}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 445834, 'usage_bytes': 0.0, 'vap_table': [], 'version': '7.1.26.15869'}, {'_id': '64e4072700c12e613e1e237d', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'discovered_via': 'l2', 'displayable_version': '2.1.0', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': 1073741824, 'ip': '10.10.10.169', 'ipv4_lease_expiration_timestamp_seconds': 1739054402, 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738991588, 'last_uplink': {'port_idx': 1, 'type': 'wire', 'uplink_device_name': '24RJ45-POE', 'uplink_mac': '78:45:58:b1:bd:3a', 'uplink_remote_port': 5}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': 'd0:21:f9:b2:7f:21', 'model': 'USMINI', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'USW Flex Mini', 'num_sta': 7, 'port_table': [{'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': True, 'media': 'GE', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 1, 'port_poe': False, 'rx_bytes': 929030562815, 'rx_bytes-r': 413114, 'rx_dropped': 811040, 'rx_errors': 0, 'rx_packets': 774599758, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 311711391078, 'tx_bytes-r': 624591, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 391022737, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 2, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 3, 'port_poe': False, 'rx_bytes': 25646811736, 'rx_bytes-r': 183643, 'rx_dropped': 30157, 'rx_errors': 0, 'rx_packets': 30669261, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 30611503076, 'tx_bytes-r': 199304, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 29314312, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 4', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 4, 'port_poe': False, 'rx_bytes': 2117701338, 'rx_bytes-r': 4761, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 4487410, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 1675910820, 'tx_bytes-r': 3922, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 8247288, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 5, 'port_poe': False, 'rx_bytes': 284543255551, 'rx_bytes-r': 450570, 'rx_dropped': 96, 'rx_errors': 0, 'rx_packets': 357545013, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 898375459134, 'tx_bytes-r': 214274, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 745561799, 'up': True}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': -1, 'spectrum_scanning': False, 'state': 1, 'sys_stats': {'loadavg_1': 0.0, 'loadavg_15': 0.0, 'loadavg_5': 0.0, 'mem_buffer': 0, 'mem_total': 0, 'mem_used': 0}, 'system-stats': {'cpu': 2.6, 'mem': 80.8, 'uptime': 0}, 'tags': ['connection_type_wired_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'usw', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'mac': 'd0:21:f9:b2:7f:21', 'name': 'eth0', 'port_idx': 1, 'speed': 1000, 'type': 'wire', 'uplink_device_name': '24RJ45-POE', 'uplink_mac': '78:45:58:b1:bd:3a', 'uplink_remote_port': 5}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 444148, 'usage_bytes': 0.0, 'vap_table': [], 'version': '2.1.0.744'}, {'_id': '6581932c7bd14c5ca3f30e7f', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'ethernet_overrides': [], 'fw_caps': 575180833, 'ip': '192.168.100.1', 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': 'd0:21:f9:05:34:4f', 'model': 'UCI', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'Cable Internet', 'num_sta': 0, 'port_table': [{'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': '2P5GE', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 1, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048680, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 0, 'spectrum_scanning': False, 'state': 0, 'tags': ['connection_type_wired_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'uci', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink_table': [], 'usage_bytes': 0.0, 'vap_table': [], 'version': '1.3.6.356'}, {'_id': '63780df7eec8d7076eee4cdb', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 359074358, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [840, 124, 630], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'discovered_via': 'l2', 'displayable_version': '6.6.78', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': -402718913, 'ip': '10.10.10.154', 'ipv4_lease_expiration_timestamp_seconds': 1739045814, 'is_access_point': True, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738991597, 'last_uplink': {'port_idx': 1, 'type': 'wire', 'uplink_device_name': '24RJ45-POE', 'uplink_mac': '78:45:58:b1:bd:3a', 'uplink_remote_port': 20}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': 'd0:21:f9:42:65:54', 'model': 'UAL6', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'AP', 'num_sta': 11, 'port_table': [], 'product_line': 'NETWORK', 'radio_table': [{'antenna_gain': 3, 'builtin_ant_gain': 3, 'builtin_antenna': True, 'channel': 0, 'current_antenna_gain': 0, 'hard_noise_floor_enabled': False, 'has_dfs': False, 'has_eht240': False, 'has_eht320': False, 'has_fccdfs': False, 'has_ht160': False, 'has_restricted_channels': False, 'ht': 20, 'is_11ac': False, 'is_11ax': False, 'is_11be': False, 'loadbalance_enabled': False, 'max_txpower': 23, 'min_rssi_enabled': False, 'min_txpower': 6, 'name': 'ra0', 'nss': 2, 'radio': 'ng', 'radio_caps': 147476, 'radio_caps2': 11, 'sens_level_enabled': False, 'tx_power': 20, 'tx_power_mode': 'auto', 'vwire_enabled': True}, {'antenna_gain': 3, 'builtin_ant_gain': 3, 'builtin_antenna': True, 'channel': 44, 'current_antenna_gain': 0, 'hard_noise_floor_enabled': False, 'has_dfs': True, 'has_eht240': False, 'has_eht320': False, 'has_fccdfs': True, 'has_ht160': False, 'has_restricted_channels': False, 'ht': 80, 'is_11ac': True, 'is_11ax': True, 'is_11be': False, 'loadbalance_enabled': False, 'max_txpower': 23, 'min_rssi_enabled': False, 'min_txpower': 6, 'name': 'rai0', 'nss': 2, 'radio': 'na', 'radio_caps': 50479124, 'radio_caps2': 15, 'sens_level_enabled': False, 'tx_power': 20, 'tx_power_mode': 'auto', 'vwire_enabled': True}], 'radio_table_stats': [{'channel': 11, 'cu_self_rx': 0, 'cu_self_tx': 9, 'cu_total': 28, 'extchannel': 0, 'gain': 3, 'guest-num_sta': 0, 'name': 'ra0', 'num_sta': 0, 'radio': 'ng', 'satisfaction': 98, 'state': 'RUN', 'tx_packets': 14, 'tx_power': 23, 'tx_retries': 4, 'user-num_sta': 0}, {'channel': 44, 'cu_self_rx': 6, 'cu_self_tx': 4, 'cu_total': 14, 'extchannel': 1, 'gain': 3, 'guest-num_sta': 0, 'name': 'rai0', 'num_sta': 0, 'radio': 'na', 'satisfaction': 100, 'state': 'RUN', 'tx_packets': 17330, 'tx_power': 23, 'tx_retries': 157, 'user-num_sta': 0}], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 13421280, 'satisfaction': 99, 'spectrum_scanning': False, 'state': 1, 'support_wifi6e': False, 'sys_stats': {'loadavg_1': 0.64, 'loadavg_15': 0.78, 'loadavg_5': 0.73, 'mem_buffer': 0, 'mem_total': 259792896, 'mem_used': 85037056}, 'system-stats': {'cpu': 5.4, 'mem': 32.7, 'uptime': 444865}, 'tags': ['connection_type_wireless_device'], 'tx_bytes': 0, 'tx_bytes-d': 582620, 'type': 'uap', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'mac': 'd0:21:f9:42:65:54', 'name': 'eth0', 'port_idx': 1, 'speed': 1000, 'type': 'wire', 'uplink_device_name': '24RJ45-POE', 'uplink_mac': '78:45:58:b1:bd:3a', 'uplink_remote_port': 20}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 444865, 'usage_bytes': 0.0, 'vap_table': [{'ap_mac': 'd0:21:f9:42:65:54', 'bssid': 'd2:21:f9:22:65:56', 'bw': 80, 'channel': 44, 'essid': 'element-e4935af3c573761f', 'is_guest': False, 'name': 'rai2', 'num_sta': 2, 'radio': 'na', 'radio_name': 'rai0', 'rx_bytes': 3592055109, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 158003821, 'rx_retries': 0, 'satisfaction': 100, 'tx_bytes': 3106258068, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 109739934, 'tx_power': 23, 'tx_retries': 1183336}, {'ap_mac': 'd0:21:f9:42:65:54', 'bssid': 'd2:21:f9:12:65:56', 'bw': 80, 'channel': 44, 'essid': 'Lotus Primary', 'is_guest': False, 'name': 'rai1', 'num_sta': 3, 'radio': 'na', 'radio_name': 'rai0', 'rx_bytes': 523865043, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 1987729, 'rx_retries': 0, 'satisfaction': 100, 'tx_bytes': 3572628624, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 9308928, 'tx_power': 23, 'tx_retries': 14518}, {'ap_mac': 'd0:21:f9:42:65:54', 'bssid': 'd2:21:f9:32:65:55', 'bw': 20, 'channel': 11, 'essid': 'element-e4935af3c573761f', 'is_guest': False, 'name': 'ra3', 'num_sta': 1, 'radio': 'ng', 'radio_name': 'ra0', 'rx_bytes': 143432444, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 1225014, 'rx_retries': 0, 'satisfaction': 100, 'tx_bytes': 52468553, 'tx_dropped': 285, 'tx_errors': 0, 'tx_packets': 1158380, 'tx_power': 23, 'tx_retries': 23456}, {'ap_mac': 'd0:21:f9:42:65:54', 'bssid': 'd2:21:f9:22:65:55', 'bw': 20, 'channel': 11, 'essid': 'Lotus Guest', 'is_guest': True, 'name': 'ra2', 'num_sta': 0, 'radio': 'ng', 'radio_name': 'ra0', 'rx_bytes': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'rx_retries': 0, 'satisfaction': -1, 'tx_bytes': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'tx_power': 23, 'tx_retries': 0}, {'ap_mac': 'd0:21:f9:42:65:54', 'bssid': 'd0:21:f9:42:65:55', 'bw': 20, 'channel': 11, 'essid': 'Lotus Primary', 'is_guest': False, 'name': 'ra0', 'num_sta': 6, 'radio': 'ng', 'radio_name': 'ra0', 'rx_bytes': 1196055678, 'rx_dropped': 48051254, 'rx_errors': 48051253, 'rx_packets': 48401201, 'rx_retries': 0, 'satisfaction': 98, 'tx_bytes': 354227211, 'tx_dropped': 8374, 'tx_errors': 0, 'tx_packets': 382171, 'tx_power': 23, 'tx_retries': 8372}], 'version': '6.6.78.15404'}, {'_id': '63780d5deec8d7076eee4cbc', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'discovered_via': 'l2', 'displayable_version': '7.1.26', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': -1488390619, 'ip': '10.10.10.139', 'ipv4_lease_expiration_timestamp_seconds': 1739045815, 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738991596, 'last_uplink': {'port_idx': 26, 'type': 'wire', 'uplink_device_name': '8SFP-AGG', 'uplink_mac': '78:45:58:6d:11:6a', 'uplink_remote_port': 5}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': '78:45:58:b1:bd:3a', 'model': 'US24PRO', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': '24RJ45-POE', 'num_sta': 34, 'port_table': [{'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 1', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 1, 'port_poe': True, 'rx_bytes': 54504699332, 'rx_bytes-r': 83211, 'rx_dropped': 11560, 'rx_errors': 0, 'rx_packets': 110306809, 'satisfaction': 90, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 93207742930, 'tx_bytes-r': 90435, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 137718435, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 2', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 2, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 3', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 3, 'port_poe': True, 'rx_bytes': 55197296, 'rx_bytes-r': 1948, 'rx_dropped': 2795, 'rx_errors': 1, 'rx_packets': 269475, 'satisfaction': 75, 'speed': 100, 'speed_caps': 1048623, 'tx_bytes': 504691855, 'tx_bytes-r': 16909, 'tx_dropped': 572, 'tx_errors': 0, 'tx_packets': 699913, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 4', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 4, 'port_poe': True, 'rx_bytes': 1142704105234, 'rx_bytes-r': 270638, 'rx_dropped': 7220, 'rx_errors': 0, 'rx_packets': 931011931, 'satisfaction': 90, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 530839807953, 'tx_bytes-r': 461864, 'tx_dropped': 295406, 'tx_errors': 0, 'tx_packets': 561119531, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 5', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': True, 'port_idx': 5, 'port_poe': True, 'rx_bytes': 311735244016, 'rx_bytes-r': 430659, 'rx_dropped': 9684, 'rx_errors': 0, 'rx_packets': 391043140, 'satisfaction': 90, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 929051362364, 'tx_bytes-r': 303222, 'tx_dropped': 470963, 'tx_errors': 0, 'tx_packets': 774631925, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 6', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 6, 'port_poe': True, 'rx_bytes': 15113062578, 'rx_bytes-r': 3, 'rx_dropped': 2900, 'rx_errors': 0, 'rx_packets': 27630427, 'satisfaction': 90, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 25888630237, 'tx_bytes-r': 1809, 'tx_dropped': 241, 'tx_errors': 0, 'tx_packets': 37702541, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 7', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 7, 'port_poe': True, 'rx_bytes': 51387537, 'rx_bytes-r': 113, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 146405, 'satisfaction': 100, 'speed': 100, 'speed_caps': 1048623, 'tx_bytes': 504623626, 'tx_bytes-r': 1832, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 3538481, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 8', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 8, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 9', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 9, 'port_poe': True, 'rx_bytes': 30446048, 'rx_bytes-r': 8, 'rx_dropped': 7351, 'rx_errors': 20, 'rx_packets': 52982, 'satisfaction': 75, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 503421590, 'tx_bytes-r': 1823, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 3522274, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 10', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 10, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 11', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 11, 'port_poe': True, 'rx_bytes': 714099353631, 'rx_bytes-r': 437658, 'rx_dropped': 29366, 'rx_errors': 0, 'rx_packets': 683768369, 'satisfaction': 90, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 772869262007, 'tx_bytes-r': 359686, 'tx_dropped': 9699, 'tx_errors': 0, 'tx_packets': 714961288, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 12', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 12, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 13', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 13, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 14', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 14, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 15', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 15, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 16', 'op_mode': 'switch', 'poe_caps': 3, 'poe_enable': False, 'port_idx': 16, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 17', 'op_mode': 'switch', 'poe_caps': 35, 'poe_enable': False, 'port_idx': 17, 'port_poe': True, 'rx_bytes': 1829888, 'rx_bytes-r': 3, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 14296, 'satisfaction': 100, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 493842103, 'tx_bytes-r': 1812, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 3448120, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 18', 'op_mode': 'switch', 'poe_caps': 35, 'poe_enable': False, 'port_idx': 18, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'GE', 'name': 'Port 19', 'op_mode': 'switch', 'poe_caps': 35, 'poe_enable': True, 'port_idx': 19, 'port_poe': True, 'rx_bytes': 83573863601, 'rx_bytes-r': 163988, 'rx_dropped': 7355, 'rx_errors': 0, 'rx_packets': 139968913, 'satisfaction': 90, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 9288825379, 'tx_bytes-r': 20503, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 126323517, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 20', 'op_mode': 'switch', 'poe_caps': 35, 'poe_enable': True, 'port_idx': 20, 'port_poe': True, 'rx_bytes': 168494999252, 'rx_bytes-r': 340703, 'rx_dropped': 38792, 'rx_errors': 0, 'rx_packets': 162179547, 'satisfaction': 90, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 20785577934, 'tx_bytes-r': 17399, 'tx_dropped': 4771, 'tx_errors': 0, 'tx_packets': 123942946, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 21', 'poe_caps': 35, 'poe_enable': False, 'port_idx': 21, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 22', 'op_mode': 'switch', 'poe_caps': 35, 'poe_enable': False, 'port_idx': 22, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 23', 'op_mode': 'switch', 'poe_caps': 35, 'poe_enable': False, 'port_idx': 23, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'is_uplink': False, 'media': 'GE', 'name': 'Port 24', 'op_mode': 'switch', 'poe_caps': 35, 'poe_enable': False, 'port_idx': 24, 'port_poe': True, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 0, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'is_uplink': False, 'media': 'SFP+', 'name': 'SFP+ 1', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 25, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 100, 'speed': 10000, 'speed_caps': 1048928, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': False, 'enable': True, 'full_duplex': True, 'is_uplink': True, 'media': 'SFP+', 'name': 'SFP+ 2', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 26, 'port_poe': False, 'rx_bytes': 344931655399, 'rx_bytes-r': 326595, 'rx_dropped': 14705, 'rx_errors': 2225, 'rx_packets': 568527995, 'satisfaction': 87, 'speed': 10000, 'speed_caps': 1048928, 'tx_bytes': 455266536332, 'tx_bytes-r': 796544, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 565496885, 'up': True}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 94, 'spectrum_scanning': False, 'state': 1, 'sys_stats': {'loadavg_1': 2.73, 'loadavg_15': 3.0, 'loadavg_5': 2.93, 'mem_buffer': 0, 'mem_total': 511627264, 'mem_used': 168202240}, 'system-stats': {'cpu': 60.0, 'mem': 32.9, 'uptime': 445835}, 'tags': ['connection_type_wired_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'usw', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'mac': '78:45:58:b1:bd:3a', 'name': 'eth0', 'port_idx': 26, 'speed': 10000, 'type': 'wire', 'uplink_device_name': '8SFP-AGG', 'uplink_mac': '78:45:58:6d:11:6a', 'uplink_remote_port': 5}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 445836, 'usage_bytes': 0.0, 'vap_table': [], 'version': '7.1.26.15869'}], 'protect_devices': [{'_id': 'f4:e2:c6:0c:c6:cd', 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'default': False, 'device_type': 'CLIENT', 'displayable_version': '4.74.88', 'firmware_status': 'UP_TO_DATE', 'icon_filename': '4080886f-4d9e-4071-8552-a893097999e2', 'icon_resolutions': [[25, 25], [51, 51], [101, 101], [129, 129], [257, 257]], 'icons': [{'height': 25, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_25x25.png', 'width': 25}, {'height': 51, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_51x51.png', 'width': 51}, {'height': 101, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_101x101.png', 'width': 101}, {'height': 129, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_129x129.png', 'width': 129}, {'height': 257, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_257x257.png', 'width': 257}], 'ip': '10.10.10.218', 'ipv4_lease_expiration_timestamp_seconds': 1739045601, 'is_wired': True, 'last_seen': 1738991608, 'mac': 'f4:e2:c6:0c:c6:cd', 'model': 'G4 Doorbell Pro PoE', 'name': 'Doorbell', 'product_line': 'PROTECT', 'state': 1, 'tags': ['connected_unifi_client'], 'uplink_mac': 'd8:b3:70:93:cc:98', 'uptime': 444682, 'usage_bytes': 0.0, 'version': 'UVC.S5L.v4.74.88.67.806d895.250124.1648', 'view_in_application': False, 'wired_speed_megabits_per_second': 1000}, {'_id': 'd0:21:f9:91:e0:e5', 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'default': False, 'device_type': 'CLIENT', 'displayable_version': '4.74.88', 'essid': 'UniFi Wireless', 'firmware_status': 'UP_TO_DATE', 'icon_filename': '50c18cf8-6de0-4961-8a0e-95d65a6d31fe', 'icon_resolutions': [[25, 25], [51, 51], [101, 101], [129, 129], [257, 257]], 'icons': [{'height': 25, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_25x25.png', 'width': 25}, {'height': 51, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_51x51.png', 'width': 51}, {'height': 101, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_101x101.png', 'width': 101}, {'height': 129, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_129x129.png', 'width': 129}, {'height': 257, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_257x257.png', 'width': 257}], 'ip': '10.10.10.112', 'ipv4_lease_expiration_timestamp_seconds': 1739056500, 'is_wired': False, 'last_seen': 1738991577, 'mac': 'd0:21:f9:91:e0:e5', 'model': 'G3 Instant', 'name': 'Back Yard', 'product_line': 'PROTECT', 'rate_imbalance': -9, 'satisfaction': 100, 'state': 1, 'tags': ['connected_unifi_client'], 'uplink_mac': 'd0:21:f9:42:65:54', 'uplink_radio_band': 'na', 'uptime': 335274, 'usage_bytes': 0.0, 'version': 'UVC.SAV532q.v4.74.88.67.806d895.250124.1648', 'view_in_application': False}, {'_id': 'd0:21:f9:91:12:0d', 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'default': False, 'device_type': 'CLIENT', 'displayable_version': '4.74.88', 'essid': 'UniFi Wireless', 'firmware_status': 'UP_TO_DATE', 'icon_filename': '50c18cf8-6de0-4961-8a0e-95d65a6d31fe', 'icon_resolutions': [[25, 25], [51, 51], [101, 101], [129, 129], [257, 257]], 'icons': [{'height': 25, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_25x25.png', 'width': 25}, {'height': 51, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_51x51.png', 'width': 51}, {'height': 101, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_101x101.png', 'width': 101}, {'height': 129, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_129x129.png', 'width': 129}, {'height': 257, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_257x257.png', 'width': 257}], 'ip': '10.10.10.155', 'ipv4_lease_expiration_timestamp_seconds': 1739056500, 'is_wired': False, 'last_seen': 1738991577, 'mac': 'd0:21:f9:91:12:0d', 'model': 'G3 Instant', 'name': 'Server Room', 'product_line': 'PROTECT', 'rate_imbalance': 0, 'satisfaction': 100, 'state': 1, 'tags': ['connected_unifi_client'], 'uplink_mac': 'd0:21:f9:42:65:54', 'uplink_radio_band': 'na', 'uptime': 335274, 'usage_bytes': 0.0, 'version': 'UVC.SAV532q.v4.74.88.67.806d895.250124.1648', 'view_in_application': False}], 'talk_devices': [], 'unmanaged_devices': []} -Feb 08 00:13:29 gandalf python3[4978]: ERROR:app:Error fetching devices: 'str' object has no attribute 'get' -Feb 08 00:13:30 gandalf python3[4981]: DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): 10.10.10.1:443 -Feb 08 00:13:30 gandalf python3[4981]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device HTTP/1.1" 200 None \ No newline at end of file +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): 10.10.10.1:443 +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device HTTP/1.1" 200 None +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:app:Response status: 200 +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:app:Response headers: {'Server': 'nginx', 'Date': 'Sat, 08 Feb 2025 05:21:30 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'Vary': 'Accept-Encoding', 'Access-Control-Allow-Credentials': 'false', 'Access-Control-Expose-Headers': 'Content-Disposition, Content-Range, Filename, Location, Range, Upload-Length, Upload-Offset, X-Connection-Type, X-Csrf-Token, X-File-Id, X-Token-Expire-Time, X-Updated-Csrf-Token', 'Referrer-Policy': 'no-referrer', 'Strict-Transport-Security': 'max-age=15552000; includeSubDomains', 'X-Content-Type-Options': 'nosniff', 'X-DNS-Prefetch-Control': 'off', 'X-Frame-Options': 'SAMEORIGIN', 'X-XSS-Protection': '1; mode=block', 'Content-Encoding': 'gzip'} +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:app:Raw response text: {"access_devices":[],"apollo_devices":[],"connect_devices":[],"drive_devices":[],"led_devices":[],"network_devices":[{"_id":"648b6a79e0dce15429a77871","adopt_state":0,"adoptable_when_upgraded":false,"adopted":true,"bytes-r":0,"connection_network_id":"629fd656424c5b052fa1c715","connection_network_name":"Main Network","countrycode_table":[],"default":false,"device_type":"MANAGED","disabled":false,"displayable_version":"2.2.6","download_speed_bytes_per_second":0,"ethernet_overrides":[],"fw_caps":0,"ip":"10.10.10.243","ipv4_lease_expiration_timestamp_seconds":1739077857,"is_access_point":false,"is_adoption_queued":false,"isolated":false,"last_connection_network_id":"629fd656424c5b052fa1c715","last_connection_network_name":"Main Network","last_seen":1738992084,"last_uplink":{"type":"wireless","uplink_device_name":"AP","uplink_mac":"d0:21:f9:42:65:54"},"license_state":"registered","locating":false,"lte_connected":false,"mac":"d0:21:f9:ca:ee:04","model":"UP6","model_in_eol":false,"rx_bytes":345105455253,"rx_bytes-r":237214,"rx_dropped":14721,"rx_errors":2225,"rx_packets":569019959,"satisfaction":87,"speed":10000,"speed_caps":1048928,"tx_bytes":455748957059,"tx_bytes-r":887106,"tx_dropped":0,"tx_errors":0,"tx_packets":566148932,"up":true}],"product_line":"NETWORK","radio_table":[],"radio_table_stats":[],"restarting":false,"rx_bytes":0,"rx_bytes-d":0,"satisfaction":94,"spectrum_scanning":false,"state":1,"sys_stats":{"loadavg_1":3.25,"loadavg_15":3.04,"loadavg_5":3.08,"mem_buffer":0,"mem_total":511627264,"mem_used":169635840},"system-stats":{"cpu":59.5,"mem":32.9,"uptime":446311},"tags":["connection_type_wired_device"],"tx_bytes":0,"tx_bytes-d":0,"type":"usw","unsupported":false,"unsupported_reason":0,"upgradable":false,"upgrade_state":0,"uplink":{"mac":"78:45:58:b1:bd:3a","name":"eth0","port_idx":26,"speed":10000,"type":"wire","uplink_device_name":"8SFP-AGG","uplink_mac":"78:45:58:6d:11:6a","uplink_remote_port":5},"uplink_table":[],"upload_speed_bytes_per_second":0,"uptime":446312,"usage_bytes":0.0,"vap_table":[],"version":"7.1.26.15869"}],"protect_devices":[{"_id":"f4:e2:c6:0c:c6:cd","connection_network_id":"629fd656424c5b052fa1c715","connection_network_name":"Main Network","default":false,"device_type":"CLIENT","displayable_version":"4.74.88","firmware_status":"UP_TO_DATE","icon_filename":"4080886f-4d9e-4071-8552-a893097999e2","icon_resolutions":[[25,25],[51,51],[101,101],[129,129],[257,257]],"icons":[{"height":25,"url":"https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_25x25.png","width":25},{"height":51,"url":"https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_51x51.png","width":51},{"height":101,"url":"https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_101x101.png","width":101},{"height":129,"url":"https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_129x129.png","width":129},{"height":257,"url":"https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_257x257.png","width":257}],"ip":"10.10.10.218","ipv4_lease_expiration_timestamp_seconds":1739045601,"is_wired":true,"last_seen":1738992090,"mac":"f4:e2:c6:0c:c6:cd","model":"G4 Doorbell Pro PoE","name":"Doorbell","product_line":"PROTECT","state":1,"tags":["connected_unifi_client"],"uplink_mac":"d8:b3:70:93:cc:98","uptime":445164,"usage_bytes":0.0,"version":"UVC.S5L.v4.74.88.67.806d895.250124.1648","view_in_application":false,"wired_speed_megabits_per_second":1000},{"_id":"d0:21:f9:91:e0:e5","connection_network_id":"629fd656424c5b052fa1c715","connection_network_name":"Main Network","default":false,"device_type":"CLIENT","displayable_version":"4.74.88","essid":"UniFi Wireless","firmware_status":"UP_TO_DATE","icon_filename":"50c18cf8-6de0-4961-8a0e-95d65a6d31fe","icon_resolutions":[[25,25],[51,51],[101,101],[129,129],[257,257]],"icons":[{"height":25,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_25x25.png","width":25},{"height":51,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_51x51.png","width":51},{"height":101,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_101x101.png","width":101},{"height":129,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_129x129.png","width":129},{"height":257,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_257x257.png","width":257}],"ip":"10.10.10.112","ipv4_lease_expiration_timestamp_seconds":1739056500,"is_wired":false,"last_seen":1738992060,"mac":"d0:21:f9:91:e0:e5","model":"G3 Instant","name":"Back Yard","product_line":"PROTECT","rate_imbalance":0,"satisfaction":100,"state":1,"tags":["connected_unifi_client"],"uplink_mac":"d0:21:f9:42:65:54","uplink_radio_band":"na","uptime":335757,"usage_bytes":0.0,"version":"UVC.SAV532q.v4.74.88.67.806d895.250124.1648","view_in_application":false},{"_id":"d0:21:f9:91:12:0d","connection_network_id":"629fd656424c5b052fa1c715","connection_network_name":"Main Network","default":false,"device_type":"CLIENT","displayable_version":"4.74.88","essid":"UniFi Wireless","firmware_status":"UP_TO_DATE","icon_filename":"50c18cf8-6de0-4961-8a0e-95d65a6d31fe","icon_resolutions":[[25,25],[51,51],[101,101],[129,129],[257,257]],"icons":[{"height":25,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_25x25.png","width":25},{"height":51,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_51x51.png","width":51},{"height":101,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_101x101.png","width":101},{"height":129,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_129x129.png","width":129},{"height":257,"url":"https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_257x257.png","width":257}],"ip":"10.10.10.155","ipv4_lease_expiration_timestamp_seconds":1739056500,"is_wired":false,"last_seen":1738992060,"mac":"d0:21:f9:91:12:0d","model":"G3 Instant","name":"Server Room","product_line":"PROTECT","rate_imbalance":0,"satisfaction":100,"state":1,"tags":["connected_unifi_client"],"uplink_mac":"d0:21:f9:42:65:54","uplink_radio_band":"na","uptime":335757,"usage_bytes":0.0,"version":"UVC.SAV532q.v4.74.88.67.806d895.250124.1648","view_in_application":false}],"talk_devices":[],"unmanaged_devices":[]} +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:app:Parsed JSON: {'access_devices': [], 'apollo_devices': [], 'connect_devices': [], 'drive_devices': [], 'led_devices': [], 'network_devices': [{'_id': '648b6a79e0dce15429a77871', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'displayable_version': '2.2.6', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': 0, 'ip': '10.10.10.243', 'ipv4_lease_expiration_timestamp_seconds': 1739077857, 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738992084, 'last_uplink': {'type': 'wireless', 'uplink_device_name': 'AP', 'uplink_mac': 'd0:21:f9:42:65:54'}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': 'd0:21:f9:ca:ee:04', 'model': 'UP6', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'USP Strip', 'num_sta': 0, 'port_table': [], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 100, 'spectrum_scanning': False, 'state': 1, 'support_wifi6e': False, 'sys_stats': {'loadavg_1': 0.0, 'loadavg_15': 0.0, 'loadavg_5': 0.0, 'mem_buffer': 0, 'mem_total': 98304, 'mem_used': 84152}, 'system-stats': {'cpu': 0.0, 'mem': 0.0, 'uptime': 0}, 'tags': ['connection_type_wireless_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'uap', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'ap_mac': 'd0:21:f9:42:65:54', 'essid': 'element-e4935af3c573761f', 'radio_band': 'ng', 'type': 'wireless', 'uplink_device_name': 'AP', 'uplink_mac': 'd0:21:f9:42:65:54'}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 151024, 'usage_bytes': 0.0, 'vap_table': [], 'version': '2.2.6.532'}, {'_id': '63780dc5eec8d7076eee4cd6', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'discovered_via': 'l2', 'displayable_version': '7.1.26', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': 659093285, 'ip': '10.10.10.107', 'ipv4_lease_expiration_timestamp_seconds': 1739045795, 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738992071, 'last_uplink': {'port_idx': 1, 'type': 'wire', 'uplink_device_name': '24RJ45-POE', 'uplink_mac': '78:45:58:b1:bd:3a', 'uplink_remote_port': 7}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': '60:22:32:ab:de:07', 'model': 'USPPDUP', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'RPDU', 'num_sta': 0, 'port_table': [{'aggregated_by': False, 'autoneg': False, 'enable': True, 'full_duplex': True, 'is_uplink': True, 'media': 'FE', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 1, 'port_poe': False, 'rx_bytes': 458527631, 'rx_bytes-r': 819, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 3374609, 'satisfaction': 100, 'speed': 100, 'speed_caps': 1048591, 'tx_bytes': 50538302, 'tx_bytes-r': 115, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 146576, 'up': True}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 100, 'spectrum_scanning': False, 'state': 1, 'sys_stats': {'loadavg_1': 0.0, 'loadavg_15': 0.0, 'loadavg_5': 0.0, 'mem_buffer': 0, 'mem_total': 61648896, 'mem_used': 18903040}, 'system-stats': {'cpu': 1.5, 'mem': 30.7, 'uptime': 446331}, 'tags': ['connection_type_wired_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'usw', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'mac': '60:22:32:ab:de:07', 'name': 'eth0', 'port_idx': 1, 'speed': 100, 'type': 'wire', 'uplink_device_name': '24RJ45-POE', 'uplink_mac': '78:45:58:b1:bd:3a', 'uplink_remote_port': 7}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 446331, 'usage_bytes': 0.0, 'vap_table': [], 'version': '7.1.26.15869'}, {'_id': '63f1de4d22f7604a2bd71cc8', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'displayable_version': '4.1.13', 'download_speed_bytes_per_second': 27051, 'ethernet_overrides': [{'ifname': 'eth0', 'networkgroup': 'LAN'}, {'ifname': 'eth1', 'networkgroup': 'LAN'}, {'ifname': 'eth2', 'networkgroup': 'LAN'}, {'ifname': 'eth3', 'networkgroup': 'LAN'}, {'ifname': 'eth4', 'networkgroup': 'LAN'}, {'ifname': 'eth5', 'networkgroup': 'LAN'}, {'ifname': 'eth6', 'networkgroup': 'LAN'}, {'ifname': 'eth7', 'networkgroup': 'LAN'}, {'ifname': 'eth8', 'networkgroup': 'WAN'}, {'ifname': 'eth9', 'networkgroup': 'WAN2'}, {'ifname': 'eth10', 'networkgroup': 'LAN'}], 'fw_caps': -487784915, 'ip': '172.14.74.7', 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'lan_ip': '10.10.10.1', 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738992090, 'last_uplink': {'port_idx': 9, 'type': 'wire', 'uplink_mac': '5a:07:f8:31:85:ee'}, 'license_state': 'registered', 'locating': False, 'lte_connected': False, 'mac': 'e0:63:da:80:55:2d', 'model': 'UDMPRO', 'model_in_eol': False, 'model_in_lts': False, 'model_incompatible': False, 'name': 'Dream Machine Pro', 'num_sta': 7, 'port_table': [{'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth0', 'is_uplink': False, 'media': 'GE', 'name': 'eth0', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 1, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth9', 'is_uplink': False, 'media': 'SFP+', 'name': 'SFP+ 1', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 10, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048864, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'ifname': 'eth10', 'ip': '10.10.10.1', 'is_uplink': False, 'media': 'SFP+', 'name': 'Downlink to USW-Aggregation', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 11, 'port_poe': False, 'rx_bytes': 204365576391, 'rx_bytes-r': 549978, 'rx_dropped': 0, 'rx_errors': 2225, 'rx_packets': 271497337, 'satisfaction': 0, 'speed': 10000, 'speed_caps': 1048864, 'tx_bytes': 325991710355, 'tx_bytes-r': 154753, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 334875787, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth1', 'is_uplink': False, 'media': 'GE', 'name': 'eth1', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 2, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth2', 'is_uplink': False, 'media': 'GE', 'name': 'eth2', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 3, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth3', 'is_uplink': False, 'media': 'GE', 'name': 'eth3', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 4, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth4', 'is_uplink': False, 'media': 'GE', 'name': 'eth4', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 5, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth5', 'is_uplink': False, 'media': 'GE', 'name': 'eth5', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 6, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'ifname': 'eth6', 'is_uplink': False, 'media': 'GE', 'name': 'eth6', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 7, 'port_poe': False, 'rx_bytes': 79432053207, 'rx_bytes-r': 0, 'rx_dropped': 71, 'rx_errors': 2, 'rx_packets': 150360451, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 153381016516, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 197514705, 'up': True}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': False, 'ifname': 'eth7', 'is_uplink': False, 'media': 'GE', 'name': 'eth7', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 8, 'port_poe': False, 'rx_bytes': 0, 'rx_bytes-r': 0, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 0, 'satisfaction': 0, 'speed': 10, 'speed_caps': 1048623, 'tx_bytes': 0, 'tx_bytes-r': 0, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 0, 'up': False}, {'aggregated_by': False, 'autoneg': True, 'enable': True, 'full_duplex': True, 'ifname': 'eth8', 'ip': '172.14.74.7', 'is_uplink': True, 'media': 'GE', 'name': 'eth8', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 9, 'port_poe': False, 'rx_bytes': 247686432430, 'rx_bytes-r': 27051, 'rx_dropped': 0, 'rx_errors': 0, 'rx_packets': 186834551, 'satisfaction': 0, 'speed': 1000, 'speed_caps': 1048623, 'tx_bytes': 52737202282, 'tx_bytes-r': 404802, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 74675652, 'up': True}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 0, 'spectrum_scanning': False, 'state': 1, 'support_wifi6e': False, 'sys_stats': {'loadavg_1': 2.21, 'loadavg_15': 2.18, 'loadavg_5': 2.21, 'mem_buffer': 300949504, 'mem_total': 4137807872, 'mem_used': 2974445568}, 'system-stats': {'cpu': 13.1, 'mem': 71.9, 'uptime': 446339}, 'tags': ['connection_type_gateway_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'udm', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'name': 'eth8', 'port_idx': 9, 'speed': 1000, 'type': 'wire', 'uplink_mac': '5a:07:f8:31:85:ee'}, 'uplink_table': [], 'upload_speed_bytes_per_second': 404802, 'uptime': 446339, 'usage_bytes': 0.0, 'vap_table': [], 'version': '4.1.13.20906'}, {'_id': '6377ff4beec8d7076eee4bad', 'adopt_state': 0, 'adoptable_when_upgraded': False, 'adopted': True, 'bytes-r': 0, 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'countrycode_table': [], 'default': False, 'device_type': 'MANAGED', 'disabled': False, 'discovered_via': 'l2', 'displayable_version': '7.1.26', 'download_speed_bytes_per_second': 0, 'ethernet_overrides': [], 'fw_caps': -1488390619, 'ip': '10.10.10.238', 'ipv4_lease_expiration_timestamp_seconds': 1739045824, 'is_access_point': False, 'is_adoption_queued': False, 'isolated': False, 'last_connection_network_id': '629fd656424c5b052fa1c715', 'last_connection_network_name': 'Main Network', 'last_seen': 1738992057, 'last_uplink': {'port_idx': 7, 'type': 'wire', 'uplink_device_name':'full_duplex': True, 'is_uplink': True, 'media': 'SFP+', 'name': 'SFP+ 2', 'op_mode': 'switch', 'poe_caps': 0, 'poe_enable': False, 'port_idx': 26, 'port_poe': False, 'rx_bytes': 345105455253, 'rx_bytes-r': 237214, 'rx_dropped': 14721, 'rx_errors': 2225, 'rx_packets': 569019959, 'satisfaction': 87, 'speed': 10000, 'speed_caps': 1048928, 'tx_bytes': 455748957059, 'tx_bytes-r': 887106, 'tx_dropped': 0, 'tx_errors': 0, 'tx_packets': 566148932, 'up': True}], 'product_line': 'NETWORK', 'radio_table': [], 'radio_table_stats': [], 'restarting': False, 'rx_bytes': 0, 'rx_bytes-d': 0, 'satisfaction': 94, 'spectrum_scanning': False, 'state': 1, 'sys_stats': {'loadavg_1': 3.25, 'loadavg_15': 3.04, 'loadavg_5': 3.08, 'mem_buffer': 0, 'mem_total': 511627264, 'mem_used': 169635840}, 'system-stats': {'cpu': 59.5, 'mem': 32.9, 'uptime': 446311}, 'tags': ['connection_type_wired_device'], 'tx_bytes': 0, 'tx_bytes-d': 0, 'type': 'usw', 'unsupported': False, 'unsupported_reason': 0, 'upgradable': False, 'upgrade_state': 0, 'uplink': {'mac': '78:45:58:b1:bd:3a', 'name': 'eth0', 'port_idx': 26, 'speed': 10000, 'type': 'wire', 'uplink_device_name': '8SFP-AGG', 'uplink_mac': '78:45:58:6d:11:6a', 'uplink_remote_port': 5}, 'uplink_table': [], 'upload_speed_bytes_per_second': 0, 'uptime': 446312, 'usage_bytes': 0.0, 'vap_table': [], 'version': '7.1.26.15869'}], 'protect_devices': [{'_id': 'f4:e2:c6:0c:c6:cd', 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'default': False, 'device_type': 'CLIENT', 'displayable_version': '4.74.88', 'firmware_status': 'UP_TO_DATE', 'icon_filename': '4080886f-4d9e-4071-8552-a893097999e2', 'icon_resolutions': [[25, 25], [51, 51], [101, 101], [129, 129], [257, 257]], 'icons': [{'height': 25, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_25x25.png', 'width': 25}, {'height': 51, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_51x51.png', 'width': 51}, {'height': 101, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_101x101.png', 'width': 101}, {'height': 129, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_129x129.png', 'width': 129}, {'height': 257, 'url': 'https://static.ui.com/fingerprint/ui/icons/4080886f-4d9e-4071-8552-a893097999e2_257x257.png', 'width': 257}], 'ip': '10.10.10.218', 'ipv4_lease_expiration_timestamp_seconds': 1739045601, 'is_wired': True, 'last_seen': 1738992090, 'mac': 'f4:e2:c6:0c:c6:cd', 'model': 'G4 Doorbell Pro PoE', 'name': 'Doorbell', 'product_line': 'PROTECT', 'state': 1, 'tags': ['connected_unifi_client'], 'uplink_mac': 'd8:b3:70:93:cc:98', 'uptime': 445164, 'usage_bytes': 0.0, 'version': 'UVC.S5L.v4.74.88.67.806d895.250124.1648', 'view_in_application': False, 'wired_speed_megabits_per_second': 1000}, {'_id': 'd0:21:f9:91:e0:e5', 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'default': False, 'device_type': 'CLIENT', 'displayable_version': '4.74.88', 'essid': 'UniFi Wireless', 'firmware_status': 'UP_TO_DATE', 'icon_filename': '50c18cf8-6de0-4961-8a0e-95d65a6d31fe', 'icon_resolutions': [[25, 25], [51, 51], [101, 101], [129, 129], [257, 257]], 'icons': [{'height': 25, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_25x25.png', 'width': 25}, {'height': 51, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_51x51.png', 'width': 51}, {'height': 101, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_101x101.png', 'width': 101}, {'height': 129, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_129x129.png', 'width': 129}, {'height': 257, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_257x257.png', 'width': 257}], 'ip': '10.10.10.112', 'ipv4_lease_expiration_timestamp_seconds': 1739056500, 'is_wired': False, 'last_seen': 1738992060, 'mac': 'd0:21:f9:91:e0:e5', 'model': 'G3 Instant', 'name': 'Back Yard', 'product_line': 'PROTECT', 'rate_imbalance': 0, 'satisfaction': 100, 'state': 1, 'tags': ['connected_unifi_client'], 'uplink_mac': 'd0:21:f9:42:65:54', 'uplink_radio_band': 'na', 'uptime': 335757, 'usage_bytes': 0.0, 'version': 'UVC.SAV532q.v4.74.88.67.806d895.250124.1648', 'view_in_application': False}, {'_id': 'd0:21:f9:91:12:0d', 'connection_network_id': '629fd656424c5b052fa1c715', 'connection_network_name': 'Main Network', 'default': False, 'device_type': 'CLIENT', 'displayable_version': '4.74.88', 'essid': 'UniFi Wireless', 'firmware_status': 'UP_TO_DATE', 'icon_filename': '50c18cf8-6de0-4961-8a0e-95d65a6d31fe', 'icon_resolutions': [[25, 25], [51, 51], [101, 101], [129, 129], [257, 257]], 'icons': [{'height': 25, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_25x25.png', 'width': 25}, {'height': 51, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_51x51.png', 'width': 51}, {'height': 101, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_101x101.png', 'width': 101}, {'height': 129, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_129x129.png', 'width': 129}, {'height': 257, 'url': 'https://static.ui.com/fingerprint/ui/icons/50c18cf8-6de0-4961-8a0e-95d65a6d31fe_257x257.png', 'width': 257}], 'ip': '10.10.10.155', 'ipv4_lease_expiration_timestamp_seconds': 1739056500, 'is_wired': False, 'last_seen': 1738992060, 'mac': 'd0:21:f9:91:12:0d', 'model': 'G3 Instant', 'name': 'Server Room', 'product_line': 'PROTECT', 'rate_imbalance': 0, 'satisfaction': 100, 'state': 1, 'tags': ['connected_unifi_client'], 'uplink_mac': 'd0:21:f9:42:65:54', 'uplink_radio_band': 'na', 'uptime': 335757, 'usage_bytes': 0.0, 'version': 'UVC.SAV532q.v4.74.88.67.806d895.250124.1648', 'view_in_application': False}], 'talk_devices': [], 'unmanaged_devices': []} +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:app:Processed devices: [{'name': 'USP Strip', 'ip': '10.10.10.243', 'type': 'uap', 'connection_type': 'copper', 'critical': False, 'device_id': 'd0:21:f9:ca:ee:04'}, {'name': 'RPDU', 'ip': '10.10.10.107', 'type': 'usw', 'connection_type': 'copper', 'critical': True, 'device_id': '60:22:32:ab:de:07'}, {'name': 'Dream Machine Pro', 'ip': '172.14.74.7', 'type': 'udm', 'connection_type': 'copper', 'critical': True, 'device_id': 'e0:63:da:80:55:2d'}, {'name': '8SFP-AGG', 'ip': '10.10.10.238', 'type': 'usw', 'connection_type': 'copper', 'critical': True, 'device_id': '78:45:58:6d:11:6a'}, {'name': 'USW Flex Mini', 'ip': '10.10.10.169', 'type': 'usw', 'connection_type': 'copper', 'critical': True, 'device_id': 'd0:21:f9:b2:7f:21'}, {'name': 'Cable Internet', 'ip': '192.168.100.1', 'type': 'uci', 'connection_type': 'copper', 'critical': False, 'device_id': 'd0:21:f9:05:34:4f'}, {'name': 'AP', 'ip': '10.10.10.154', 'type': 'uap', 'connection_type': 'copper', 'critical': False, 'device_id': 'd0:21:f9:42:65:54'}, {'name': '24RJ45-POE', 'ip': '10.10.10.139', 'type': 'usw', 'connection_type': 'copper', 'critical': True, 'device_id': '78:45:58:b1:bd:3a'}] +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device/d0:21:f9:ca:ee:04 HTTP/1.1" 404 431 +Feb 08 00:21:30 gandalf python3[5066]: ERROR:app:Failed to get device details: 404 Client Error: for url: https://10.10.10.1/proxy/network/v2/api/site/default/device/d0:21:f9:ca:ee:04 +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device/60:22:32:ab:de:07 HTTP/1.1" 404 431 +Feb 08 00:21:30 gandalf python3[5066]: ERROR:app:Failed to get device details: 404 Client Error: for url: https://10.10.10.1/proxy/network/v2/api/site/default/device/60:22:32:ab:de:07 +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device/e0:63:da:80:55:2d HTTP/1.1" 404 431 +Feb 08 00:21:30 gandalf python3[5066]: ERROR:app:Failed to get device details: 404 Client Error: for url: https://10.10.10.1/proxy/network/v2/api/site/default/device/e0:63:da:80:55:2d +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device/78:45:58:6d:11:6a HTTP/1.1" 404 431 +Feb 08 00:21:30 gandalf python3[5066]: ERROR:app:Failed to get device details: 404 Client Error: for url: https://10.10.10.1/proxy/network/v2/api/site/default/device/78:45:58:6d:11:6a +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device/d0:21:f9:b2:7f:21 HTTP/1.1" 404 431 +Feb 08 00:21:30 gandalf python3[5066]: ERROR:app:Failed to get device details: 404 Client Error: for url: https://10.10.10.1/proxy/network/v2/api/site/default/device/d0:21:f9:b2:7f:21 +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device/d0:21:f9:05:34:4f HTTP/1.1" 404 431 +Feb 08 00:21:30 gandalf python3[5066]: ERROR:app:Failed to get device details: 404 Client Error: for url: https://10.10.10.1/proxy/network/v2/api/site/default/device/d0:21:f9:05:34:4f +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device/d0:21:f9:42:65:54 HTTP/1.1" 404 431 +Feb 08 00:21:30 gandalf python3[5066]: ERROR:app:Failed to get device details: 404 Client Error: for url: https://10.10.10.1/proxy/network/v2/api/site/default/device/d0:21:f9:42:65:54 +Feb 08 00:21:30 gandalf python3[5066]: DEBUG:urllib3.connectionpool:https://10.10.10.1:443 "GET /proxy/network/v2/api/site/default/device/78:45:58:b1:bd:3a HTTP/1.1" 404 431 +Feb 08 00:21:30 gandalf python3[5066]: ERROR:app:Failed to get device details: 404 Client Error: for url: https://10.10.10.1/proxy/network/v2/api/site/default/device/78:45:58:b1:bd:3a \ No newline at end of file diff --git a/static/app.js b/static/app.js index 35a2175..f1ce2ed 100644 --- a/static/app.js +++ b/static/app.js @@ -21,6 +21,13 @@ function updateDeviceStatus() { }); } +function toggleInterfaces(header) { + const list = header.nextElementSibling; + const icon = header.querySelector('.expand-icon'); + list.classList.toggle('collapsed'); + icon.style.transform = list.classList.contains('collapsed') ? 'rotate(-90deg)' : 'rotate(0deg)'; +} + function updateInterfaceStatus(deviceName, interfaces) { const interfaceList = document.querySelector(`.interface-group[data-device-name="${deviceName}"] .interface-list`); if (interfaceList && interfaces) { @@ -30,7 +37,7 @@ function updateInterfaceStatus(deviceName, interfaces) {