Current filter login is based on what NOT to include.
That means that the list of variables to be filtered is a nightmare to create and maintain.
// Add ignorable variables in this array.
const ignore_vars = [
‘ismBand’,
‘ismband’,
‘maxPayLoad’,
‘maxpayload’,
…
…
// Remove unwanted variables.
payload = payload.filter(x => !ignore_vars.includes(x.variable));
So instead, I would prefer to provide a list of variables that we would like use and that all other ‘junk’ gets ignored.
Example:
// Add variables to persist in this array.
const persist_vars = [
‘temperature’,
‘humidity’,
‘rssi’,
‘snr’
];
payload = payload.filter(x => persist_vars.includes(x.variable));
(I just made this up… but hope you get the point)
Vincent