Hello
I have many scripts MQTT and ESP qui old MQTT protocol with example:
{"command": "switchlight", "idx": 701, "switchcmd": "On" }
My idx is a swith and name is Portilon:
I have tested with prefix "domoticz"
mosquitto_pub -h 127.0.0.1 -p 1883 -t "domoticz/switch/Portillon/set" -m ON
any message is received, any error
i have read the wiki https://www.domoticz.com/wiki/MQTT https://www.domoticz.com/wiki/Zigbee2MQ ... todiscover https://www.home-assistant.io/integrati ... -discovery
help for convert MQTT message to MQTT discovery
Moderator: leecollings
- waltervl
- Posts: 5902
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: help for convert MQTT message to MQTT discovery
Why change to AutoDiscover, these old messages are Domoticz native so are all fine.
Autodiscover is build on the principle you send first a config message so Domoticz will create a device end then send a state messsage to update the device. I would just keep using these messages.
But perhaps the firmware on the ESP is already Autodiscover compatible, just switch it on.
Firmwares that support Autodiscover:
ESPHome, ecowitt2mqtt, EsPurna, IOTLink, MiFlora MQTT Daemon, OpenMQTTGateway, Teleinfo MQTT, Wyzesense2MQTT, Arduino HAMqttDevice
Autodiscover is build on the principle you send first a config message so Domoticz will create a device end then send a state messsage to update the device. I would just keep using these messages.
But perhaps the firmware on the ESP is already Autodiscover compatible, just switch it on.
Firmwares that support Autodiscover:
ESPHome, ecowitt2mqtt, EsPurna, IOTLink, MiFlora MQTT Daemon, OpenMQTTGateway, Teleinfo MQTT, Wyzesense2MQTT, Arduino HAMqttDevice
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Who is online
Users browsing this forum: No registered users and 1 guest