diff --git a/temperature_logger.py b/temperature_logger.py index 129985d..4b7d4c7 100644 --- a/temperature_logger.py +++ b/temperature_logger.py @@ -73,6 +73,7 @@ class Monitor(Timer): for reading in data[channel]: (temperature, time_ms, overflow) = reading point = self.make_point( + serial, channel, temperature, time_ms, @@ -81,10 +82,10 @@ class Monitor(Timer): points.append(point) self.idb.commit(points) - def make_point(self, channel, temperature, time_ms, overflow): + def make_point(self, serial, channel, temperature, time_ms, overflow): json_body = { "measurement": "temperature", - "tags": {"channel": channel}, + "tags": {"channel": channel, "tc08-serial": serial}, "time": time_ms, "fields": {"temperature": temperature, "overflow": overflow}, }