12 lines
295 B
Python
12 lines
295 B
Python
from time import sleep
|
|
from log_data import log_to_json
|
|
from discovery import start_discovery
|
|
|
|
|
|
def start_loop(interval=40, timeout=20):
|
|
print(f"Starting loop with interval {interval}s")
|
|
while True:
|
|
devices = start_discovery(timeout=timeout)
|
|
log_to_json(devices)
|
|
sleep(interval)
|