Influxdb tags for multiple iotawatts consistency

Hi! I have 2 units per switchboard reporting to a influx database and want them to:

  1. update seperately (e.g. one unit loses wifi and now needs to query its set of last points)
  2. otherwise operate as a single unit (i.e. from a dashboard / user view)

I specify tags like this:

On device with hostname “foo1”
name: $sensor
device: foo
units: $units

On device with hostname “foo2”
name: $sensor
device: foo
units: $units

I read the influx values with where device='foo' when creating a dashboard.

I read this tag info text and think I’m doing it right, but want to check:

When tags are specified, IoTaWatt assumes the first tag is unique to this measurement and is referenced to determine the time of last measurement during restart recovery. In that way, an IoTaWatt can maintain context and continuity where multiple data sources are writing to a single database.

Hence my ‘first tag’ is name: $sensor. I think achieved aims #1 and #2.

Can you confirm this is correct? (The other ordering option would is first tag as “device:foo”.) Thanks!

Hello Brett, the documentation is out of date. I changed the way that works some time ago but never addressed the documentation. The code was improved to query all of the series defined in the influxDB setup.

In InfluxDB , a series is a collection of points that share a measurement, tag set, and field key.

So as long as the two IoTaWatt do not attempt to upload the exact same datapoint (series), they should each restart after their own last post.

Ok, great. That makes it easier as reordering the tags in the interference is annoying.