Optimisation of the structure of forwarded messages

With next release, we will clean up the message structure that also impacts the messages being forwarded to your servers. Currently, the array of keys includes:

  1. key
  2. value
  3. unit (in some cases, e.g. °C for key temperature  or % for key humidity)
  4. isCode (flag telling if the key should be translated using list of values or not
  5. _id of the key item

The key’s attributes: unit, isCode, and _id were there historically since version v1 and are not needed anymore, so we want to remove them from the message to make the messages smaller and be more efficient. It does not make sense to send a unit of temperature with every temperature since it does not change and we keep it as a part of our config files. Same with isCode. These attributes were mainly used internally. 


The new message will keep this structure: 

{
  keys: [
    { key: 'action', value: 'gas_periodic' },
    { key: 'gas_concentration', value: 1040 },
    { key: 'mode', value: 'gas' }
  ],
  deviceId: 'A152',
  type: 'data_bidir',
  timestamp: 1637575251,
  seqNumber: 2,
  _id: '619b6a5bf83148c4cc3ea3b9'
}

So the only difference is the removal of key’s attributes: unit, isCode, _id.