At first I used D0 for Status LED and D1-4 for Relay 1-4.
I switched it to D1, D2, D5, D6 for Relays 1-4 and D7 for the Status LED, but got the same result where the relays trigger when the Wemos D1 mini gets power. I tried adding restore_mode: ALWAYS_OFF, but doesn’t seem to do much.
Yes, ESPHome yaml for use with Home Assistant. It shows up fine in HA, but relays trigger when rebooting the Wemos, opening the gate.
I also need to figure out how to process the pulse from the Status LED to be qble to detect the different states (Open, Closed, Opening, No Mains etc)
Certain pins are pulled high as part of the bootup and selecting bootup mode for the esp8266, avoid those pins. I would say use D5 D6 D7 D8
If you are using inverted mode and pull everything low you might be pulling it high… just something to consider.
I used a reed switch to know if the gate is open/closed.
I also made my own pedestrian mode by using delays. Trigger wait 3s. trigger. wait 10s. trigger. opens for 3s…stops. 10s remins open. closes.
On the topic of the D5. Slightly OT in all other ways
My D5 Evo would ram full speed into the stop ends, and then go into collision mode. Recalibration worked for only a few minutes at best. I eventually managed to get it to sort-of close, because we were away for a few days.
I found the problem though. It has a thing they call a DOSS sensor. It’s essentially an optical sensor that counts the slots in an encoder wheel so it knows how far the gate has moved. You can find this sensor by looking in the middle of the chassis, it usually has a warning sticker on it that says never to put in oil, and it is connected to the same harness as the origin sensor, and wired to the “encoder” input on the control board.
The sensor itself was fine. The encoder wheel was dirty in my case, and also a little wet. After cleaning up the encoder wheel, the gate returned to normal working order.
being electronically challenged when me and the wife settle in at around dusk i insert a piece of bloudraad to lock it… good excuse for getting some fresh air
I think I have the exact same problem. Every now and then it slams into the stops. Was told it needs a reconditioning or replacement by one guy who showed me the encoder wheel was dirty (he claimed oil). Another guy (who had no idea what the encoder wheel existed and insisted that only the magnet is used to detect the distance) told me the first one is taking me for a ride amd that it needs reprogramming (and quoting me for it amongst other work I need done to garage doors). I didn’t make use of either of their services. Reprogrammed the thing using the wizard after he left and no problems so far. Maybe I wiped some of the dirt away while checking for “oil”.
There’s a place to put special oil for the gearbox under the battery.
To clean the encoder wheel, I pushed the tip of a clean rag down there, with a small screw driver to hold it against the wheel. I had the gearbox disengaged and could move the gate by hand. By moving the gate, the encoder wheel would then spin against the rag, and so I cleaned it.
What I think happens, is a bit of oiliness does “sweat” out into that area, but also water. If there is a drop of water on that wheel, it is enough to deflect some of the light and cause it to misread one of the slots.
I’m years away from Home Assistant stuff and Node Red.
Looking for something simple to open and close my gate remotely. Are there any plug and play type modules for a gate motor that will connect it to your wifi and which I can control with an app?
I have the D5 Evo but their module is crazy expensive (R3K) and also being a GSM unit which requires a sim card - and you dial your gate open or closed.
There must be something better than that.
I see Sonoff has something like that with an app, but hoping to hear from members here what they have and what works, potential pitfalls etc.
This should do it for you, as long as its connected to the WiFi network and you have an internet connection in Cape Town, you should be able to open the gate from your phone.
Sonoff has a 12V board called the Sonoff SV. It’s essentially the same as the AC type units, except it has no AC power supply. You can flash Tasmota on it, or use Ewelink if you prefer.
Does need to be within Wi-Fi range. My gate motor is at the edge of my Wi-Fi reach, so I am better off with something RF-based.
Added a Shelly Uni to my D5 motor today. I can now see if the gate is closed, whether the beam is broken and can trigger the main gate and pedestrian opening, all from the comfort of my phone. Technology is wonderful.