MQTT rework v0.4, install scripts rework, Traefik docs 📦

This commit is contained in:
Jokob-sk
2023-10-15 16:37:32 +11:00
parent 31e1116483
commit 897112e466
22 changed files with 50461 additions and 204 deletions

View File

@@ -5,7 +5,7 @@ import conf
import re
from helper import timeNowTZ, get_setting, get_setting_value,resolve_device_name_dig, resolve_device_name_pholus, check_IP_format
from logger import mylog, print_log
from const import vendorsPath6, vendorsPath9
from const import vendorsPath
#-------------------------------------------------------------------------------
@@ -343,19 +343,13 @@ def query_MAC_vendor (pMAC):
mac_start_string9 = mac[0:9]
try:
with open(vendorsPath6, 'r') as f:
with open(vendorsPath, 'r') as f:
for line in f:
if line.startswith(mac_start_string6):
vendor = line.split(' ', 1)[1].strip()
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath6}"])
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath}"])
return vendor
with open(vendorsPath9, 'r') as f:
for line in f:
if line.startswith(mac_start_string9):
vendor = line.split(' ', 1)[1].strip()
mylog('debug', [f"[Vendor Check] Found '{vendor}' for '{pMAC}' in {vendorsPath9}"])
return vendor
return -1 # MAC address not found in the database
except FileNotFoundError: