Skip to content

Commit

Permalink
[chore]: Readme update (#2927)
Browse files Browse the repository at this point in the history
* clarify notification and compatibility of controller v7

* revert one line

* fix

* clarify a bit more about adapter structure
  • Loading branch information
foxriver76 authored Sep 28, 2024
1 parent efb6ace commit 594eda1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ The ioBroker.js-controller is the heart of any ioBroker installation. The contro
- [License](#license)

## 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
Expand Down Expand Up @@ -517,9 +518,10 @@ This method takes the following parameters:
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.

As a best practice the top-level of `contextData` should not be populated with individual data belonging to instances. Use a `key` specific to the adapter or if a feature is supported by all adapters of a type, the type (e.g. `messaging`) is also fine.
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!
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.
Expand Down

0 comments on commit 594eda1

Please sign in to comment.