Skip to content

iobroker-community-adapters/ioBroker.alias-manager

Repository files navigation

Logo

ioBroker.alias-manager

NPM version Downloads Number of Installations (latest) Number of Installations (stable) Dependency Status Known Vulnerabilities

NPM

Tests:: Travis-CI

alias-manager adapter for ioBroker

Manages and creates aliases.

Credits

This adapter would not have been possible without the great work of @sbormann (https://github.com/sbormann), who developed former releases of this adapter.

How to report issues and feature requests

Ideally, please use GitHub issues for this, with the best method achieved by setting the adapter to Debug log mode (Instances -> Expert mode -> Column Log level). Then retrieve the logfile from disk via the 'log' ioBroker subdirectory, not from Admin, which will cut lines.

Quick Intro

Manage aliases

Screenshot

  • (1) Klick on 'MANAGE ALIASES'
  • (2) To create a new alias, klick on 'NEW ALIAS' or
  • (3) Select an existing alias to edit

Screenshot

  • (1) You will then find an area with general settings of this alias, like the name or the common role
  • (2) Below you will find a list with all the datapoints of the alias
  • (3) You can add alias-datapoints to this list either by adding an empty one or by selecting an existing iobroker-datapoint and copy its settings to a new alias-datapoint
  • (4) You can delete datapoints by clicking on the garbage-icon
  • Every datapoint has several fields to configure it:
    • In the grey area you may set the name or delete the datapoint
    • In the blue area you can configure the role, the type and - optional - the unit
    • In the green area you can set optional min and max, and determine if the datapoint should be readonly (common.write is off) and if its value can be accessed (common.read is on - which will be the right setting for most cases)
    • In the red area you can:
      • (5) Configure the original ioBroker-datapoint, this alias-datapoint is linked to. Both (the original datapoint and the alias-datapoint) well be kept in sync.
      • (6) Furthermore you can configure conversion-functions for read and write.
        • Example: If you set val / 10 as "Read-Function", the value of the aias-datapoint will always be 10 percent of the original datapoint.
        • In most cases you would then like to configure val * 10 as "Write-Function", to also keep this ratio, when writing to the alias-datapoint.
      • Please read more about that in the ioBroker-documenation about aliases under https://www.iobroker.net/#en/documentation/dev/aliases.md

Screenshot

  • (1) When clicking on 'COPY ALIAS' to copy or
  • (2) on 'RENAME ALIAS' to rename the alias, the following dialog field will open:

Screenshot
Here you can:

  • (1) Set a new id and
  • (2) Set a new common name for the alias
  • (3) By clicking on 'ADD REPLACEMENT' you can add lines to the following list, where you can:
    • (4) Enter a string, that will be searched for, and replaced by (5) this string
    • With this funcion, you can quickly change the original ioBroker-datapoints, your alias-datapoints are linked to
    • Example:
      • You have a fan with several datapoints like SET, ERROR and UNREACH
      • These alias-datapoints are linked to original datapoints like hm-rpc.0.JEQ0698034.1.STATE, hm-rpc.0.JEQ0698034.0.ERROR and hm-rpc.0.JEQ0698034.0.UNREACH
      • Now, if your device is broken and has to be replaced by a new one, its serial number will change, lets say, for example to ASDF1234
      • To update all the links in all you alias-datapoints in one go you can search for hm-rpc.0.JEQ0698034 and replace it by hm-rpc.0.ASDF1234
      • This is also useful, when creating new aliases, that are similar to an old one. Just copy the alias, set a new id and name and use the replacement-function, to adjust the linked datapoints

Screenshot

  • After changing settings, you can:
  • (1) Save all changed alias-datapoints in one go by clicking on 'SAVE ALL CHANGES' or
  • (2) Save only one datapoint by clicking on 'SAVE CHANGES'
  • (3) Finally you can delete the entire Alias by clicking on 'DELETE ALIAS'

Autocreate Alias

Screenshot

  • (1) Klick on 'AUTOCREATE ALIASE'

Screenshot

  • (1) First select an ID of a device from the ioBroker object tree
  • (2) Then click on 'TRY TO CREATE ALIAS FROM THIS DEVICE'
  • (3) Afterwards you will find the determined settings for the Alias and
  • (4) A list of all datapoints of the selected device
    • All automatically recognized datapoints will be checked (only checked lines will be saved)
    • If automatically recognized, the datapoint will have an 'Destination ID' set. This will be the corresponding datapoint of the alias (the original datapoint will be linked to this new alias-datapoint). The autocreate-function tries to match to stanardized datapoint-ids, depending on the type of device that was recognized. However, you can change the settings as you like, but every 'Destination ID' has to be unique.
    • And finally you can enter a name for the destination alias-datapoint
    • All NOT automatically recognized datapoints appear in the list unchecked. You can manually adjust the settings and activate the checkbox.
    • (5) You can also manually add other datapoints to this list or clear the complete list
  • (6) You can then save the new alias with all the checked(!) datapoints (unchecked datapoints will be discarded)
  • Afterwards you will be automatically transfered to the 'MANAGE ALIASES' tab and the new alias will be opend, to adjust its settings as needed

Changelog

2.0.0 (2024-10-20)

  • (mcm1957) Adapter has been moved to iobroker-community-adapter organisation.
  • (mcm1957) Adapter requires js-controller 5, admin 6 and node.js 20 now.
  • (mcm1957) Dependencies have been updated.

1.2.6 (2022-03-02)

  • (sbormann) Updated dependencies.
  • (sbormann) Fixed saving of common.custom.

1.2.5 (2022-03-02)

  • (sbormann) Added All and None Buttons to select Datapoint while autocreating alias.
  • (sbormann) Some GUI-Enhancements and fixes for dark mode.

1.2.4 (2021-08-25)

  • (sbormann) Fixed autocreate not working after renaming destination id.

1.2.3 (2021-06-05)

  • (sbormann) Fixed autocreate not working after deleting or renaming alias.

License

MIT License

Copyright (c) 2024 iobroker-community-adapters [email protected]
Copyright (c) 2022 Sebastian Bormann [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.