Scrin / RuuviCollector

Utility to collect measurements from RuuviTags and store them in InfluxDB
MIT License
125 stars 62 forks source link

Feature request/idea: Insert to two influxUrl's #53

Closed codemiha closed 2 years ago

codemiha commented 3 years ago

Describe the feature you'd like to have implemented By default the collector writes to one influxUrl.

Describe alternatives you've considered Making RuuviCollector to write two separate influxUrl's would help with displaying collected data on Grafana when ruuvitags are on two different geolocations. RuuvICollector on remote site would write to local influx and also to remote (Grafana-site influx. Local RuuvCollector would write to local influx. Remote RuuviCollector would continue writing to its local influx if the connection to remote influx is lost.

Sadly I don't have skills to make this happen

DG12 commented 3 years ago

An alternative might be to have "monitor station 2" grafana use influxdb from "local" .

eras commented 3 years ago

I think this should already be achievable by just running two instances of the collector. Granted, a bit more heavy on resources and the data would not be identical (e.g. timestamps), but requires no code changes and would probably be even more robust.

Scrin commented 2 years ago

Indeed, this can be achieved by running two instances of RuuviCollector, or by switching to a stack of two instances of RuuviBridge paired with a physical Ruuvi Gateway or ruuvi-go-gateway for a software solution. Basically: ruuvi-go-gateway -> MQTT -> any number of RuuviBridges -> each RuuviBridge feeding data to a different InfluxDB instance, optionally with different configs (ie. different minimum measurement intervals)