Skip to main content

Tags

In Energyworx a Tag is an object to store metadata about a Datasource, such as its location, meter type or installed capacity. A tag follows the event sourcing design pattern with two properties:

  • version : the moment of recording. By default, every Tag is limited to 50 versions per Datasource.
  • valid_from : the moment of occurrence.

We define a couple of collections of tags with the same name:

  • latest tag : the tag with the latest version
  • current tag : the tag with the latest version and a valid_from before the current moment
  • active tags : All tags for which no tag with a later version and an earlier or equal valid_from exist.
  • all tags : all tags

This allows modelling of changes without losing information about history.

How to manage tags in the UI

It is possible to create, edit and remove tags from the platform. This page provides a step by step guide as well as a video demonstrating how each of those action can be performed.

Create tag

  1. Go to the ‘Tag’ section of your datasource and expand it
  2. On the top right corner of that section, click ‘Add tag’
  3. Type in the tag name, add select the valid from of the tag. you can also add a description if you want
  4. Type in a key value pair for a tag property and click ‘Add property’. Make sure to select the correct type (ie: timestamp or date when working with dates)
  5. Repeat step 4 until all the properties have been created
  6. Click ‘Save’

Edit Tag

  1. Go to the ‘Tag’ section of your datasource and expand it
  2. On the top right corner of that section, click ‘Edit tags’
  3. Make the changes necessary
    1. This can be adding or removing a property, changing a valid from or editing an existing value
    2. Note: choosing a valid from earlier than the existing one will make the current tag invalid ( as you will be creating a newer version which is valid from earlier). If you choose a valid from after the current's tag valid_from you will keep both versions, in a tag timeline (ie: tag_v1 valid until today, tag_v2 valid from today)
  4. Click ‘Save’ on the top right corner of that section

Delete Tag

  1. Go to the ‘Tag’ section of your datasource and expand it
  2. On the top right corner of that section, click ‘Edit tags’
  3. Click ‘Delete Tag’ on the tag that you want removed
  4. Choose the valid from of the deletion
    1. This means the previous value will be valid until the date of the new valid from. For instance, if I have tag_a valid from January 2020, and I remove it with a valid from of March 2021, tag_a will have a valid value from Jan 2020 to March 2021, and be considered removed from March 2021 onwards.

Note: You can still see the tag information by clicking ‘Show Removed’ in the top right corner of that section

Video Example:

Known Limitations and Behavior ⚠️

  1. Properties cannot be renamed directly. To change a name, you must delete the existing property and create a new one.
  2. To delete a property via API call, remove it from the tag's property list.
  3. Note that the following attributes are ignored in the request: deleted, readOnly, authorized
  4. A Tag is considered a duplicate if only the valid_from attribute has been updated to a future date. Duplicate tags will not generate a new version.