Enviro Indoor RTC


I provisioned my first Enviro Indoor with FW 0.0.9. It is set up to measure every 10 minutes and publish the values to a MQTT broker every five readings. The MQTT messages are sent via telegraf to an influxDB. Unfortunately the timestamps seem not to be right:

2023-01-13T04:50:09.93341218Z  21.09
2023-01-13T04:50:10.448852522Z 21.08
2023-01-13T04:50:10.96852426Z  21.05
2023-01-13T04:50:11.479811741Z 21.04
2023-01-13T04:50:11.991617678Z 21.04
2023-01-13T05:40:08.508709483Z 21.05
2023-01-13T05:40:09.022700193Z 21.03
2023-01-13T05:40:09.53879533Z  21.01
2023-01-13T05:40:10.049579469Z 21.01
2023-01-13T05:40:10.56374579Z  21.01
2023-01-13T06:30:08.560788817Z 21.01
2023-01-13T06:30:09.072052145Z 20.99
2023-01-13T06:30:09.584088702Z 20.99
2023-01-13T06:30:10.097025947Z 20.97
2023-01-13T06:30:10.608221295Z 20.97

In the database are five measurements every 50 minutes, but they aren’t 10 minutes apart from each other? Any suggestion how to investigate further?

I found the solution. In case somebody comes to this thread with the same question. In the telegraf.conf file define the json_time_key:

 urls = [""]
 database = "telegraf"

servers = ["tcp://"]
topics = ["enviro/#"]

data_format = "json"
json_time_key = "timestamp"
json_time_format = "2006-01-02T15:04:05Z"
json_timezone = "UTC"

I use mqtt with enviro indoor (0.0.9 reads every 10 minutes and uploads every 3 readings) and then have my own Python program to push it into influxDB and all seems ok. Likely related to your telegraf bit. Sorry cannot be more help as don’t know telegraf.

1 Like