Created Domoticz - Automatic discovery (markdown)

emontnemery 2018-08-05 21:48:23 +02:00
parent b52bf4d69b
commit c778348186
1 changed files with 32 additions and 0 deletions

@ -0,0 +1,32 @@
Sonoff supports automatic discovery by [Domoticz](http://www.domoticz.com/) through the [Domoticz MQTT Discovery plugin](https://github.com/emontnemery/domoticz_mqtt_discovery).
## Prerequisites
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
### Domoticz MQTT Discovery plugin
Configure Domoticz MQTT Discovery plugin.
- On the hardware page add Type ```MQTT Discovery```
1. Give it a name, e.g. ```Sonoff```
2. Configure the interface with access to your MQTT server (```MQTT Server Address```, ```Port```, ```Username``` and ```Password```)
3. Set the ```Discovery topic``` to ```homeassistant``` unless it has been changed in a custom Sonoff-Tasmota build
4. Set the ```Ignored device topic``` to ```tasmota/sonoff/``` to avoid unconfigured Sonoff-Tasmota devices from being discoved
## Sonoff-Tasmota (official binary)
- 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](Initital-Configuration) 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)
1. ```cmnd/<sonoff_MAC>/SetOpttion19``` with payload ```1``` to enable MQTT discovery
## Sonoff-Tasmota (custom binary)
- The above settings can be defined in user_config_override.h (TBD)
## Usage
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