-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tasmota - d1 mini + relay + reed switch #2792
Comments
add a sec relay D5 = switch2 the D6 relay2 and know you will get MQTT message from the switch have a look at how I tasmota my fan I put a motion sensor on D2 witch is a ON/OFF but had to add a relay3 to the RX then it would send the MQTT message |
You need a virtual relay for your reed switch to get an independent mqtt message from relay1. |
So as to use switch2, you need to define also switch1. If you are not going to use switch1, put it on an unused pin. I recommend to use directly switch1 and rules for the logic. See the commands for switchmode and switchtopic to have the behaviour you want. Also add some ruletimer for extra protection if the door is taking too much for opening |
I can not solve it !!! :(( Someone would have a step step: (( |
Hi, There are some information missing. The relay is just giving a signal to a control that opens the door? I assume (JUST FOR EXAMPLE) that is it just a signal and not a direct control of the motor, and what you want is only to open the door and to know if the door is closed or not closed. There are several ways to solve that automation. One is the following example. 1-Reed Switch connection The reed switch is a normal close switch, meaning that with the magnet near to it, it will connect its conctacts. As it is connected on your diagram it has a 3.3v state when the magnet is close and floating when it is far from the magnet. The floating state can not be read by the esp8266. you have to pull up or down with a resistor. You need to connect the reed switch like pushbuttons are conected.
With that connection you will see on the esp8266 the status of the reed switch 2-PIN Configuration Set the relay1 to your pin where the relay is I recommend to disable saving on eeprom relay status and also to be outputs set to off at startup for safety. Also be sure of the right switchmode selected. Also, as I assume it is just a signal, after you send the command to open (relay on), the relay goes off after 2 seconds. On console: 3-Control Logic Using rules:
4-Check to see the status of the switch |
That is only an example. You will have to adapt it to your needs |
Dont look at the Switch look at the Relay2 you should be seen a POWER2 ON/OFF in the MQTT log hope this make cents |
Thank you all What was doing wrong was connecting the reed switch module after I put a resector everything worked .. and how do I do that ? Regards, |
on console type: All the help about commands is on the wiki at https://github.com/arendst/Sonoff-Tasmota/wiki/Commands |
Hi @lscosta90br If your issue was solved, please close it. Thanks 👍 |
Hi, please, can you send me your code from this issue? Wemos D1 mini + Reed switch magnet together? :) |
Dear,
I'm configuring a d1-mini with 2 components:
The purpose is to control whether the garage door is open or closed and open the garage door through the relay.
in configure module / module parameters:
The relay is triggered without problem.
The reed switch does not provide any door open information.
How do I look like an open or closed door information console?
With the informed results of the console I will make the decisions in the automation software
Note:
Make sure these boxes are checked [x] before submitting your issue - Thank you!
status 0
:(Please, remember to close the issue when the problem has been addressed)
The text was updated successfully, but these errors were encountered: