Skip to content

Influxdb additional tags#16

Open
pdcleyn wants to merge 2 commits intorensongroup:masterfrom
Newtec:influxdb_additional_tags
Open

Influxdb additional tags#16
pdcleyn wants to merge 2 commits intorensongroup:masterfrom
Newtec:influxdb_additional_tags

Conversation

@pdcleyn
Copy link
Copy Markdown

@pdcleyn pdcleyn commented Oct 4, 2017

Added possibility to add arbitrary tags to power measurements

Peter De Cleyn and others added 2 commits October 3, 2017 21:40
@khenderick
Copy link
Copy Markdown
Contributor

Hi,

Thanks for the contribution. However, I'm going to put this one on hold for a little bit.

As you might already know, we're working on incorporating metrics in the core product. This means that the system will out of the box be able to gather various metrics and deliver them to any plugin that might be interesting. This also means quite some changes for this plugin, as it will change from being gather-and-push to push-only.

This PR will still be viable after the change, as extra metadata can always come in handy. It's just that I want to reduce possible merge conflicts. Let's revisit it as soon as the metrics land.

@khenderick
Copy link
Copy Markdown
Contributor

Hi @pdcleyn, version 2 of the plugin has landed in the meantime. Knowing that you make extensive use of this functionality (and most likely the code in this PR), I would like to check with you on how to get this merged in.

My proposal would be to incorporate this on the new version of the plugin in a slightly more generic way, so basically tags can be added to any metrics that is processed by the plugin.

A suggestion would be to slightly change the new "tags" configuration entry you added to sth like "additional_tags". I think it would be more uniform to replace "name" by "id", since that one is more likely to be available by more metrics. Next to "id", I think it makes sense to add an optional filter for "source" and "type". Leaving these empty matches all sources/types.

@pdcleyn
Copy link
Copy Markdown
Author

pdcleyn commented Nov 27, 2017

This all makes perfectly sense. However, I selected "name" iso "id" as this is what is also visible in other elements on the Openmotics UIs. It is not that trivial, AFAIK, to match the "id" and the "name" based on whatever information available within the OpenMotics WUI, i.e., when looking at the 'Engergy' page, you can find the module's ID, e.g., E13, but have no reference any more to the actual id, while a name is visible and has more context.

Another observation made while having this code operational now for a while, is that the UI way of configuring the additional tags is fine for a couple of sources, but once you extend the number of elements, it is not the most user friendly way of working. I'm thinking of adding a file based way of configuring the additional tags.

@khenderick
Copy link
Copy Markdown
Contributor

The ID should typically be this E number and the id of the CT connection; e.g. "E13.5". But indeed, a name might be more convenient.

You're indeed right that for a larger setup a configuration file might be easier. Plugins support a possibility "webgui" that allows them to add a page with whatever functionality desired. This could e.g. contain a textbox where a json config file could be parsed and stored.

@pdcleyn
Copy link
Copy Markdown
Author

pdcleyn commented Jan 4, 2018

@khenderick is there any documentation available about this new metrics handling? I can't find the metrics interface documented in http://wiki.openmotics.com/index.php/Gateway_plugins and it seems that even the readme files for the plugin has not yet been updated.

@khenderick
Copy link
Copy Markdown
Contributor

khenderick commented Jan 12, 2018

That's correct, I'll update the docs as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants