[DISC] Removal of openHAB specific MQTT discovery patch (#2153)

Removal of openHAB specific MQTT discovery patch "ohdisc", as it is no longer required with openHAB 4.3 and later, and with openHAB before 4.3 MQTT discovery never was fully implemented anyway.
This commit is contained in:
DigiH authored and GitHub committed 2025-01-25 14:14:22 -06:00
1 parent d837dfd32a
commit 4bf43f5695
7 files changed
+7 -66

No files matched your search

-7
View File
@@ -76,13 +76,6 @@ Or use another upload method from the Upload section that requires credentials b
You should see the gateway connected to your broker by checking with an MQTT client like MQTT Explorer.
To make the auto discovery compatible with OpenHAB you have to send the following command with a retain flag.
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdisc":true}'`
You can also activate OpenHAB auto discovery by adding the gateway as a Thing, Model, and switching the button to ON. The name of the channel to add is "SYS: OpenHAB discovery".
Once activated restart OpenMQTTGateway.
## Adding the things
1. From the Administration click on "Things" under "Settings", you should see a number in the INBOX button
-12
View File
@@ -35,18 +35,6 @@ If you want the settings to be kept upon gateway restart, you can save the state
Auto discovery is enabled by default on release binaries and platformio.
:::
## AutoDiscovery compatible with OpenHAB (default: false)
OpenHAB does not support the key `is_defined` in the json template, to remove it at runtime and make the auto discovery compatible you can use the following command with a retain flag.
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdisc":true}'`
If you want the settings to be kept upon gateway restart, you can save the state by adding `"save":true` (ESP32 only).
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"ohdisc":true, "save":true}'`
::: tip
This command can also be used with other controllers that does not support the is_defined key.
:::
## Activate Offline mode
`mosquitto_pub -t "home/OpenMQTTGateway/commands/MQTTtoSYS/config" -m '{"offline":true,"save":true}'`