Ghost switch ??
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 9
- Joined: 11 Apr 2019, 02:18
Ghost switch ??
Good morning all,
There you go: I'm trying to do automatic watering with ESPEASY.
The assembly consists of 2 relays mounted so as to reverse the polarity to open or close a solenoid valve.
It works well, except that ... from time to time I have a valve opening without any action. I give you the Rules that I use.
I looked everywhere, using other switches: same. without switch: same. And the whole thing is random. Change the Wemo :same (it's a Wemos D1 mini Pro)
If anyone had a clue, she would be welcome.
Thanks.
Xavier
// Partie automatique
on Clock#Time=All,**:28 do //Mode auto a chaque lever %sunrise% (%sunset% is also available)
if [Etats#Etat_Manuel]=0 and [Bouton#Etat]=1
TaskValueSet 11,2,1
gpio,12,0
gpio,13,1
timerSet,4,1
else
timerSet,4,0
timerSet,5,0
timerSer,6,0
endif
endon
// Partie Manuelle
on Bouton#Etat=0 do // Mode manuel
if [Bouton#Etat]=0 and [Etats#Etat_Auto]=0
TaskValueSet 11,1,1
gpio,12,0
gpio,13,1
timerSet,1,1
else
TaskValueSet 11,1,0
endif
endon
//Timers Auto et manuel
on Rules#timer=1 do // Mode manuel Timer1 (ouverture vanne)
gpio,13,0
timerSet,1,0
timerSet,2,5 // Temps arrosage en secondes
endon
on Rules#timer=2 do // Mode manuel Timer2 (arrosage)
gpio,13,0
gpio,12,1
timerSet,2,0
timerSet,3,1
endon
on Rules#timer=3 do // Mode manuel Timer3 (fermeture vanne)
gpio,12,0
TaskValueSet 11,1,0
TaskValueSet 12,1,1
timerSet,3,0
endon
on Rules#timer=4 do // Mode auto Timer4 (ouverture vanne)
gpio,13,0
timerSet,4,0
timerSet,5,5
endon
on Rules#timer=5 do // Mode auto Timer5 (Arrosage)
gpio,13,0
gpio,12,1
timerSet,5,0
timerSet,6,1
endon
on Rules#timer=6 do // Mode auto Timer6 (fermeture vanne)
gpio,12,0
TaskValueSet 11,2,0
timerSet,6,0
endon
There you go: I'm trying to do automatic watering with ESPEASY.
The assembly consists of 2 relays mounted so as to reverse the polarity to open or close a solenoid valve.
It works well, except that ... from time to time I have a valve opening without any action. I give you the Rules that I use.
I looked everywhere, using other switches: same. without switch: same. And the whole thing is random. Change the Wemo :same (it's a Wemos D1 mini Pro)
If anyone had a clue, she would be welcome.
Thanks.
Xavier
// Partie automatique
on Clock#Time=All,**:28 do //Mode auto a chaque lever %sunrise% (%sunset% is also available)
if [Etats#Etat_Manuel]=0 and [Bouton#Etat]=1
TaskValueSet 11,2,1
gpio,12,0
gpio,13,1
timerSet,4,1
else
timerSet,4,0
timerSet,5,0
timerSer,6,0
endif
endon
// Partie Manuelle
on Bouton#Etat=0 do // Mode manuel
if [Bouton#Etat]=0 and [Etats#Etat_Auto]=0
TaskValueSet 11,1,1
gpio,12,0
gpio,13,1
timerSet,1,1
else
TaskValueSet 11,1,0
endif
endon
//Timers Auto et manuel
on Rules#timer=1 do // Mode manuel Timer1 (ouverture vanne)
gpio,13,0
timerSet,1,0
timerSet,2,5 // Temps arrosage en secondes
endon
on Rules#timer=2 do // Mode manuel Timer2 (arrosage)
gpio,13,0
gpio,12,1
timerSet,2,0
timerSet,3,1
endon
on Rules#timer=3 do // Mode manuel Timer3 (fermeture vanne)
gpio,12,0
TaskValueSet 11,1,0
TaskValueSet 12,1,1
timerSet,3,0
endon
on Rules#timer=4 do // Mode auto Timer4 (ouverture vanne)
gpio,13,0
timerSet,4,0
timerSet,5,5
endon
on Rules#timer=5 do // Mode auto Timer5 (Arrosage)
gpio,13,0
gpio,12,1
timerSet,5,0
timerSet,6,1
endon
on Rules#timer=6 do // Mode auto Timer6 (fermeture vanne)
gpio,12,0
TaskValueSet 11,2,0
timerSet,6,0
endon
- Attachments
-
- Capture d’écran 2020-08-18 à 10.45.37.png (141.06 KiB) Viewed 8287 times
-
- Capture d’écran 2020-08-18 à 10.45.11.png (121.75 KiB) Viewed 8287 times
Re: Ghost switch ??
timerSer,6,0
This is a typo?
This is a typo?
Re: Ghost switch ??
Also please check if the ESP may have crashed and rebooted when the valve opens unintended.
If the unit reboots, then some pins may toggle a few times at boot.
See: https://espeasy.readthedocs.io/en/lates ... on-esp8266 and especially the links mentioned there.
If the unit reboots, then some pins may toggle a few times at boot.
See: https://espeasy.readthedocs.io/en/lates ... on-esp8266 and especially the links mentioned there.
Re: Ghost switch ??
And you should really use a pull-up resistor (10k or 4k7 would be fine) on the button input gpio, the internal pull-up of the ESP is too weak to keep it firmly high if the button isn't pressed, so any induction across the wires may fake-push the button.
/Ton (PayPal.me)
-
- New user
- Posts: 9
- Joined: 11 Apr 2019, 02:18
Re: Ghost switch ??
@ epost : Sorry for the bad typo, bad copy / paste.
@Ath : Good idea for the resistance in external pull-up, I will do that. I thought the internal resistance was enough.
#TD-er : Thanks for the link ( I lost it ) ; I tried with different Wemo D1 mini Pro (V1.0.0), and always had the same result. The weird thing is, nothing happened until I used the "Rules".
Anyway, I'm going to try @Ath's method and put an additional 10K or 4.7K resistor (I have both). I'll let you know.
Thanks a lot. Have a good day.
Xavier
@Ath : Good idea for the resistance in external pull-up, I will do that. I thought the internal resistance was enough.
#TD-er : Thanks for the link ( I lost it ) ; I tried with different Wemo D1 mini Pro (V1.0.0), and always had the same result. The weird thing is, nothing happened until I used the "Rules".
Anyway, I'm going to try @Ath's method and put an additional 10K or 4.7K resistor (I have both). I'll let you know.
Thanks a lot. Have a good day.
Xavier
Re: Ghost switch ??
Thanks for that hint. I'm also experiencing a "nervous" D1 mini Pro which toggles an input after it's own mind . Have always used internal pull-up, but this time it's with a ~1m cable and a push-button.
Re: Ghost switch ??
Ah, you're experimenting with a very nice antenna mounted as GPIO random generator input
-
- New user
- Posts: 9
- Joined: 11 Apr 2019, 02:18
Re: Ghost switch ??
Problem solved: it was a small resistance problem :/
Thank you so much.
The only thing that I changed since yesterday apart from adding a resistor is that I use the D8 (GPIO 15) with a pull-down and adding a resistor of 4K7 (of course ) because I noticed that the TTP223 mounted in pull-up (A closed) does not work permanently (it goes off and you just have to disconnect the ESP for it to restart). I did not find on the internet if it was normal so a little bit of soldering iron and hop in GPIO15.
Have a good day.
Thank you so much.
The only thing that I changed since yesterday apart from adding a resistor is that I use the D8 (GPIO 15) with a pull-down and adding a resistor of 4K7 (of course ) because I noticed that the TTP223 mounted in pull-up (A closed) does not work permanently (it goes off and you just have to disconnect the ESP for it to restart). I did not find on the internet if it was normal so a little bit of soldering iron and hop in GPIO15.
Have a good day.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 136 guests