Page 1 of 1

Several water sensors on one NodeMCU integrated into OpenHAB or FHEM with MQTT

Posted: 07 Feb 2018, 23:59
by Donnie
Hi,
I was planning to use a NodeMCU v2 (with usb charger) and add these sensors: https://www.modmypi.com/raspberry-pi/se ... ure-sensor
They have a digital output. I wanted to connect 5 of these sensors to different GPIOs of one NodeMCU.

Is this possible with ESPEasy, or can I use only one sensor with a NodeMCU?

Then I wanted to integrate the NodeMCU with the sensors into OpenHAB2 or FHEM. I did read that I need to do that with MQTT.

Can anybody confirm if it is possbible to use several sensors on one NodeMCU with ESPEasy and integrate it with MQTT in OpenHab2 or FHEM?

Or is there even a better way?

Re: Several water sensors on one NodeMCU integrated into OpenHAB or FHEM with MQTT

Posted: 08 Feb 2018, 00:01
by toffel969
Donnie wrote: 07 Feb 2018, 23:59 Hi,
I was planning to use a NodeMCU v2 (with usb charger) and add these sensors: https://www.modmypi.com/raspberry-pi/se ... ure-sensor
They have a digital output. I wanted to connect 5 of these sensors to different GPIOs of one NodeMCU.

Is this possible with ESPEasy, or can I use only one sensor with a NodeMCU?

Then I wanted to integrate the NodeMCU with the sensors into OpenHAB2 or FHEM. I did read that I need to do that with MQTT.

Can anybody confirm if it is possbible to use several sensors on one NodeMCU with ESPEasy and integrate it with MQTT in OpenHab2 or FHEM?

Or is there even a better way?
The sensor on the link has two outputs. Analog and digital. You can only hook one analog but 5 digital on one NodeMCU should work no problem

Re: Several water sensors on one NodeMCU integrated into OpenHAB or FHEM with MQTT

Posted: 09 Feb 2018, 13:56
by Donnie
Thanks man!!!
Do you suggest to use v2.0 or the earlier officially stable version?

I am not so versatile with Raspberry pie and NodeMcu wiring. I saw many times you need to put a resistor in the wiring to protect from too high currents or to handle floating.

When I use these sensors (https://www.modmypi.com/raspberry-pi/se ... ure-sensor) do I still need to use a resistor, or is that maybe already built in the board of the sensor? I dont want to risk damaging the pie or nodemcu and have it working properly....

Re: Several water sensors on one NodeMCU integrated into OpenHAB or FHEM with MQTT

Posted: 09 Feb 2018, 19:15
by Donnie
ok I picked the v.2 and I didn't bother using extra resistors. I connected the nodemcu and the sensor over a breadboard and there is a signal sent when there is water contact with water.

Now I need to know what device I need to chose in the ESPEasy configuration menu for my water sensor.

I have this sensor https://www.modmypi.com/raspberry-pi/se ... ure-sensor

It is very simple. When it has conact with water it sends a signal over its digital output.

But I can't find this device in the tasks menu.

Is it a

switch input
MQTT Input
dummy device
???

Also what do I need to set for IDX and controller Port?

Re: Several water sensors on one NodeMCU integrated into OpenHAB or FHEM with MQTT

Posted: 09 Feb 2018, 23:32
by Donnie
Can anybody answer my question, which device I should chosse in the ESP configuration menu?

Re: Several water sensors on one NodeMCU integrated into OpenHAB or FHEM with MQTT

Posted: 10 Feb 2018, 00:02
by grovkillen

Re: Several water sensors on one NodeMCU integrated into OpenHAB or FHEM with MQTT

Posted: 10 Feb 2018, 16:15
by Donnie
No it is not the same. The one you linked, is a capacitive one, also with light and another measure.

I have a resistive one?

It is this one:
https://www.modmypi.com/raspberry-pi/se ... ure-sensor

If there is enough water a current flows and sends a signal over the digital output. Very simple I guess. Like a switch. I just need to see if there is water or not. So it is 0 or 1.

Which device to choose?

Re: Several water sensors on one NodeMCU integrated into OpenHAB or FHEM with MQTT

Posted: 10 Feb 2018, 23:10
by Donnie
Actually it was device "switch input". Easy :-D