{"id":16397336,"url":"https://github.com/foxriver76/iobroker.notification-manager","last_synced_at":"2025-03-16T16:31:33.146Z","repository":{"id":163232392,"uuid":"637470879","full_name":"foxriver76/ioBroker.notification-manager","owner":"foxriver76","description":"This adapter allows management of the ioBroker notification system.","archived":false,"fork":false,"pushed_at":"2024-10-10T07:44:24.000Z","size":11797,"stargazers_count":7,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T11:39:39.957Z","etag":null,"topics":["iobroker","messaging","notifications","smart-home"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/foxriver76.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-07T16:50:08.000Z","updated_at":"2024-10-10T07:44:26.000Z","dependencies_parsed_at":"2023-12-08T11:27:07.378Z","dependency_job_id":"46757ee9-bcf3-4452-915b-d3450d98477f","html_url":"https://github.com/foxriver76/ioBroker.notification-manager","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxriver76%2FioBroker.notification-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxriver76%2FioBroker.notification-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxriver76%2FioBroker.notification-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foxriver76%2FioBroker.notification-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foxriver76","download_url":"https://codeload.github.com/foxriver76/ioBroker.notification-manager/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243822293,"owners_count":20353499,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["iobroker","messaging","notifications","smart-home"],"created_at":"2024-10-11T05:09:51.787Z","updated_at":"2025-03-16T16:31:31.476Z","avatar_url":"https://github.com/foxriver76.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Logo](admin/notification-manager.png)\n# ioBroker.notification-manager\n\n[![NPM version](https://img.shields.io/npm/v/iobroker.notification-manager.svg)](https://www.npmjs.com/package/iobroker.notification-manager)\n[![Downloads](https://img.shields.io/npm/dm/iobroker.notification-manager.svg)](https://www.npmjs.com/package/iobroker.notification-manager)\n![Number of Installations](https://iobroker.live/badges/notification-manager-installed.svg)\n![Current version in stable repository](https://iobroker.live/badges/notification-manager-stable.svg)\n\n[![NPM](https://nodei.co/npm/iobroker.notification-manager.png?downloads=true)](https://nodei.co/npm/iobroker.notification-manager/)\n\n**Tests:** ![Test and Release](https://github.com/foxriver76/ioBroker.notification-manager/workflows/Test%20and%20Release/badge.svg)\n\n## notification-manager adapter for ioBroker\nManage ioBroker notifications, e.g. by sending them as messages\n\n### General description\nThis adapter allows to redirect the ioBroker internal `Notifications` to messenger adapters which support \nthe `Notification System`. If you are missing an adapter, please open a ticket on the corresponding adapter.\n\n### Configuration\nFor each `category` you are able to configure if the `category` should be active. If the category is not active,\nthe `notification-manager` will not handle anything for this specific `category`. \n\nAdditionally, you can configure \nif the `notification-manager` should suppress certain `categories`. If a `notification` for a suppressed \n`category` is registered, the adapter will immediately clear this `notification` without sending you any messages.\n\nFinally, you can configure supported messaging adapters. Whenever a new `notification` for an `active` (and `non-suppressed`) \n`category` is generated, the adapter will send the `notification` via the first configured adapter. If sending the message was\nsuccessful, the `notification-manager` will clear the `notification`. IF sending was not successful it will re-try with the second adapter.\n\nWhenever a category is `active` but has not configured any specific settings yet, then the adapter will use the configured \nfallback settings. New categories are always `active` by default to ensure you will be notified. This means whenever a new `category`\nis implemented by some adapter, the fallback settings for the given `severity` will be applied.\n\nYou can further define to just `suppress` a category. The `notification-manager` will then simply acknowledge the notification, so that is \ndoes not appear in your system. \n\nSince js-controller version 7, adapters have the possibility to add additional `contextData` to notifications. This is for example used\nto display specific actions for the user in the Admin GUI. By default, the `notification-manager` will send you these notifications and will \n__NOT__ delete them, so that these stay present for later user interactions. However, if you decide that you don't need such interactions\nfort certain `category` you can disable them via the checkbox.\n\n### Registering user-centric notifications\nAs a user you at best know, when you want to be notified about specific situations in your system. \nThus, the `notification-manager` provides you with an interface to register your own notifications inside\nthe ioBroker notification system. Three categories are supported, one for each severity level `notify`, `info` and `alert`.\n\nThe notifications can be registered via `sendTo` \n\n```ts\n(async () =\u003e {\n    try {\n        await sendToAsync('notification-manager.0', 'registerUserNotification', { category: 'notify', message: 'Your delivery has arrived' });\n    } catch (e) {\n        log(`Could not register notification: ${e}`, 'error');\n    }\n})();\n```\n\n### Requirements for messaging adapters\nPlease set the `common.supportedMessages.notifications` flag to `true` in your `io-package.json`.\n\nWhenever a new notification should be delivered via the messaging adapter, `notification-manager` will send a message\nto the configured instance. \n\nThe messages consist of the command `sendNotification` and a message with the following structure: \n\n```json\n{\n  \"host\": \"system.host.moritz-ThinkPad-P16-Gen-1\",\n  \"scope\": {\n    \"name\": \"System-Benachrichtigungen\",\n    \"description\": \"Diese Benachrichtigungen werden vom ioBroker-System erfasst und weisen auf Probleme hin, die überprüft und behoben werden sollten.\"\n  },\n  \"category\": {\n    \"instances\": {\n      \"system.adapter.backitup.0\": {\n        \"messages\": [\n          {\n            \"message\": \"Restart loop detected\",\n            \"ts\": 1684074961226\n          }\n        ]\n      },\n      \"system.adapter.notification-manager.0\": {\n        \"messages\": [\n          {\n            \"message\": \"Restart loop detected\",\n            \"ts\": 1684075183094\n          }\n        ]\n      }\n    },\n    \"description\": \"Eine Adapterinstanz stürzt beim Start häufig ab und wurde aus diesem Grund gestoppt. Die Protokolldatei muss vor dem Neustart der Instanz überprüft werden.\",\n    \"name\": \"Probleme mit häufig abstürzenden Adapterinstanzen\",\n    \"severity\": \"alert\"\n  }\n}\n```\n\nWhere `category.instances` shows the affected adapter instances for this notification. \nAdditionally, the category has an i18n description and an i18n name. \nThe same properties exist for the scope of the category. Additionally, the affected host is included.\n\nAfter sending the notification, the `notification-manager` expects an answer with the property `{ sent: true }` \nif the messaging adapter was able to deliver the notification, else it should respond with `{ sent: false }`.\n\n## Changelog\n\u003c!--\n    Placeholder for the next version (at the beginning of the line):\n    ### **WORK IN PROGRESS**\n--\u003e\n### 1.3.0 (2024-10-10)\n* (@foxriver76) by default we do not delete notifications with `contextData`\n* (@foxriver76) added checkbox to also delete notifications with `contextData` for specific categories\n\n### 1.2.1 (2024-08-29)\n* (@foxriver76) fixed issue if host name contains `.`\n\n### 1.2.0 (2024-08-05)\n* (@klein0r) Added Blockly blocks\n\n### 1.1.2 (2024-05-02)\n* (foxriver76) made logging a bit more silent\n\n### 1.1.1 (2024-03-16)\n* (foxriver76) added possibility to suppress messages\n* (foxriver76) fixed issue that bottom of settings page is shown behind toolbar\n* (foxriver76) fixed issue that all notifications are cleared instead of only the handled one\n\n### 1.0.0 (2023-12-08)\n* (foxriver76) added possibility to send custom messages\n* (foxriver76) added UI indicators for each category\n\n### 0.1.2 (2023-10-11)\n* (foxriver76) also show notifications provided by adapters in the configuration\n\n### 0.1.1 (2023-07-04)\n* (foxriver76) added possibility to send test messages from web interface (closes #1)\n\n### 0.1.0 (2023-06-02)\n* (foxriver76) initial release\n\n## License\nMIT License\n\nCopyright (c) 2024 foxriver76 \u003cmoritz.heusinger@gmail.com\u003e\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\nIcon made by \"Good Ware\" from www.flaticon.com","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxriver76%2Fiobroker.notification-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoxriver76%2Fiobroker.notification-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoxriver76%2Fiobroker.notification-manager/lists"}