Skip to content

PointToLineProtocol should output also additionaly set tags #139

@pxlfrk

Description

@pxlfrk

Proposal:
I'm using the InfluxDB-Client Library on a ESP8266 in addition with an Telegram-Bot to interact with the device. By sending a request-message to the telegram-bot /values, it should pass the sensor-values connected to the esp to the bot.

I have four different data points in my configuration with each 2 tag sets. There isn't any (non-deprecated) way to create a String of a data point including all tag sets right now.

Current behavior:
The data point class supports the method toLineProtocol and includes the optionally added tags - that's my desired behaviour - but it's deprecated :/

// Creates line protocol with optionally added tags
String toLineProtocol(String includeTags = "") const __attribute__ ((deprecated("Use InfluxDBClient::pointToLineProtocol()")));

The (regarding to the author) prefered method in the client-class only adds the default-tags, not the optionall added tags for each data point.

String InfluxDBClient::pointToLineProtocol(const Point& point) {
return point.createLineProtocol(_writeOptions._defaultTags);
}

Desired behavior:
Include the optionally configured tag sets.

Alternatives considered:
Describe other solutions or features you considered.

Use case:
Serial Output or (in my case) identify different dara points when forwarding their pointToLineProtocol-String to a Bot.

Kind regards,
Achim / pxlfrk

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions