Everything is running ok in my setup, but I have realized that one sonoff basic with GPIO14 switched externally, receives uncommanded signal, how is it possible? I have to try with other device, but maybe could be some interference between sonoff? It is located very closed to another device.
2018-05-30 23:38:24.232 [vent.ItemStateChangedEvent] - sonoff07 changed from OFF to ON
2018-05-30 23:38:24.240 [vent.ItemStateChangedEvent] - sonoff07 changed from ON to OFF
2018-05-30 23:44:58.813 [vent.ItemStateChangedEvent] - sonoff07 changed from OFF to ON
2018-05-30 23:44:58.823 [vent.ItemStateChangedEvent] - sonoff07 changed from ON to OFF
2018-05-31 00:33:16.732 [vent.ItemStateChangedEvent] - sonoff07 changed from OFF to ON
2018-05-31 00:33:16.740 [vent.ItemStateChangedEvent] - sonoff07 changed from ON to OFF
2018-05-31 03:18:07.032 [vent.ItemStateChangedEvent] - sonoff07 changed from OFF to ON
2018-05-31 03:18:07.042 [vent.ItemStateChangedEvent] - sonoff07 changed from ON to OFF
Have you got a long wire from your sonoff to your doorbell?
Although your log shows ON/OFF/ON/OFF… (a regular pattern), it may actually be a lot more random as two same states in a row would not show up in a log.
A long wire may cause noise on the wire so the pin is basically floating.
The easiest way (from a noise-removal point of view) would be to site the sonoff next to the switch but I doubt this is practical.
You could try a pull-up resistor on the GPIO14 (to 3V3). Something like 10K and make sure the wires go nowhere near the mains side of things or some better filtering on the GPIO input such as described on this Arduino forum.
I had similar problems with some window switches and built a filter board which fixed the problem.
Before you do that, connect a switch directly to the GPIO14 pin with a short wire and see if the problem goes away (in case it’s something else causing the problem).
As you are using it as a doorbell, isn’t the pattern ON followed by OFF immidiatly desired? You want the doorbell to stop ringing when the button is released, don’t you?
Although the times logged are (hopefully) not the times when your doorbell is used
The thing is that I have uncommanded ON/OFF when the doorbell is not actually pushed, so I am inclined to think that is an interference issues, electromagnetic interferance, too much noise, or whatever…
@Saracen I will do that first, to install a short wired switch in the GPIO14 and wait one day to see what happen.