Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/iobroker-community-adapters/iobroker.mqtt-client
Publish and subscribe ioBroker states to MQTT Brokers
https://github.com/iobroker-community-adapters/iobroker.mqtt-client
home-automation iobroker mqtt smarthome
Last synced: 3 months ago
JSON representation
Publish and subscribe ioBroker states to MQTT Brokers
- Host: GitHub
- URL: https://github.com/iobroker-community-adapters/iobroker.mqtt-client
- Owner: iobroker-community-adapters
- License: mit
- Created: 2016-06-09T12:50:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-10-01T15:28:21.000Z (3 months ago)
- Last Synced: 2024-10-11T05:03:23.360Z (3 months ago)
- Topics: home-automation, iobroker, mqtt, smarthome
- Language: JavaScript
- Homepage:
- Size: 2.48 MB
- Stars: 10
- Watchers: 5
- Forks: 10
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![Logo](admin/mqtt-client.png)
# ioBroker.mqtt-client
[![NPM version](https://img.shields.io/npm/v/iobroker.mqtt-client?style=flat-square)](https://www.npmjs.com/package/iobroker.mqtt-client)
[![Downloads](https://img.shields.io/npm/dm/iobroker.mqtt-client?label=npm%20downloads&style=flat-square)](https://www.npmjs.com/package/iobroker.mqtt-client)
![node-lts](https://img.shields.io/node/v-lts/iobroker.mqtt-client?style=flat-square)
![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/npm/iobroker.mqtt-client?label=npm%20dependencies&style=flat-square)![GitHub](https://img.shields.io/github/license/iobroker-community-adapters/iobroker.mqtt-client?style=flat-square)
![GitHub repo size](https://img.shields.io/github/repo-size/iobroker-community-adapters/iobroker.mqtt-client?logo=github&style=flat-square)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/iobroker-community-adapters/iobroker.mqtt-client?logo=github&style=flat-square)
![GitHub last commit](https://img.shields.io/github/last-commit/iobroker-community-adapters/iobroker.mqtt-client?logo=github&style=flat-square)
![GitHub issues](https://img.shields.io/github/issues/iobroker-community-adapters/iobroker.mqtt-client?logo=github&style=flat-square)
![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/iobroker-community-adapters/iobroker.mqtt-client/test-and-release.yml?branch=master&logo=github&style=flat-square)## Versions
![Beta](https://img.shields.io/npm/v/iobroker.mqtt-client.svg?color=red&label=beta)
![Stable](http://iobroker.live/badges/mqtt-client-stable.svg)
![Installed](http://iobroker.live/badges/mqtt-client-installed.svg)Publish and subscribe ioBroker states to MQTT Brokers
## Sentry
**This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.**
For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.## Adapter Settings
![Adapter](img/settings.png)### on connect topic and message
The ```on connect message``` is published to the ```on connect topic``` every time the client connects or reconnects to the server.### on disconnect topic and message
The ```on disconnect message``` is published to the ```on disconnect topic``` when the adapter stops gracefully.### last will topic and message
The ```last will message``` is published to the ```last will topic``` every time the client connects or reconnects to the server.
The Server will store this message and send it to its subscribers when the client disconnects unexpectedly.### subscriptions
Comma separated list of topics that are not covered by existing states.
Received messages are converted to states within the adapter's namespace (e.g. mqtt.0) and subscribed.
You can remove topics after all states have been created.### publish prefix
When publishing this will be prepended to all topics.
Default is empty (no prefix).### subscribe prefix
When subscribing this will be prepended to all topics.
Default is empty (no prefix).## State Settings
![State](img/dialog.png)### enabled
Enables or disables the mqtt-client functionality for this state.
Disabling will delete any mqtt-client settings from this state.### topic
The topic this state is published to and subscribed from.
default: state-ID converted to a mqtt topic.### publish
* ```enable``` state will be published
* ```changes only``` state will only be published when its value changes
* ```as object``` whole state will be published as object
* ```qos``` see
* ```retain``` see### subscribe
* ```enable``` topic will be subscribed and state will be updated accordingly
* ```changes only``` state will only be written when the value changed
* ```as object``` messages will be interpreted as objects
* ```qos``` see
* ```ack``` on state updates the ack flag will be set accordingly#### Note
* when ack is set to true it will overwrite objects ack, see ```as object```
* to prevent message loops, if both publish and subscribe are enabled ```changes only``` is always on for subscribe## Changelog
### 2.0.1 (2024-09-23)
* (@klein0r) Added missing information in configuration dialog
* (@klein0r) Fixed type of port configuration to avoid conflicts### 2.0.0 (2024-06-21)
* (klein0r) Password is now encrypted - you have to re-renter your password in instance settings!
* (klein0r) Use jsonConfig instead of materialize (for instance settings)### 1.8.0 (2024-04-07)
* (mcm1957) Adapter requires node.js 18 and js-controller >= 5 now
* (mcm1957) Dependencies have been updated### 1.7.0 (2023-10-30)
* (mcm1957) Dependencies have been updated
* (mcm1957) Adapter requires nodejs 16 now### 1.6.5 (2023-09-28)
* (foxriver76) prevent crash cases on invalid subscribe### 1.6.4 (2023-07-26)
* (DutchmanNL) Option to allow self-signed certificates in adapter settings added.### 1.6.3 (2022-06-16)
* (Apollon77) Prevent potential crash cases reported by Sentry### 1.6.2 (2022-04-02)
* (Apollon77) Prevent potential crash cases reported by Sentry### 1.6.1 (2022-02-24)
* (Pmant) fix subscriptions
* (Pmant) fix unsubscribing
* (Pmant) use prefix for LWT topic### 1.6.0 (2022-02-19)
* (Pmant) add option to select protocol version
* (Pmant) add websocket support
* (Pmant) publish values once on enabling publishing
* (Pmant) Upgrade to MQTT version 4 (resolves many connection issues)
* (Pmant) fix LWT documentation
* (Pmant) optionally publish a message when disconnecting gracefully### 1.5.0 (2022-01-26)
* IMPORTANT: This adapter now required at least js-controller 3.3.x
* (Apollon77) Fix crash cases### 1.4.1 (2022-01-26)
* (bluefox) js-controller 3.3 optimizations### 1.4.0 (2021-07-16)
* IMPORTANT: This adapter now required at least js-controller 2.0.0
* (Apollon77) js-controller 3.3 optimizations
* (AlCalzone) Unpublished expired states
* (AlCalzone) Only handle stat values if state exists### 1.3.2 (2021-04-19)
* (bluefox) Added support of admin5### 1.3.1 (2020-03-17)
* (bluefox) mqtt package moved back to 2.x### 1.3.0 (2020-03-11)
* (bluefox) mqtt package was updated
* (bluefox) Fixed the error with "custom" view### 1.2.1 (2019-10-17)
* (algar42) Fix adapter restarting
* (algar42) Fix mqtt issues### 1.2.0 (2019-10-14)
* (bluefox) Support of js-controller 2.0 was added### 1.1.1 (2018-01-30)
* (bluefox) small fixes### 1.1.0 (2017-12-30)
* (bluefox) Translations
* (bluefox) Update of MQTT module### 1.0.1 (2017-11-16)
### 1.0.0 (2017-11-16)
* (bluefox) Update io-package.json### 0.3.2 (2016-11-18)
* (Pmant) fix initial object parsing
* (Pmant) fix objects view### 0.3.1 (2016-11-16)
* (Pmant) fix crash### 0.3.0 (2016-09-08)
* (Pmant) add optional publish and subscribe prefixes### 0.2.5 (2016-09-08)
* (Pmant) reduce logging -> debug### 0.2.0 (2016-09-08)
* (Pmant) use new custom settings### 0.1.1 (2016-06-09)
* (Pmant) fix possible loop### 0.1.0 (2016-06-08)
* (Pmant) initial commit## License
The MIT License (MIT)Copyright (c) 2024, iobroker-community-adapters
Copyright (c) 2016-2023 PmantPermission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.