Disable data store of zcl values by default
The feature is currently only used internally for R&D.
On Raspberry Pi sd-card writes should be prevented.
@@ -131,6 +131,9 @@ void DeRestPluginPrivate::cleanUpDb()
//"DELETE FROM device_descriptors WHERE rowid NOT IN"
//" (SELECT max(rowid) FROM device_descriptors GROUP BY device_id,type,endpoint)",
+ // change old default value of zcl data store, from 1 hour to disabled
+ "UPDATE config2 SET value = 0 WHERE key = 'zclvaluemaxage' AND value = 3600",
+
nullptr
};
@@ -673,6 +676,11 @@ void DeRestPluginPrivate::pushZdpDescriptorDb(quint64 extAddress, quint8 endpoin
*/
void DeRestPluginPrivate::pushZclValueDb(quint64 extAddress, quint8 endpoint, quint16 clusterId, quint16 attributeId, qint64 data)
{
+ if (dbZclValueMaxAge <= 0)
+ {
+ return; // zcl value datastore disabled
+ }
+
/*
select mac, printf('0x%04X', cluster), data, datetime(zcl_values.timestamp,'unixepoch','localtime')
