jxmot / node-dht-udp

SensorNet 2 of 3 - The server side to the esp8266-dht-udp project
MIT License
0 stars 1 forks source link

Preserve oldest sensor status on purges #27

Open jxmot opened 6 years ago

jxmot commented 6 years ago

The status purge erases the oldest sensor status and the client field goes blank. Improve the purge process so that it will retain the oldest status record.

jxmot commented 5 years ago

Currently, the last status message is retained only until a restart of the server. To fix that : when a new status arrives the server will save it in a text file. The next time the server starts it will read those files|that file and repopulate the internal storage of the last status. This is done before the server begins listening for clients. The same could also be done for the last sensor update(s).

The file(s) will have a depth of 1 for the status and update for each previously connected devices.

jxmot commented 3 years ago

This feature is under test.