Wednesday, April 23, 2025
2 changes · master
Resolved issues and error corrections
The system now clears stored browser-side data when the database structure changes or a different database is used with the same address. This helps prevent outdated information from causing errors after module, field, or database changes.
Original PR description
…cture changes. Before this commit, the persistent caches were not invalidated when the database structure changed (e.g.: installing/removing modules; adding/removing fields). The persistent caches will return old values, which could lead to errors. This can also happen when using a different database with the same URL (e.g.: in local when developing; or changing the database using `web/database/manager`; or changing the cli parameter `-d<database>,--database<database>`). Now the persistent caches will be invalidated if the database structure is changed, or if a different database is used.
IoT box discovery now runs from the user's browser instead of the server, so it searches the same local network the user is on. This helps businesses find and connect the correct IoT boxes more reliably during setup.
Original PR description
Before this commit, the `/iot/discover-boxes` endpoint was called from the backend. This meant that the associated IP was that of the DB, which is usually different from the client network and not the intended behaviour. After this commit, the discover boxes route is called in a client action, and the result passed to the backend. There is a new transient model to keep track of the discovered IoT boxes during the wizard's lifetime, which simplifies the selection logic. task-4687795