ive managed to get my sliding gate working fine in OH2 with the following items and site map using a Sonoff on Tasmota.
The issue I have is the switch type, i have to press it a few times before it triggers - i believe becasue its not a push button or some other type. The switch item can’t be monitored I believe because the relay in the Sonoff is just connecting two wires, I use a camera to check if the gate is open or closed. But it would be nice to actually have the switch item/sitemap work correctly
So, on Channel 1 is the fully open setting for the Gate motor (2 wires). Channel 2 is the partially open setting for the Gate motor (another 2 wires). Channel 3 is for the garage door, which is currently unused
Basically when Channel 1 or Channel 2 wires are connected via the Sonoff, it opens the gate. If it connects again, it will close the gate.
Good, OK, the channel 1 to 4, the relays are output only. You will not get feedback from them. The information the sonoff sends back is more an acknowledgement that the relay has been triggered.
To get real feedback, you will need to wire a switch (or two) on each side your gate opening to the switches in the sonoff to act as contact sensors. then when the gate is fully closed or closed the switch will trigger the GPIO and the sonoff will send a payload according to which GPIO has been triggered.
Mode wiring and a more hardware I am afraid to get real feedback.
Thank you, understand now. I could wire a contact switch where the gate motor is - its right next to the Sonoff WIFI unit and I have one spare channel.
Would a single contact sensor do it? Can you recommend one thats black in color? and small? I also have ZWave if that helps
Could I use the 4th input of my Sonoff for this? Amazon.com
In terms of just the configuration of the item, is my setup fine?
Your set-up is fine, your item definitions will need some work.
I would contact the gate installer for the switch because you will need something weather proof and maintenance free.
So, I called my gate company, they went onsite and made some changes to the wiring and configuration and have ran me two new wires. They said that when the gate opens it triggers a light that stays on when open - he’s using the signal from that to two wires he’s ran into to my Sonoff.
Its setup as Normally Closed. Now all i need to do is detect the presense of that using the 4th free channel on my Sonoff Pro R2.
Can anyone suggest how? Basically I want to make the icon on in the site map show the Garage open or closed depending on the switch.
Have you made sure of the voltage of the two wires that is going into the sonoff?
It should be 3.3v max, anything more than 5v will probably fry your device…
What pins are the wires connected to?
The 240VDC is for the power of the sonoff and what the relays can handle, NOT the digital input pins, these remain 3.3v because the heart of the device is still an ESP. You will need to step down that voltage before connecting it to the sonoff
OK, well as I mentioned its a dry contact from the gate motor. Ive connected the open/close wires from the motor into the sonoff and there was no issue. I dont see why this isnt the same
The wires to the motor are connected to the relays, they are designed to handle 240VDC and are electrically isolated from the electronics. The wires from the light, your open/closed feedback will be connected to the board directly. On this pin: