I have a nodemcu running ESPHome, and everything is working fine, except when I tried to add an extra relay board port. I have a sainsmart 4 port relay board and up until now had been using only 2 ports.
So I wired the additional port into GPIO port D5 and added it into the ESPHome config. Everything compiled and pushed to the nodemcu with no issues. But…the relay doesn’t fire? The relays connected to D3 and D8 work fine, so I dont know why the relay connected to D5 doesn’t work?
I tried multiple GPIO ports for the relay pin, and connected a working GPIO port to the relay pin that wasn’t working, all worked as expected. Not sure why the GPIO port is not being triggered? Perhaps ESPHome is not receiving the signal from HA… which is weird for just one of the relay ports.
Edit: Wired the relay port into a known good GPIO port, and it didn’t work. Replaced the cable between the GPIO port and relay board pin, no good. Removed and re-added the switch in HA, and even renamed the switch name in ESPHome config and HA, no good.
I have proven the electrical/relay is not the issue, here’s my logic…
The ‘hvac_fan’ relay is on GPIO 14 or D5 and is connected to relay port 1 - it works. If I move the wire to relay pin 3 - it works, so the relay is not at fault.
Then the ‘rack_fan’ relay works, but the ‘hvac_fan’ stops working.
If I then move the wire from GPIO 13 to GPIO5 (which previously had the temperature sensor successfully working) the relay doesn’t work for that port. Yet if I put the dallas sensor on GPIO13 it works. See below…
Checked with a multimeter… the pins that are working are showing 3.3 volts when not activated, and the pin not working shows 2.95 volts when not activated. When activated the 3.3 volt pins drop to 0.58 volts. And the pin not working, when activated it drops to almost zero volts.
Solved… pulled the relay board and checked/re-soldered a number of joints, and found a dry contact joint on relay board. Apology for wasting everyone’s time.