bircastri wrote:It is very strange, because I can see led light turn on only when connection wifi is lost.
int OFF = 0;
int ON = 1;
The port pin needs to put out a 0 to turn on the LED. The led is connected to Vcc and the port pin has to go low in order to turn it on. You need to handle on and off for the led different than the relays.
int statusOFF = 1;
int statusON = 0;
https://www.itead.cc/wiki/images/f/fe/S ... ematic.pdf
The leds are on page three. The status led is connected so a low will turn it on. The relay leds are handles differently. they have a mosfet that drives then and that inverts the signal. So for the relays a high will turn on the relay leds. I don't understand why the did it different with the Green status led.