pbegg / signalk-to-influxdb-v2-buffering

'Plugin that saves data to an influxdbv2 database - buffers data without internet connection'
5 stars 3 forks source link

What happens when two devices send data to the same device instance? #14

Closed glover-glitch closed 3 years ago

glover-glitch commented 3 years ago

Hello!

I have to say that I am really enjoying this module. It works great!

But.. I have run across a small problem that I am hoping you can resolve or provide some guidance on. While I was monitoring electrical.batteries.1.voltage, Influx and grafana would flip between the correct voltage and a value of 0. It appeared to be random.

Tracking down that issue brought me face to face with the following scenario; Multiple battery monitors on the boat are sending data to the same device address. In this case 'electrical.batteries.1.voltage'. (and electrical.batteries.0.voltage)

This module can't see the difference between them and is sending either value to influxdb. It appears to choose at random. (As an aside for reference, Willhelmsk resolves this issue by allowing me to choose which data source to pull the value from. i.e. Canbus 1 or Canbus 224)

Is there anyway to have this module choose which data source to pull data from as well? Or to send both values to influx and we can choose there?

image

pbegg commented 3 years ago

As A quick fix you could use source priorities in the data connections tab. Otherwise i think we would need to do the same as signalk-to-influx and include a tag name 'source' value of the source name.

glover-glitch commented 3 years ago

Perfect, Thank you!

Your 'quick fix' worked like a charm. It is sufficient for my needs.

Thanks for being so supportive and having a very quick response time. Have great weekend!

image

pbegg commented 3 years ago

No dramas! Glad it's of use