k4cg / matomat-service

Matomat as a Service (MaaS)
MIT License
5 stars 2 forks source link

MQTT Message Content for 'item-consumed' #30

Closed noqqe closed 5 years ago

noqqe commented 5 years ago

Hi,

In the current implementation of the mqtt message content, its hard to determine (as a mqtt subscriber) if we already seen a message. In our (more specific case): What message should I put into InfluxDB and what message not?

Current behaviour:

From time to time, my mqtt subscriber recieves a message like matomat;item-consumed;1;1;Club Mate;100;

Wanted behaviour A)

From time to time, my mqtt subscriber recieves a message like matomat;item-consumed;1;1;Club Mate;100;42, where 42 is the total number of Club Mate items consumed

Wanted behaviour B)

From time to time, my mqtt subscriber recieves a message like matomat;item-consumed;1;1;Club Mate;100;1549967539 where 1549967539 is the timestamp the item was consumed

Please pick one (preferably A)