Searching the forum and getting all kinds of results except the one I need.
I just need a very small binary sensor. A switch that is NO (Normally Open) and can be closed and gives a signal in home assistant. Of course lots of “expensive” products are available like fibaro universal sensor or just a shelly switch and not use the relay. But these all have 2 things in common: expensive and big.
Is there any cheap ESP8266 available just doing this? I can’t find sensor - input - version, only outputs: Controlling a lamp from tasmota or home assistant to switch on and off a relay. I just need the other way around…
The sarcastic answer is that all you need is an esp unit and two wires that you touch together manually. Or even just one wire that your carefully touch to the right pins.
What exactly are you trying to do and having trouble with? Which type of sensor to buy for your application? How to wire it?
@MatthewFlamm What unit? I have a few but find it hard to find out “what” to do. @Troon Yes, dead easy?, but your link is not for me… What device can I use? How and what pins to use?
FWIW, I an not using an RPI… run on a VM. And the “binary input” is needed for e.g. a doorbell, motion sensor (radar), switch somewhere to activate a scene, etc… I would love to have e.g. a VERY simple PCB like below, but then with a NO (Normally Open) input…
(BTW, it took me HOURS to get above working with tasmota thus I an searching for something SIMPLE
@tom_l
How fast do you need it to react? Direct
Does it have to be battery powered? No
What networks do you have (Zwave, Zigbee, Wifi, RF)? I have all, but prefer wifi or ethernet cabled. -> as said, zwave is expensive and zigbee is also not cheap…
I think what you’d prefer is a pre packaged option at the cost of diy. I think you need to choose. I’m confused as your picture is clearly a diy unit that would require something like esphome to program, yet you state it is too complex.
If you are willing to figure out esphome, there are these kind of boards you can use to make it an easy screw terminal connection. I don’t know of any that specifically fit an esp board, but this one can be cut in half to fit.
Even that doorbell is more complex than @sender is asking for. The relay module is not needed at all: provided you can flash ESPHome onto an ESP8266 device (Wemos D1 Mini is my favourite), it’s just a question of wiring your switch to pull a pin to ground.
Choose the right one and you don’t need any other components: GPIO0 (D3 on the Wemos) is pulled high internally so connect it to ground via the switch and there’s your signal.
My picture was an example. I just want a very simple option…
If I would buy that AZDelivery D1 Mini NodeMcu Parent is it easy to flash with tasmota or do I need to spend hours finding correct pinlayouts, firmware, settings etc.
You flash it with ESPHome, which has pin definitions that match the board markings. Plenty of other places to get the D1 Mini, that was just an example. Here’s another.
Basically, you write a tiny bit of YAML which ESPHome turns into a specific firmware for the job. Very powerful, resulting in a super-simple interface to HA.
the ESP is now ok in hass sending mqtt via tasmota. Actually it works well.
But now is the biggest BUT. To use the GPIO2 with GND to send a “command” to home assistant I have used a relay to convert the 230V output of a radar sensor to the GPIO2 input. And there it goes wrong…
When powering up all modules see picture, the radar sensor initially immedetaley send out a trip and this triggers the relay and thus… puts GPIO2 to GND and that… yes make the device in flash mode I believe. So by first releasing the relay contact to GPIO2 and then powering up, connecting back I have my functionality…
How can I overcome that? any tips?
I am getting to start to understand why there is not a “cheap brand” with small devices and a “simple” protocol.
Connecting GPIO0 to GND makes a ESP go into flash mode. GPIO2 does not do that.
For normal program execution GPIO0 and GPIO2 need to be pulled up to Vcc (3.3V) and GPIO15 needs to be pulled to GND, each with a resistor in the range 2K to 10K resistor.
Ok, I give up. I am beaten by the GPIO-puzzle. Why is it so freaking hard to have a “simple-cheap-but-working” without, soldering, breaking resistors on prints, “pulling vcc” up with resistors, flashing with tasmota (hell to get it working) and why isn’t there not just a small “like this relay board” working devices easy to operate, easy to understand?
You have chosen the wrong ESP board for the application. The ESP8266-01 has a very limited number of GPIO pins and pulling most of them low at boot will cause issues. Use a Wemos D1 mini board and you will have more GPIO to choose from. GPIO that don’t cause the boot to fail if pulled low when powering up. There is a handy reference table here showing you which are the best pins to use and why:
Also 230V can kill you quite easily. Do not be so flippant. Be extremely careful. One hand behind your back when working with 230V makes it less likely for an accidental shock current to travel past your heart, which can cause fibrillation and death.