[SOLVED] Some kind of interference?

Hi there,

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

Please post all Settings used for this sonoff. Since an ON command is followed immidiatly by an OFF, you migth have Setup a Loop.

Within Sonoff

Module parameters:
01 Sonoff Basic
GPIO1 None
GPIO3 None
GPIO4 None
GPIO14 sensor 09 Switch1

Other Configurations:
MQTT enable
Emulation: None

On Items files I have:

Switch sonoff07 "Timbre Puerta" <light>
<[mosquitto:stat/sonoff07/POWER:state:MAP(onoff.map)]", autoupdate="true"}

In rules files I have:

   Item sonoff07 changed to ON
    sendBroadcastNotification("Llaman al timbre")

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.

1 Like

Hi, YES I have a long cable…

OK, I will have a look to the filter.

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).

1 Like

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 :wink:

That is the point.

I have a rule only to proces the ON status.

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.

I will let you know…

Problem solved. I placed them near the switch, and no more interferences… :wink:

1 Like