Sonoff on the second attempt and after nearly three months arrived.
So here’s how to make it work even with button and status LED. I used ESPEasy R105.
Adding devices in ESPEasy:
Add rules to ESPEasy:
on relay#state do
if [relay#state]=0
gpio,13,1
else
gpio,13,0
endif
endon
on button#state do
if [button#state]=0
gpio,12,0
gpio,13,1
else
gpio,12,1
gpio,13,0
endif
endon
Then you have to add the relay into Pimatic:
{
"topic": "mh/gf/lab/sonoff/gpio/12",
"id": "sonoff",
"name": "Sonoff",
"class": "MqttSwitch",
"stateTopic": "mh/gf/lab/sonoff/relay/state",
"onMessage": "1",
"offMessage": "0"
}
@noxx Does not the CE label.
For the money, it’s a handy device. It is possible to connect sensors.
This configuration is also interesting: http://www.esp8266.nu/forum/viewtopic.php?f=5&t=721&hilit=sonoff&start=80#p5418