You donāt necessarily need to alter RuuviCollector, if you are able to parse InfluxDB line protocol on the receiving side, as the connection between RuuviCollector and InfluxDB (in the standard setup) is standard HTTP POST. In this case all you need to do is to change the influxUrl configuration property.
For example, if I changed the influxUrl to http://example.com:1337
then RuuviCollector would do a HTTP POST to:
http://example.com:1337/write?db=ruuvi&rp=autogen&precision=n&consistency=one
or with influxUrl of https://example.com/some/path/
it would post to:
https://example.com/some/path/write?db=ruuvi&rp=autogen&precision=n&consistency=one
(parameters depending on exact configurations) with following kind of data:
ruuvi_measurements,dataFormat=5,mac=D7D09A60357B absoluteHumidity=4.0374809476748155,accelerationAngleFromX=73.86213543428374,accelerationAngleFromY=16.145033821861915,accelerationAngleFromZ=89.53160256963027,accelerationTotal=0.9785949110842544,accelerationX=0.272,accelerationY=0.94,accelerationZ=0.008,airDensity=1.2148683985819957,batteryVoltage=2.983,dewPoint=-1.415840196649157,equilibriumVaporPressure=2764.5917289802787,humidity=19.9375,measurementSequenceNumber=4055i,movementCounter=117i,pressure=103319.0,rssi=-63i,temperature=22.74,txPower=4i
(note that with batch mode there can be multiple lines like the above (from different tags) in the post data if the measurements are received within the configured influxBatchMaxTime
(default 0.1 seconds) of each other)
If you need more fine-grained adjustments, you need to create your own implementation of a DBConnection, you can take a look at the InfluxDBConnection.java and DummyDBConnection.java for examples. You also need to add it to the config.