Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@iobroker/js-controller-cli

ioBroker34.1kMIT7.0.7TypeScript support: included

The Library contains the cli classes of ioBroker.

ioBroker

readme

Logo

ioBroker.js-controller

Number of Installations Number of Installations NPM version

Test and Release Downloads

The ioBroker.js-controller is the heart of any ioBroker installation. The controller is owning the central configuration of the ioBroker installation and controls and monitors all adapter processes for the current host.

Please check the js-controller compatibility information below which version runs on your Node.js version

Overview

Compatibility

  • js-controller 7.x (Lucy) works with Node.js 18.x, 20.x and probably 22.x
  • js-controller 6.x (Kiera) works with Node.js 18.x, 20.x and probably 22.x
  • js-controller 5.x works with Node.js 16.x, 18.x and probably 20.x
  • js-controller 4.x works with Node.js 12.x, 14.x, 16.x (incl. up to NPM 8) and probably 18.x
  • js-controller 3.x works with Node.js 10.x, 12.x, 14.x and probably 16.x (first tests look good, NPM 7 still has some issues, so NPM6 is best)
  • js-controller 2.x works with Node.js 8.x, 10.x, 12.x and probably 14.x (untested)
  • js-controller 1.x works with Node.js 4.x, 6.x, 8.x and probably 10.x (untested)

Please try to stay current with your Node.js version because the support is limited in time. As of now (May 2024) all Node.js versions below 18.x are no longer supported by Node.js and considered EOL (End Of Life). To upgrade your Node.js version and ioBroker, please follow https://forum.iobroker.net/topic/44566/how-to-node-js-f%C3%BCr-iobroker-richtig-updaten-2021-edition!

As it is hard to keep a lot of the decentralized adapters up-to-date, up from controller version 6.0.4 the js-controller will override the @iobroker/adapter-core dependency of single adapters to ensure compatibility with the current js-controller version.

  • js-controller 6.x (Kiera) specifies this version as ^3.1.6.

Usage

Example how to install on a Debian-based system:

curl -sLf https://iobroker.net/install.sh | bash -

Install ioBroker

See Linux instructions, Windows instructions and

after that, ioBroker should be running and available in the browser under http://<ip>:8081/.

Start ioBroker controller

Linux

  • run iobroker start to start the ioBroker controller in the background
  • watch the logfile iobroker logs --watch

or

  • run node node_modules/iobroker.js-controller/controller.js in the ioBroker directory to start the ioBroker controller in foreground and watch the log on console.

Windows

  • run iobroker start in the ioBroker directory to start the ioBroker controller as service. The name of the service is "iobroker(<servicename>)"
  • check the logfile log/iobroker.log

or

  • run node node_modules/iobroker.js-controller/controller.js in the ioBroker directory to start the ioBroker controller in foreground and watch the log on console

Configuration

The main configuration is stored in iobroker-data/iobroker.json. Normally, there is no need to edit this file because the ioBroker CLI commands can control most of the settings.

Feature Overview

Admin UI

Feature status: stable

The admin adapter is installed automatically and starts a web-server that hosts the Admin UI. Default port is 8081, so just open http://<iobroker-ip>:8081/

If port 8081 is occupied, you can install a second Admin UI on an alternate port and change the port for the first admin UI. To do so, run iobroker add admin --enabled --port 8090 and go to the http://<iobroker-ip>:8090/. Of course you can change port 8090 to a different one.

Automatic adapter upgrade

Feature status: New in 6.0.0

Whenever the repository changes, the controller will perform an automatic upgrade of the adapters, w.r.t. the auto-upgrade policy. The policy can be configured system-wide and per adapter. Whenever there is no policy on adapter-level the system-wide policy is used as a fallback.

Technically, the system-wide policy is configured in the system.config object in common.adapterAutoUpgrade.defaultPolicy. The policy is only active for the repositories which are set to true in common.adapterAutoUpgrade.repositories. On adapter level, the policy is configured in common.automaticUpgrade of each system.adapter.<adapterName> object.

Valid values for the policy are none, patch, minor and major. These relate to the version ranges, which will be automatically upgraded. It is strongly recommended to not configure major upgrades to be performed automatically, as these do often contain breaking changes and need manual intervention by the user.

A successful as well as a failed auto-upgrade will generate a notification in the ioBroker notification system (see Notification System).

Command Line Interface

Feature status: stable

The command line interface is described at https://www.iobroker.net/#de/documentation/config/cli.md

Adapter Upgrade with Webserver

Feature status: New in 5.0.0

Feature Flag for detection: ADAPTER_WEBSERVER_UPGRADE

An adapter can be upgraded via sendToHost. The adapter sends parameters to the js-controller which contain the information of the adapter to upgrade as well as information to start a webserver. The webserver can be polled by a UI, even if the adapter itself is stopped during upgrade or does not know of the upgrade.

Example:

sendToHostAsync('system.host.test', 'upgradeAdapterWithWebserver', { 
    version: '1.0.5', 
    adapterName: 'hm-rpc', 
    useHttps: true, 
    port: 8081, 
    certPrivateName: 'defaultPrivate',
    certPublicName: 'defaultPublic' 
});

In this example the controller will upgrade the adapter hm-rpc to version 1.0.5. During the upgrade, the log and status information is provided by a webserver running on port 8081, and using https with the given certificates.

During the update, you can perform a GET request against the webserver to get the current status of the upgrade.

The webserver response is defined as following:

interface ServerResponse {
    /** If the update is still running */
    running: boolean;
    /** Stderr log during the upgrade */
    stderr: string[];
    /** Stdout log during the upgrade */
    stdout: string[];
    /** If installation process succeeded */
    success?: boolean;
}

Controller UI Upgrade

Feature status: New in 5.0.0

Feature Flag for detection: CONTROLLER_UI_UPGRADE

The controller can be updated via sendToHost. This feature is used by Admin UI to allow upgrades without usage of CLI. The controller will start a detached process, and host a web server on the same port as the provided Admin instance.

Example:

sendToHostAsync('system.host.test', 'upgradeController', { version: '5.0.5', adminInstance: 0 });

In this example, the controller will be upgraded to version 5.0.5 and the web server will take the configuration (http/s, port, certificates) of system.adapter.admin.0. During the update, you can perform a GET request against the webserver to get the current status of the upgrade.

The webserver response is defined as following:

interface ServerResponse {
    /** If the update is still running */
    running: boolean;
    /** Stderr log during the upgrade */
    stderr: string[];
    /** Stdout log during the upgrade */
    stdout: string[];
    /** If installation process succeeded */
    success?: boolean;
}

Managing node modules

Feature status: New in 6.0.0

In the past, adapters which needed additional user-defined node modules directly interacted with npm to install them. With the ongoing development of npm it turned out to be problematically as additional packages get removed during other npm operations.

Hence, the controller now provides convenience methods to manage additional node modules.

To install a node module, execute:

const result = await adapter.installNodeModule('axios', { version: '1.0.0' });

if (result.success) {
    // successfully installed
}

Instead of specifying a module name you can also specify a URL to e.g. install a package from GitHub. To use the installed node module, you can import it:

const module = await adapter.importNodeModule('axios');

Note, that the behavior mimics the one of JavaScript's "import" operator.

If you are just interested in the default export, use the example below.

const module = (await adapter.importNodeModule('axios')).default;
// now we can call axios specific methods
const result = await module.get('https://www.iobroker.net/');

NOTE: Always use the provided adapter method to import the module, importing the module directly with import or require statements will not work!

To remove a no longer needed module:

const result = await adapter.uninstallNodeModule('axios');

if (result.success) {
    // successfully uninstalled
}

To list all installed node modules by your adapter:

const installedNodeModules = await adapter.listInstalledNodeModules();

adapter.log.info(`Installed modules are: ${installedNodeModules.join(', ')}`);

To get the adapter scoped package identifier you can use:

// e.g. @iobroker-javascript.0/axios
const packageIdentifier = adapter.getAdapterScopedPackageIdentifier('axios');

Per host adapter objects

Feature status: New in 6.0.0

Previous to js-controller 6.0.0 all adapter objects were only created as system.adapter.<adapterName>. This had the downside, that it was not possible to determine if an adapter is installed on a specific host on database level. Furthermore, in multihost environments the content of system.adapter.<adapterName> was filled with the last uploaded version of this adapter. Thus having different versions of an adapter on different hosts lead to an inconsistent object.

Up from controller 6.0.0 the objects of type adapter are additionally created under system.host.<hostName>.adapter.<adapterName>. If you need to interact with objects of type adapter, please use them from there. For now the objects are additionally created under their previous system.adapter.<adapterName> structure to ensure backward compatibility.

Furthermore, instances and their states will not move to another structure and will stay at system.adapter.<adapterName>.<instanceNumber>. Note, that instances are unique across the whole system and are thus not affected by the described problem. Also objects of type instance have a common.host attribute to find the corresponding host.

Ignoring specific adapter version

Feature status: New in 6.0.0

If you know, that a specific version of an adapter is not suitable for you, you may want to ignore this update to avoid accidentally installing it. You can do so by using the cli command iobroker version <adapter> --ignore <version> and to recognize all updates again use iobroker version <adapter> --recognize. If a version of an adapter is ignored, you will not be able to update to this specific version on this ioBroker host. If you use a multihost environment you might need to execute the commands once per host.

Internally this will set common.ignoreVersion to the specified version on the system.host.<hostName>.adapter.<adapterName> object. The version to be ignored can be specified via a semver range. So an absolute version is fine if you only want to ignore one specific update, e.g. 1.5.1. Another example, if you want to ignore all updates in the 1.5.x range, you can specify ~1.5.0.

Operating system package management

Feature status: New in 6.0.0

Feature Flag for detection: CONTROLLER_OS_PACKAGE_UPGRADE

The controller can upgrade OS packages on Linux via yum and apt. To upgrade a package, you have to send a message to the controller with the following this example:

sendToHostAsync('system.host.test', 'upgradeOsPackages', {
    packages: [{
      // the package name
      name: 'google-chrome-stable',
      // the optional version
      version: '120.0.6099.199-1' 
    }],
    // if the controller should be restarted afterwards
    restart: true,
});

Note, that specifying a version is optional. The answer by the controller has the property success which is true, if the upgrade was successful for all packages. If a package fails, the response will have a value of false for success and an additional property error which contains the error message as a string.

Currently only upgrading of packages is supported. If you need a specific OS dependency for your adapter, you can specify it inside io-package.json with the field osDependencies.

Custom install logic

Feature status: New in 5.0.0

If an adapter needs to execute custom install logic, one possibility is to use the scripts attribute of package.json. However, often adapters already want to interact with the ioBroker databases during the installation logic.

Hence, you can set ioPackage.common.install flag to true, to indicate that the js-controller should perform an installation run with your adapter after the npm installation is successfully done. During the installation run, the install instead of the ready event will be emitted. Alternatively, you can also pass an install function to the constructor the same way as for ready.

this.on('install', () => {
    this.log.info('Performing installation logic ...')
    // Perform your installation logic
});

Hostname

Feature status: stable

By default, the hostname for the js-controller instance will be taken from the official hostname of the server ioBroker is running on. The hostname should not be changed after the first start of ioBroker on this host.

If changes are needed there are CLI commands available to update the hostname. Look under https://www.iobroker.net/#de/documentation/config/cli.md for the iobroker host ... commands

If you need to set a specific hostname before the first start of iobroker you can also edit the iobroker.json file:

{
  "system": {
    ...
    "hostname":"local",
    ...
  },

Adapter process memory limitation

Feature status: stable

By default, the memory management is done by Node.js automatically. A Garbage Collector (GC) will clean up unused objects automatically from time to time.

If needed, especially for low memory situations the memory limit for all adapter processes can be set in iobroker.json. Only set this if really needed, and you know what you are doing. Leave the value at 0 to not set a special memory limitation.

{
...
  "system": {
    ...
    "memoryLimitMB": 0,
    ...
  },
...
}

Directly executing TypeScript adapters

Feature status: Technology preview since js-controller 3.3.0

The js-controller is able to execute .ts files, which removes the need of compiling to JavaScript first. To use this feature, simply define the adapter main file as the required .ts file.

E.g. in package.json:

{
  "main": "src/main.ts"
}

Note, that the sources need to be presence on every installation and thus need to be included in the npm package. Vice versa, the build folder is no longer required and should not be published to npm any longer.

Technically, the sources are compiled with ESBuild at every startup; hence this feature should not be used on adapters consisting of many sources to prevent noticeably delayed adapter starts.

Statistics

Feature status: stable

The js-controller is collecting statistics for the host (system.host.hostname.*), running compact groups (system.host.hostname.compaczgroupX.*) and for each adapter (system.adapter.adaptername.*). The data contains memory usage, free memory, number of events and also the event loop lag of the Node.js process.

Error Reporting via ioBroker Sentry

Feature status: stable since js-controller 3.0.0

Sentry.io is a way for developers to get an overview about errors from their applications. The js-controller uses this method to make sure application crashes are reported to us. With this, we can make sure to provide fixes for problems very fast.

Especially with the automatic restart behavior of ioBroker, some crashes happen and no one really realizes them. And so we also do not get bug reports for them. With this method the information is provided to us.

When the js-controller crashes or another Code error happens (and only then!), this error that also appears in the ioBroker log is submitted to our own Sentry server hosted in Germany. If you have allowed iobroker GmbH to collect diagnostic data, then also your anonymous installation ID (this is just a unique ID without any additional infos about you, email, name or such) is included. This allows Sentry to group errors and show how many unique users are affected by such an error. IP addresses are not stored with the crash report!

All of this helps me to provide an error-free smart home system that basically never crashes.

If you want to disable the error reporting, you can do this by setting the state "system.host.NAME.plugins.sentry.enabled" to false. You should see a log message stating that sentry was disabled. After disabling the plugin no crashes from your system are reported and so cannot be fixed without reporting them by yourself manually!

Notification System

Feature status: Stable since js-controller 5.0.0

The notification system in ioBroker allows setting, detecting and storing notifications per Host and allows querying the details.

Notifications need to be defined in the io-package.json of the adapter in the key notifications. Notifications are grouped in scopes and contain categories of different notification types. Notifications can contain a regex for automatic detection in strings or adapter exception texts. The definition also contains localized names and descriptions that can be used to display it to the users.

Registered notifications are stored per host and can be requested via messages to the host. They are also stored when the controller stops and loaded on next start. Additionally, a summary of the stored categories per scope with a number of stored notifications and the last added timestamp is available in the state system.host.hostname.notifications.scopeid as a JSON.

The js-controller defines in its io-package the system scope together with all details. You can use this as an example, and the JSON schema will help you validate your notifications.

{
  "notifications": [
    {
      "scope": "system",
      "name": {
        "en": "System Notifications",
        "de": "System-Benachrichtigungen",
        "ru": "Системные уведомления",
        "pt": "Notificações do sistema",
        "nl": "Systeemmeldingen",
        "fr": "Notifications système",
        "it": "Notifiche di sistema",
        "es": "Notificaciones del sistema",
        "pl": "Powiadomienia systemowe",
        "zh-cn": "系统通知"
      },
      "description": {
        "en": "These notifications are collected by the ioBroker system and point to issues you should check and fix.",
        "de": "Diese Benachrichtigungen werden vom ioBroker-System erfasst und weisen auf Probleme hin, die überprüft und behoben werden sollten.",
        "ru": "Эти уведомления собираются системой ioBroker и указывают на проблемы, которые вы должны проверить и исправить.",
        "pt": "Essas notificações são coletadas pelo sistema ioBroker e apontam para problemas que você deve verificar e corrigir.",
        "nl": "Deze meldingen worden verzameld door het ioBroker-systeem en wijzen op problemen die u moet controleren en oplossen.",
        "fr": "Ces notifications sont collectées par le système ioBroker et indiquent des problèmes que vous devez vérifier et résoudre.",
        "it": "Queste notifiche vengono raccolte dal sistema ioBroker e indicano problemi che dovresti controllare e correggere.",
        "es": "Estas notificaciones son recopiladas por el sistema ioBroker y señalan problemas que debe verificar y solucionar.",
        "pl": "Te powiadomienia są zbierane przez system ioBroker i wskazują problemy, które należy sprawdzić i naprawić.",
        "zh-cn": "这些通知由ioBroker系统收集,并指出您应检查并修复的问题"
      },
      "categories": [
        {
          "category": "memIssues",
          "name": {
            "en": "Issues with RAM availability",
            "de": "Probleme mit der Arbeitsspeicher-Verfügbarkeit",
            "ru": "Проблемы с доступностью оперативной памяти",
            "pt": "Problemas com disponibilidade de RAM",
            "nl": "Problemen met de beschikbaarheid van RAM",
            "fr": "Problèmes de disponibilité de la RAM",
            "it": "Problemi con la disponibilità della RAM",
            "es": "Problemas con la disponibilidad de RAM",
            "pl": "Problemy z dostępnością pamięci RAM",
            "zh-cn": "RAM可用性问题"
          },
          "severity": "alert",
          "description": {
            "en": "Your system is running out of memory. Please check the number of running adapters and processes or if single processes need too many memory.",
            "de": "Es steht nicht genug Arbeitsspeicher zur Verfügung. Die Anzahl der laufenden Adapter und Prozesse sollte geprüft werden, oder ob einzelne Prozesse zuviel Speicher benötigen.",
            "ru": "В вашей системе не хватает памяти. Пожалуйста, проверьте количество работающих адаптеров и процессов, или если отдельным процессам требуется слишком много памяти.",
            "pt": "Seu sistema está ficando sem memória. Verifique o número de adaptadores e processos em execução ou se processos únicos precisam de muita memória.",
            "nl": "Uw systeem heeft onvoldoende geheugen. Controleer het aantal actieve adapters en processen of als afzonderlijke processen te veel geheugen nodig hebben.",
            "fr": "Votre système manque de mémoire. Veuillez vérifier le nombre d'adaptateurs et de processus en cours d'exécution ou si des processus uniques nécessitent trop de mémoire.",
            "it": "Il tuo sistema sta esaurendo la memoria. Controllare il numero di adattatori e processi in esecuzione o se i singoli processi richiedono troppa memoria.",
            "es": "Su sistema se está quedando sin memoria. Verifique el número de adaptadores y procesos en ejecución o si los procesos individuales necesitan demasiada memoria.",
            "pl": "W Twoim systemie kończy się pamięć. Sprawdź liczbę działających adapterów i procesów lub czy pojedyncze procesy wymagają zbyt dużej ilości pamięci.",
            "zh-cn": "您的系统内存不足。请检查正在运行的适配器和进程的数量,或者单个进程是否需要太多内存。"
          },
          "regex": [
            "^Exception-Code: ENOMEM",
            "buffer allocation failed"
          ],
          "limit": 10
        }
      ]
    }
  ]
}

How to define own scopes?

Each adapter can define its own "scopes" for own notifications with its own categories which then will be available in the system. You can use the name of your adapter as a scope, e.g. hm-rpc to avoid conflicts with other scopes. If you plan on using a general purpose scope, please contact the core development group so that scope names can be checked to stay unique. The same applies if you see the need to enhance the system scope by additional categories. Let's discuss the requirements that they can also be added officially into upcoming js-controller versions.

A scope and category definition needs to contain all relevant UI texts in the JSON.

How to register own notifications?

An adapter can use the method registerNotification to register own notifications to the system. To find out if the used controller version supports this feature, check if the method exists (or require at least js-controller 3.2.0).

This method takes the following parameters:

  • scope: scope to be addressed
  • category: category to be addressed, if a null message will be checked by regex of given scope
  • message: message to be stored/checked
  • options: Available with js-controller version 7.0. Additional options for the notification, currently you can provide additional contextData which is also stored with the notification information. Notification processing adapters can use this data

Note, that the structure of the contextData which can be stored via the options object is not defined by the controller. Adapters which handle messages can use individual data attributes. Currently, it is planned to support individual notification customization in the admin adapter. More information will be available in the admin adapter as soon as this feature is ready.

The top-level of contextData should not be populated with individual data. The only allowed key on top-level is the name of the adapter which consumes these data, e.g. contextData.admin for the admin adapter. The structure inside the adapter property needs to be defined by the consuming adapter itself and is not specified by the js-controller. Please consult the adapter docs of the corresponding adapter for these information.

When a regex is defined then console.error output from the adapter is always checked by the regex and notifications are registered automatically when the regex matches!

How to read notifications?

The host supports the message command getNotifications to query the stored notifications together with the localized names and descriptions.

The message needs to take the following parameters in the message object:

  • scope - scope of notifications
  • category - category of notifications
  • instance - instance of notifications

All three are optional and can be a string or null/undefined if omitted.

How to clear notifications?

The host supports the message command clearNotifications to clear specific notifications after they are handled.

Please only clear notifications that really were handled and displayed to the user especially for "system" scope!

The message needs to take the following parameters in the message object:

  • scope - scope of notifications
  • category - category of notifications
  • instance - instance of notifications

All three are optional and can be a string or null/undefined if omitted.

Disk space warnings

Feature status: New in 6.0.0

The js-controller will generate a notification of in the scope system and the category diskSpaceIssues on warning level, if your free disk space falls under a specified threshold. By default, this threshold is 5 % of disk space. Via the state system.host.<hostname>.diskWarning you can override this level to any level between 0 and 100.

Logging

Log levels

Feature status: stable

The js-controller and each adapter can define their own log level. By default, info is used. The following log levels can be used:

  • silly (most logging)
  • debug
  • info
  • warn
  • error (only errors are logged)

The log level for js-controller is configured in iobroker.json in the logs section:

{
  ...
  "log": {
    "level": "info",
    ...
  }
  ...
}

Dynamic Loglevel change

Feature status: stable since js-controller 2.0.0

The log level can be changed dynamically for adapter-instance and host (main controller and compact group controllers) after they have been started. Initially, the configured loglevel is always used!

The states system.adapter.xy.logLevel and system.host.hostname.logLevel are updated on instance/controller start with the configured log level and can afterward be used to change the loglevel during runtime. These changes are not persisted, so the next restarts resets the loglevel to the configured one.

The Loglevel change is only effective if there is no loglevel (property "level") defined on the transport configuration.

This possibility allows debugging adapters better and during runtime.

File-based logging

Feature status: stable

The default logging will log file based in the log directory inside the ioBroker directory. The logfile will be stored with a name that contains the date and will be deleted after 7 days. It only contains the logs from the current host.

The logging is configured in the iobroker.json file and can be changed there:

{
  ...
  "log": {
    "level": "info",
    "maxDays": 7,
    "noStdout": true,
    "transport": {
      "file1": {
        "type": "file",
        "enabled": true,
        "filename": "log/iobroker",
        "fileext": ".log",
        "maxsize": null,
        "maxFiles": null
      },
    },
  ...
}

If you want to pin a special loglevel for the file transport, you can add a property "level" with a hard defined loglevel. Then no dynamic control is possible.

Since js-controller 3.0 Logfiles on non-Windows-based systems are compressed in rotation, so that the older Files need less space in your storage.

If you do not want to compress the files, this behavior can be deactivated by iobroker.json:

{
  ...
  "log": {
    ...
    "transport": {
      "file1": {
        ...
        "zippedArchive": false,
        ...
      },
    },
  ...
}

Syslog logging

Feature status: stable

ioBroker also supports logging to a syslog server. The configuration is also stored in the iobroker.json configuration file. A section for syslog is pre-created but disabled by default.

{
  ...
  "log": {
    ...
    "transport": {
      ...
      "syslog1": {
        "type": "syslog",
        "enabled": false,
        "host": "localhost",
        "host_comment": "The host running syslogd, defaults to localhost.",
        "port_comment": "The port on the host that syslog is running on, defaults to syslogd's default port(514/UDP).",
        "protocol": "udp4",
        "protocol_comment": "The network protocol to log over (e.g. tcp4, udp4, unix, unix-connect, etc).",
        "path_comment": "The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).",
        "facility_comment": "Syslog facility to use (Default: local0).",
        "localhost": "iobroker",
        "localhost_comment": "Host to indicate that log messages are coming from (Default: localhost).",
        "sysLogType_comment": "The type of the syslog protocol to use (Default: BSD).",
        "app_name_comment": "The name of the application (Default: process.title).",
        "eol_comment": "The end of line character to be added to the end of the message (Default: Message without modifications)."
      }
    }
  }
  ...
}

If you want to pin a special loglevel for the file transport, you can add a property "level" with a hard defined loglevel. Then no dynamic control is possible.

Other Log transports

See the iobroker.json and Admin for more transports and their settings.

If you want to pin a special loglevel for the file transport, you can add a property "level" with a hard defined loglevel. Then no dynamic control is possible.

Adapters are allowed to subscribe log messages

Feature status: stable

ioBroker allows adapters to subscribe to log messages from the whole system. E.g., admin adapter is using this logic

More details for this feature can be found at https://github.com/ioBroker/ioBroker.docs/blob/master/docs/en/dev/logging.md

Controlling and monitoring of adapter processes

The full definition for adapter settings can be found at https://github.com/ioBroker/ioBroker/blob/master/doc/SCHEMA.md#adapter

Multiple adapter instances

Feature status: stable

ioBroker allows installing multiple adapters on the system. For each adapter, the JavaScript code is installed once. For each adapter, multiple instances can be created and started with independent configurations.

Adapter types

Feature status: stable

ioBroker supports multiple Adapter modes. These are:

  • deamon: The adapter is started and runs all the time. If the process gets killed, it will be restarted automatically. This adapter type is mainly used for all situations where communications or actions are done continuously. These adapters also support a restart schedule where the controller restarts the instances. The adapter needs RAM and some CPU resources also when doing nothing.
  • schedule: The adapter is started based on a defined schedule (e.g., once per hour, once a day, all 10 minutes ...), then is doing its work and is stopping itself when finished. The adapter is only using RAM and CPU when needed.
  • once: The adapter ist started only once after it's object got modified. No restarting happens after the adapter stops.
  • none: The adapter is officially not having any process, but could be a webExtension (so iis included by a web instance on the same host or is only running client side and so offering www files)

NOTE: Up from controller v6 for adapters of type schedule and if connectionType is set to cloud

If the schedule consists of a CRON tab without specifically specifying seconds, the execution will be delayed randomly up to 60 seconds. This is to prevent unwanted DDoS attacks. If your adapter needs to exactly run at a specified second, please specify the second in your CRON tab so no delay will be introduced by the controller.

Start adapter instances as normal processes

Feature status: stable

By default, adapters are started by the js-controller as separate Node.js processes. They connect to the state and object DBs to read and write their data and some statistical information.

The js-controller is monitoring the process ids of the started processes and also controls stopping or restarting these processes.

With this approach, the whole iobroker system is very robust. A faulty adapter will only affect his own process, and the js-controller and the other adapter processes are unaffected.

The downside is that more RAM is required because each Node.js process needs 20-30 MB RAM for the Node.js part of it. With this, a 1 GB system is usually limited to run approximately 10 to 15 adapter processes. Aside from using systems with more RAM, distributing adapters onto multiple hosts in a multihost environment is possible.

Start adapter instances in compact mode

The compact mode is developed especially for systems with low memory. All adapters configured to run in compact mode will run inside the same process as js-controller.

As a result, each adapter needs 20-30 MB less RAM because it does not need to have its own Node.js process handling. This way, even a system with only 512 MB RAM can run several adapter instances.

The downside is that as soon as one adapter is crashes or generates an unhandled error, the whole js-controller process will be restarted.

To minimize the risk, adapter instances are run by default in compact group 1 which means that a second process is created for all adapters. A problem there would also not crash the js-controller itself. If you need less RAM usage you can manually change that and configure the instances to run on group 0 (=inside js-controller).

Compact mode

Feature status: Technology preview (since 2.0.0)

To enable compact mode for a js-controller instance, you can use the new "compact" CLI commands, or you can manually change the iobroker.json configuration file

{
  ...
  "system": {
    ...
    "compact":true
  }
  ...
}

and restart the js-controller.

Compact groups

Feature status: Technology preview (since 2.0.0)

To be able to handle the risk of crashed controller processes affecting the whole system, it is possible to assign the adapter instances to different compact groups. Each group will be run in their own process, only group 0 is handled directly by the main js-controller process.

Using several compact groups, you can, by using a bit more memory, lower the risk of a crashing js-controller main process.

Compact groups can be configured for the respective instances using the compact CLI commands (see ìobroker compact commands on https://www.iobroker.net/#de/documentation/config/cli.md).

Implementation details

https://forum.iobroker.net/topic/18338/experimentell-js-controller-compact-mode

Testing details for development

For testing, set up your js-controller to use compact mode and change the io-package.json and javascript files accordingly. Do not forget to iobroker upload adaptername after changing io-package.json.

Please check that your adapter starts and runs as expected also when compact mode is used.

For adapters running in compact mode, special care must be taken to clean up used resources without throwing errors. You need to make sure that all initialized connections, timers and intervals are closed and stopped in the unload handler.

Check available RAM before adapters are started

Feature status: stable, since js-controller 3.0

The js-controller checks the available RAM of the system before starting a new adapter process. If the available RAM is below 50/100 MB by default, an error/warn is logged. The limits can be configured in iobroker.json

    "system": {
        "memLimitWarn": 100,
        "memLimitWarnComment": "If the available RAM is below this threshold on adapter start, a warning will be logged.",
        "memLimitError": 50,
        "memLimitErrorComment": "If the available RAM is below this threshold on adapter start, an error will be logged."
    }
    ...

Later versions of js-controller might prevent the start of a new adapter process if system resources are too low!

Manually run adapter instances for debugging

Feature status: stable

For debugging reasons, sometimes it is necessary to start an adapter instance via the command line to get more detailed logging.

To do so, manually execute the adapter's main javascript file, which is usually named main.js or <adaptername>.js (where "adaptername" is the name of the adapter):

node node_modules/iobroker.adaptername/main.js --force --logs

All log output will now be printed to the console.

Multihost

Feature status: stable

When local interfaces are required or the host system is reaching its resource limits, the ioBroker system can be distributed to additional hosts. All hosts in a multihost environment are connected to the same states and objects databases and are thus synchronized with each other.

When the states and/or objects databases are provided by a js-controller process on one host, this "master" host needs to be configured so the databases are available on the local network. To do so, enter 0.0.0.0 as the address in iobroker setup custom instead of 127.0.0.1.

All other hosts are configured to connect to this master host.

For detailed setup instructions see https://www.iobroker.net/docu/index-24.htm?page_id=3068&lang=de

TIERS: Start instances in an ordered manner

Feature status: Technology preview (since 3.3.0)

Starting from js-controller 3.3.0, you can define the common.tier attribute in the io-package.json. Lower TIERS will start before higher TIERS. Currently, 3 TIER levels are supported. Note, that the admin adapter as the central control platform will always be started first.

TIER 1

Logic and scripting engines, which should be able to act as fast as possible to work with states delivered by higher TIER adapters.

TIER 2

Adapters which deliver data from external APIs, which are important and can change at any time. This also often includes messaging adapters.

TIER 3

Adapters which are not time-critical like Visualization, Backup adapters, and adapters whose information does not necessarily need to be up-to-date. These are often schedule adapters, whose information is always a bit delayed.

Custom Node.js process arguments

Feature status: New in 5.0.0

Passing custom arguments to the Node.js adapter process

To use this feature, use the nodeProcessParams in the common section of io-package.json. Using this feature will disable the possibility to start the adapter in compact mode, as then other adapters would also be affected by the passed parameters. The property nodeProcessParams needs to be an array of strings.

Example: "nodeProcessParams": ["--tls-min-v1.0"]

IPv6 DNS resolution support

Feature status: New in 5.0.0

You can decide to use IPv6 first as DNS resolution method instead of IPv4 first (default). To use this, configure dnsResolution to verbatim in iobroker.json.

For handling IPv6 and IPv4 in adapters, we provide some convenience methods. These are available via ioBroker Adapter Core starting with version 2.7.0.

Ensure that DNS resolution is performed according to ioBroker config if you need to ensure this for non-standard adapter processes (e.g., own started subprocesses).

Object and State Aliases

Feature status: stable (since 2.0.0)

Feature Flag for detection: ALIAS, ALIAS_SEPARATE_READ_WRITE_ID

The Alias Feature allows defining one object/state to be the "alias" of another object/state.

All Aliases will be created in the Object namespace alias.0

Effectively an alias object will mirror the state value of the target object. If allowed, both states can be changed and are synced automatically by the ioBroker core system. Also, both states can be used to subscribe in scripts and should behave exactly identical.

Additionally, to defining the target ID, the alias object can also define "read and write functions" to do easy value conversions, so e.g. the target state could contain a power measurement value in Wh (because an adapter delivers the value that way) and the alias could use the same value calculated as kWh.

Some devices have separate states for semantically one state. One to read the current status from and one to write to, to control the device. You can combine these states into one alias by using a separate alias id to write to and another to read from.

We recommend to use the devices adapter to manage aliases. Alternatively, you can use Admin interface on the "Objects" tab to create aliases. Just open the context menu on the state, for which you want to create an alias, and select "Create Alias".

To create an alias object simple create a new object with an own name in the alias.0 namespace and add the alias definition in the common section (here for an alias with the id "alias.0.aliasName"):

{
    _id: "alias.0.aliasName",
    common: {
        name: 'Test AliasC',
        type: 'number',
        role: 'state',
        min: -10,
        max: 10,
        alias: {
            id: 'state.id.of.target',
            read: 'val * 10 + 1',
            write: '(val - 1) / 10'
        }
    },
    native: {},
    type: 'state'
}

or using different read and write ids (supported starting js-controller 3.0, check using feature flag ALIAS_SEPARATE_READ_WRITE_ID):

{
    _id: "alias.0.aliasName",
    common: {
        name: 'Test AliasC',
        type: 'number',
        role: 'state',
        min: -10,
        max: 10,
        alias: {
            id: {
                read: 'state.id.to.read.from',
                write: 'state.id.to.write.to'
            }
            read: 'val * 10 + 1',
            write: '(val - 1) / 10'
        }
    },
    native: {},
    type: 'state'
}

The following fields are allowed in the alias structure:

  • alias.id contains the ID of the target object/state to mirror OR (since js-controller 3.0) represents an object with the following two properties:
    • alias.id.write contains the ID of the object which will be set when alias is written
    • alias.id.read contains the ID of the object which will be mirrored to the alias object/state
  • alias.read can optionally contain a "read" script (will be evaluated) to calculate the alias value when the target state changes
  • alias.write can optionally contain a "write" script (will be evaluated) to calculate the target value if the alias value is changed

Note, that alias states will be automatically scaled if the following conditions match:

  • target and source state are of type number
  • either the alias state or (not both) the source state are of unit %
  • no read or write function is defined
  • the state which is not of unit % has a valid min and max property

To set the alias properties without a JavaScript or in adapter code you can also use the cli commands like:

iobroker object set alias.0.aliasName common.alias.id=state.id.of.target
iobroker object set alias.0.aliasName common.alias.read="read-func"
iobroker object set alias.0.aliasName common.alias.write="write-func"

NOTE: The permissions of the source object are ignored and only the permissions set on the alias object itself are relevant for database operations.

Additional information about aliases could be found here.

State and objects databases and files

ioBroker is storing three different types of data:

  • objects contain the metadata, descriptions and configuration values for all objects and states stored by ioBroker. Objects are created initially and sometimes updated, but usually not changed very frequently
  • files are all JSON, image and other files that are accessible for all ioBroker adapters. A meta.user object needs to exist for the adapter or instance to define allowed root directories. As example see sayIt adapter io-package.
  • states contain the real data from sensors, devices and objects which are updated frequently

ioBroker in-memory database with JSON file storage

By default, the js-controller process is offering in-memory DBs at ports 9000 (for states) and 9001 (for objects/file). All adapter processes and js-controller processes from other hosts connect to these databases to read and store data.

The in-memory DBs for states and objects use JSON files to store the data. The files are stored after changes every 30 seconds and are backed up automatically. The files are stored in iobroker-data directory, the backups in a subfolder.

The in-memory DBs work well for up to 10000 objects and normal state update frequencies. When your system has more objects and states or its states are updated very often, it is a better idea to use Redis as the database engine. A good indicator for this if the js-controller process is using a lot of CPU and/or the system feels slow.

js-controller 1.x was using socket.io as the communication protocol between the adapters and the in-memory DBs. Starting with js-controller 2.0, the communication protocol was changed to be a lightweight Redis protocol. This simplifies the logic and should increase performance.

For the objects and states databases, special additional logging of the redis protocol messages can be activated in iobroker.json

"objects": {
  ...
  "enhancedLogging": false
}

When not configured differently, the file databases are persisted every 15s (15000ms) after data are changed. The interval in ms can be changed by configuration in iobroker.json starting js-controller 3.0.

NOTE: If you do that be aware that you may lose data when the js-controller crashes unexpectedly!

"objects": {
  ...
  "writeFileInterval": 60000
}

Redis as database

Redis is a well-known industrial grade in-memory database optimized for speed and stability. It performs better than the ioBroker In-Memory database which is written in JavaScript.

Install Redis

e.g. for Linux: https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-18-04

Configure Redis
make sure Locale is set correctly

ioBroker requires the "Locale" for the redis-server process to be set to "LANG=C" instead of other locales in order to get correct sorted results when Objects are stored in Redis.

On Linux, ideally set the LC_ALL environment variable for the redis-server process correctly. For more information to see if changes are needed and how to do them see https://forum.iobroker.net/topic/52976/wichtiger-hinweis-f%C3%BCr-redis-installationen (German right now).

Allow Network access

Ideally, the Redis server should be installed on the same host as the js-controller process because as soon as Redis is configured to be used, the ioBroker installation will not work without it.

If you plan to install Redis on a different host than the js-controller or use a multi-host environment (see below), you must allow connections to redis from any address (the default only accepts connections from 127.0.0.1). To do that edit the file /etc/redis/redis.conf (sudo nano /etc/redis/redis.conf) and replace bind 127.0.0.1 with bind 0.0.0.0 . Don't forget to restart redis after that. (sudo systemctl restart redis-server)

Redis Slaves

If you have multiple hosts, you can install Redis to all of them and configure the other hosts to be slaves of the Master host. With this, all data is available on all hosts, so even if one host crashes completely, you still have the database content from the other hosts.

More details can be found at https://redis.io/topics/replication#configuration and https://redis.io/commands/replicaof

Redis slaves will be not writable by default.

In case of a crash of the master, you can reconfigure one of the slaves to be the new master and it will use the current content. After reconfiguring all slaves to sync with the new Master, the redis database is functional again.

After reconfiguring Redis, you also need to update all ioBroker states/objects DB settings to connect to the new Redis Master host.

Redis persistence

By default, Redis is a pure in-memory Database which means that it has no content when it starts. In the default configuration, the content of the redis DB is stored on disk after a certain number of changed keys.

Depending on how many changes your system is doing, it will update the data on disk roughly every 5 minutes by default. Please consider this if your system runs from an SD card (like Raspberry Pi).

If you are not working on an SD card and want to have real up-to-date data on disk, you can use the second persistence method called AOF. Else the latest dumped data is used, which could be some minutes old.

Please see https://redis.io/topics/persistence for details, differences, and configuration information for both persistence options.

Using Redis as States-DB

Feature status: stable

There is a possibility to use Redis as a state database. It is reasonable to do that for big installations or for systems with performance problems. It is possible to switch anytime between Redis and in-memory Javascript DB.

Note for js-controller <2.0: After changing to Redis, all states must be updated by the adapters again (the previous values will be lost). Please especially note this for the state values from own JavaScript states! Objects and configuration are not affected.

To switch to Redis, execute the following on the console:

iobroker stop
iobroker setup custom

And then enter redis as the states DB type (line 4):

Type of objects DB [file, redis], default [file]:
Host of objects DB(file), default[127.0.0.1]:
Port of objects DB(file), default[9001]:
Type of states DB [file, redis], default [file]: redis
Host of states DB (redis), default[127.0.0.1]:
Port of states DB (redis), default[6379]:
Data directory (file), default[../../../iobroker-data/]:
Host name of this machine [FastPC]:
creating conf/iobroker.json

Now ioBroker can be started. If it does not start, please check the log at log/iobroker.*.log in the ioBroker directory. Please also check the redis is running (use e.g. redis-cli) and that the firewall set up correctly.

To switch back to file-based states, write the same commands again, just instead of redis in the fourth line, write nothing and press ENTER.

Using Redis as objects/File-DB

Feature status: New in 2.0.0

Starting with js-controller 2.0.0, objects and files can also be stored in Redis. Since Redis holds all data in the RAM, this setup uses much more RAM because uploaded files and image assets are also stored in Redis. Please think carefully about this step and make sure your system has enough RAM available!

The setup is comparable to the setup for states in Redis by using iobroker setup custom, but enter redis as type of the objects' database. You can use the same redis server for states and objects/files database.

Using Redis Sentinel as objects/File-DB

Feature status: New in 2.0.0

Redis Sentinel is an industry standard to achieve a highly available redis database. It is based on a Redis master-slave setup with at least three nodes. Additional so-called sentinel processes monitor all redis instances in the master-slave setup.

If the master is going offline, the sentinel processes react and coordinate to select a new master. After this is done, the master-slave cluster is reconfigured and the new master is taking over.

More details about the Redis sentinel can be found in the official documentation at https://redis.io/topics/sentinel .

ioBroker allows using a Redis Sentinel system. For this you use iobroker custom like above, but provide a comma-separated list of the sentinel hosts. For the sentinel ports you can either enter a comma-separated list with the same number of entries, or a single one which is then used for all hosts.

With such a setup, ioBroker will connect to one of these sentinel processes to get the current Master Redis and then connect to it. When the connection to the Master is disconnected, all data updates are cached and transmitted as soon as a connection to the new master has been established.

Using Password for Redis Databases

Feature status: Stable

Certificate Handling

... CLI ... Files vs PEM content ... TODO

js-controller Host Messages

... TODO

shell

... TODO

cmdExec

... TODO

getRepository

... TODO

getInstalled

... TODO

getInstalledAdapter

... TODO

getVersion

... TODO

getDiagData

... TODO

... TODO

getLocationOnDisk

... TODO

getDevList

... TODO

getLogs

... TODO

getHostInfo

... TODO

getHostInfoShort

... TODO

delLogs

... TODO

readDirAsZip

... TODO

writeDirAsZip

... TODO

readObjectsAsZip

... TODO

writeObjectsAsZip

... TODO

updateMultihost

... TODO

getInterfaces

... TODO

upload

... TODO

rebuildAdapter

... TODO

readBaseSettings

... TODO

writeBaseSettings

... TODO

Adapter Development

Feature status: Stable

TODO: Link to Adapter Development docs

Automatically Encrypt/Decrypt configuration fields

Feature status: Stable, since js-controller 3.0

Since js-controller 3.0, the adapter developer can define an array or field names in io-package.json as encryptedNative to define which fields should be automatically encrypted before being stored by Admin and decrypted when the adapter process starts. The values are not decrypted when the object itself is read!

With this change and the Admin support for this soon, the adapter developer does not need to struggle around with encryption or decryption of adapter values and can simply configure this.

To preserve backward compatibility, you can check for the feature flag ADAPTER_AUTO_DECRYPT_NATIVE or add a global Admin dependency to the respective Admin (>=4.0.10) version.

Protect free reading of adapter configuration fields

Feature status: Stable, since js-controller 2.0

Normally, all objects can be read by any adapter using getObject or getForeignObject. To make sure sensible adapter configuration values are protected from that free reading they can be secured.

If an array with field names from native is defined in io-package.json as common.protectedNative the ioBroker system will sort these fields out when the object is read. Only the adapter itself is allowed to read the full object.

It is best practice adding the field names of encrypted fields to the protectedNative array too to make sure the fields stay protected (even if encrypted). Only let other adapters read your encrypted values if there is a need to (e.g. adapter interoperability)

Define Adapter dependencies to other adapters

Feature status: Stable

Dependencies are defined in an array and can contain an adapter name of an object.

When using the object style, you can define a semver version range for this adapter:

"dependencies": [
      {
        "js-controller": ">=2.0.0"
      }
    ],

If the version do not matter and just the adapter itself needs to be present you can also use:

"dependencies": [
      "web"
    ],

There are two types of adapter dependencies that can be defined in io-package.json and will be checked on installation and adapter start.

common.dependencies for Same Host dependencies With common.dependencies in io-package.json you can define if an adapter needs to be present on the same host and optionally in which version. This is mainly used to define the needed "js-controller" version for yor adapter and can also be relevant e.g. for web extension adapters (adapters that can be plugged in into the web adapter, so the code needs to be on the same host).

common.globalDependencies for dependencies on any Host With common.globalDependencies in io-package.json and starting with js-controller 3.0, you can define a global dependency that will be checked over all hosts. Irrelevant where on the system the referenced adapter is installed it needs to match the version and at least one instance needs to exist. This can mainly be used for more loose dependencies where adapters are split over multiple hosts but still work together, e.g. Admin.

Subscribe to Logs from other adapters

Feature status: Stable

The js-controller allows adapters to subscribe to log messages from other adapters and react on them. For details see https://github.com/ioBroker/ioBroker.js-controller/blob/master/doc/LOGGING.md

Adapter Feature Detection

Feature status: Stable since js-controller 2.0.0

Since js-controller 2.0, there exists a dedicated method to detect if certain features exist for an adapter.

The preferred way to use it (also because of backward compatibility reasons) is:

if (adapter.supportsFeature && adapter.supportsFeature('NAME')) {
    // ...
}

The following features can be checked using this method:

  • ALIAS: checks if the Alias feature is existing (since js-controller 2.0)
  • ALIAS_SEPARATE_READ_WRITE_ID: allows specifying separate IDs for reading and writing (since js-controller 3.0)
  • ADAPTER_GETPORT_BIND: the adapter.getPort method allows an optional second parameter to bind the port only on a special network interface (since js-controller 2.0)
  • ADAPTER_SET_OBJECT_SETS_DEFAULT_VALUE: adapter.setObject(*) methods now sets the default value (def) after the object was created (since js-controller 2.0)
  • ADAPTER_DEL_OBJECT_RECURSIVE: adapter.delObjects supports options.recursive flag to delete whole object structures (since js-controller 2.2)
  • ADAPTER_AUTO_DECRYPT_NATIVE: The Controller supports auto decryption of encrypted native properties (since js-controller 3.0)
  • PLUGINS: Plugins are supported by this js-controller and adapters, see the section below for more details (since js-controller 3.0)
  • CONTROLLER_NPM_AUTO_REBUILD: Automatic rebuild when node version mismatch is detected (since js-controller 3.0)
  • CONTROLLER_READWRITE_BASE_SETTINGS: Allow reading and writing of js-controller base settings file (iobroker.json) via host messages (since js-controller 3.0)
  • CONTROLLER_MULTI_REPO: indicates that the controller supports multiple repository sources, which will be combined in one (since js-controller 4.0)
  • CONTROLLER_LICENSE_MANAGER: js-controller can read licenses from iobroker.net (since js-controller 4.0)
  • DEL_INSTANCE_CUSTOM: indicates that controller is able to delete all custom attributes of an adapter and instance if it is deleted via --custom flag (since js-controller 4.0)

To check if certain adapter methods itself are existing, please simply check for their existence like

if (adapter.getObjectView) {
    // ...
}

or

if (typeof adapter.getObjectView === 'function') {
    // ...
}

Plugin-System for Adapters and js-controller

Feature status: Stable since js-controller 3.0.0

Starting with js-controller 3.0, a flexible plugin system is available to the js-controller and also to adapters. Plugins are custom modules that can be configured in io-package.json in a new "plugins" section and provide central functionality on the level of the adapter or js-controller process. The modules are automatically loaded and configured. Depending on the plugin they can be enabled or disabled by setting system.host or system.adapter states.

More details about plugins and their development can be found at the Plugin-Base repository. A simple implementation can be found at the Sentry-Plugin

New Plugins should always be developed, reviewed and published by ioBroker Core developers! Contact @Apollon77 or @GermanBluefox for this.

Since js-controller 3.0, the sentry plugin is integrated and activated by default in js-controller. See the information above.

Maintenance mode

There is a special maintenance mode. It is used by some special adapters, that will clean the objects and states from invalid entries. Invalid entries could be:

  • has invalid ID (e.g., null, empty or with prohibited chars, very long IDs over 2000 chars),
  • has an empty object or with no object type.
  • states that have no according entry in object DB

To make it possible to get such an entries, the maintenance mode was implemented. To make a call in maintenance mode, you must provide options object with the at least following attributes:

{
    user: 'system.user.admin',
    maintenance: true,
}

Following adapter methods support maintenance mode:

- adapter.getForeignState
- adapter.getForeignObject
- adapter.setObjectWithDefaultValue
- adapter.setForeignObject
- adapter.setObjectNotExists
- adapter.delForeignObject

- adapter.getForeignState
- adapter.delForeignState

* Do not use this mode for any other purposes except sanitizing/cleaning/repairing of existing DBs (Object and States)*

Environment Variables

Feature status: stable

There are several environment variables which are respected by the js-controller.

IOB_NO_SETCAP (up from js-controller 7.0.X)

By default, the js-controller sets some capabilities on the Node.js executable. Currently, cap_net_admin, cap_net_bind_service, cap_net_raw are set to e.g. allow Node.js to start/stop BLE advertising without root privileges. On installation these are set by the ioBroker installer. However, on upgrades of Node.js these get lost. If js-controller detects a Node.js upgrade, it will ensure that these capabilities are set again.

In some scenarios, e.g. during development it may be useful to deactivate this feature. You can do so by settings the IOB_NO_SETCAP environment variable to true.

Vendor Packages Workflow

Feature status: New in 7.0.0

This feature is only of interest for vendors which aim to provide a package which is published to a private package registry (e.g. GitHub Packages). This may be desirable if the adapter is only relevant for a specific customer and/or contains business logic which needs to be kept secret.

In the following, information is provided how private packages can be installed into the ioBroker ecosystem. The information is tested with GitHub packages. However, it should work in a similar fashion with other registries, like GitLab Packages.

Package Registry

You can use e.g. the GitHub package registry. Simply scope your adapter to your organization or personal scope by changing the package name in the package.json and configuring the publishConfig:

{
  "name": "@org/vendorAdapter",
  "publishConfig": {
    "registry": "https://npm.pkg.github.com"
  }
}

Note, that you need to configure npm to authenticate via your registry. Find more information in the documentation.

Example .npmrc file (can be in your project or in the users home directory):

//npm.pkg.github.com/:_authToken=<YOUR_TOKEN>
@org:registry=https://npm.pkg.github.com

Where YOUR_TOKEN is an access token which has the permissions to write packages.

If you then execute npm publish, the package will be published to your custom registry instead of the npm registry.

Vendor Repository

In your vendor-specific repository, each adapter can have a separate field called packetName. This represents the real name of the npm packet. E.g.

{
  "vendorAdapter": {
    "version": "1.0.0",
    "name": "vendorAdapter",
    "packetName": "@org/vendorAdapter"
  }
}

The js-controller will alias the package name to the adapter name on installation. This has one drawback, which is normally not relevant for vendor setups. You can not install the adapter via the npm url command, meaning no installation from GitHub or local tarballs.

Token setup

On the customers ioBroker host, create a .npmrc file inside of /home/iobroker/. It should look like:

//npm.pkg.github.com/:_authToken=<YOUR_TOKEN>
@org:registry=https://npm.pkg.github.com

Where YOUR_TOKEN is an access token which has the permissions to read packages. A best practice working with multiple customers is, to create an organization for each customer instead of using your personal scope. Hence, you can scope them to not have access to packages of other customers or your own.

Find more information in the documentation.

Release cycle and Development process overview

The goal is to release an update for the js-controller roughly all 6 months (April/September). The main reasons for this are shorter iterations and fewer changes that can be problematic for the users (and getting fast feedback) and also trying to stay up-to-date with the dependencies.

For the dependencies, we will use depend-a-bot. In general, the goal is still to support a certain range of Node.js LTS versions. Currently, js-controller 3.0 will start with nodes 10.x up to 12/14.x. If dependency updates break that and would require a major-release, this will be discussed and decided on core developer level BEFORE merging such a dependency change!

For the planned changes, we use a backlog approach. This means that out of the existing issues for the project, the core developers select issues to put into a prioritized backlog in the project view. Other users also can propose tickets. All merged PRs (also when unplanned/not prioritized before) are included as finished tickets in the project (so a project is assigned to them manually on merge). When a ticket is contained in the backlog, this does not mean that it will be done in the next version! But it helps if developers have some time to see what’s considered important. The current project will always get the name „Next Release“. All older projects will get the respective release version number to know the history.

Roughly at the end of each first/third quarter (so 31.3. and 30.9.) we will finalize the next release version, update change logs. A version branch for this version is created that will allow hotfixes. 1-2 weeks before that cut-off date, no new feature PRs should be added. Changes are flagged as [Bugfix], [Feature] or [Breaking Change] in changelog (ideally also in PRs) and the version increase is depending on the type of the changes.

After this, we will have a testing phase for this version. Once tests ended successfully, it will be published to „latest“ repository to get feedback from the community. After this it goes too stable. Depending on the problems, bugs and feedback the goal is to release the stable version roughly 1 - 1.5 months after cut-off date from the version.

All changes should be added via PRs that are reviewed and merged by the core developers. PRs are flagged as [Bugfix], [Feature] or [Breaking Change].

It is also allowed to introduce unfinished new features, as soon as they do not break the system. We will also start to introduce „testing quality features“ that only may be configured manually in JSON files or via CLI. They are then flagged as „Technology Preview“. This means we will not delay a new js-controller version because a new feature is not possible to configure via admin. The feature list and details in js-controller README needs to be updated as soon as the feature is ready in general (including "Technology preview"). Unfinished features are not included in the README even if existing partly in the code.

This new process and rules are introduced with js-controller 2.0 and updated to a 6-months cycle with js-controller 3.0.

License

The MIT License (MIT)

Copyright (c) 2014-2024 bluefox dogafox@gmail.com,

Copyright (c) 2014 hobbyquaker

changelog

Changelog

7.0.7 (2025-04-17) - Lucy

  • (@foxriver76) fixed the edge-case problem on Windows (if adapter calls readDir on single file)
  • (@foxriver76) fixed setting negative numbers via state set cli command
  • (@GermanBluefox) corrected typing for checkPasswordAsync command and added caching of mulit-languages names
  • (@GermanBluefox) Added support for the complex attribute names for the encrypted and protected native configuration properties: encryptedNative and protectedNative
  • (@GermanBluefox) Improvement of adapter.findForeignObject (typing and optional parameters fixed)
  • (@GermanBluefox) Improvement of JSON schema for io-package.json and type definitions

7.0.6 (2024-12-08) - Lucy

  • (@foxriver76) fixed UI upgrade if admin is running on privileged port (<1024)

7.0.5 (2024-12-07) - Lucy

  • (@foxriver76) fixed UI upgrade for non-systemd systems

7.0.4 (2024-12-04) - Lucy

  • (@Apollon77) Fixes async usage of extendObject
  • (@Apollon77) Makes setObject async save
  • (@foxriver76) deprecated set(Foreign)ObjectAsync as the non async methods are now working correctly with promises
  • (@foxriver76) allow specifying a version on iob upgrade self command

7.0.3 (2024-11-13) - Lucy

  • (@foxriver76) Introduce "Vendor Packages Workflow" (only relevant for vendors - see README.md)

7.0.2 (2024-10-28) - Lucy

  • (@foxriver76) the UI upgrade now runs as the same user as the js-controller
  • (@foxriver76) fixed iob validate command and setup custom migration

7.0.1 (2024-10-21) - Lucy

  • (@foxriver76) fixed crash case on database migration
  • (@foxriver76) fixed edge case crash cases if notifications are processed nearly simultaneously

7.0.0 (2024-10-06) - Lucy

Breaking changes

  • Backups created with 7.0.x cannot be restored with a previous version

Features

  • (@GermanBluefox) Added support for dynamic notification data (with this feature developers can create interactive notifications in the Admin adapter)
  • (@GermanBluefox/@foxriver76) implemented automatic upload on adapter start if version mismatch is detected
  • (@foxriver76) improved backup/restore process to work for arbitrary large installations
  • (@foxriver76) added notification if new image is available on Docker Hub (for official docker systems)

Optimizations and fixes

  • (@foxriver76) extend the time to wait until the controller is stopped on controller UI upgrade
  • (@foxriver76) enhanced translations for the diskSpaceIssues notification category
  • (@foxriver76) enriched logging on upload with version information

Developer relevant new features

  • (@GermanBluefox) On registerNotification developers can now pass additional context data e.g. for dynamic notifications with Admin adapter

Developer relevant Optimizations and Fixes

  • (@foxriver76) updated plugin base and sentry plugin to version 2
  • (@GermanBluefox/@foxriver76) multiple improvements on type level

6.0.11 (2024-08-21) - Kiera

  • (foxriver76) only generate packageUpdates notification, if new updates detected

6.0.10 (2024-08-05) - Kiera

  • (foxriver76) fixed "alias subscription error" log
  • (foxriver76) do not check for OS updates on Docker installations
  • (foxriver76) clear package update notification if no updates are present anymore
  • (Gaspode69) fixed restarting controller on Windows systems

6.0.9 (2024-07-20) - Kiera

  • (foxriver76) provide method getAdapterScopedPackageIdentifier for adapters

6.0.8 (2024-07-13) - Kiera

  • (foxriver76) fixed problem with Sentry plugin

6.0.7 (2024-07-12) - Kiera

  • (foxriver76) added auto upgrade information to cli list adapters and repo show
  • (foxriver76) do not show the stack trace if user does not exist on iob user check
  • (foxriver76) prevent iob logs --watch logging the entries two times

6.0.6 (2024-06-30) - Kiera

  • (foxriver76) fixed Windows installation
  • (foxriver76) fixed issue on package updates (e.g., Admin Node.js update)

6.0.5 (2024-06-16) - Kiera

Breaking changes

  • Support for Node.js 16 is dropped!
  • Binary states have been removed
  • Let's encrypt has been removed

Features

Optimizations and fixes

  • (foxriver76) we now send SIGKILL instead of SIGTERM if adapter does not stop in normal time to prevent ghost processes
  • (foxriver76) prevent a crash case if an invalid pattern is scanned in the database
  • (foxriver76) we now log the pid if an adapter process is stopped
  • (foxriver76/Apollon77) fixed crash case on file rotation
  • (foxriver76) optimized error messages and help text for cli commands url and install
  • (foxriver76) if users want to install non-existing adapters, we now hint to the url command instead of recommending the use of npm
  • (foxriver76) when interacting with aliases, we no longer check permissions of the alias and the original object, we now only check the alias
  • (foxriver76) host object is now already created during setup first run, allowing e.g., to disable sentry globally before first start of ioBroker
  • (foxriver76) if the user sets a custom title for instances, this is now preserved during upload
  • (foxriver76) on re-installation of adapters we uninstall the package manually first to ensure a correct reinstalling
  • (foxriver76) fixed problem on multihost discover
  • (foxriver76) if getState is called on a non-existing or non-linked alias we return null like for all other non-existing states
  • (foxriver76) optimize alias subscribe performance for non-redis dbs
  • (foxriver76/bluefox/Apollon77) updated dependencies
  • (foxriver76/bluefox/Apollon77) minor fixes and stability improvements

Developer relevant DEPRECATIONS/WARNINGS

  • (foxriver76) adapters need to specify adapter-core version 3.1.4 or higher or allow an upgrade to this version by specifying e.g. ^3.x.x
  • (foxriver76) it is now validated that obj.native is of type Record<string, unknown>
  • (foxriver76) Let's encrypt has been removed (@iobroker/webeserver should be used instead)
  • (foxriver76) deprecated delete/createState/channel/device methods
  • (foxriver76) deprecated ioPack common.license which is replaced by the new object common.licenseInfo
  • (foxriver76) ioPack mode subscribe has been removed as you can achieve the same with mode once and setting system.adapter.xy.alive state (also removed common.wakeup and common.subscribe because of this)

Developer relevant new features

  • (foxriver76) js-controller (and thus the whole ioBroker) is now running as an ESM module internally while staying a 100% backward compatible with adapters written in cjs
  • (foxriver76) adapters can now be written as ESM modules having full support (including compact mode)
  • (foxriver76) we provide all exports as ESM and as CJS to allow adapter developers to choose what to use
  • (foxriver76) added convenient methods to manage node modules (see https://github.com/ioBroker/ioBroker.js-controller?tab=readme-ov-file#managing-node-modules)
  • (foxriver76) allow specifying reason and exit code on adapter.stop
  • (foxriver76) if you blocklist a version in your io-package.json the controller won't start it anymore and will generate a notification
  • (foxriver76) for adapters of type schedule and connectionType set to cloud the schedule will be automatically delayed by up to 60 seconds randomly per user if the CRON does not contain a seconds argument, this is to prevent DDoS attacks

Developer relevant optimizations and fixes

  • (foxriver76) fixed crash case if a malformed object was defined in ioPack instanceObjects
  • (foxriver76) when interacting with aliases, we no longer check permissions of the alias and the original object, we now only check the alias
  • (foxriver76) if getState is called on a non-existing or non-linked alias we return null like for all other non-existing states
  • (foxriver76/bluefox) multiple improvements on type level

5.0.19 (2024-01-30) - Jana

  • (foxriver76) fixed issue on getStates with aliases

5.0.18 (2024-01-30) - Jana

BREAKING CHANGES

  • Support for Node.js 12 and 14 is dropped! Supported are Node.js 16.4.0+ and 18.x
  • Backups created with the new js-controller version cannot be restored on hosts with a lower js-controller version!
  • Update recommended npm version to 8
  • Deprecate binary states, Adapters will change to use Files instead!

Features

  • (foxriver76) added method sendToUserInterfaceClient to push messages to the UI client
  • (foxriver76) Show npm error message on failing adapter installations and update also without a debug parameter
  • (bluefox/Apollon77/foxriver76) Try to solve ENOTEMPTY errors automatically on adapter upgrades/installations
  • (foxriver76) Introduce iobroker setting (dnsResolution) to choose between verbatim and ipv4 first dns resolution order
  • (foxriver76) Add support for windows for iob fix
  • (bluefox) Added CLI option to restart/start/stop all instances of an adapter (e.g. iob stop admin now also works)
  • (foxriver76) Allow to use iob host oldname command when new host already exists but has no instances
  • (foxriver76) Added an admin notification if redis is misconfigured and info how to fix it
  • (foxriver76/buanet) Enable upgrade of js-controller via Admin UI (Linux/Docker only)
  • (foxriver76) automatically reset info.connection if adapter instance is stopped
  • (foxriver76) automatically reset instance statistics like cputime when instance is stopped

Optimizations and Fixes

  • (foxriver76) Speedup "getStates" calls with many IDs often used by visualizations: JSONL 17 times faster, Redis 23 times faster
  • (foxriver76) significantly reduce backup size
  • (foxriver76) Enhance CLI help for list command to show all possible types to list
  • (foxriver76) Also stop instances before updating from GitHub
  • (foxriver76) Conversion of big parts of the js-controller codebase to typeScript and address all found issues
  • (Apollon77) Only log error on "enable/disable via .alive" if there is an error
  • (foxriver76) Optimize adapter unload and stop handling for edge cases
  • (AlCalzone) Carefully normalize jsonlOptions
  • (bluefox) Do not show warning on a requested adapter stop/termination
  • (bluefox) Make sure that the first log line is not missing in Admin
  • (foxriver76) Fix wrong formatting of cli get binary state if no encoding is passed
  • (foxriver76) Fix restoring backups from pre js-controller 4.x which were created without config.system
  • (foxriver76) Preserve tier setting on adapter upload
  • (foxriver76) update apt sources before installing os dependencies
  • (foxriver76) Only skip the erasing on upload if opted out explicitly to always clean up unneeded files
  • (foxriver76) Try to fix strange alias errors, inform us if it happens again!
  • (foxriver76) Remove windows bat files completely, installer will create them when needed
  • (AlCalzone/Apollon77) Update JSONL db to prevent locking issues
  • (foxriver76) Fixes iob file sync not working for JSONL
  • (foxriver76) Do not crash if we cannot initialize db backup directory on start
  • (foxriver76) Fixed issue with certificate validity on leap years
  • (Apollon77/foxriver76) Make sure that all relevant files are removed when eraseOnUpload is used
  • (foxriver76) fix wrong hostname after backup restore
  • (bluefox) allow CLI vendor update without explicitly specifying a vendor file (a default file is used)
  • (foxriver76) fix backup restore restoring to an old database and using new one afterwards
  • (foxriver76) fix that memory limit of instance was not applied
  • (foxriver76) validate cron jobs before executing them for schedule adapters
  • (bluefox) new notification category securityIssues
  • (foxriver76) no longer assume all states ending with .logging are actual log subscribers
  • (Apollon77, foxriver76, bluefox, AlCalzone) Several fixes and refactorings to prevent potential crash cases reported by Sentry and other sources

Developer relevant DEPRECATIONS/WARNINGS

  • Deprecate binary states, Migrate your adapters to use Files instead!
  • If you need to access special js-controller common tools, please use adapter-core instead of js-controller directly - see https://github.com/ioBroker/adapter-core#commontools
  • Parameter that contain patterns (e.g. mqtt.*) are now checked for allowed characters and general correctness!

Developer relevant new Features

  • (bluefox) Added options to subscribe to file changes: subscribeForeignFiles, unsubscribeForeignFiles, onAdapterFileChanged (event contains id, fileName, size and not the whole content of the file!)
  • (foxriver76) Introduce on("install") handler for adapter which is automatically called when an adapter process is started with --install
  • (foxriver76) Introduce io-package flag common.nodeProcessParams to allow passing the adapter-specific Node.js process parameters (disables compact mode for the adapter!)
  • (foxriver76) Respect dns resolution (ipv4/ipv6 first) from config internally and provide relevant methods via adapter-core
  • (foxriver76) Add JSON-Schema for iobroker.json
  • (bluefox) Allowed export of password.js (to be used with adapter-core)
  • (bluefox) Added _design/chart to the system designs
  • (foxriver76) Automatically generated Code-Docs for Adapter class https://github.com/ioBroker/ioBroker.js-controller/tree/master/packages/controller/doc
  • (foxriver76) Added (foreign)objectExists to adapter methods
  • (bluefox) Extend getSuitableLicenses to look for other licenses
  • (buefox/foxriver76) Added new category for notifications: blocked and respect js-controller common.blockedVersions to block versions from starting
  • (bluefox) Added new system view "custom-full" to return the full objects for objects with a custom part and not only the custom details
  • (foxriver76) Added support for getForeignObjects with an array of strings as a pattern
  • (AlCalzone) Preparations to allow js-controller Dev version to be used with dev-server
  • (foxriver76) Validate max timeout value (max 32bit max number) on setTimeout/setInterval and throw on error to prevent issues
  • (foxriver76) new io-package flag common.supportedMessages to replace messagebox and other messagebox-related properties
  • (foxriver76) adapter.sendTo now accepts an optional timeout argument

Developer relevant Optimizations and Fixes

  • (foxriver76) Ensure setObjectNotExists returns id on success
  • (foxriver76) Fix Typings for sendTo/sendToHost
  • (Bluefox) Add User permission check to requireLog
  • (foxriver76) added nonEdit property of objects to types and document functionality
  • (foxriver76) introduced constants for state quality
  • (foxriver76) subscribeStates now also accepts an array of ids
  • general dependency updates
  • code style optimizations and streamline code

4.0.24 (2022-12-16)

  • (Bluefox) Excluded iot and cloud from masking special properties
  • (AlCalzone) Added time-based JSONL compaction (once a day)
  • (Apollon77/foxriver76) Optimized message sequence id generation
  • (Apollon77) Used ipv4 as a primary DNS lookup option also in Node.js 18+
  • (buanet) Extended Docker detection to prevent issues in new Debian

4.0.23 (2022-04-19)

  • (AlCalzone) normalize JSONL options to prevent issues because of admin adding empty setting objects
  • (Apollon77/foxriver76) Prevented some crash cases reported by Sentry

4.0.21 (2022-03-12)

  • (Apollon77) Fixed Backup Restore crash case

4.0.20 (2022-03-12)

  • (foxriver76) Added missing axios dependency
  • (Apollon77) Only log an error if an error is happening when activating/deactivating adapter via .alive states
  • (foxriver76) Fixed edge case in redis simulator MULTI/EXEC logic
  • (Apollon77/foxriver76) Prevent some crash cases reported by Sentry

4.0.19 (2022-03-05)

  • (foxriver76) Fix Adapter restarting on install/update
  • (foxriver76) Really fix invalid backup period warning

4.0.18 (2022-03-04)

  • (foxriver76) Also stop instances before GitHub installs on windows
  • (Apollon77) Fix eraseOnUpload logic
  • (Apollon77) Fix invalid backup period warning
  • (Apollon77) Fix maxSize property for logging in a dist file
  • (Apollon77/foxriver76) Prevent some crash cases reported by Sentry

4.0.15 (2022-02-03 - 2022-02-20) Release Isabelle

BREAKING CHANGES

  • Support for Node.js 10 is dropped! Supported are Node.js 12.x, 14.x and 16.x
  • CLI command iob update --updateable changed to iob update --updatable
  • CLI command iob update http://download.iobroker.net/sources-dist.json is not supported anymore
  • CLI command iob rebuild adaptername is no longer supported because of the new way of automatic rebuilds and some unwanted side effects
  • CLI command iob state get <id> will no longer handle binary state values (which was never really working before). We added iob state getBinary <id> <encoding> as new way.
  • Ensure that on a backup-restore the same adapters and adapter versions are restored as existing on backup time. Also check js-controller version and error on mismatch (is allowed to be forced accepted by --force parameter for restore)
  • The "file" database will be automatically converted into JSONL and the database types that use "file" are adjusted to "JSONL" on installation (and backup restore). This means that a rollback of js-controller is only possible to 3.3 after 4.0 was installed! Rollback to former versions requires a manual migration to "file" DB before the downgrade! (COMMUNICATION, TESTFOKUS)

Features

  • (bluefox) Added complexity rules for user passwords: New created passwords need to follow the following rules (TODO ADMIN UI INFO ISSUE):
    • minimum length is 8
    • contains at least one digit
    • contains at least one lower case letter
    • contains at least one upper case letter
  • (foxriver76) Introduce option "--custom" when deleting instances or adapter to also clean up relevant custom entries from all objects (TODO ADMIN ISSUE ADD CHECKBOX!, TESTFOKUS)
  • (foxriver76) Added new host objects to provide Node.js version and PID
  • (foxriver76) Updated the Linux capabilities on js-controller start when a Node.js version change was detected (and initial on first run)
  • (AlCalzone/foxriver76) Further optimize strategy for required Node.js module rebuilds. We first try to run rebuild in root package and if still packages are left (or it fails) we try to rebuild the really affected modules alone. Should give better results then former strategy (TESTFOKUS)
  • (bluefox) Added support for configuring multiple repositories (TODO LINK+INFO FLAG)
  • (Apollon77) Streamline logging configuration for all available transports: A set Loglevel in config means that this loglevel is pinned for the transport for all cases. An Empty/not set level ("Default" in Admin) means that logging is dynamic and can be adjusted per Instance controller or loglevel state on the fly.
  • (foxriver76) Added installedFrom info to adapter start log line when not installed from npm normally

Optimizations and Fixes

  • (Apollon77/foxriver76) Improve performance of object deletions (also when deleting instances or adapters) significantly (file-db 4x faster, jsonl-db 14x faster, redis 360x% !! faster)
  • (foxriver76/Apollon77) Improve performance for redis object searches by up to 2,5x by using lookup structures for object types and custom object properties. This optimization is only active for single host redis systems automatically, but can be activated for multihost redis systems too after all hosts are (and stay!) on js-controller 4.0! (TODO DOCS)
  • (foxriver76/Apollon77) Improve performance for object searches in general by limiting search namespaces to the relevant ones automatically
  • (foxriver76) Improve handling of backup restores when custom hostnames were used (especially relevant for Docker usage)
  • (foxriver76) Optimize backup to make sure invalid user-generated JSONs do not prevent backups from being considered valid
  • (foxriver76/klein0r) Improved CLI help
  • (foxriver76) Preserve changed instance names also when updating adapter (name was reset before)
  • (foxriver76) stop adapters on Windows prior update to prevent EBUSY
  • (foxriver76) Prevent crashes for uploads with invalid adapter installations
  • (bluefox) Removed news from instance/adapter objects on install/update because taken from repository in Admin5 (TODO CHECK ADMIN4 EFFECTS)
  • (AlCalzone) Removed extraneous "npm install" inside adapter directory
  • (foxriver76/AlCalzone) reduce JSONL compression frequency to reduce I/O (relevant when experimental JSONL database modules are used)
  • (foxriver76) prevent uploading js-controller (creating system.adapter.js-controller object) and remove existing cases on setup first
  • (foxriver76) prevent crash when multihost password is invalid and multihost active
  • (bluefox/foxriver76) bigger internal refactorings in cli commands (TESTFOKUS)
  • (foxriver76) made logging of not fulfilled adapter dependencies more user-friendly
  • (foxriver76) Check user and group assignments and remove unknown users from groups (could have happened in earlier versions) in setup first
  • (foxriver76) Prevent crash on adapter install/update if version string in repo is invalid
  • (AlCalzone) Update and optimize JSONL database integration and configuration options
  • (foxriver76) make sure that settings for file/JSONL DB in configfile are also respected
  • (foxriver76) Update seq integration for logging
  • (foxriver76) If logging can not be initialized because of a fatal error do not start js-controller
  • (foxriver76) Prevent the start of a debug session for an instance that is already running
  • (Apollon77) Fixed an edge case for file db which could lead to the main and backup file being broken in strange situations with multiple crashes in a row
  • (foxriver76) make sure that admin, backitup and discovery instances are created when update of controller happens if installed and no instance exists
  • (Apollon77) Optimize Stop Handling to prevent errors
  • (Apollon77) Optimize Adapter process initialization to prevent edge case errors
  • (foxriver76) Optimize meta object sync
  • (Apollon77) make sure to really end CLI process when they should end in error cases
  • (Apollon77) catch error when streaming data to stdout and this is closed already
  • (Apollon77) Optimize some special cases on adapter start
  • (AlCalzone) Prevent issues when a backup interval is configured with invalid values
  • (AlCalzone) Prevent db-file-locking issues for JSONL database; the connectTimeout for databases is now minimum 5s (overrides lower values from configuration)
  • (foxriver76) allow instance deletion when executed from another host
  • (foxriver76) stop the database before executing upgrade self; Will be effective for all upgrades >4.0.5
  • (Apollon77/foxriver76) Optimize database initialization and destroys
  • (Apollon77) Update winston-syslog to prevent errors
  • (Apollon77, foxriver76, bluefox, AlCalzone) Several fixes and refactorings to prevent potential crash cases reported by Sentry and other sources

Developer relevant DEPRECATIONS/WARNINGS

  • js-controller is no longer installable from GitHub because it is now a monorepo. Use @dev tag on npm to get the nightly build of master js-controller!
  • log info when setState is used for an object of type file - use setBinaryState instead!
  • log info when the default value of an object is invalid (e.g., does not match object type)
  • log info when common.states is used and not an object (deprecate String usage)
  • log info when common.min/common.max exists on non-numbers and contain invalid values/types
  • add get/setForeignBinaryState methods as copy from get/setBinaryState allow adapter to migrate; get/setBinaryState will be changed in 4.1 to be "non Foreign"
  • Enhanced object checks: adapter needs to have a name as string
  • Decline calls for getForeignObjects with a non-string pattern (was pot. crashing before)
  • adapter.tools is deprecated and replaced by a shim. Use methods in adapter class or adapter-core instead or open issues if you need more internal functions The object view definition "custom/state" is now removed from js-controller after being replaced by "system/custom" in js-controller 3.3. All relevant adapters are updated (COMMUNICATION)
  • remove all Fifo Methods from adapter.js because deprecated since 1.x
  • remove adapter.objects.* methods because deprecated since 2.x

Developer relevant new Features

  • (jogibear9988) Add new "unload-safe" promise based "adapter.delay" method to delay further code execution, but still make sure code does not continue after unload was called. This method can not be used inside the "unload" method itself!
  • (jogibear9988/AlCalzone/foxriver76/Apollon77) Revamp adapter.Timeout and adapter.Interval methods to be "unload-safe" and also clear missing timeouts without warnings for more developer convenience! The methods to set a timeout or interval can not be used inside the "unload" method itself!
  • (foxriver76) Allow to set "null" for common.states and not log error for an object (also for extend)
  • (AlCalzone) Introduce new methods in tools for Node.js module management: installNodeModule, uninstallNodeModule (TODO Issues adapter that use npm install -> Move))
  • (bluefox) Add license management functionality to host. Adapters can use adapter.getSuitableLicenses to get available relevant licenses (TODO DOCS)
  • (AlCalzone) Switch NPM relevant handling to library pak to be more flexible for the future which package manager we want to use. Important: There are still parts that rely on npm for now!
  • (bluefox) Also report docker info when sending diag data
  • (foxriver76) Add server time to getHostInfo message
  • (foxriver76) For multihost clusters with js-controller 4.0+ the hosts automatically determine a "primary" host that can be used js-controller internally (right now, preparation for future topics)
  • (Apollon77) Add database types to crash data reported to sentry

Developer relevant Optimizations and Fixes

  • (foxriver76) fixed permissionError on setBinaryState
  • (foxriver76) preserve "native" content for instanceObjects when updating the objects on adapter start
  • (Apollon77/foxriver76) Limit the search scope for object types host, adapter, instance, instanceStats, enum, script, group, user, config to the relevant namespaces when no search start/end is provided to speedup these calls in general
  • (foxriver76) Optimize deleteDevice/deleteChannel methods to just delete all objects the relevant device/channel
  • (foxriver76) Removed some magic path lookups to be compatible to npm 7/8. Appname of controller is now always "iobroker" ("ioBroker" in dev cases)
  • (foxriver76) Also use Sentry (if enabled/allowed) in CLI commands whenever database is initialized to report crashes from CLI if they happen
  • (foxriver76) Introduce a database protocol version number to allow detection of the available database features in multihost environments
  • (bluefox) Prevent issues when using adapter.addChannelToEnum because of missing callback
  • (foxriver76) make sure autoSubscribe works as expected in all cases
  • (Apollon77) Correctly return null when a session is expired
  • general dependency updates
  • code style optimizations and streamline code

3.3.22 (2021-12-20)

  • (bluefox) Fixed addChannelToEnum function

3.3.21 (2021-11-28)

  • (Apollon77/foxriver76) we fixed issues with multihost setup, that existed in 3.3.19/3.3.20

3.3.19 (2021-07-26 - 2021-11-17) Release Hannah

BREAKING CHANGES

  • None, Supported are Node.js 10.x, 12.x and 14.x (Node.js 16.x is also working WHEN USED WITH npm 6!!, but officially not yet supported because we do not have enough results)
  • The experimental JSONL db libraries are now included in js-controller directly too
  • (Apollon77) Do not install info adapter by default
  • (foxriver76) changed default behaviour of cli update command -> only list installed, allow --all as parameter to see all again

Features

Optimizations and Fixes

  • (foxriver76) correctly encrypt native attributes from instances when set via cli
  • (Apollon77) give DB a bit more time to startup for CLI
  • (foxriver76) fixed logging undefined w/o meta data when deleting log files
  • (Apollon77/oweitman) prevent errors when listening for multihost messages
  • (Apollon77) made sure to await the database destroy in all places
  • (Apollon77) fixed crash case when Lets encrypt config is not provided but LE is activated
  • (AlCalzone) understand .tar.gz as a valid extension for GitHub URLs
  • (foxriver76) only renew Let's encrypt when configured that way
  • (foxriver76) if free memory reaches threshold, also add a notification
  • (bluefox) fixed applyViewFunc if the name is a localized object
  • (Apollon77) optimize db initialization for fileDB and enhance error case handling
  • (bluefox/Apollon77) made sure all object types are deleted on recursive object deletion
  • (Apollon77/foxriver76) several optimizations and fixes in database modules and update
  • (foxriver76) Made sure getStates uses write attribute of aliases instead of read
  • (Apollon77) prevent crash in disconnect cases on startup
  • (foxriver76) allowed defaultNewAcl updates on the fly
  • (Apollon77) initialize new default ACLs in any case, only controller sets it for all objects
  • (foxriver76) do not send null as diag info in error cases or if user has selected none
  • (foxriver76) revive config.dataDir if deleted via bug in admin5 config editor
  • (foxriver76) fixed a bug which lead to an infinite loop if the repo was invalid and no cached sources available
  • (foxriver76) check host existence before adding instance
  • (Apollon77) Check that password is provided when multihost discovery server should be started in secure mode
  • (foxriver76) only send diagnose data if license and diag dialog has been confirmed on new installations
  • (foxriver76) made sure adapters are added only once to upgrade queue if it has no dependencies
  • (Apollon77) Optimize Database save handling on write
  • (Apollon77) Optimize restart logic
  • (foxriver76) optimize cli help
  • (AlCalzone) Optimize search for adapter start file to also respect main property from package.json
  • (Apollon77/foxriver76) Optimize Database storage behaviour for file database
  • (Apollon77/Stabilostick) Try to fix restart on Windows
  • (bluefox) Do not delete objects recursively that have dontDelete flag
  • (AlCalzone) Fixed restart logic for linux systems to prevent processes started aside systemd
  • (Apollon77) "upgrade self" CLI command should not start controller because we require it to be stopped before (will be effective for all upgrades from 3.3.2 to higher versions only)
  • (Apollon77) fixed "iobroker upgrade" call that crashed when no updates were available
  • (foxriver/Apollon77) fixed invalid logging in package manager
  • (foxriver76) avoid deleting too many metaobjects starting with the same name as adapter
  • (foxriver76) we fixed a crash due to multilingual instance objects
  • (bluefox) Fixed compact group host check

  • (Apollon77, foxriver, bluefox, AlCalzone) Several fixes and refactorings to prevent potential crash cases reported by Sentry and other sources

Developer relevant DEPRECATIONS/WARNINGS

  • (foxriver76) added new checks for setState:
    • if strictObjectChecks are activated we now perform additional checks
    • require common.type on state objects
    • if state is read only, and we get ack false -> not allowed
    • check type of the state.val matching the common.type of the obj
    • if it's a number and min/max is defined on object we perform additional checks for min and max
  • (bluefox) checkPassword(Async) is now returning two parameters in callback/resolve (first is boolean if password/user are valid, second is the final internal username in form system.user.xxx)
  • (bluefox) added _design/custom to the controller objects - this should deprecate the own custom view over time, please update if relevant!
  • (bluefox) Adjust generation of installation UUID

Developer relevant new Features

  • (AlCalzone) support executing TypeScript adapters: If the adapter main file ends with ".ts" we automatically transpile the typeScript file before starting the adapter
  • (bluefox) Implemented chownFile in adapter.js
  • (foxriver76) introduce common.step attribute of states and round state value if needed
  • (bluefox) Added restartController sendToHost command
  • (bluefox) Allowed npm install to be executed with debug flag
  • (bluefox) Added messages to read logs
  • (bluefox) Added location of ioBroker as information to getHostInfo
  • (bluefox) Added new system config values to set a default loglevel for new created instances

Developer relevant Optimizations and Fixes

  • general dependency updates
  • code style optimizations

3.2.16 (2021-02-01) Release Grace

BREAKING CHANGES

  • None, Supported are nodejs 10.x, 12.x and 14.x (Node.js 15.x is also working WHEN USED WITH npm 6!! in the automated tests, but formally not supported)
  • If you have enabled Multihost Discovery please disable and enable it again if you really need it persistent running. By re-enabling it you update the used passphrase with a better encryption mechanism.
  • (Foxriver76) Harmonize username handling between admin and js-controller by transforming the object id to lowercase. With these usernames will be treated case-insensitive from now on!

Features

  • (raintonr) Updated Let's encrypt implementation; all relevant adapters (web and such) need updates to use it! NEEDS NODE.JS 12.x+! (see DOCS LINK TODO)
  • (bluefox) Restart adapters that use Let's encrypt after certificates were updated
  • (bluefox) Provide min/max for convert alias functions
  • (foxriver76) handling major adapter upgrades more carefully (CLI on upgrade will show if it's a major upgrade and major upgrades will be skipped on upgrade all when executed by admin
  • (AlCalzone) detect and allow short GitHub URL format when (auto-)installing adapters (iobroker url User/repo#branchorcommit)
  • (AlCalzone) Support more GitHub URL formats for iobroker url command
  • (AlCalzone) support GitHub branch names with slashes on adapter install
  • (foxriber76) Added notification system (see DOCS LINK TODO)
  • (foxriver76) enhance setup (and setup first) with redis to all port configuration
  • (foxriver76) set connectionName for redis connections and simulator support
  • (bluefox) Added "http" and "stream" options for logs
  • (Apollon77) added seq logging support to js-controller
  • (foxriver76) Fixed wrong logger pattern that caused issues on Windows
  • (Apollon77) fixed potential crash when restoring backup
  • (Apollon77) restore old logfile deletion logic because rotator library do not work as expected
  • (Apollon77) Optimize File DBs to lower write i/o by 50% (backup file is now renamed instead of rewritten)
  • (AlCalzone/Apollon77) Restructure DB code to allow easier new DB types
  • (Apollon77) enhance letsencrypt to also allow to specify alternative names for certs

Optimizations and Fixes

  • (foxriver76) Detect adapter restart loops and stop restarting after 3 crashes (an adapter is considered "working" when no crash by an exception happens within 10 minutes)
  • (foxriver76) Fixed failed logins if username is uppercase, be reworking user logic and caching
  • (bluefox) Set for def states the quality: QUALITY_SUBS_INITIAL
  • (AlCalzone) fixed npm uninstall loglevel argument
  • (foxriver76) delete pids.txt when iobroker was stopped
  • (bluefox) Added missing attributes by multihost if Redis is used for objects/states, Remove unused settings from iobroker-dist.json, Remove pass and user from connection settings. Use options.auth_pass
  • (AlCalzone) Package-Manager: log which packages were (already) installed
  • (foxriver76) replace redis "KEYS" command by "SCAN" to optimize redis access performance
  • (foxriver76) optimize redis library usage to prevent errors on redis outages
  • (bluefox) Catch errors when plugins initialize. At least log will work and could be checked for errors.
  • (foxriver76) allowed migration of instances to already existing host
  • (foxriver76) also allow <adapter>.<instance-nr> for install/add cli command
  • (AlCalzone) buffer streams that are piped to stdout to fix weird Windows logging cases
  • (foxriver76/AlCalzone) Optimize upgrade/downgrade logic for adapters, ask for a downgrade only if lower version is to be installed
  • (foxriver76) allowed redis<->redis migration when changing host of redis - fix bug where process crashes when controller is running when migrating
  • (bluefox) Catch errors for subscribe on alias without target
  • (foxriver76) only perform auto-scaling on alias if not null
  • (foxriver76) if repository request fails also use cached sources on updating repository
  • (foxriver76) prevent host deletion from same host - otherwise it will remove the system.host states but instances will still be on the removed host, because transfer happens to itself
  • (foxriver76) use instanceObjects from system.adapter.* object instead from io-package.json
  • (foxriver76) notify of errors on readFileCertificates to show permission problems etc.
  • (foxriver76) multihost discovery now logs ignored messages on debug and also logs the senders address
  • (foxriver76) sync up created objects on instance start and instance creation by using helper function in tools.js, e.g. .loglevel was missing on instance creation
  • (bluefox) Package-Manager: Filter empty packets out to suppress error message
  • (foxriver76) rename repository names for new installations and on updates to beta/stable
  • (foxriver76) rewrite collectDiagInfo to Promises and fix minor issue with it
  • (foxriver76) only scale aliases if target or source is represented by unit %
  • (foxriver76) create meta.user on file sync cli, if not existing
  • (Apollon77) also create meta.user on setup first if not existing
  • (foxriver76) fixed enumInstances used by CLI commands
  • (foxriver76) when missing rights to access log dir do not crash hard anymore, instead fallback to default directory
  • (bluefox) Fixed error if type of native data changed in the new version from basic type e.g. 'string' to 'object'.
  • (AlCalzone) Removed hardcoded references to GitHub master branch because newer repositories use "main"
  • (Apollon77) updated _design objects also on js-controller upgrade/setup first
  • (Apollon77) optimize deletion of files in ioBroker file storage
  • (foxriver76) do not return an error if object does not exist on del*Object
  • (Apollon77) optimize logs when instance is restarted
  • (foxriver76) Preserve name field on instance object creation/update
  • (foxriver76) optimize parameters and flags on CLI
  • (foxriver76) Use yargs helper instead of building our own string output to allow showing --help for a specific command instead of the whole output and allow support for auto completion (iobroker _createCompletion >> ~/.bashrc)
  • (foxriver76, Apollon77) also accept pre-release version in some semver checks for dependencies
  • (foxriver76) replace outdated encryption mechanism of multihost
  • (Apollon77) prevent an endless loop when lua script initialization was not possible
  • (Apollon77) catch semver errors in upgrade commands
  • (foxriver76) ensure setAdapterInstanceEnabled can not hang
  • (Apollon77, foxriver, bluefox, AlCalzone) Several fixes and refactorings to prevent potential crash cases reported by Sentry and other sources

Developer relevant DEPRECATIONS/WARNINGS

  • (foxriver76) we warn if object not exists when setting a state via adapter.setState. Adjust your code that a state value is NOT set before the object is successfully created. If this deep check is NOT wanted for performance reasons the adapter needs to be initialized with strictObjectChecks = false!! (see DOCS LINK TODO)
  • (foxriver76) readFile should not validate metaobject, we now throw on writeFile if id is no valid metaobject
  • (AlCalzone) updated Forbidden ID Characters: use Unicode properties to define which characters are allowed instead of blacklisting. For ASCII the allowed characters are the same as before - for other languages mainly character class of Unicode are allowed! (see DOCS LINK TODO)
  • (foxriver76) Throw on invalid setState objects; was logged as deprecated before
  • (foxriver76) removed getMessage shim, no adapter uses it anymore; was logged as deprecated before

Developer relevant new Features

  • (foxriver76) use aes-192-cbc as encryption - backward compatible with current encryption, nothing to do for adapter-developers (see DOCS LINK TODO)
  • (bluefox) Added system view to filter for "folder" objects
  • (bluefox) added set/clearTimeout and set/clearInterval to adapter methods and check on unload that they were all cleared and clear if needed with logging, so developers are reminded to clean up!
  • (AlCalzone) Added ...Async version for getChannels - make sure to check before using or use correct js-controller version dependency!
  • (Apollon77) modularize databases into own npm packages and basically support adding new types of databases; add deprecation infos and logging to "old legacy" files in lib/states and lib/objects to not be used anymore; requires mostly updates in testing (see DOCS LINK TODO)
  • (foxriver76) allowed to specify the instance for debug starts (iobroker debug adaptername.1)
  • (foxriver76) Enhance extendObject to allow to preserve specified fields (e.g. common.name)
  • (foxriver76) added adapter method getUserId

Developer relevant Optimizations and Fixes

  • (foxriver76) implemented maybeCallback and maybeCallbackWithError and use it in adapter.js
  • (AlCalzone) use fs-extra instead of mkdirp
  • (AlCalzone) read JSON files using fs-extra's readJSONSync
  • (AlCalzone) fixed callback definitions in adapter.js, We have signatures for (almost) everything in @types/iobroker, and we should use them
  • (AlCalzone) move from Promises to async/await in some places, use a single readyPromise instead of an array
  • (foxriver76) migrated ci tests to GitHub actions
  • (foxriver76) resolve adapter main file as tools.js method
  • (foxriver76) optimize extendObject with def value
  • (AlCalzone) Handle existing, but undefined properties in validateSetStateObjectArgument
  • (foxriver76) also escape + char on regex, it's not forbidden
  • (bluefox) Set default state only for objects of type "state"
  • (AlCalzone) include folders in the result of getAdapterObjects
  • (Apollon77) Made sure to not trigger subscribes or messages when unload is called
  • (Apollon77) deleting a not existing object is handled as success instead of Not-Exists error
  • general dependency updates
  • code style optimizations

3.1.6 (2020-06-18) Release Francesca

  • (foxriver76) fixed output of iobroker plugin status command
  • (foxriver76) fixed deletion of states on instance-deletion
  • (Apollon77) added additional checks to prevent Errors (Sentry)
  • (Apollon77) Made sure Sentry activation info is also shown on upgrade self command
  • (Apollon77) Upgrade winston-daily-rotate-file library to prevent a crash case

3.1.5 (2020-06-05) Release Francesca

  • (Apollon77) Return empty array on non-existing directory for readDir
  • (foxriver76) fixed "host this" command

3.1.4 (2020-05-10) Release Francesca

  • (Apollon77) Updated Sentry plugin to be more transparent on temporary disabling reasons
  • (foxriver76) fixed error when writing binary States

3.1.3 (2020-05-09) Release Francesca

  • (foxriver76) catch error on alias ids with empty objects
  • (Apollon77) made sure promise rejections without error are not crashing the controller
  • (bluefox) Added Controller messages to allow read and write controller base settings (iobroker.json); introduce adapter feature flag CONTROLLER_READWRITE_BASE_SETTINGS
  • (Apollon77) handle edge case where hostName is not a string when sending messages (Sentry IOBROKER-ADMIN-B)
  • (Apollon77) handle case where letsencrypt directory can not be created (Sentry IOBROKER-ADMIN-C/IOBROKER-WEB-B)
  • (bluefox) added IDs to some log messages
  • (foxriver76) fixed some logging in objects lib
  • (Apollon77) made sure to catch error when reading log directory (Sentry IOBROKER-JS-CONTROLLER-1F)
  • (foxriver76) Made decrypt and encrypt methods available in adapter object for developers. System secret is read automatically so only the value is passed to the function
  • (AlCalzone) Added adapter exit code 13 (ADAPTER_REQUESTED_REBUILD) to also allow to tell js-controller to rebuild this adapter.
  • (Apollon77) changed logging for invalid readFile actions to debug because ca be triggered also by other cases then planned ones. Update objects lib
  • (Apollon77) made sure command on cmdExec is a string (Sentry IOBROKER-JS-CONTROLLER-1H)
  • (Apollon77) Check more cases for existence of variables before accessing them (Sentry IOBROKER-JS-CONTROLLER-E)
  • (Apollon77) Added a node.js version check and output special error message if node.js version is not satisfied
  • (AlCalzone) Added missing parameter digest to crypto calls
  • (AlCalzone) further code optimizations
  • (AlCalzone) Allowed reverse lookup of exit codes (exit code -> error name)
  • (Apollon77) made sure Objects/States backup files are deleted correctly according to backup settings
  • (foxriver76) Made sure default state value is only set if state is not existing also in setObject
  • (foxriver76) check that alias is of type state when adding subscribing pattern
  • (Apollon77) Made sure error are checked correctly (Sentry IOBROKER-JS-CONTROLLER-1N)
  • (Apollon77) Inform about sentry activation if not configured on "iobroker setup first"
  • (bluefox) implemented maintenance mode for adapter methods
  • (bluefox) store for binary states the binary flag in objects
  • (Apollon77) updated Plugin system
  • (Apollon77) updated Sentry plugin to respect all options to disable reporting including new disableDataReporting flag ( will be integrated into Admin later)
  • (AlCalzone) Added Plugin CLI commands to enable/disable plugins

3.0.20 (2020-04-28) Release Elena

  • (Apollon77) made sure disabling instances while installation is running do not crash the controller (Sentry IOBROKER-JS-CONTROLLER-Z)
  • (From Forum) prevent error on backup restore
  • (Apollon77) Made sure error handing do not throw exception
  • (Apollon77) Catch all errors when trying to store the File DB (Sentry IOBROKER-JS-CONTROLLER-14/15)
  • (Apollon77) Made sure also edge cases on start adapter are handled correctly (Sentry IOBROKER-JS-CONTROLLER-12)
  • (Apollon77) Use 3.3.4 of objects library to prevent an error from 3.3.3

3.0.19 (2020-04-26) Release Elena

  • (Apollon77) made sure to correctly create empty logfile on "delLogs" (Sentry IOBROKER-JS-CONTROLLER-Q)
  • (foxriver76) made callback consistent when client has closed connection (Sentry IOBROKER-JS-CONTROLLER-R)
  • (foxriver76) added missing Error for DB closed, which was used but undefined in tools.js
  • (foxriver76) if buffer is of type object and not a buffer object log a warning - also bufferFrom null will also result in an error, prevent it (Sentry IOBROKER-JS-CONTROLLER-S)
  • (foxriver76) in edge cases def can be an object, we also support this on extendObject
  • (foxriver76) made sure stacktrace is there on validateId
  • (foxriver76) avoid error on installAdapters function due to downloadRetry (Sentry IOBROKER-JS-CONTROLLER-V)
  • (Apollon77) made sure Logfile is rewritten with empty content (Sentry IOBROKER-JS-CONTROLLER-Q)
  • (Apollon77) Updated Sentry Plugin to 1.0.0, adds pathBlacklist option, fixes pot. crash reason
  • (foxriver76) ensure backward compatibility with auto decrypt function
  • (Apollon77) Re-allow states to be set with no val property but check that there is at least one property
  • (foxriver76) also call enumerateAdapterDocs when deleting all instances

3.0.18 (2020-04-23) Release Elena

  • (Apollon77) correct error handling for letsencrypt challenge server
  • (foxriver76) fixed default value of extend*Object
  • (AlCalzone) Added 'CONTROLLER_NPM_AUTO_REBUILD' to supported features

3.0.17 (2020-04-22) Release Elena

  • (Apollon77) made sure system.config objects has correct type
  • (foxriver76) made sure that callback of extend*Object returns object as before (was broken in 3.0.15)

3.0.16 (2020-04-22) Release Elena

  • (Apollon77) made sure error cases are handled on zip file creation for objects (Sentry IOBROKER-JS-CONTROLLER-J)
  • (Apollon77) made sure to check id when iterating over it (Sentry IOBROKER-WEB-3)
  • (foxriver76) fixed path on getInstalledInfo (was broken in 3.0.15)

3.0.15 (2020-04-21) Release Elena

  • (Apollon77) Adjust ID checking to allow numbers for non-foreign id's for now but log warn
  • (foxriver76/Apollon77) Adjust extendObject logic and only set state when state was not defined before
  • (Apollon77) check that path is found before using it on rebuild CLI command (Sentry issue)
  • (foxriver76) fixed error on caught process exceptions
  • (foxriver76) made sure that procs[id] is not undefined in some cases (Sentry IOBROKER-JS-CONTROLLER-E/G)
  • (foxriver76/Apollon77) handle weird case where io-package.json from controller is not on normal place when getInstalledInfo is called (Sentry IOBROKER-JS-CONTROLLER-B/C/D/F/H)
  • (foxriver76) fixed bug for some cases where common.def is used on creation of foreign objects
  • (Apollon77) made sure error cases are handled on zip file creation for objects (Sentry IOBROKER-JS-CONTROLLER-J)

3.0.14 (2020-04-20) Release Elena

  • First version for latest repository
  • (Apollon77) catch errors when letsencrypt server can not bind to port 80 (Sentry IOBROKER-WEB-1)

3.0.13 (2020-04-18) Release Elena

  • (Apollon77) fixed in objects lib when db connection closes while loading view results
  • (bluefox) fixes and optimizations

3.0.12 (2020-04-17) Release Elena

  • (Apollon77) prevent logged error from file DB where it ws tried to write meta file for already deleted folders
  • (Apollon77) display errors on npm uninstall
  • (foxriver76) delete adapter and adapter.admin folders even if no corresponding meta objects exist
  • (foxriver76) streamline dependencies/globalDependency checks in all places and allow different versions

3.0.11 (2020-04-15) Release Elena

  • (Apollon77) fixed crash when system views are not correctly initialized (Sentry IOBROKER-JS-CONTROLLER-9)

3.0.10 (2020-04-15) Release Elena

  • (Apollon77) consider the Adapter Stop Timeout also for adapter restarts to give adapters enough time to stop before restarting

3.0.9 (2020-04-15) Release Elena

  • (Apollon77) fixed reported crash on obsolete object deletion (Sentry IOBROKER-JS-CONTROLLER-8)
  • (Apollon77) fixed reported crash when a new process can not be started because of ENOMEM (Sentry IOBROKER-JS-CONTROLLER-7)
  • (foxriver76) made sure errors are return the same in two places

3.0.8 (2020-04-14) Release Elena

  • (foxriver76/bluefox/Apollon77) small code optimizations
  • (Apollon77) dependency updates

3.0.7 (2020-04-12) Release Elena

  • (foxriver76) also allow to set user property for states
  • (Apollon77) changed FeatureFlag for Auto decrypt to ADAPTER_AUTO_DECRYPT_NATIVE

3.0.6 (2020-04-11) Release Elena

  • (bluefox) Fixed vis debug
  • (foxriver76/Apollon77) optimize and fix dependency checks to consider all dependencies correctly on install, upgrade and adapter start
  • (AlCalzone) added iobroker object extend command
  • (AlCalzone) optimize performance when objects are duplicated and checked internally
  • (AlCalzone) Added command iobroker debug adapter to start Node.js debug sessions for an adapter
  • (foxriver76) validate id also has to allow objects with correct properties (device, channel ...)
  • (Apollon77) prevent crash if udp membership can not be added (Sentry IOBROKER-JS-CONTROLLER-5)
  • (Apollon77) changed object type for compact groups to "folder"
  • (Apollon77) added adapter flag ALIAS_SEPARATE_READ_WRITE_ID

3.0.5 (2020-04-09) Release Elena

  • (foxriver76) Removed mock for adapter.states.getState again, fixed two adapters
  • (foxriver76) fixed crash of redis setState when undefined is passed and refuse undefined as value in general
  • (Apollon77) Made sure objects update from/ts/user when extending objects in all cases

3.0.4 (2020-04-07) Release Elena

  • (Apollon77) Added "lc" property to list of allowed properties to set (prevent false positive errors with hm-rpc adapter)
  • (Apollon77) Added mock for adapter.states.getState to prevent crashed with Soef Adapters
  • (Apollon77) Made sure extendObject is checking object parts differently, prevent false positive logging

3.0.3 (2020-04-07) Release Elena

BREAKING CHANGES

  • Nodejs 8.x will be no longer officially supported! Supported are nodejs 10.x, 12.x and (most likely) 14.x

Features

  • (Apollon77) Enable zip Archive setting that it is on by default again. All Logs on Linux will be packaged to .gz on rotation. This can be deactivated by configuration (see Documentation)
  • (Apollon77) Introduce CLI command "iobroker rebuild <adaptername>" or "iobroker rebuild self" (for controller) to execute a npm install/rebuild for the specified adapter
  • (Apollon77) Detect the need for a rebuild because of a nodejs update by checking adapter crash error message and execute the "iobroker rebuild" command for the affected adapter up to 3 times.
  • (foxriver76) Added ability to define separate read and write id for aliases (see Documentation)
  • (foxriver76) Made file write intervals of objects and state file dbs configurable (see Documentation)
  • (foxriver76) Check available RAM of the system before a new adapter process is started. If it is below 50/100MB log an error/warn and make it configurable via iobroker.json (see Documentation)
  • (Apollon77) Added plugin system for js-controller and adapters (see Documentation)
  • (Apollon77) Added and automatically enable Sentry as plugin for js-controller (see infos in README.md), can be disabled per host via system.host.name.plugins.sentry.enabled (see Documentation)

Optimizations and Fixes

  • (bluefox) Show options for start/stop/restart if more than one instance exists for the adapter
  • (AlCalzone) Validate arguments for iobroker del ... CLI command
  • (bluefox) Log js-controller version by start of adapter too
  • (Stabilostick) Set default certificate validity to 12 months, according to new Apple rules! Existing certificates will be recreated on controller installation if no custom certificate is used
  • (bluefox) Also initialize objects with local redis connection details if setup command is called with "useRedis" parameter
  • (foxriver76) Increase timeout of hostinfo command to prevent errors on systems with low CPU
  • (foxriver76) The end of schedule adapters is no longer logged as error
  • (foxriver76) Allowed CLI commands to check status of an adapter instance
  • (foxriver76) Enhancements and fixes for iobroker list files command, allow to specify exact meta folder name as parameter and not only the adapter
  • (foxriver76) Added forced repository update to help, add logging to show that it is used
  • (foxriver76) Also delete uploaded vis widgets on adapter deletion
  • (foxriver76) Restart referenced restart-adapters after uninstall also
  • (foxriver76) Prevent dot as last char of an object or state id
  • (foxriver76) Improve performance on filter actions (getObjectView) when redis is used as objects database
  • (Apollon77) Optimize sigKill handling to prevent restart loops for edge cases and slow system
  • (Apollon77) Optimize errormessage for invalid protocol on database connection and make easier understandable
  • (Apollon77) Also catch unhandled promise rejections in adapters and handle like exceptions to allow error detection and automatic restart
  • (foxriver76) Also remove objects from Enums on object deletion
  • (foxriver76) Fixed adapter exiting with wrong exit codes
  • (bluefox) Fixed restart CLI command
  • (foxriver) Updated cache manifest correctly on visdebug and fix process exit on non-existing vis dir
  • (foxriver76) No longer require restart of instance after alias object changes and other alias optimizations
  • (foxriver76) Made sure files in internal file storage are always stored with correct path and also automatically fix existing entries

Developer relevant DEPRECATIONS/WARNINGS

  • (foxriver76) Do not allow access to adapter.states and adapter.objects anymore and add warning logs to deprecate the usage. js-controller 3.1+ will remove these methods. Please adjust your adapters
  • (foxriver76) Verify that a proper object of type "meta" exists when files are accessed in the internal ioBroker storage and output deprecation logging, these actions will be declined in js-controller 3.1+
  • (AlCalzone) Validate the object argument to set[Foreign]State[Changed] and log warnings, such invalid set commands will be declined with js-controller 3.1
  • (Apollon77) Move deprecation of getMessage to next controller version (3.1+)
  • (foxriver76/Apollon77) Validate that id in several state and object methods is of type string and log warnings
  • (foxriver76) Added basic checking for obj.common properties including logging. Please check logs and fix them, such invalid objects will be declined with js-controller 3.1

Developer relevant new Features

  • (bluefox/foxriver76) Automatically encrypt all config attributes that are listed in common.encryptedNative in io-package, introduce ADAPTER_AUTO_DECRYPT_NATIVE (see Documentation) Admin support missing as of now!
  • (bluefox) Introduce new dependency field for io-package called common.globalDependencies to check for global dependencies (see Documentation). Admin support missing as of now!

Developer relevant Optimizations and Fixes

  • (Apollon77) Made sure that all places in adapters for states and objects that can return "really async" (e.g. because of DB communication) ALWAYS return async! (else callback !--count constructs can fail)
  • (foxriver76) Also set default values of instanceObjects defined in io-package.json
  • (bluefox) Improve extension mode for web extensions
  • (foxriver76) Optimize extendObjects function of adapter.js (use from and ack)
  • (foxriver76) Use from and ack when creating instanceObjects on installation of an instance
  • (Apollon77) Fixed potential crash where name is no string in some file object operations
  • (foxriver76) Fixed this.stop being undefined on daemon adapters
  • (foxriver76) Also respect def values of io-package.json on automatic object recreation due to instance start
  • (foxriver76) Respect state.from if provided on setState
  • (Apollon77) Enhance checks for getObjectsView response
  • general dependency updates
  • code style optimizations

2.2.10 (2020-03-08) Release Dina - Windows Edition

This version is especially for the new Windows Installer and will be used by it. It is not offered as normal update for the users on Linux (will not break, but not needed)!

  • (AlCalzone) do not execute npm installs with --prefix but inside a given directory on Windows

2.2.9 (2020-02-12) Release Dina

  • (Apollon77) fixed pot. crash for edge cases
  • (Apollon77) allowed to deactivate logfile zipping by iobroker.json (for non-windows systems)
  • (Apollon77) made sure sigKill state only handles number values (fixes #638)
  • (bluefox) added better checks for file CLI commands
  • (Apollon77) made sure directory is created before writing metadata and send redis error correctly, prevent controller crash (fixes #644)
  • (foxriver76) optimize package manager handling (fixes #631)
  • (Apollon77) made sure deleting running instances does not crash js-controller (fixes #658)
  • (Apollon77) Downgrade semver to stay compatible with nodejs 8

2.2.8 (2020-01-24) Release Dina

  • (bluefox) Added for delObject the recursive flag to recursively delete objects; use feature flag ADAPTER_DEL_OBJECT_RECURSIVE in your adapter code to detect if the js-controller supports it or not!
  • (bluefox) added check for sudo for package manager
  • (Apollon77) Fixed error on restore/validate when no name is provided
  • (Apollon77) added/changed checks for some calls (fixes #611 too ;-))
  • (Apollon77) Added feature flag ADAPTER_DEL_OBJECT_RECURSIVE
  • (Apollon77) adapter.restart used "terminate" directly which do not call unload and broke compact mode, changed to use stop()
  • (foxriver76) Fixed bug in nodejs version check and really disable adapter when requiring unsupported nodejs version
  • (foxriver76) fixing issues in backup validation + add some missing commands to cli help
  • (Apollon77) Do not have ioredis autoResubscribe because we do it by our own
  • (Apollon77) changed stopTimeout to prevent killing wrong process for long-running "stopTimeouts" that were then fast in the end
  • (bluefox) added CLI command "file rm" to delete files from ioBroker storage via command line
  • (AlCalzone) fixed some errors
  • (AlCalzone) made sure repository hash is always checked correctly
  • (Apollon77) made sure scheduled starts are also removed when a scheduled instance is stopped
  • (Apollon77) made sure Multi-host discovery server does not unexpectedly restart when trying to stop ioBroker Master
  • (Apollon77) added feature flag ADAPTER_SET_OBJECT_SETS_DEFAULT_VALUE for adapter class
  • (Apollon77) allowed sessions to run longer then 24days (fixes #618, addresses ioBroker/ioBroker.admin#467)
  • (Apollon77) Check a wrong check for os on installation
  • (Apollon77) Also check nodejs minimum version on adapter install
  • (bluefox) fixed CLI "state set"
  • (Apollon77) Added some more logging to Objects/States DB
  • (foxriver76) check if controller is running on upgrade self before controller upgrade (fixes #511)
  • (bluefox) Restart ioBroker after applying vendor information
  • (Apollon77) fixed pot. crashes happening while logs are rotated or packaged (thanks @mattberther and @rogerc)

2.2.7 (2020-01-03) Release Dina

  • (Apollon77) Updated deps
  • (bluefox) disabled log-symlink on Windows because only admins are allowed to create symlinks here
  • (foxriver76) fixed async version of getEncryptedConfig
  • (bluefox) obj type 'adapter' not set if installing adapter via octocat (#539)
  • (bluefox) fixes Change settings of onlyWWW adapter cause exception (#549)
  • Note: In order to remove custom settings you need Admin 3.7.6+

2.2.6 (2020-01-01) Release Dina

  • (Apollon77) fixed some more places where checks for not connected objects db were not triggered

2.2.5 (2019-12-31) Release Dina

  • (Apollon77) added certificate handling if a local file is specified and do not overwrite if invalid in setup first
  • (Apollon77) added check in objects lib
  • (Apollon77) only initialize PacketManager when needed to prevent error messages shown when not relevant
  • (Apollon77) changed logging when no packet manager found to info
  • (Apollon77) disabled gz-log-rotation on Windows; remove added logging from debugging
  • (Apollon77) made sure adapters and instances can be deleted again
  • (Apollon77) made sure Redis simulator only set object data, all other logic is done in objects lib

2.2.4 (2019-12-29) Release Dina

  • (Apollon77) create symlink to current logfile (fixes #578)

2.2.3 (2019-12-29) Release Dina

  • (Apollon77) added some logging for archiving logfiles on Windows
  • (Apollon77) added warning message for getMessage method to make deprecation more visible
  • (bluefox) Fixed wrong error handling for adapter deletions; should work again! Fixes #576
  • (bluefox) Added Package installation by js-controller for Linux based systems (apt/yum package managers) via io-package common.osDependencies[process.platform]

2.2.2 (2019-12-27) Release Dina

  • (Apollon77) readd getMessages to adapter.js and remove in controller 2.4 later to prevent to many adapter incompatibilities now

2.2.1 (2019-12-27) Release Dina

  • (bluefox) CLI: check if object exists by "state set" command and other fixes
  • (Apollon77) Made sure adapter with longer stopTimeouts can be restarted as usual; the "stopping" flag was blocking the restart logic
  • (Apollon77) made sure adapters can be stopped again with setting .alive to false
  • (Apollon77) optimize questions on setup custom
  • (Apollon77) fixed log file rotation; additionally old logs are now packed with gz
  • (bluefox) Fixed rights by object creation
  • (bluefox) Added support for vendor specific logic and database initialization
  • (Apollon77) made sure restart of instances work in all cases
  • (AlCalzone) fixed iobroker start all to not hang after starting all instances
  • (Apollon77) made sure auto-rotation for logs work now with winston and make sure "old style manual cleanup" too
  • (Apollon77) fixed error when 'iobroker url' is called without any parameter
  • (Apollon77) separate system and user/adapter subscribes, introduce "changeUser" trigger for States and Objects
  • (Apollon77) Also allow ÄÖÜäöüа-яА-Я as characters for first character
  • (Apollon77) Also log exceptions for compact group controller
  • (Apollon77) Updated dependencies
  • (bluefox) removed getMessage and lenMessage from adapter methods because deprecated since long time
  • (Apollon77) Removed Socket.io compatibility layer - master/slave systems coming from 1.5 need to update to 2.0 or manually!
  • (Apollon77) made options parameter for getObjectList optional again

2.1.1 (2019-11-22) Release Christina

  • (bluefox) Fixed host deletion
  • (Apollon77) updated objects lib to prevent one crash case and make sure extendObject works as intended also for JavaScript adapter
  • (Apollon77) made sure adapters are also reinstalled correctly when used in compact groups

2.1.0 (2019-11-15) Release Christina

  • (Apollon77) Stable Release as minor update to separate from development/testing phase

2.0.44 (2019-11-14) Release Bella Stable-RC5

  • (Apollon77) optimize stopping and restarting behaviour (again)

2.0.43 (2019-11-12) Release Bella Stable-RC4

  • (Apollon77) enhance backup error handling for invalid files - they now display errors and not break the backup process
  • (Apollon77) made sure new enabled/moved instances are started directly
  • (Apollon77) increase object init timeout for adapter starts before complaining/stopping
  • (Apollon77) fixed file read/write to not allow invalid locations and add some more checking
  • (Apollon77) added some more logging for ioredis initializations

2.0.42 (2019-11-10) Release Bella Stable-RC3

  • (Apollon77) Correct error message if certificate can not be parsed
  • (bluefox) Fixed upload of material adapter
  • (Apollon77) prevent crash when adapter instance is deleted which is also running currently and if stopped by deletion
  • (bluefox) made sure getForeignStates do not modify the input ids list
  • (Apollon77) enhance list instances and only show compact infos if adapter supports it

2.0.41 (2019-11-08) Release Bella Stable-RC2

  • (Stabilostick) enhance certificate methods and add certificate checks in setup first
  • (Stabilostick) added iobroker cert view <name> CLI command
  • (Apollon77) fixed problems in stop controller handling

2.0.40 (2019-11-08) Release Bella Stable-RC1

  • (Apollon77) made sure multiple instances of same adapter do not disturb each other in compact mode, finalize compact mode
  • (AlCalzone) correctly handle git commits and branches as custom install sources
  • (Apollon77) made sure callbacks with setImmediate return the real values from code execution and not pot. changed values from other actions (fixing file content being undefined when write/read happen in parallel)
  • (Apollon77) handle more cases for aliases automatically (On/Ein is converted to true case insensitive now)
  • (bluefox) getForeignStates() return correct ids when used with aliases
  • (Apollon77) optimize controller group stopping
  • (Apollon77) when target state is deleted also emit "null" onChange events to adapters for alias states
  • (Apollon77) optimize controller stop behaviour with compact groups
  • (Apollon77) made sure that schedules instances can start even after a "once" run that set a sigKill value
  • (Apollon77) added method to synchronize file directories with file DB storage
    • add new CLI command "iobroker file sync <id>" to do the sync
    • integrate the sync with "iobroker setup first"

2.0.39 (2019-10-29) Release Bella

  • (Apollon77) "upgrade name" for a controller will return an error to use "upgrade self"
  • (Apollon77) "upgrade all" will no longer update controller too
  • (Apollon77) added some more checks in adapter.js for existence of states/objects
  • (Apollon77) enhance iobroker setup custom for Redis sentinel usage
  • (Apollon77) made sure flot store works again also with objects with empty names

2.0.38 (2019-10-26) Release Bella

  • (Apollon77) Added some more logic to prevent access with invalid ids
  • (Apollon77) changed "enhancedLogging" to not be global but "per DB"
  • (Apollon77) Fixed compact mode on Windows systems
  • (Apollon77) made sure multiple callbacks to "unload" will be ignored
  • (bluefox) Rise all user in admin group to administrators
  • (Apollon77) Allowed buffers to be passed in messages again
  • (bluefox) Fixed session storage
  • (Apollon77) Introduce 0_userdata as new home for user specific files, objects and states
  • (Apollon77) Enhance logging
  • (bluefox) fixed letsencrypt (was broken n 2.0.35)
  • (Apollon77) fixed install adapter starts like vis installation when db is not available
  • (Stabilostick) Auto generated self-signed certificates need to have a max duration of 2 years according to new Apple rules

2.0.35 (2019-10-19) Release Bella

  • (Apollon77) Allowed to use Redis password as "pass" parameter for States and Objects
  • (Apollon77) Prevent hangs on "iobroker upgrade self" from 1.5 to 2.0
  • (bluefox) Updated IPs information periodically
  • (bluefox) Removed safe-replace, bluebird, pyconf packages
  • (paul53/AlCalzone/Apollon77) Fixed datatype of system.host.cpu and system.adapter.XY.Z.cpu
  • (Apollon77) Made sure alias.0 and other controller objects are also checked and created if needed on setup first when updating
  • (bluefox) Allowed one state to multiple aliases connections
  • (Apollon77) Made sure required adapters are also checked correctly when using compact mode and groups
  • (Apollon77) Enhance logging for unsupported (should not happen) commands

2.0.34 (2019-10-17) Release Bella

  • (Apollon77) Allowed custom settings to be removed again if objects are "file"
  • (Apollon77) Removed default value for "switch" and "level.dimmer" roles
  • (bluefox) fixed user authentication

2.0.33 (2019-10-15) Release Bella

  • (Apollon77) Sync objects and states retry max delay defaults
  • (Apollon77) Re-Add the certificate check and automatic re-creation for old certificates as in 1.5.14

2.0.32 (2019-10-15) Release Bella

  • (Apollon77) Also restart controller if only states connection disconnects

2.0.31 (2019-10-14) Release Bella

  • (Apollon77) fixed undefined variable on one place

2.0.30 (2019-10-14) Release Bella

  • (Apollon77) enhance reconnection handling (system tries to reconnect up to 40s including re-sending all data changes before restart happens, on no connection to db on start a restart is tried every 30s)
  • (Apollon77) fixed file handing issue
  • (bluefox) handle empty states correctly in Redis scenarios

2.0.29 (2019-10-13) Release Bella

  • (Apollon77) fixed backup on empty/null states

2.0.28 (2019-10-13) Release Bella

  • (Apollon77) Correct meta data return for some special cases

2.0.27 (2019-10-13) Release Bella

  • (Apollon77) Correct some potential object issues

2.0.26 (2019-10-13) Release Bella

  • (Apollon77) Made sure Logs are only streamed to admin for selected loglevel
  • (Apollon77) Fixed "iobroker file write"
  • (Apollon77) Made sure invalid ids are handled correctly without throwing errors
  • (bluefox) Added alias.0 as object to be added
  • (bluefox) Allowed Arrays as state values
  • (bluefox) Translate object names

2.0.25 (2019-10-09) Release Bella

This is the First version which is released into Latest Repository.

Discussion Thread in Forum

  • (Apollon77) Also allow states/objects with capital letters as first letter
  • (Apollon77) fixed adapter/instance deletion
  • (AlCalzone) fixed CLI get state getValue
  • (Apollon77) increase LUA script timeout
  • (Apollon77) updated in objects lib, also update other dependencies
  • (bluefox) small logging optimization

2.0.24 (2019-10-02) Release Bella

  • (Apollon77) optimize performance, especially for file/file systems
  • (Apollon77) enhance path sanitization
  • (Apollon77) hopefully prevent Redis errors on connection close
  • (Apollon77) fixed adapter logging with --debug flag
  • (Apollon77) fixed Adapter Restarts also for widgets

2.0.22 (2019-10-02) Release Bella

  • (Apollon77) work on some performance optimizations
  • (Apollon77) Fixed binary state handling

2.0.21 (2019-10-02) Release Bella

  • (Apollon77) made sure also states starting with "io" will be notified on stateChange
  • (Apollon77) fixed Loglevel change via instance state
  • (Apollon77) made sure subscribes for instances states are correctly passed through to adapter for all cases he subscribed them (also for special states like logLevel or sigKill)
  • (Apollon77) made sure id filtering also works correct for >10 instances of the same adapter
  • (Apollon77) some more small fixes and optimizations
  • (Bluefox) Do not kill instance in debug mode on PID mismatch

2.0.19 (2019-10-02) Release Bella

  • (Apollon77) fixed migration
  • (Apollon77) fixed potential cases where objects/states files were not stored

2.0.18 (2019-10-01) Release Bella

  • (Apollon77) allowed to specify network family for redis library, defaults to 0 (IPv4 and IPv6)

2.0.17 (2019-10-01) Release Bella

  • (Apollon77) delay parallel start of scheduled instances to prevent system overload scenarios (same rules asd for adapter start, basically 4s delay)
  • (Apollon77) Optimize some Migration questions
  • (Apollon77) smaller fixes and optimization

2.0.16 (2019-09-30) Release Bella

  • (Apollon77) streamline redis vs file States handling which was different also before controller 2.0:
    • not set states will always return null now
    • States will set to null completely (not only value) when they expire
    • States will also be published to onChanged handlers when states are in Redis
  • (Apollon77) rework expiry handling for File-States to use Timeouts

2.0.14 (2019-09-29) Release Bella

  • (Apollon77) fixed checking if ioBroker is running (bug in 2.0.13)
  • (Apollon77) upgrade socket-io deps
  • (Stabilostick) Randomize Certificate Serial numbers

2.0.13 (2019-09-28) Release Bella

  • (Apollon77) optimize iobroker status CLI command
  • (Apollon77) some other small fixes
  • (Apollon77) removed clearAllLogs logic

2.0.12 (2019-09-27) Release Bella

  • (Apollon77) Correct selections with wildcards at the beginning, should solve the admin issues

2.0.10 (2019-09-26) Release Bella

  • (Apollon77) Optimize Compact mode CLI commands (fixes #468, fixes #471, fixes #470)
  • (Apollon77) fixes #475, #476
  • (Apollon77) only use quit from redis and let ioredis handle the disconnect, hopefully fixes #472, update objects-ha-lib to 1.1.20
  • (Apollon77) object changes are only logged as debug from now on, fixes #473
  • (Apollon77) Some adapter tweaks when running in "--install" mode (no reporting, don't check sigKill)

2.0.9 (2019-09-24) Release Bella

  • (Apollon77) Optimize Adapter and Controller stopping processes further
  • (Apollon77) Optimize redis connection handling on exit
  • (Apollon77) Updated objects-ha lib to 1.1.19

2.0.8 (2019-09-23) Release Bella

  • (Apollon77) Optimize Adapter and Controller stopping processes

2.0.7 (2019-09-22) Release Bella

  • (Apollon77) Correct file based internal structure to prevent entries with "//" in the path
  • (Apollon77) Check for existing of states DB in some more places to prevent problems in compact end scenarios
  • (Apollon77) try to add a better retry logic on disconnect to the DBs, restart after 30s
  • (Apollon77) made some file operations with Paths more compatible to former versions

2.0.6 (2019-09-21) Release Bella

  • (Apollon77) prevent "keys Not found" error in log, be more redis compatible, fixes #461
  • (Apollon77) prevent "invalid instance object" errors for channel objects, fixes #462
  • (Apollon77) optimize further on compact- and general adapter starting mechanisms to better prevent multi-starts
  • (Apollon77) updated objects-ha lib to 1.1.17 to normalize filenames to prevent problems on double-slashes

2.0.5 (2019-09-20) Release Bella

  • (Apollon77) fixed some error while accessing custom directories, fixes #455
  • (Apollon77) Added more logic to better handle migration edge cases (especially slaves vs migrations), fixes #458
  • (Apollon77) Made sure invalid alias values do not crash controller process (logger was missing), fixes #456
  • (Apollon77) Added better error and fallback handling for compact mode, fixes #460

2.0.4 (2019-09-19) Release Bella

  • (Apollon77) fixes #434, host command
  • (Apollon77) Added one more confirmation question when migrating objects

2.0.3 (2019-09-19) Release Bella

  • (Apollon77) Log Process-ID for all adapter log messages
  • (Apollon77) When Objects/States connection dies and is no longer able to be restored for adapters we end the adapter process. This prevents us from hanging processes
  • (Apollon77) End adapters with code 11 when they decide to end itself because they are not the current process, so that no additional restarts happen

2.0.2 (2019-09-17) Release Bella

Breaking changes

  • Minimum requirement for js-controller 2.0 is nodejs 8.x
  • Manually uploaded files into iobroker-data/files/... may no be fully supported. Please make sure to put them into officially allowed directories, e.g. vis.0
  • The following Adapters needs to be updated to the listed versions to be compatible with js-controller 2.0
    • simple-api 2.1.2 or higher
    • email 1.0.5 or higher
    • pushover 1.1.1 or higher
    • hue 1.2.4 or higher
    • node-red 1.10.1 or higher
    • vis 1.2.1 or higher
    • iqontrol 0.2.6 or higher
    • socketio 2.1.2 or higher
    • radar2 1.0.9 (1.2.0 from GitHub needs a manual fix!)
    • ring 1.0.5 or higher

New user features

  • (Bluefox/Apollon77) Added Compact Mode and compact groups, see Compact Information in README (Technology Preview)
  • (bluefox) Added build-in Alias handling for Objects/States, see Alias Information in README (Technology Preview)
  • (Bluefox/Apollon77) Added support to also use Redis for Objects and Files, see Redis Objects Information in README
  • (Apollon77) Added Redis sentinel support, see Redis Sentinel Information in README
  • (Apollon77) Allowed dynamic change of Loglevel for adapter instance and js-controller hosts processes, see Dynamic Loglevel changes Information in README
  • (Bluefox) Added optional migration for State and/or Objects values when using setup custom.
  • (Apollon77) added monitoring for event-Loop-Lag as host and adapter objects. This can be used to analyze if an node.js process is blocked too much
  • (foxriver76) added possibility to validate backup files
  • (alcalzone) Support command iobroker logs
  • (Stabilostick) cert create CLI commands
  • (Apollon77) Remember installation location for re-installations. For GitHub installs it gets the exact commit hash to reinstall really the correct version
  • (Apollon77) Use remembered installation location for automatic adapter installs (e.g. if missing, host move cases)

New adapter developer features

  • (Apollon77) added adapter.supportsFeature('NAME') method to check if a certain feature exists. fixes #244, see Adapter Feature Detection Information in README for information and the full list of allowed features
  • (foxriver76) Ability to define secured objects in io-pack access only via own adapter and admin, details see #287
  • (foxriver76) added getObjectView and getObjectViewAsync on adapter object
  • (foxriver76) added getObjectList and getObjectListAsync on adapter object
  • (bluefox) allowed the deletion of multiple objects with wildcard
  • (foxriver76) setObject/setObjectNotExists now also sets default value of state after object creation
  • (Apollon77) allowed getPort to check for the port optionally on a certain host/IP
  • (Apollon77) Streamline redis vs file States handling which was different also before controller 2.0:
    • not set states will always return null now
    • States will set to null completely (not only value) when they expire
    • States will also be published to onChanged handlers when states are in Redis

Further changes

  • (Apollon77) Rewrite InMem databases (States & Objects) to TCP (redis compatible) protocol and deprecate socket.io version; will be removed approx. in v2.1. This change should prevent us from "Reconnection to DB" errors
  • (bluefox) Added adapter handling to prevent "error 7" (adapters will stop itself as soon as PID is not as expected)
  • (Apollon77) upgrade all dependencies, means: 0 vulnerabilities :-)
  • (AlCalzone) Don't chmod 777 after controller upgrade
  • (alcalzone) refactoring of many CLI commands
  • (bluefox) added possibility to return zip file as a link and not as base64
  • (bluefox) standardize error codes
  • (alcalzone) Root should always npm install with --unsafe-perm
  • (bluefox) enabled gzip to read repositories
  • (bluefox) read hash of sources.json before read the whole file
  • (bluefox) Added some information to user-agent, like chrome, IE and Firefox do by update checks - the information is absolutely anonymous
  • (bluefox) verified the version of node.js by start of the instance
  • (bluefox) hide cmd window on Windows
  • (AlCalzone) Include certificate creation in setup first
  • (bluefox) suppressed warning by npm install
  • (bluefox) allowed optional dependencies being installed
  • (Apollon77) optimize setup customand add more user guidance
  • (Apollon77) Added Feature overview to README
  • (bluefox) forward upload console outputs from slave to master
  • (Apollon77) made sure to upload and upgrade all relevant objects on installations and updates of adapters
  • (Apollon77) always upgrade instance objects after successful installs or upgrades
  • (Apollon77) optimize adapter start processes and such, especially when combined with needed automatic installations of adapters, also for error cases
  • (Apollon77) after 2 installation tries with "last-installedFrom" use the installedVersion field to try to install from npm
  • (Apollon77) hosts now ignore object changes when the affected instances is still in installQueue
  • and much more code refactoring and optimizations in various places

Bugfixes

  • (Apollon77) log scheduled restarts as info only (fixes #315)
  • (Apollon77) fixes #340 to maintain restartSchedule on updates
  • (Apollon77) fixed bug where "ack" was possible to set to any value via cli
  • (alcalzone) Enable ESLint and fix most issues
  • (bluefox) optimize multi host upload
  • (Apollon77) Restart stopped adapters at the end of the upload and not before to make sure to not have two adapter restarts on upgrade cases
  • (Apollon77) Enhance checks for failed installations in cli and controller
  • (Apollon77) also update adapter instance statistic objects when no instanceObjects are defined
  • (Apollon77) "alive" state values are only checked on adapter start if ack=true to allow to start a process if not running
  • (Apollon77) fixes for multi-host detection
  • (Apollon77) fixed backup of states
  • (bluefox) Made sure also VIS global CSS is included in backup and restored
  • and many more fixes in various places

1.5.13 (2019-06-12) Evolution release (Ann)

  • (Stabilostick) Made sure Info Adapter Tab is displayed automatically on install
  • (Stabilostick) Added CLI host commands to CLI usage help
  • (Stabilostick) Replace winston-syslog dependency to prevent build errors on node.js 10+ when installing or updating ioBroker (not needed in 2.0.0)
  • (Stabilostick) Replace default self signed SSL certificate to prevent errors in Node.Js 10.16+
  • (Apollon77) Also replace default certificate used for all Web and Admin instances if the old certificate was used, so restart will use the new certificate

1.5.12 (2019-06-01) Evolution release (Ann)

  • (Apollon77) Install instance of info adapter too on first setup of controller

1.5.11 (2019-05-26) Evolution release (Ann)

  • (Apollon77) Allowed to install specific versions/fix installing specific versions

1.5.9 (2019-05-16) Evolution release (Ann)

  • (bluefox) Read cache of repository before download the whole file
  • (AlCalzone) if npm returns code 1 it is OK
  • (AlCalzone) fixed instances enumeration
  • revert greenlock version to 2.7.1

1.5.7 (2019-02-12) Fixes for Evolution release (Ann)

  • Required version for normal functionality: javascript 3.6.5, dasWetter: 2.7.1, upnp: 1.0.0
  • (bluefox) Fixed let's encrypt
  • (bluefox) Fixed "iob" script
  • (Dominic Griesel) Revert the changes to del[Foreign]State, so the object is not deleted.
  • (bluefox) always install the version from repository and not the latest from npm
  • (Ingo Fischer) Root should always npm install with --unsafe-perm
  • (bluefox) fixed iobroker stop
  • (bluefox) fixed Empty ID error
  • (bluefox) fixed error with formatDate

1.5.3 (2018-09-15) Evolution release (Ann)

  • (bluefox) disabled the auto-control of quality codes

1.5.2 (2018-09-14) Evolution release (Ann)

  • (bluefox) Let's encrypt fixes
  • (bluefox) Fixed SSL issue with authentication

1.5.1 (2018-09-14) Evolution release (Ann)

Breaking changes:

  • (bluefox) Breaking changes: "][*,;'"`<>?" are no more allowed in IDs

Feature changes:

  • (bluefox) the user by changing of states and objects is logged
  • (bluefox) install specific version of missing adapter
  • (bluefox) added disk info
  • (bluefox) added memAvailable state
  • (bluefox) added noChmod experimental settings
  • (bluefox) stop instances only if they belong to current host
  • (bluefox) delete adapter only on current host and leave it on others
  • (bluefox) Combine States and Objects (#203)
  • (bluefox) Implemented adapter.terminate('Because I need it') (#197)
  • (alcalzone) added restart, disable, updateConfig methods to Adapter class
  • (bluefox) added reinstall.js
  • (bluefox) added "iob" as shortcut
  • (bluefox) added getInterfaces to sendToHost
  • (bluefox) implemented backup of data folders via dataFolder flag
  • (alcalzone) Added a wrapper method to safely expose ES6 classes to legacy code
  • (bluefox) added information if instance is alive in "list instances"
  • (stabilostick) added 'pidusage' for information about cpu and new states per adapter instance
  • (bluefox) added support of new mime types: pdf, doc, xls, ppt
  • (bluefox) implemented flag common.eraseOnUpload
  • (bluefox) set quality codes on connection lost and adapter disconnect
  • (alcalzone) Give adapters a chance to handle their own uncaught errors
  • (alcalzone) Added call stack information to trace error logs
  • (bluefox) added pattern2RegEx to tools

Fixes and Optimizations:

  • (apollon77) the node10 testing was added
  • (bluefox) the read file function was protected
  • (bluefox) possible access rights problem was closed
  • (bluefox) refactoring of memory calculations
  • (bluefox) set default values of states by creation of new instances
  • (alcalzone) Fixed "install npm" messages, upgrade node typings to v6
  • (bluefox) check if mem file could be read
  • (buzzy1337) fixed calculation of kilobyte to megabyte and fix reading /proc/meminfo
  • (bluefox) Fix: Access to log files through admin does not work
  • (bluefox) fixed redis disconnect
  • (bluefox) Updated acme to V2 (#199)
  • (bluefox) Improve deleteDevice (#186)
  • (bluefox) fixed cookie expiration
  • (alcalzone) several async and testing fixes
  • (bluefox) timeout for npm check added
  • (bluefox) fixed "object chmod 777 777 javascript.0.*" command
  • (bluefox) do not send ready second time on reconnect db
  • (Apollon77, Bluefox) prevent defaultObj to be overwritten with normal common details
  • (bluefox) fixed error if ID is empty
  • (bluefox) check id by setObject
  • (apollon77) Added amazon-dash to list of adapter to be installed with unsafe-perm
  • (bluefox) leave backitup enabled after restore

1.4.2 (2018-04-12)

Main changes: add instance with desired number, Force using of socket.io 2.1.0, Bugfixes

  • (bluefox) fixed error with letsencrypt debug output
  • (bluefox) fixed delObject
  • (bluefox) fixed restore of backup
  • (bluefox) allowed to add instance with desired number
  • (apollon77) fixed auto multi-host
  • (bluefox) fixed for adapter update
  • (bluefox) Force using of socket.io 2.1.0

1.4.0 (2018-04-03)

Main changes: uninstall via npm, downgrade winston-syslog, refactored deleteAdapter, object.json auto-backups

  • (AlCalzone) fixed npm version pre-install check
  • (bluefox) removed winston-syslog 2.0 and replace it with 1.2.6
  • (AlCalzone) refactored and promisified deleteAdapter and deleteInstance
  • (bluefox) removed controller from the adapters list in admin
  • (bluefox) also uninstall adapters using npm
  • (bluefox) backup object.json files every 2 hours for last 48 hours (warning! Disk usage)
  • (bluefox) added cli command to update/add the vis/knx license

1.3.0 (2018-03-11)

Main changes: socket.io Version downgraded because of bug. Better npm5 support

  • (AlCalzone) Removed the outdated npm package and disable package-lock before installing (#175)
  • (AlCalzone) reworked npm adapter version check without npm package
  • (AlCalzone) ignore local NPM for version check
  • (AlCalzone) don't modify the parent's process PATH variable
  • (AlCalzone) check npm version before installing and potentially disable package-lock
  • (AlCalzone) don't cancel installation, or we're breaking ioBroker anyways
  • (AlCalzone) ignore local npm version for preinstall check
  • (bluefox) move socket.io from 2.0.4 to 1.5.1 because of bug
  • (bluefox) added intro to default tabs

1.2.7 (2018-03-06)

Main changes: support of npm5, Multihost fixed, added promises to adapter.js

  • (bluefox) fixed multi-host connect
  • (bluefox) added "multi-host status" command
  • (bluefox) made statistics interval adjustable
  • (bluefox) better scan of installed adapters
  • (bluefox) better deletion of adapters
  • (bluefox) fixed requests like getStates('*.info.connection')
  • (bluefox) create instance's objects by start.
  • (AlCalzone) Added promisified methods to the adapter class
  • (AlCalzone) enabled basic type-checking and fix found error
  • (Apollon77) fixed potential error and check if that.log exists
  • (bluefox) updates npm packets
  • (Apollon77) log an error when npmInstallWithCheck throws
  • (AlCalzone) [npm5] Disable package-lock.json before installing anything
  • (Apollon77) use stable tag from admin in dependencies
  • (bluefox) fixed empty ID error

1.2.5 (2018-01-27)

  • (bluefox) move buildRepository.js to ioBroker.repositories
  • (bluefox) fixed adapter download
  • (Apollon77) also include npm5 fix into reinstall.sh
  • (bluefox) added functions to standard enums
  • (bluefox) check if pattern is valid
  • (bluefox) catch error by deleting of adapter.
  • (bluefox) better adapter directory search
  • (Apollon77) another fix for reinstall.sh, add --unsafe-perm
  • (Apollon77) exit mocha tests explicitely when completed, needed pot. with most current version of mocha
  • (Apollon77) added npm5 check and "Block" to "iobroker install" commands

1.2.4 (2017-12-15)

  • (bluefox) The fix for npm5

1.2.3 (2017-11-24)

  • (bluefox) fixed Windows problem and storing of error messages
  • (bluefox) fixed logging level: silly
  • (bluefox) fixed dependency check
  • (bluefox) fixed small errors
  • (bluefox) added repo commands to cli
  • (bluefox) setTimeout(0) => setImmediate
  • (bluefox) added timestamp and "from" information object
  • (bluefox) allowed to enable redis by setup
  • (bluefox) catch backup errors
  • (bluefox) ignore errors by setup first
  • (bluefox) fixed generate repository
  • (bluefox) calculate number of datapoints in vis and deliver it in statistics
  • (bluefox) fixed restoring of backup
  • (AlCalzone) fixed install urls ending with ".git"

1.2.0 (2017-09-24)

  • (bluefox) fixed upgrade command
  • (bluefox) allowed to install from custom repositories
  • (bluefox) removed online and sources repositories
  • (bluefox) fixed multihosts command
  • (bluefox) catch the error outputs of instances if they die
  • (bluefox) no more support for node.js 0.10/0.12
  • (bluefox) added new logging level: silly

1.1.3 (2017-08-13)

  • (bluefox) Extend statistics (node.js versions and some HW parameters will be reported)
  • (bluefox) Updated npm packets
  • (bluefox) caught semver error
  • (bluefox) changed interface of getDevices functions
  • (bluefox) changed interface of createChannel functions
  • (bluefox) working on multi-host service
  • (bluefox) fixed users cli
  • (bluefox) implemented defaultNewAcl
  • (bluefox) removed 0.10 and add 8 by tests
  • (bluefox) fixed restart of adapters

1.1.2 (2017-07-13)

  • (bluefox) Close sockets by default for external connects

1.1.1 (2017-06-29)

  • (jens-maus) allowed redis connections via unix sockets by specifying host as e.g. '/var/run/redis/redis.sock' and setting port to 0. This should slightly improve performance on busy installations.
  • (Apollon77) optimizations for permission handling

1.1.0 (2017-06-08)

  • (bluefox) BREAKING Changes: For multi-host systems the user MUST explicit allow connections from other IPs in /opt/iobroker/iobroker-data/iobroker.json
"host": "127.0.0.1",
=>
"host": "0.0.0.0",

for objects (line 11) and for states (line 21).

1.0.3 (2017-06-01)

  • (bluefox) getHostInfo for new admin
  • (bluefox) allowed using of files for certificates
  • (bluefox) always install zwave with unsafe-perm option
  • (apollon77) added handling for undefined
  • (apollon77) uptime is a number only and no String/List/Array beside the fact that also with a number a "toString" should exist, or it's undefined because an old host is listed with no value ...

1.0.1 (2017-05-03)

  • (bluefox) Change repository generation (not relevant for users)
  • (bluefox) small change for install process (not relevant for users)

1.0.0 (2017-04-23)

  • (bluefox) No big changes, just version
  • (bluefox) removed warning about iDs
  • (bluefox) fixed tests
  • (bluefox) try to ignore npm error 1
  • (bluefox) fixed possible error.
  • (bluefox) create states with ack=true by default

0.17.2 (2017-03-25)

  • (bluefox) do not store logs and messages and just publish it
  • (bluefox) removed mochawsome

0.17.1 (2017-03-15)

  • (bluefox) added stable repository
  • (bluefox) fixed bug with user=>users (required for user rights)
  • (bluefox) install discovery adapter too if exists at first start
  • (bluefox) extend configuration with city, country and GPS coordinates
  • (bluefox) send city and country in statistics and allow to disable it

0.16.2 (2017-03-08)

  • (bluefox) fixed "iobroker passwd username"

0.16.1 (2017-02-27)

  • (bluefox) use SHA256 instead of SHA1 (All passwords must be reset via "iobroker passwd username")
  • (bluefox) changed cli commands for user: user add, user del, user set, user enable...
  • (bluefox) replace letsencrypt with greenlock
  • (bluefox) try to fix sha256 issue with node.js 0.10.x
  • (bluefox) added uniti
  • (Apollon77) changed reinstall.sh script
  • (bluefox) added setStateChanged
  • (bluefox) implemented event counters
  • (bluefox) read values from cache if possible in adapter
  • (bluefox) added parser adapter, smartmeter, fakeroku, wetty, fronius, Worx Landroid Rasenmäher
  • (bluefox) fixed log sources
  • (bluefox) fixed callbacks calls by setObjectNotExists
  • (bluefox) fixed getForeignObjects
  • (bluefox) write tests
  • (Patrick) adapter.namespace now always int (was int or string mixed)
  • (Patrick) _fixId better results for empty obj and string (return namespace + '.')
  • (bluefox) small fixes for multi-host
  • (bluefox) added getInstalledAdapter for autodiscovery

0.15.3 (2017-01-20)

  • (bluefox) fixed of autoSubscribe
  • (bluefox) no extra upload if install of adapters from GitHub

0.15.1 (2017-01-14)

  • (bluefox) documentation of adapter
  • (bluefox) support of autoSubscribe
  • (bluefox) added innogy-smarthome, vis-players
  • (bluefox) fixed error with preserve settings
  • (bluefox) restart adapter immediately if desired
  • (bluefox) support of web extensions

0.14.0 (2016-12-17)

  • (bluefox) added debug information for logging
  • (bluefox) removed occ
  • (bluefox) added mpd, icons-fatcow-hosting
  • (bluefox) updated node-schedule
  • (bluefox) added cli command show uuid
  • (bluefox) try to fix issue with npm3
  • (bluefox) added console command repo [name]
  • (bluefox) try to extract the information from local sources-dist.json it online not reachable
  • (bluefox) added host remove
  • (bluefox) install non enabled adapters
  • (bluefox) install icons on backup too
  • (bluefox) fixed some sporadic errors

0.13.3 (2016-11-26)

  • (bluefox) support of getLocationOnDisk message for admin
  • (bluefox) allowed upgrade to specific version, like adapter@0.1.0
  • (bluefox) you can change any native parameter of instance with set
  • (bluefox) added support of syslog (see iobroker.json to enable)
  • (bluefox) added radar
  • (bluefox) do not change title of instance by upload and update

0.13.2 (2016-11-04)

  • (bluefox) fixed new installation

0.13.1 (2016-10-31)

  • (bluefox) fixed renaming of host by start
  • (bluefox) implemented auto-objects and auto-states for adapter
  • (bluefox) recursive deletion of folders with objects.unlink
  • (bluefox) support of tarballs as install path
  • (bluefox) rename rpi to rpi2, homekit to homekit2
  • (bluefox) added upnp
  • (bluefox) fixed fileName of log file
  • (bluefox) removed peerDependencies

0.13.0 (2016-10-21)

  • (bluefox) fixed letsencrypt to use fullchain.pem
  • (bluefox) fixed error with emitter
  • (bluefox) fixed formatDate for russian month
  • (bluefox) backup letsencrypt files too
  • (bluefox) install missing adapters one after other and not parallel.
  • (bluefox) let remove UUID to prepare images with ioBroker
  • (bluefox) using peerDependencies
  • (bluefox) rename host automatically if single host
  • (bluefox) added write/read properties to alive variable
  • (bluefox) fixed creation of package.json for npm 3
  • (bluefox) try catch for parse of states
  • (appolon77) added possibility to send messages with json
  • (bluefox) updates some packages
  • (bluefox) print node.js version at start
  • (bluefox) force logger to use local time
  • (appolon77) fixed multi instance messaging
  • (bluefox) using peerDependencies
  • (bluefox) rename host automatically if single host
  • (bluefox) updated artnet
  • (bluefox) added vis-canvas-gauges
  • (bluefox) added rflink
  • (bluefox) added foobar2000
  • (bluefox) added mqtt client
  • (bluefox) added lgtv
  • (bluefox) added pushsafer

0.12.2 (2016-09-04)

  • (bluefox) fixed read versions by multi-host
  • (bluefox) added owntracks
  • (bluefox) added amazon-dash
  • (bluefox) control enabled for instance over system.adapter.NAME.INSTANCE.alive variable

0.12.1 (2016-09-02)

  • (bluefox) fixed letsencrypt file

0.12.0 (2016-08-27)

  • (bluefox) working on objects in redis
  • (bluefox) added botvac adapter
  • (bluefox) better multi-host
  • (bluefox) fixed formatDate

0.11.3 (2016-08-24)

  • (PArns) fixed upgrade of adapters
  • (bluefox) updated _design/xyz by upgrade

0.11.2 (2016-08-13)

  • (bluefox) fixed upgrade of adapters

0.11.1 (2016-07-30)

  • (bluefox) fixed dependency if depend on js-controller

0.11.0 (2016-07-27)

  • (bluefox) implemented auto-restart of adapters (expert mode)
  • (bluefox) added rights check for getBinaryState/setBinaryState
  • (bluefox) support of default ttl for sessions
  • (bluefox) fixed custom setup
  • (bluefox) fixed upload binary files
  • (bluefox) fixed list of files in subdirectories

0.10.1 (2016-07-06)

  • (bluefox) support of chained certificates
  • (bluefox) added nut
  • (bluefox) added vis-map

0.10.0 (2016-07-01)

  • (bluefox) support of export and import
  • (bluefox) activate redis for states
  • (bluefox) fixed the installation of adapter with singletonHost
  • (bluefox) issue event if state deleted (redis)
  • (bluefox) fixed error with administrator users
  • (bluefox) do not store repository if with errors
  • (bluefox) fixed checkPassword and setPassword
  • (bluefox) updated wrong SSL certificates
  • (bluefox) added freemem state to host
  • (bluefox) added milliseconds to formatDate
  • (bluefox) updated tar.gz

  • (bluefox) added fhem

  • (bluefox) added netatmo
  • (bluefox) added tankerkoenig
  • (bluefox) added vis-history
  • (bluefox) added homepilot
  • (bluefox) added cloud

0.9.0 (2016-05-23)

  • (bluefox) made from seconds the ms
  • (bluefox) added console command "isrun"
  • (bluefox) added --timeout 5000
  • (bluefox) fixed small errors
  • (bluefox) changed function formatValue
  • (bluefox) fixed stop of scheduled adapters
  • (bluefox) added "--logs" flag for adapter start (required by adapter debugging)
  • (bluefox) made hostname configurable
  • (bluefox) fixed update of adapters and settings

0.8.10 (2016-04-25)

  • (bluefox) fixed restart script
  • (bluefox) updated default certificates

0.8.9 (2016-04-23)

  • (bluefox) do not handle exceptions in logger
  • (bluefox) changed logger
  • (bluefox) set valid mimeType for *.manifest
  • (bluefox) added noolite adapter
  • (bluefox) changed download script
  • (bluefox) changed rename script
  • (bluefox) added starline
  • (bluefox) changed repository building
  • (bluefox) added 'delete' objects
  • (bluefox) changed behavior by exceptions
  • (bluefox) workaround for DHCP delay
  • (bluefox) fixed passwd command
  • (bluefox) do not write error under Windows: "cannot delete log file"

0.8.8 (2016-02-29)

  • (bluefox) replace winston with the latest module
  • (bluefox) added syslog support
  • (bluefox) fixed some LINT warnings
  • (bluefox) added "host self" command (identical to "host this")
  • (bluefox) fixed error with npm 3 if no node_modules directory found
  • (bluefox) support of noCache flag
  • (bluefox) fixed error if _data.json file broken
  • (bluefox) support of file uploading: iobroker fileName /adapter/fileName

0.8.7 (2016-02-24)

  • (bluefox) fixed getForeignObjects
  • (bluefox) added telegram
  • (bluefox) enabled OEM naming
  • (bluefox) fixed small error if multi-host not available
  • (bluefox) added reinstall script
  • (bluefox) added vis-justgage adapter
  • (bluefox) added mysensors

0.8.6 (2016-02-04)

  • (bluefox) added text2command adapter
  • (bluefox) fixed upload problem
  • (bluefox) use node-schedule 1.0.0
  • (bluefox) extend node node_modules/iobroker.js-controller/lib/buildRepository.js command

0.8.5 (2016-02-01)

  • (bluefox) updated version of node-schedule to fix problem with Februar.2016
  • (bluefox) updated socket.io version
  • (bluefox) added logo image
  • (bluefox) added buildRepository.js
  • (bluefox) If desired, that adapter must be terminated
  • (bluefox) use isFloatComma in formatValue
  • (soef) formatDate extended and formatValue added
  • (soef) formatDate extended to use seconds as duration
  • (soef) formatValue added to convert a value to a string with a thousand separator....
  • (bluefox) added homekit and miele
  • (bluefox) fixed upload of files

0.8.4 (2016-01-22)

  • (bluefox) fixed version
  • (bluefox) fixed log outputs

0.8.3 (2016-01-21)

  • (bluefox) added commands like "npm start"
  • (bluefox) check singletonHost one on host
  • (bluefox) added memoryLimitMB for controller and adapters
  • (bluefox) made install from NON-git sources possible again.
  • (bluefox) added rpi, weatherunderground, chromecast, geofency, samsung, squeezebox, vcard, yamaha
  • (husky-koglhof) occ und rpi Adapter
  • (angelnu) visdebug - check for different adapter directories
  • (bluefox) enabled install of icons-open-icon-library-png

0.8.2 (2015-12-14)

  • (bluefox) fixed upgrade.

0.8.1 (2015-12-14)

  • (bluefox) fixed permissions for administrator group, but not admin user.
  • (bluefox) support of getHistory command and defaultHistory
  • (bluefox) implemented "iobroker restart adapter"
  • (bluefox) enabled write dependencies as an object
  • (bluefox) removed directory adapter and move example to iobroker.template
  • (bluefox) prepare support of syslog
  • (bluefox) added ioBroker.sql
  • (bluefox) added ioBroker.influxdb
  • (bluefox) removed example adapter (it is replaced with iobroker.template)
  • (bluefox) start of renaming of js-controller to enable branding

0.7.15 (2015-11-10)

  • (bluefox) added command visdebug
  • (bluefox) added flag preserveSettings
  • (bluefox) added vis-keyboard
  • (bluefox) fixed error with host rename
  • (bluefox) fixed sendTo and sendToHost with callback.
  • (bluefox) updated objects by upload of adapter (important for community adapters)
  • (bluefox) added vis-google-fonts
  • (bluefox) added support of quality in setState
  • (bluefox) added adapter mobile

0.7.14 (2015-10-13)

  • (bluefox) fixed restart under linux
  • (bluefox) added wolf adapter to repository
  • (smilingJack) increase timeout by update of repository
  • (bluefox) fixed set --ssl
  • (bluefox) added "connectTimeout" parameter to iobroker.json. Try to fix EADDRINUSE error under raspi.

0.7.13 (2015-09-30)

  • (bluefox) added vis-jqui-mfd
  • (bluefox) allowed to install direct from GitHub in admin
  • (bluefox) added vis-fancyswitch, vis-rgraph
  • (bluefox) fill state by createState even if no default value set
  • (bluefox) added modbus

0.7.12 (2015-09-15)

  • (bluefox) added terminal adapter
  • (bluefox) implemented "iobroker url xxx"
  • (bluefox) fixed restore
  • (bluefox) fixed _failCounter entry in Adapters
  • (bluefox) fixed log outputs

0.7.11 (2015-08-23)

  • (bluefox) fixed installation of adapter

0.7.10 (2015-08-22)

  • (bluefox) fixed first installation

0.7.9 (2015-08-20)

  • (bluefox) fixed broker upgrade
  • (bluefox) improve vis upload
  • (bluefox) fixed adapter.deleteChannel
  • (bluefox) use regex by deleting of channel or instance
  • (bluefox) fixed delete instance errors
  • (bluefox) added new console commands: set, host. To set settings of instance from console and change host name.

0.7.8 (2015-08-12)

  • (bluefox) fixed error with node-red
  • (bluefox) move setup files into directories

0.7.7 (2015-08-11)

  • (bluefox) added harmony to repository

0.7.6 (2015-08-06)

  • (bluefox) changed log file extension to .log
  • (bluefox) enabled destroyDB, but check before if ioBroker is running
  • (bluefox) updated packages
  • (bluefox) added bars, plumbs, scenes

0.7.5 (2015-07-27)

  • (bluefox) added iobroker upload all and iobroker start all commands
  • (bluefox) fixed iobroker package
  • (bluefox) made it possible to allow OBJECTS and STATES only on localhost
  • (bluefox) added new adapter pushbullet
  • (bluefox) fixed restart by installing.

0.7.4 (2015-07-19)

  • (bluefox) fixed restartAdapters flag. (for vis-metro and co)
  • (bluefox) added vis-hqWidgets
  • (bluefox) added vis-colorpicker
  • (bluefox) normalized paths in backup
  • (bluefox) added better backup

0.7.3 (2015-07-12)

  • (bluefox) added flot to repository
  • (bluefox) added chmodFile for adapter
  • (bluefox) implemented rm
  • (bluefox) fixed permissions problem
  • (bluefox) set permission by creation of file
  • (bluefox) made possible upload of subtree
  • (bluefox) fixed user name
  • (bluefox) fixed update function

0.7.2 (2015-06-29)

  • (bluefox) removed _failCounter from adapter list
  • (bluefox) updated license

0.7.1 (2015-06-28)

  • (bluefox) support of permissions
  • (bluefox) fixed backup
  • (bluefox) fixed error with noFileCache
  • (bluefox) added unsubscribeForeignObjects to adapters
  • (bluefox) added icon sets to repository
  • (bluefox) implemented list: objets, states, instances, adapters
  • (bluefox) support of "list hosts"
  • (bluefox) verified version by install and start
  • (bluefox) fixed error with dependencies
  • (bluefox) fixed delete of logs
  • (bluefox) fixed getPort function in adapter.

0.7.0 (2015-05-07)

  • (bluefox) support of permissions

0.6.6 (2015-05-07)

  • (bluefox) implemented daily rolling files.
  • (bluefox) fixed addChannelToEnum, deleteChannelFromEnum, deleteChannel if no device name
  • (bluefox) fixed "state set", "message" console commands
  • (bluefox) fixed errors in adapter.js

0.6.5 (2015-04-27)

  • (bluefox) added default certificates

0.6.4 (2015-04-17)

  • (bluefox) optimize install call
  • (bluefox) backup/restore

0.6.3 (2015-04-16)

  • (bluefox) use system npm for update and install
  • (bluefox) generate uuid as hash of MAC
  • (bluefox) delete empty adaptors from repository

0.6.0 (2015-03-22)

  • (bluefox) try to implement backup/restore
  • (bluefox) support of --install flag for sayIt
  • (bluefox) added megad to repository
  • (bluefox) enabled subscribeStates() same as subscribeStates('*')
  • (bluefox) replace "silent" mode with "install" mode

0.5.14 (2015-03-11)

  • (bluefox) enabled silent mode

0.5.14 (2015-03-08)

  • (bluefox) updated utils.js (silent mode)
  • (bluefox) fixed error by setup.js

0.5.12 (2015-03-07)

  • (bluefox) fixed error with sendTo('email')
  • (bluefox) increase timeout for npm to 5000 ms

0.5.11 (2015-02-26)

  • (bluefox) fixed function deleteDevice in adapter.js

0.5.10 (2015-02-26)

  • (bluefox) do not start more times the scheduled task after a long sleep

0.5.9 (2015-02-21)

  • (bluefox) fixed error with trimFifo (used for history adapter)
  • (bluefox) use system "npm" by updating of js-controller

0.5.8 (2015-02-18)

  • (bluefox) added start/stop/restart adapter from console.
  • (bluefox) better wakeup of adapters.

0.5.7 (2015-01-14)

  • (bluefox) added sayit adapter
  • (bluefox) fixed clear of log file

0.5.4 (2015-01-27)

  • (bluefox) fixed restart under Windows

0.5.5 (2015-01-30)

  • (bluefox) added yr as npm
  • (bluefox) extend adapter.js with formatDate

0.5.6 (2015-02-06)

  • (bluefox) added simple-api

0.5.3 (2015-01-27)

  • (bluefox) fixed log for restart

0.5.2 (2015-01-27)

  • (bluefox) removed node-windows from dependencies

0.5.1 (2015-01-26)

  • (bluefox) fixed log
  • (bluefox) show npm version and not git version
  • (bluefox) use npm packet to install and not the exec npm

0.5.0 (2015-01-23)

  • (bluefox) made it possible to install ioBroker with "npm install iobroker"

0.4.6 (2015-01-21)

  • (bluefox) added developing flag "noFileCache" to do not cache web files.
  • (bluefox) improve "adapter.getPort" on Windows.
  • (bluefox) create iobroker.sh with 0777 by install

0.4.5 (2015-01-20)

  • (bluefox) fixed problem with no objects after "setup" started

0.4.4 (2015-01-20)

  • (bluefox) move "data" directory by "npm install" to ../../iobroker-data

0.4.3 (2015-01-18)

  • (bluefox) restart objects socket if some exception occurs

0.4.2 (2015-01-14)

  • (bluefox) fixed error in objectsInMemClient and objectsInMemServer

0.4.1 (2015-01-10)

  • (bluefox) fixed first setup

0.4.0 (2015-01-10)

  • (bluefox) support of multiple hosts

0.3.17 (2015-01-10)

  • (bluefox) fixed problem with "hosts are not shown in admin"

0.3.16 (2015-01-09)

  • (bluefox) support of multiple hosts

0.3.15 (2015-01-09)

  • (bluefox) "chmod 777 * -R /opt/iobroker" => "chmod 777 -R /opt/iobroker"

0.3.14 (2015-01-09)

  • (bluefox) fixed error update of js-controller under linux/osx

0.3.13 (2015-01-08)

  • (bluefox) fixed error with publish/subscribe

0.3.12 (2015-01-07)

  • (bluefox) support of "onlyWWW" flag

0.3.11 (2015-01-06)

  • (bluefox) fixed error if state is null or undefined
  • (bluefox) store fifos from states in file

0.3.10 (2015-01-06)

  • (bluefox) support of file manager in vis

0.3.9 (2015-01-04)

  • (bluefox) try to fix update of controller

0.3.8 (2015-01-04)

  • (bluefox) fixed error with subscribes
  • (bluefox) fixed error with extendObject
  • (bluefox) fixed error with delete adapter
  • (bluefox) fixed error in deleteChannelFromEnum

0.3.7 (2015-01-03)

  • (bluefox) fixed upload problem

0.3.6 (2015-01-03)

  • (bluefox) fixed package.json

0.3.1 (2015-01-02)

  • (bluefox) enabled npm install

0.3.0 (2014-12-28)

  • (bluefox) no redis anymore

0.2.9 (2014-12-20)

  • (bluefox) fixed problem with restart controller
  • (bluefox) check flag supportStopInstance before send signal to adapter

0.2.8 (2014-12-20)

  • (bluefox) fixed problem with upgrade adapter

0.2.7 (2014-12-19)

  • (bluefox) fixed problem with upload adapter

0.2.6 (2014-12-19)

  • (bluefox) implemented getConfigKeys in redis.
  • (bluefox) new running mode: once

0.2.5 (2014-12-14)

  • (bluefox) enabled start of no-daemon adapters like rickshaw or vis.

0.2.4 (2014-12-10)

  • (bluefox) fixed delObject function
  • (bluefox) removed unused log message

0.2.3 (2014-12-08)

  • (bluefox) optimize start/stop/restart.

0.2.2 (2014-12-06)

  • (bluefox) fixed error in redis.

0.2.1 (2014-12-06)

  • (bluefox) fixed error in redis.

0.2.0 (2014-12-04)

  • (bluefox) removed couchDB and store everything in redis.

0.1.6 (2014-11-29)

  • (bluefox) use npm to install some adapters.

0.1.5 (2014-11-26)

  • (bluefox) fixed log in controller.js one more time

0.1.4 (2014-11-26)

  • (bluefox) fixed log in controller.js

0.1.3 (2014-11-24)

  • (bluefox) fixed some errors and add restart.js

0.1.2 (2014-11-24)

  • (bluefox) fixed messageboxes

0.1.1 (2014-11-23)

  • (bluefox) fixed log output in admin.

0.1.0 (2014-11-22)

  • (bluefox) new naming concept. No children and parents set extra.

0.0.37 (2014-11-16)

  • (bluefox) fixed adapter.js
  • (bluefox) call chmod +x iobroker after upgrade of controller

0.0.36 (2014-11-15)

  • (bluefox) fixed adapter.js

0.0.35 (2014-11-09)

  • (bluefox) added logging to controller

0.0.34 (2014-11-08)

  • (bluefox) create restore/backup (from console)

0.0.33 (2014-11-04)

  • (bluefox) support of node-red as adapter and defined exit codes for errors

0.0.32 (2014-11-04)

  • (bluefox) support of node-red as adapter

0.0.31 (2014-11-02)

  • (bluefox) fixed error with binary states

0.0.30 (2014-11-01)

  • (bluefox) fixed error in "support of listDevices for configuration"

0.0.29 (2014-10-30)

  • (bluefox) (bluefox) fixed creatChannel for adapter

0.0.28 (2014-10-30)

  • (bluefox) support of listDevices for configuration

0.0.27 (2014-10-30)

  • (bluefox) check common.os (e.g. to install adapter only on linux)
  • (bluefox) support of common.install adapter settings.

0.0.26 (2014-10-25)

  • (bluefox) changed state names to 'io.*'

0.0.25 (2014-10-24)

  • (bluefox) show version in log

0.0.24 (2014-10-22)

  • (bluefox) fixed dependencies of packets

0.0.22 (2014-10-20)

  • (bluefox) fixed error in adapter.js

0.0.21 (2014-10-19)

  • (bluefox) store repository in the DB

0.0.20 (2014-10-19)

  • (bluefox) changed example adapter for emitEvent
  • (bluefox) support of certificates
  • (bluefox) fixed names for states

0.0.19 (2014-10-02)

  • (bluefox) fixed add/delete adapter
  • (bluefox) fill source-dist.json with grunt
  • (bluefox) call "npm install" after adapter updated

0.0.18 (2014-09-27)

  • (bluefox) new concept of updates and repositories

0.0.17 (2014-09-04)

  • (hobbyquaker) trimFifo calls callback with trimmed data
  • (hobbyquaker) fixed instance restart

0.0.16 (2014-08-22)

  • (hobbyquaker) admin-ui: enums
  • (hobbyquaker) admin-ui: ...
  • (hobbyquaker) fixes

0.0.15 (2014-08-17)

  • (hobbyquaker) admin-ui: adapter-settings
  • (hobbyquaker) admin-ui: add instance
  • (hobbyquaker) admin-ui: cmd execution

0.0.14 (2014-08-11)

  • (bluefox) adapter admin: https
  • (bluefox) adapter admin: auth
  • (bluefox) admin-ui: user and group management
  • (hobbyquaker) fixes
  • (hobbyquaker) added adapter cul to sources-dist.json

0.0.13 (2014-07-31)

  • (hobbyquaker) new object types user and group
  • (hobbyquaker) iobroker setup: create user and group admin. Default password: iobroker

0.0.12

  • (hobbyquaker) setup.js fixes
  • (hobbyquaker) setup.js create multiple system objects

0.0.11

  • (hobbyquaker) admin ui: instances

0.0.10

  • (hobbyquaker) refactoring controller.js and setup.js
  • (hobbyquaker) iobroker.js command line options
  • (hobbyquaker) iobroker with shebang (needs chmod +x)
  • (hobbyquaker) added dbdump.js
  • (hobbyquaker) fixes and other stuff...

0.0.9

  • (hobbyquaker) Javascript Script Engine
  • (bluefox) Gruntfile.js
  • (bluefox) SCHEMA.md

0.0.8

  • (hobbyquaker) ctrl: instance mode schedule
  • (hobbyquaker) iobroker.js add: set instanceObjects (new attribute in io-package.json)
  • (hobbyquaker) added meta attribute to sources.json
  • (hobbyquaker) added adapter yr to sources.json

0.0.7

  • (hobbyquaker) fixed Admin UI - handle IDs with spaces

0.0.6

  • (hobbyquaker) download adapters via iobroker.js add <adapter-name> (has to be defined in conf/sources.json)
  • (hobbyquaker) automatically install node dependencies on iobroker.js add
  • (hobbyquaker) restructuring
  • (hobbyquaker) history adapter
  • (hobbyquaker) renamed adapter web to admin (this adapters purpose is to do only the admin-ui)
  • (hobbyquaker) renamed adapter legacy to web (this adapter should provide a ccu.io-like webserver for easy porting of dashui, scriptgui, yahui, ...)
  • (hobbyquaker) renamed adapter dummy to example

0.0.5

  • (hobbyquaker) hm-rpc Adapter checks Datapoint-Type and warns if readonly
  • (hobbyquaker) Admin-UI - gridStates update on stateChange

0.0.4

  • (hobbyquaker) hm-rega Adapter
  • (hobbyquaker) ctrl restarts crashed adapters automatically

0.0.3

  • (hobbyquaker) Adapter web
  • (hobbyquaker) Admin UI

0.0.2

  • (hobbyquaker) Installation/instancing of adapters via iobroker.js add
  • (hobbyquaker) Adapter command line param instead of IPC
  • (hobbyquaker) Config-file iobroker.json

0.0.1

  • (hobbyquaker) first release