I have been running UltraECM HSPI since it was released. I discovered the database purge function was taking a long time to complete which caused the database watchdog function to cancel the operation. When I manually truncated the data, it took almost 15 minutes to complete and another 15 minutes for the vacuum to complete. I came to the conclusion that purging and running vacuum was not going to work.
This is the solution I came up with:
1) I added an option to buffer the data packets and average the values prior to updating the HomeSeer device and the underlying database. The default buffer is 30 seconds. This greatly reduces the volume of data stored in the database. This solution also solves the issues with HSTouch caused by devices being updated every second.
2) I dropped support for all databases except SQLite so I could programmatically create the database and underlying tables.
3) I implemented monthly databases to improve performance and to ensure the database does not exceed 2 GB. The data is kept for 1 year before the database is eventually deleted. This solution allows me to delete a month worth of data in a few milliseconds instead of 30+ minutes.
If you purchased this plug-in, I highly recommend you install the version now available via the HomeSeer updater.
Regards,
Ultrajones
This is the solution I came up with:
1) I added an option to buffer the data packets and average the values prior to updating the HomeSeer device and the underlying database. The default buffer is 30 seconds. This greatly reduces the volume of data stored in the database. This solution also solves the issues with HSTouch caused by devices being updated every second.
2) I dropped support for all databases except SQLite so I could programmatically create the database and underlying tables.
3) I implemented monthly databases to improve performance and to ensure the database does not exceed 2 GB. The data is kept for 1 year before the database is eventually deleted. This solution allows me to delete a month worth of data in a few milliseconds instead of 30+ minutes.
If you purchased this plug-in, I highly recommend you install the version now available via the HomeSeer updater.
Regards,
Ultrajones
Comment