esprfid / esp-rfid

ESP8266 RFID (RC522, PN532, Wiegand, RDM6300) Access Control system featuring WebSocket, JSON, NTP Client, Javascript, SPIFFS
MIT License
1.34k stars 419 forks source link

Relais not switching when pushing "test" #400

Open henfri opened 3 years ago

henfri commented 3 years ago

Hello,

I have tested my relais board with this code:

#define RELAY_PIN 5
void setup() {
 pinMode(RELAY_PIN, OUTPUT);
}
void loop() {
 digitalWrite(RELAY_PIN, HIGH);
 delay(1000);
 digitalWrite(RELAY_PIN, LOW);
 delay(1000);
}

unfortunately, with the "Test" Button in the Hardware Section, I cannot get the relais to switch. What could be the reason? I have not yet connected a Wiegand Reader - could that be the cause?

I am mildly confused about the different ways to name the pins... This Pin 5 according to this schematic Could be GPIO5 (=D1) or D5 (=GPIO14). I have tested both settings in the webinterface (GPIO5 and GPIO14) without success :-(

Regards, Hendrik

ingeninge commented 3 years ago

I found the test failing, when you change the Pin in the settings and press Test without saving and restarting. Could depend on ESP-RFID version, but please give it a try. Also my Relay is 5V Arduino-type and I was not able to trigger it stable with 3,3V VCC from the NodeMCU Board on some Pins (GPIO5 fx.). Try D7 (GPIO13) this works for me. but leave it open on reboot!

henfri commented 3 years ago

Hello,

you are right. A reboot was neccessary. I think, it would be advisable to trigger that when the settings are saved.

Regards, Hendrik