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

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Donnie
Normal user
Posts: 11
Joined: 05 Feb 2018, 20:53

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

#1 Post by Donnie » 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?

User avatar
toffel969
Normal user
Posts: 469
Joined: 03 Jan 2017, 10:58
Location: Germany

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

#2 Post by toffel969 » 08 Feb 2018, 00:01

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
Domoticz on Raspi 2 -- 14 ESP units (hacked Sonoff,NodeMCUs, Wemos, self-built units) running with RC140- Mega 2.0.0 dev8

Donnie
Normal user
Posts: 11
Joined: 05 Feb 2018, 20:53

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

#3 Post by Donnie » 09 Feb 2018, 13:56

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....

Donnie
Normal user
Posts: 11
Joined: 05 Feb 2018, 20:53

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

#4 Post by Donnie » 09 Feb 2018, 19:15

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?

Donnie
Normal user
Posts: 11
Joined: 05 Feb 2018, 20:53

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

#5 Post by Donnie » 09 Feb 2018, 23:32

Can anybody answer my question, which device I should chosse in the ESP configuration menu?

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

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

#6 Post by grovkillen » 10 Feb 2018, 00:02

ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Donnie
Normal user
Posts: 11
Joined: 05 Feb 2018, 20:53

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

#7 Post by Donnie » 10 Feb 2018, 16:15

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?

Donnie
Normal user
Posts: 11
Joined: 05 Feb 2018, 20:53

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

#8 Post by Donnie » 10 Feb 2018, 23:10

Actually it was device "switch input". Easy :-D

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests