-
Notifications
You must be signed in to change notification settings - Fork 637
Domoticz
Integrating an ESPurna switch into Domoticz is done using MQTT protocol. From the ESPurna side everything is there already: MQTT support is built-in and you can configure the IDX you want to report to from the web interface. But you will have to configure a virtual switch in Domoticz to interact with it.
Of course you will need an MQTT broker. That's the service that listens and dispatches messages. You have two options here:
- Install a broker locally, in a home server or an always-on computer.
- Use a cloud broker.
For running a local broker my recommendation is to use Mosquitto. It's light and multi-platform. Check their site for instructions to install it on your server. Keep in mind that it runs on a computer, not on the device running ESPurna. ESPurna will be a "client" for this broker.
For running a cloud broker you have many available option. CloudMQTT is one of the most populars that has a free plan.
The Domoticz wiki has an entry specifically for MQTT. Check the "Add hardware MQTT Client Gateway" for the initial setup. You will configure Domoticz on the device as an MQTT client pointing to your broker (the one you have setup in the step above).
Once you have the "MQTT Client Gateway with LAN interface" hardware in the hardware list you will have to add another hardware of type "Dummy (used for virtual switches)" and give it a name.
Now you are ready to create "virtual sensors" where ESPurna will send the data to. You can do that by clicking "Create Virtual Sensors". Name it too. The type of sensor will depend on the data you send. ESPurna currently supports this types:
- "Switch" to read relay state and toggle them on and off.
- "Temperature" sensor (DHT or DS18B20 modules).
- "Humidity" sensor (DHT module).
- "Electric (Instant+Counter)" for power and energy monitoring (EMON or HLW8012 modules). Note: select "computed" for in the "energy read" option.
- "Voltage" for voltage monitoring (HLW8012 module).
Now if you go to the "devices" page you should see the device you have just created and the IDX is has been given by Domoticz. This is the number you have to define in the "DOMOTICZ" tab in ESPurna.
The communication from Domoticz to ESPurna is quite fast, almost instantaneous, but the other way round it may take a few seconds to update the switch status in Domoticz. Patience....
If you're looking for support:
- Issues: this is the most dynamic channel at the moment, you might find an answer to your question by searching open or closed issues.
- Wiki pages: might not be as up-to-date as we all would like (hey, you can also contribute in the documentation!).
- Gitter channel: you have better chances to get fast answers from project contributors or other ESPurna users. (also available with any Matrix client!)
- Issue a question: as a last resort, you can open new question issue on GitHub. Just remember: the more info you provide the more chances you'll have to get an accurate answer.
- Backup the stock firmware
- Flash a pre-built binary image
- Flash a virgin Itead Sonoff device without opening
- Flash TUYA-based device without opening
- Flash Shelly device without opening
- Using PlatformIO
- from Visual Studio Code
- Using Arduino IDE
- Build the Web Interface
- Over-the-air updates
- Two-step updates
- ESPurna OTA Manager
- NoFUSS
- Troubleshooting
- MQTT
- REST API
- Domoticz
- Home Assistant
- InfluxDB
- Prometheus metrics
- Thingspeak
- Alexa
- Google Home
- Architecture
- 3rd Party Plugins
- Coding style
- Pull Requests