-
Notifications
You must be signed in to change notification settings - Fork 197
Domoticz
kenmercer edited this page Jun 4, 2018
·
9 revisions
This page is now out of date. Refer to [this page](https://github.com/arendst/Sonoff-Tasmota/wiki/Domoticz) instead.
Sonoff supports Domoticz MQTT 'out of the box'. Find below the procedure to start using it.
The following servers should be made available:
- You have installed/access to a MQTT server and made contact with your sonoff
- You have installed Domoticz
Configure MQTT and Virtual Sensor hardware
- On the hardware page add Type
MQTT Client Gateway with LAN interface
- Give it a name
- Configure the interface with access to your MQTT server (
Remote Address
,Port
,Username
andPassword
) - Set the
Publish Topic
to flat (which seems to relate toout
in the select field)
- On the hardware page add Type
Dummy (used for virtual switches)
- Give it a name
- Make a new virtual switch to be used with Sonoff by clicking
Create Virtual Sensors
- Give it a name
- Select
Sensor Type Switch
- On the Devices page find the new switch by it's name
- Remember it's Idx number
- Make updates to the Domoticz section of
user_config.h
but remember that these changes are only propagated if you also change the CFG_HOLDER define. This is NOT my preferred way of configuring.- Set
DOMOTICZ_IN_TOPIC
todomoticz/in
as hardcoded in Domoticz - Set
DOMOTICZ_OUT_TOPIC
todomoticz/out
as hardcoded in Domoticz - Configure
DOMOTICZ_RELAY_IDX1
to the value read in step 4.1
- Set
- Use the webinterface and select
Configuration - Configure Domoticz
- Set
In topic
todomoticz/in
as hardcoded in Domoticz - Set
Out topic
todomoticz/out
as hardcoded in Domoticz - Configure
Idx 1
to the value read in step 4.1
- Set
- Use MQTT and execute commands
-
cmnd/sonoff/DomoticzInTopic
with payloaddomoticz/in
as hardcoded in Domoticz -
cmnd/sonoff/DomoticzOutTopic
with payloaddomoticz/out
as hardcoded in Domoticz -
cmnd/sonoff/DomoticzIdx1
with payload value read in step 4.1
-
- Use the serial interface and execute commands
-
DomoticzInTopic
withdomoticz/in
as hardcoded in Domoticz -
DomoticzOutTopic
withdomoticz/out
as hardcoded in Domoticz -
DomoticzIdx1
with the value read in step 4.1
-
That's it! You can now switch Sonoff from the Domoticz user interface.
- On the Switches page scroll down and find your Switch as configured in step 3
- Toggle the light bulb; Sonoff should respond