hiveeyes / terkin-datalogger

Datalogger for MicroPython and CPython.
https://terkin.org
GNU Affero General Public License v3.0
60 stars 28 forks source link

Compatibility with Kotori: Add `timestamp` field into outbound telemetry message #111

Open amotl opened 3 years ago

amotl commented 3 years ago

Hi there,

this patch adds a timestamp field into the outbound telemetry message. The implementation should probably be improved, at least by making this detail configurable.

Currently, we are using the timestamp of the first reading, which also might have room for improvements.

With kind regards, Andreas.

amotl commented 3 years ago

When thinking about this once more, and when looking at the ci job #4274673219, it looks like the MQTT payload already includes three timestamp fields:

system.runtime                            17.281501054763794                          
system.time                                1637434163.607122                          
system.uptime                             1637434163.6071224                          

So, there would be no need to introduce another one. Instead, we can make Kotori learn about them.