Domoticz Automatic discovery - RTurala/Sonoff-Tasmota GitHub Wiki
Sonoff supports automatic discovery by Domoticz through the Domoticz MQTT Discovery plugin.
The following services should be made available:
- You have installed/access to a MQTT broker server and made contact with your sonoff
- You have installed Domoticz
- You have installed the Domoticz MQTT Discovery plugin
Configure Domoticz MQTT Discovery plugin.
- On the hardware page add Type
MQTT Discovery
- Give it a name, e.g.
Sonoff
- Configure the interface with access to your MQTT server (
MQTT Server Address
,Port
,Username
andPassword
) - Set the
Discovery topic
tohomeassistant
unless it has been changed in a custom Sonoff-Tasmota build - Set the
Ignored device topic
totasmota/sonoff/
to avoid unconfigured Sonoff-Tasmota devices from being discoved
- Give it a name, e.g.
- Each Sonoff-Tasmota device must have it's own topic, the easiest way is to set topic to
sonoff_%06X
(%06X will be replaced by MAC address). See point 5 here for how to set the topic. - Use MQTT or Serial or Web console and execute commands (replace
<sonoff_MAC>
with the device's unique topic)-
cmnd/<sonoff_MAC>/SetOption19
with payload1
to enable MQTT discovery
-
- The above settings can be defined in user_config_override.h (TBD)
That's it! You will now find your Sonoff in the Domoticz user interface.
- On the Switches page scroll down and find your Switch as configured in step 1
- Toggle the light bulb; Sonoff should respond