Digital-Waters / WaterMonitorDevice

All the code that runs on our water monitoring devices.
0 stars 0 forks source link

As a Water Warden, I want my devices to operate offline so it can operate in the wilderness. #20

Open digitalwaters-jason opened 1 month ago

digitalwaters-jason commented 1 month ago

Description:

A significant portion of our water monitoring devices will be deployed in remote locations where internet connectivity is either unavailable or intermittent. To ensure continuous data collection, these devices must operate entirely offline and store data locally until a Water Warden volunteer can physically visit the site to swap batteries and collect the accumulated data.

The device should be designed to handle scenarios where it typically transfers data in real-time via Wi-Fi but may temporarily lose connection. In such cases, the device must seamlessly switch to local storage, appending data to a .json file during each iteration of the main loop. Over time, these files may grow significantly in size, containing several gigabytes of photo and sensor data.

We must also anticipate volunteers pulling batteries or SD cars in the middle of the main loop and corrupting the data of that iteration. That's ok. We should just discard partial data and remove any artifacts from the .json file.

When a Water Warden swaps out the SD card, the device should automatically detect this, create a new .json file, initialize it correctly, and continue appending data to the new file with each loop iteration. The device must be capable of bulk uploading stored data when a connection is re-established.

Acceptance Criteria:

Offline Operation:

Data Storage:

Data Transfer:

User Interaction:

Power and Reliability:

digitalwaters-jason commented 2 weeks ago

After testing our prototype in water, it's obvious all our devices will be completely disconnected under water, no signal will reliably get through even a few inches of water.