Sonoff 4CH automaticall switch On²

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
jme
Normal user
Posts: 43
Joined: 11 Apr 2018, 14:20

Sonoff 4CH automaticall switch On²

#1 Post by jme » 08 Jul 2021, 09:28

Hi,

I'm using a sonoff 4CH with firmware mega-20180625


It's connected to domoticz, domoticz is configured to send me telegram notifications.
I use this sonoff to fill up my swimming pool, it should be enabled manually and switched off after a delay, so i'm sure to not forget to switch it off.

Since a while i receive some notifications that the sonoff started filling the pool but i didn't switch anything on.

Today i was able to catch some logs:

Here is the sonoff log:

Code: Select all

EVENT: Clock#Time=Thu,11:43
42187521: SW : Switch state 1 Output value 0
42187525: EVENT: Bouton3#Bouton3=0.00
42187734: SW : GPIO 4 Set to 1
42199148: SW : GPIO 4 Set to 0


domoticz Logs

Code: Select all

2021-07-08 09:19:13.657 Vanne Arrosage: Light/Switch (Remplissage piscine)
2021-07-08 09:19:13.807 Notification sent (telegram) => Success
2021-07-08 09:19:13.653 Status: User: Admin (IP: 192.168.1.44) initiated a switch command (235/Remplissage piscine/On)
2021-07-08 09:19:13.654 Status: Notification: Remplissage piscine >> ON
2021-07-08 09:19:23.683 Vanne Arrosage: Light/Switch (Remplissage piscine)
2021-07-08 09:19:23.804 Notification sent (telegram) => Success
2021-07-08 09:19:23.681 Status: Notification: Remplissage piscine >> OFF
2021-07-08 09:19:24.016 Vanne Arrosage: Light/Switch (Remplissage piscine)
2021-07-08 09:19:24.133 Notification sent (telegram) => Success
If i hunderstand the log correctly
domoticz just reported that the switch was switched on .

Sonoff reported a event on the button 3, is it the physical button ?
Maybe this one is "broken" and activate him self ?

i have this rule

Code: Select all

on Bouton1#Bouton1=1 do
if [Relais1#Relais1]=1
GPIO,12,0
else
GPIO,12,1
endif
endon

on Bouton2#Bouton2=1 do
if [Relais2#Relais2]=1
GPIO,5,0
else
GPIO,5,1
endif
endon

on Bouton3#Bouton3=1 do
if [Relais3#Relais3]=1
GPIO,4,0
else
GPIO,4,1
endif
endon

on Bouton4#Bouton4=1 do
if [Relais4#Relais4]=1
GPIO,15,0
else
GPIO,15,1
endif
endon
Maybe a good idea to desactivate it ?

Thx

User avatar
Ath
Normal user
Posts: 3419
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sonoff 4CH automaticall switch On²

#2 Post by Ath » 08 Jul 2021, 11:26

- Does your Bouton3 have a pull-up resistor (I'd guess it has as it should be one of the built-in buttons)
- What De-bounce time have you set on that Switch? It should be at least something like 100msec to properly filter out any spurious spike-signals (that can even originate from the power lines to the Sonoff)
/Ton (PayPal.me)

jme
Normal user
Posts: 43
Joined: 11 Apr 2018, 14:20

Re: Sonoff 4CH automaticall switch On²

#3 Post by jme » 08 Jul 2021, 11:53

i see that the internal pullup is not enable, i will enable it.

Where do you set the De-bounce time ?

User avatar
Ath
Normal user
Posts: 3419
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Sonoff 4CH automaticall switch On²

#4 Post by Ath » 08 Jul 2021, 12:16

On each Switch task there is a field for that.
/Ton (PayPal.me)

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH automaticall switch On²

#5 Post by TD-er » 08 Jul 2021, 12:40

Is the IDX also used by some other device in the network?
That one has bitten me multiple times with Domoticz.

User avatar
ThomasB
Normal user
Posts: 1064
Joined: 17 Jun 2018, 20:41
Location: USA

Re: Sonoff 4CH automaticall switch On²

#6 Post by ThomasB » 08 Jul 2021, 19:23

Besides the other recommendations, also try a longer switch debounce time. At least 100mS.
I'm using a sonoff 4CH with firmware mega-20180625
That's three year old ESPEasy firmware. A lot of changes have been applied since then. I suggest trying a more recent Mega release.

- Thomas

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Sonoff 4CH automaticall switch On²

#7 Post by TD-er » 08 Jul 2021, 20:04

For example the builds here: https://td-er.nl/ESPEasy/
Those are better with WiFi than the latest 20210503 (yep, I really need to make a new 'nightly')

Post Reply

Who is online

Users browsing this forum: No registered users and 27 guests