From d46367dfd04d99b2aefa6a54ae72cf021ba949a6 Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Tue, 8 Feb 2022 01:03:41 +1000 Subject: [PATCH] [mqtt] Remove references to the System Broker (#12233) Signed-off-by: Jimmy Tanagra --- .../main/resources/OH-INF/thing/thing-types.xml | 6 ------ .../org.openhab.binding.mqtt.generic/README.md | 15 ++++++++------- .../main/resources/OH-INF/thing/generic-thing.xml | 1 - .../OH-INF/thing/homeassistant-thing.xml | 1 - .../main/resources/OH-INF/thing/homie-thing.xml | 1 - 5 files changed, 8 insertions(+), 16 deletions(-) diff --git a/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/resources/OH-INF/thing/thing-types.xml b/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/resources/OH-INF/thing/thing-types.xml index 23ecf3a2e77..14fd4892b87 100644 --- a/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/resources/OH-INF/thing/thing-types.xml +++ b/bundles/org.openhab.binding.mqtt.espmilighthub/src/main/resources/OH-INF/thing/thing-types.xml @@ -7,7 +7,6 @@ - Led globe with full Colour, and both cool and warm whites. @@ -26,7 +25,6 @@ - Use this when your remote is the newer 8 group type called FUT089 and your globes are rgb_cct @@ -45,7 +43,6 @@ - Use this when your remote is the newer fut091 and your globes are cct @@ -61,7 +58,6 @@ - Led globe with both cool and warm white controls @@ -77,7 +73,6 @@ - RGB Globe with a fixed white @@ -95,7 +90,6 @@ - RGB Globe with no white diff --git a/bundles/org.openhab.binding.mqtt.generic/README.md b/bundles/org.openhab.binding.mqtt.generic/README.md index 359f934a97a..f010c8b146a 100644 --- a/bundles/org.openhab.binding.mqtt.generic/README.md +++ b/bundles/org.openhab.binding.mqtt.generic/README.md @@ -212,15 +212,16 @@ This binding includes a rule action, which allows one to publish MQTT messages f There is a separate instance for each MQTT broker (i.e. bridge), which can be retrieved through ``` -val mqttActions = getActions("mqtt","mqtt:systemBroker:embedded-mqtt-broker") +val mqttActions = getActions("mqtt","mqtt:broker:myBroker") ``` -where the first parameter always has to be `mqtt` and the second (`mqtt:systemBroker:embedded-mqtt-broker`) is the Thing UID of the broker that should be used. +where the first parameter always has to be `mqtt` and the second (`mqtt:broker:myBroker`) is the Thing UID of the broker that should be used. Once this action instance is retrieved, you can invoke the `publishMQTT(String topic, String value, Boolean retained)` method on it: ``` mqttActions.publishMQTT("mytopic","myvalue", true) ``` + Alternatively, `publishMQTT(String topic, byte[] value, Boolean retained)` can publish a byte array data. The retained argument is optional and if not supplied defaults to `false`. @@ -231,8 +232,8 @@ The retained argument is optional and if not supplied defaults to `false`. ``` mqtt:broker:mySecureBroker [ host="192.168.0.41", secure=true, certificatepin=true, publickeypin=true ] -mqtt:broker:myUnsecureBroker [ host="192.168.0.42", secure=false ] -mqtt:broker:myAuthentificatedBroker [ host="192.168.0.43",secure=true, username="user", password="password" ] +mqtt:broker:myInsecureBroker [ host="192.168.0.42", secure=false ] +mqtt:broker:myAuthenticatedBroker [ host="192.168.0.43",secure=true, username="user", password="password" ] mqtt:broker:pinToPublicKey [ host="192.168.0.44", secure=true , publickeypin=true, publickey="SHA-256:9a6f30e67ae9723579da2575c35daf7da3b370b04ac0bde031f5e1f5e4617eb8" ] ``` @@ -248,9 +249,9 @@ Files can also be used to create topic things and channels and to combine them w *mqtt.things* file: ``` -Bridge mqtt:broker:myUnsecureBroker [ host="192.168.0.42", secure=false ] +Bridge mqtt:broker:myInsecureBroker [ host="192.168.0.42", secure=false ] -Thing mqtt:topic:mything "mything" (mqtt:broker:myUnsecureBroker) { +Thing mqtt:topic:mything "mything" (mqtt:broker:myInsecureBroker) { Channels: Type switch : lamp "Kitchen Lamp" [ stateTopic="lamp/enabled", commandTopic="lamp/enabled/set" ] Type switch : fancylamp "Fancy Lamp" [ stateTopic="fancy/lamp/state", commandTopic="fancy/lamp/command", on="i-am-on", off="i-am-off" ] @@ -263,7 +264,7 @@ Thing mqtt:topic:mything "mything" (mqtt:broker:myUnsecureBroker) { If the availability status is available, it can be configured to set the Thing status: ``` -Thing mqtt:topic:bedroom1-switch (mqtt:broker:myUnsecureBroker) [ availabilityTopic="tele/bedroom1-switch/LWT", payloadAvailable="Online", payloadNotAvailable="Offline" ] { +Thing mqtt:topic:bedroom1-switch (mqtt:broker:myInsecureBroker) [ availabilityTopic="tele/bedroom1-switch/LWT", payloadAvailable="Online", payloadNotAvailable="Offline" ] { Channels: Type switch : power [ stateTopic="stat/bedroom1-switch/RESULT", transformationPattern="REGEX:(.*POWER.*)∩JSONPATH:$.POWER", commandTopic="cmnd/bedroom1-switch/POWER" ] } diff --git a/bundles/org.openhab.binding.mqtt.generic/src/main/resources/OH-INF/thing/generic-thing.xml b/bundles/org.openhab.binding.mqtt.generic/src/main/resources/OH-INF/thing/generic-thing.xml index 3b5c731b506..e1bc5037c3c 100644 --- a/bundles/org.openhab.binding.mqtt.generic/src/main/resources/OH-INF/thing/generic-thing.xml +++ b/bundles/org.openhab.binding.mqtt.generic/src/main/resources/OH-INF/thing/generic-thing.xml @@ -8,7 +8,6 @@ extensible="string,number,dimmer,switch,contact,colorRGB,colorHSB,color,datetime,image,location,rollershutter,trigger"> - You need a configured Broker first. Dynamically add channels of various types to this Thing. Link diff --git a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/resources/OH-INF/thing/homeassistant-thing.xml b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/resources/OH-INF/thing/homeassistant-thing.xml index 57331f1783d..51e9957a01d 100644 --- a/bundles/org.openhab.binding.mqtt.homeassistant/src/main/resources/OH-INF/thing/homeassistant-thing.xml +++ b/bundles/org.openhab.binding.mqtt.homeassistant/src/main/resources/OH-INF/thing/homeassistant-thing.xml @@ -7,7 +7,6 @@ - You need a configured Broker first. This Thing represents a device, that follows the "HomeAssistant MQTT diff --git a/bundles/org.openhab.binding.mqtt.homie/src/main/resources/OH-INF/thing/homie-thing.xml b/bundles/org.openhab.binding.mqtt.homie/src/main/resources/OH-INF/thing/homie-thing.xml index b3d7fe26e5d..31d852bb5e6 100644 --- a/bundles/org.openhab.binding.mqtt.homie/src/main/resources/OH-INF/thing/homie-thing.xml +++ b/bundles/org.openhab.binding.mqtt.homie/src/main/resources/OH-INF/thing/homie-thing.xml @@ -7,7 +7,6 @@ - You need a configured Broker first. This thing represents a device, that follows the "MQTT Homie