Closed trkks closed 1 year ago
Commits related to #16 implement removing devices from database (by IP address(es)) when the device says 'goodbye' correctly (i.e., using service.stop()
of the bonjour-service
library), but there is no timeout-based removal because of reasons given in https://github.com/LiquidAI-project/wasmiot-orchestrator/issues/16#issuecomment-1506565084
Could manually (i.e., with the library not working as expected) implement a rescanDevices
method, that checks connectivity to each device and deletes non-available ones from db in a 120second re-firing timeout.
I seem to be using the device discovery wrong and should change it to make scans between intervals, like the other guys have demonstrated in their protos and told me earlier, woops :)
This realization came, when I realized the bonjour-service library apparently does not provide any means to remove found services...
Atm the devices' information like hostnames are saved into database, which keeps and never updates them. This makes experimenting bothersome and results in stuff like the "DELETE ALL DEVICES" button for convenience.
Maybe bonjour has some thing to query a device's hostname again and orchestrator would update this to database when suitable?