mirror of
https://github.com/jokob-sk/NetAlertX.git
synced 2026-03-31 07:12:23 -07:00
updated freebox requirements
This commit is contained in:
@@ -107,10 +107,10 @@ async def get_device_data(api_version: int, api_address: str, api_port: int):
|
|||||||
await fbx.open(host=api_address, port=str(api_port))
|
await fbx.open(host=api_address, port=str(api_port))
|
||||||
except NotOpenError as e:
|
except NotOpenError as e:
|
||||||
mylog("verbose", [f"[{pluginName}] Error connecting to freebox: {e}"])
|
mylog("verbose", [f"[{pluginName}] Error connecting to freebox: {e}"])
|
||||||
return (),()
|
return None, []
|
||||||
except AuthorizationError as e:
|
except AuthorizationError as e:
|
||||||
mylog("verbose", [f"[{pluginName}] Auth error: {str(e)}"])
|
mylog("verbose", [f"[{pluginName}] Auth error: {str(e)}"])
|
||||||
return (),()
|
return None, []
|
||||||
|
|
||||||
# get also info of the freebox itself
|
# get also info of the freebox itself
|
||||||
config = await cast(System, fbx.system).get_config()
|
config = await cast(System, fbx.system).get_config()
|
||||||
@@ -147,16 +147,17 @@ def main():
|
|||||||
mylog("verbose", [freebox])
|
mylog("verbose", [freebox])
|
||||||
mylog("verbose", [hosts])
|
mylog("verbose", [hosts])
|
||||||
|
|
||||||
plugin_objects.add_object(
|
if freebox:
|
||||||
primaryId=freebox["mac"], # type: ignore
|
plugin_objects.add_object(
|
||||||
secondaryId=freebox["ip"], # type: ignore
|
primaryId=freebox["mac"],
|
||||||
watched1=freebox["name"], # type: ignore
|
secondaryId=freebox["ip"],
|
||||||
watched2=freebox["operator"], # type: ignore
|
watched1=freebox["name"],
|
||||||
watched3="Gateway",
|
watched2=freebox["operator"],
|
||||||
watched4=timeNowUTC(),
|
watched3="Gateway",
|
||||||
extra="",
|
watched4=timeNowUTC(),
|
||||||
foreignKey=freebox["mac"], # type: ignore
|
extra="",
|
||||||
)
|
foreignKey=freebox["mac"],
|
||||||
|
)
|
||||||
for host in hosts:
|
for host in hosts:
|
||||||
# Check if 'l3connectivities' exists and is a list
|
# Check if 'l3connectivities' exists and is a list
|
||||||
if "l3connectivities" in host and isinstance(host["l3connectivities"], list):
|
if "l3connectivities" in host and isinstance(host["l3connectivities"], list):
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ librouteros
|
|||||||
yattag
|
yattag
|
||||||
zeroconf
|
zeroconf
|
||||||
psutil
|
psutil
|
||||||
git+https://github.com/foreign-sub/aiofreepybox.git
|
freebox-api
|
||||||
|
|||||||
@@ -24,4 +24,4 @@ librouteros
|
|||||||
yattag
|
yattag
|
||||||
zeroconf
|
zeroconf
|
||||||
psutil
|
psutil
|
||||||
git+https://github.com/foreign-sub/aiofreepybox.git
|
freebox-api
|
||||||
|
|||||||
Reference in New Issue
Block a user