In the previous post we installed ESPEASY over NODEMCU.
This post is on controlling an LED connected to GPIO 12 of NODEMCU from DOMOTICZ Service.
My Raspberry PI and PC both are on same Local Area Network , i.e connected to same WIFI Router .
Domoticz is installed on RPI
The IP address of RPI connected to the Router over WIfI is 192.168.0.150 & the DOMOTICZ dashboard is accessed by URL
192.168.0.150:8080
On Domoticz dashboard click on Setup –> Hardware
Create a Type “Dummy “ (select from the drop down list) and provide a name as LED.
Click on ADD
Now click on “ Create Virtual Sensors “
Select a Sensor type as SWITCH and provide a name.
The Virtual Switch is visible under SWITCHES tab.
Click on EDIT
Against On Action , type in this HTTP command
http ://192.168.0.110/control?cmd=gpio,12,1
192.168.0.110 is the IP address of ESPEASY NODEMCU.
LED is at gpio12 & 1 for switching ON , 0 for Switching Off.
Now go to the dashboard of ESPEASY by typing in 192.168.0.110 in the browser.
Under Controllers select a Protocol Domoticz HTTP
Provide the IP address of DOMOTICZ and the port no. as 8080
Click on Enabled & Submit.
Under Devices select from the drop down Switch Input –Switch
Provide a Name and click Enabled.
Select the GPIO as GPIO 12.
Click on SUBMIT.
Now you can switch On / Off the LED by clicking bulb icon on Domoticz.
VIDEO: