Send alarms from basement pump to mobile device
Moderators: grovkillen, Stuntteam, TD-er
Send alarms from basement pump to mobile device
Hello
I have a pump with a controller in the basement. The controller of the pump has a bunch of potential-free error outlets. Outlet 03, 04,05 are described in the manual as following.
Outlet 03 / 04 / 05 General error potential-free
04 / 05 closed --> operrational
03 / 04 closed --> general error
I would like to use a ESP8266 controller to to grip on outlet 03 and 04 if the relay is closed or open. If relay 03/04 is open everything is ok and if it's closed I would like to send a message through openHAB to my mobile phone.
I installed the newest ESPeasy on a ESP8266 and had a look at the supported devices. Would it be possible somehow to use a Switch input - Switch on ESPeasy to check if relay 03/04 is open or closed?
Thank you very much for your help.
Greetings Manuel
I have a pump with a controller in the basement. The controller of the pump has a bunch of potential-free error outlets. Outlet 03, 04,05 are described in the manual as following.
Outlet 03 / 04 / 05 General error potential-free
04 / 05 closed --> operrational
03 / 04 closed --> general error
I would like to use a ESP8266 controller to to grip on outlet 03 and 04 if the relay is closed or open. If relay 03/04 is open everything is ok and if it's closed I would like to send a message through openHAB to my mobile phone.
I installed the newest ESPeasy on a ESP8266 and had a look at the supported devices. Would it be possible somehow to use a Switch input - Switch on ESPeasy to check if relay 03/04 is open or closed?
Thank you very much for your help.
Greetings Manuel
- Attachments
-
- AnschlüssePumpe.png (88.79 KiB) Viewed 14805 times
-
- Dorfstrasse 11 Pumpe Keller.png (415.22 KiB) Viewed 14805 times
Re: Send alarms from basement pump to mobile device
Yes, you can have the relay connect a GPIO pin to ground on the ESP (so the switch state becomes 0) to detect that. You'd better not use GPIO's 0, 2 15 or 16.
If you set up a Home Assistant (openHAB) MQTT controller, and enable that in the Switch device/task setup, so that state is sent to openHAB. In openHAB you can configure that alarm trigger when the state goes to 0 (wouldn't know how though as I don't use openHAB)
/Ton (PayPal.me)
Re: Send alarms from basement pump to mobile device
Make sure you also use a pull-up resistor (or enable the internal pull-up) or else you won't see any signal.
The internal pull-up resistors are quite weak, so you might pick up noise.
Better use something like 4k7 - 10k as pull-up.
And as Ath mentioned, not using GPIO-0, -2 or -15 as those require a specific state during boot.
GPIO-16 is needed for deep sleep. If you don't need deep sleep, you can use it as an input, but that pin doesn't have a pull-up resistor.
GPIO-16 also can't be used on an interrupt, but it can be used with the monitor command in the rules.
The internal pull-up resistors are quite weak, so you might pick up noise.
Better use something like 4k7 - 10k as pull-up.
And as Ath mentioned, not using GPIO-0, -2 or -15 as those require a specific state during boot.
GPIO-16 is needed for deep sleep. If you don't need deep sleep, you can use it as an input, but that pin doesn't have a pull-up resistor.
GPIO-16 also can't be used on an interrupt, but it can be used with the monitor command in the rules.
Re: Send alarms from basement pump to mobile device
Hello Ath, hello TD-er
Many thank for your answer. I tried to chart the wiring from ESP8266 to pump controller outlets. I think it won't work because according my model pattern from Elektronik-Kompendium - Paragraph 3 (German) GPIO-Pin is connected with +VCC.
Could you please give me some advise?
Many thank. I really appreciate your work and help.
Greetings Manuel
Many thank for your answer. I tried to chart the wiring from ESP8266 to pump controller outlets. I think it won't work because according my model pattern from Elektronik-Kompendium - Paragraph 3 (German) GPIO-Pin is connected with +VCC.
Could you please give me some advise?
Many thank. I really appreciate your work and help.
Greetings Manuel
- Attachments
-
- ESP8266 Wiring.png (90.28 KiB) Viewed 14739 times
-
- Pullup.png (6.63 KiB) Viewed 14739 times
Re: Send alarms from basement pump to mobile device
You're using a single pull-up resistor for all inputs. You need a resistor for each signal you like to measure.
Also in your picture, you attach the GPIO pins line to the GND.
So that's not going to work.
You did post a correct schematic below, where there is a resistor between Vcc and the GPIO.
The switch will then "pull" the level down to GND.
There you also see why you need to have a resistor per GPIO, otherwise all connected GPIO pins will be pulled down if one of the switches is closed.
Also in your picture, you attach the GPIO pins line to the GND.
So that's not going to work.
You did post a correct schematic below, where there is a resistor between Vcc and the GPIO.
The switch will then "pull" the level down to GND.
There you also see why you need to have a resistor per GPIO, otherwise all connected GPIO pins will be pulled down if one of the switches is closed.
Re: Send alarms from basement pump to mobile device
Hello TD-er
Thank you for your patience. Unfortunately I know very little about electronics
but I try my best.
I made a new picture but if I use a separate +VCC (3V3) per outlet I only can connect three outlets of the pump controller. Or I could use only one resistor and V3V for pump1 and pump2 (Outlet 06/07 and 09/10) so I just would know if pump1 or pump2 has a failure. That would be ok. I then could use the third 3V3 for Outlet 12/13 to find out if there is a flooding error.
I hope this is a step further into the right direction
Thank you for your help.
Greetings Manuel
Thank you for your patience. Unfortunately I know very little about electronics

I made a new picture but if I use a separate +VCC (3V3) per outlet I only can connect three outlets of the pump controller. Or I could use only one resistor and V3V for pump1 and pump2 (Outlet 06/07 and 09/10) so I just would know if pump1 or pump2 has a failure. That would be ok. I then could use the third 3V3 for Outlet 12/13 to find out if there is a flooding error.
I hope this is a step further into the right direction

Thank you for your help.
Greetings Manuel
- Attachments
-
- Wiring ESP8266 to Pump Controller v1.1.png (129.45 KiB) Viewed 14726 times
Re: Send alarms from basement pump to mobile device
Nope.
What you need is this:
3V3 ---Resistor----GPIO----switch----GND
So all resistors have 1 pin connected to 3V3 and their other pin to the respective GPIO pins.
From the GPIO pins you connect a wire to their switches
The other end of the switches you connect to GND.
Only a big warning!
Make sure the switches are (before you start) not connected in any way to each other or to some voltage. (so called "potential free")
The best way would be to have the switching pins of some relays.
If the outputs are not a relay, but something else, you need to know if those outputs have some kind of polarity (a + and - symbol)
However, the schematic does not suggest it, so you're probably fine.
What you need is this:
3V3 ---Resistor----GPIO----switch----GND
So all resistors have 1 pin connected to 3V3 and their other pin to the respective GPIO pins.
From the GPIO pins you connect a wire to their switches
The other end of the switches you connect to GND.
Only a big warning!
Make sure the switches are (before you start) not connected in any way to each other or to some voltage. (so called "potential free")
The best way would be to have the switching pins of some relays.
If the outputs are not a relay, but something else, you need to know if those outputs have some kind of polarity (a + and - symbol)
However, the schematic does not suggest it, so you're probably fine.
Re: Send alarms from basement pump to mobile device
Hello TD-er
Ok, I don't give up. Next try
sorry to bother you again.
The manual states that the outlets are potential free (potentialfrei in German). Should I measure voltage from outlet 03/04, 06/07.... before connecting some cables? Just to be sure that there is no voltage and the relay is potential-free? I already checked the continuity (Durchgangsprüfung) with a multimeter and there is no connection between 03/04 but between 04/05 because there was no error when I was measuring. That's how it should be.
I took the outlet for pump1 and pump2 on the same GPIO (D2, GPIO 4) because there is no 3V3 left on the ESP8266.
Thank you for your help. It's really nice.
Regards Manuel
Ok, I don't give up. Next try



The manual states that the outlets are potential free (potentialfrei in German). Should I measure voltage from outlet 03/04, 06/07.... before connecting some cables? Just to be sure that there is no voltage and the relay is potential-free? I already checked the continuity (Durchgangsprüfung) with a multimeter and there is no connection between 03/04 but between 04/05 because there was no error when I was measuring. That's how it should be.
I took the outlet for pump1 and pump2 on the same GPIO (D2, GPIO 4) because there is no 3V3 left on the ESP8266.
Thank you for your help. It's really nice.
Regards Manuel
- Attachments
-
- Wiring ESP8266 to Pump Controller v1.1.png (137.65 KiB) Viewed 14718 times
-
- Störungsmeldungausgänge.png (71.62 KiB) Viewed 14718 times
Re: Send alarms from basement pump to mobile device
Still not a good drawing ...
With respect to the potential free, that sounds good.
Just puck 1 pin on the NodeMCU with 3V3 and one with GND and use those.
So with my best ASCII-art skills:
As you can see, Each GPIO you plan to use should be connected to:
- A resistor
- the center point of the switch
Each resistor is on one end connected to 3V3
The pin on the switch that is normally closed is connected to GND
So what you get then is that the signal is "0" on the normal situation and "1" on the alert situation.
With respect to the potential free, that sounds good.
Just puck 1 pin on the NodeMCU with 3V3 and one with GND and use those.
So with my best ASCII-art skills:
Code: Select all
3V3 ---Resistor----GPIO A ----switch A----GND
| |
|--Resistor----GPIO B ----switch B---|
| |
|--Resistor----GPIO C ----switch C---|
| |
\--Resistor----GPIO D ----switch D---/
- A resistor
- the center point of the switch
Each resistor is on one end connected to 3V3
The pin on the switch that is normally closed is connected to GND
So what you get then is that the signal is "0" on the normal situation and "1" on the alert situation.
Re: Send alarms from basement pump to mobile device
Hello TD-er
I hardly dare to show you my next drawing.....
I hope it's ok now.
Thank you for your patient and feedback.
Greetings Manuel
I hardly dare to show you my next drawing.....


Thank you for your patient and feedback.
Greetings Manuel
- Attachments
-
- Wiring ESP8266 to Pump Controller.png (135.33 KiB) Viewed 14656 times
Re: Send alarms from basement pump to mobile device
Looks much better 
But just to make it more clear, you better draw the resistors from a single 3v3 pin to the switches.
Electrically it does not matter, just more clear in the drawing, when you have a single line from the GPIO pins as it is a rather small picture.
The switches are larger, so easier to draw a line from the resistor to it and from the GPIO pin.
But I'm almost sure it is conceptually correct
Edit:
Only one issue.... seems like on the switch side you have GND and the GPIO lines connected to the same pin
That's not correct.
It should be to GND on the middle pin and GPIO line to one of the side pins (depending on whether the signal should be "1" or "0" in error state)

But just to make it more clear, you better draw the resistors from a single 3v3 pin to the switches.
Electrically it does not matter, just more clear in the drawing, when you have a single line from the GPIO pins as it is a rather small picture.
The switches are larger, so easier to draw a line from the resistor to it and from the GPIO pin.
But I'm almost sure it is conceptually correct

Edit:
Only one issue.... seems like on the switch side you have GND and the GPIO lines connected to the same pin
That's not correct.
It should be to GND on the middle pin and GPIO line to one of the side pins (depending on whether the signal should be "1" or "0" in error state)
Re: Send alarms from basement pump to mobile device
Hello TD-er
Cool! Thank you for your help and patience. I really appreciate that. I made a new drawing with fritzing. Makes me always a little bit nervous to show it to you
I changed the wiring on the switch side.GND is now in the middle an GPIO line to one of the side pins.
I sponsored you some coffees. ESPEasy is really really cool and I already have some sensors installed in my apartment.
Thank you all for your great work.
Greetings Manuel
Cool! Thank you for your help and patience. I really appreciate that. I made a new drawing with fritzing. Makes me always a little bit nervous to show it to you

I changed the wiring on the switch side.GND is now in the middle an GPIO line to one of the side pins.
I sponsored you some coffees. ESPEasy is really really cool and I already have some sensors installed in my apartment.
Thank you all for your great work.
Greetings Manuel
- Attachments
-
- ESP8266 Wiring Pump Controller_Steckplatine.png (386.72 KiB) Viewed 14597 times
Last edited by -manuel- on 03 Jun 2021, 14:20, edited 1 time in total.
Re: Send alarms from basement pump to mobile device
Looks OK.
Just a few remarks:
- The Fritzing image mentions "4.7 Ohm" that should be 4k7 Ohm, or 4700 Ohm. (10k is also fine, 4.7 Ohm is almost a short circuit)
- The lines from the switch to the pull-up resistors is now drawn in red, it is more clear when drawn in the same colors as the GPIO line. After all it is the GPIO state.
Just a few remarks:
- The Fritzing image mentions "4.7 Ohm" that should be 4k7 Ohm, or 4700 Ohm. (10k is also fine, 4.7 Ohm is almost a short circuit)
- The lines from the switch to the pull-up resistors is now drawn in red, it is more clear when drawn in the same colors as the GPIO line. After all it is the GPIO state.
Re: Send alarms from basement pump to mobile device
Thank you TD-er
I already changed the colors of the red lines to the one of the GPIO state colors in the last post. Resistor is now 10k.
I guess this is it
. I'm very happy now.
Thank you very much.
Manuel
I already changed the colors of the red lines to the one of the GPIO state colors in the last post. Resistor is now 10k.
I guess this is it

Thank you very much.
Manuel
- Attachments
-
- ESP8266 Wiring Pump Controller_Steckplatine.png (386.72 KiB) Viewed 14595 times
Re: Send alarms from basement pump to mobile device
Great 
Hope you also learned why it should be connected like this.

Hope you also learned why it should be connected like this.
Re: Send alarms from basement pump to mobile device
Hello TD-er
Yes, with your explenations I think I understand it. There is also a really good Site in German which explains very well pullup and pulldown relay. This also helped me a lot.
Many thanks for your help. You deserved your coffees.
Greetings Manuel
Yes, with your explenations I think I understand it. There is also a really good Site in German which explains very well pullup and pulldown relay. This also helped me a lot.
Many thanks for your help. You deserved your coffees.
Greetings Manuel
Who is online
Users browsing this forum: No registered users and 4 guests