Page 1 of 1

Read valve status (cannot get Switch input to work)

Posted: 19 Sep 2019, 19:31
by Maarten71
I would like to read the status of 4 24VDC central heating valves. In parallel with the valves I bring the signal to an Opto coupler (https://www.tinytronics.nl/shop/nl/dive ... -4-kanalen). The Opto output is connected to NodeMcu ground and the signal is going to a GPIO pin and I have added a pull-up 10 k resistor to VCC. Tried this with a simple battery and this is working. The output signal line is depicting 0.8 or 3.3 VDC depending on the input.
I have flashed ESPEasy on a NODEMCU board and configured 4 GPIOs for switch input (see enclosed screenshot). Unfortunately, it does not reflect the input status. Also if I simply connect VCC or GND to the GPIO pin the NodeMcu is not triggered. So I must do something wrong but I’m running out of options.
What I would like to achieve is valve on = input Opto 24 VDC. Result output Opto board high. Switch input function (NodeMcu) is reading high input and sends 1. Once the valve is off = input Opto = 0. Result output low. Switch input function is reading low input and sends 0. Is my understanding correct that a change in GPIO should immediately be reflected in the status? No 1-minute delay?

Re: Read valve status (cannot get Switch input to work)

Posted: 21 Sep 2019, 11:40
by Maarten71
No one?
Stupid question or wrong place?
Any advice or reference would be appreciated!
Thanks.

Re: Read valve status (cannot get Switch input to work)

Posted: 21 Sep 2019, 12:39
by grovkillen
You might want to be more to the point, I didn't follow you. You may want to use a newer version too.

Re: Read valve status (cannot get Switch input to work)

Posted: 21 Sep 2019, 12:47
by Maarten71
Clear and thanks.
Will look at newer version and clarify my question.

Re: Read valve status (cannot get Switch input to work)

Posted: 21 Sep 2019, 20:27
by Maarten71
According to https://www.letscontrolit.com/wiki/inde ... le=ESPEasy
Release R120 is the last stable version.
Do you recommend to use mega?
Thanks

Re: Read valve status (cannot get Switch input to work)

Posted: 21 Sep 2019, 20:57
by grovkillen
Yes I know we're still promoting R120 but latest mega (found on GitHub) is very stable.

Re: Read valve status (cannot get Switch input to work)

Posted: 22 Sep 2019, 13:03
by Maarten71
Thanks, will try the new version.
In the meantime, I'm able to read the input. Simplified the setup by using a simple 3 wire switch (common, pos1 and pos2), connected to 3V to pos1, GND to pos2 and common to GPIOs.
When flipping the switch, I see the result straight in the browser. Although, I don't know what I did wrong, I now know how to use the switch option!
Will continue the journey, including trying the new software.