I'm using this version of ESPEasy on my projects:
https://github.com/ToniA/ESPEasy, build it with PlatformIO (
http://platformio.org/), as I needed to increase the MQTT message size buffer (Domoticz is VERY verbose). With Arduino IDE you need to manually modify the PubSubClient code...
In Domoticz I have a 'text' sensor on the dummy hardware. This sensor has a text value like 'panasonic_nke,1,6,5,10,0,0'. This value is calculated by the event scripts, and it's the value the ESPEasy looks for. In the event script I update the text value like this:
Code: Select all
commandArray[1] = {['OpenURL'] = 'http://127.0.0.1:8080/json.htm?type=command¶m=udevice&idx=' .. otherdevices_idx[apartment .. ': ' .. textDev] .. '&svalue=' .. modeCmd}
Then I need to have an MQTT broker running, I'm using Mosquitto on the Domoticz host.
Finally, the ESPEasy firmware is configured to connect to the MQTT broker on the Domoticz host, and it has a device definition like this:
* Device: Heatpump IR transmitter
* IDX/Var: Domoticz IDX of the text sensor
* 1st GPIO: The pin the IR led is connected to (connect in series with a resistor, then connect between G and the GPIO pin of your choice). Remember that the IR transmission range is not that great without any amplifier, something like 1 meter will work fine