-
Notifications
You must be signed in to change notification settings - Fork 196
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,UsernameandPassword) - Set the
Publish Topicto flat (which seems to relate tooutin 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
Sonoff provides several ways of configuring Domoticz parameters.
- Make updates to the Domoticz section of
user_config.hbut 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_TOPICtodomoticz/inas hardcoded in Domoticz - Set
DOMOTICZ_OUT_TOPICtodomoticz/outas hardcoded in Domoticz - Configure
DOMOTICZ_RELAY_IDX1to the value read in step 4.1
- Set
- Use the webinterface and select
Configuration - Configure Domoticz- Set
In topictodomoticz/inas hardcoded in Domoticz - Set
Out topictodomoticz/outas hardcoded in Domoticz - Configure
Idx 1to the value read in step 4.1
- Set
- Use MQTT and execute commands
-
cmnd/sonoff/DomoticzInTopicwith payloaddomoticz/inas hardcoded in Domoticz -
cmnd/sonoff/DomoticzOutTopicwith payloaddomoticz/outas hardcoded in Domoticz -
cmnd/sonoff/DomoticzIdx1with payload value read in step 4.1
-
- Use the serial interface and execute commands
-
DomoticzInTopicwithdomoticz/inas hardcoded in Domoticz -
DomoticzOutTopicwithdomoticz/outas hardcoded in Domoticz -
DomoticzIdx1with 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