1) Give a description of the problem
Working toward a webCoRE piston, but not there yet. Can’t find another forum to post this question, so hoping for some help from this community.
I am using a NodeMCU 12E to automate opening and closing of a pet door. The following hardware list will provide an idea what is being done.
2 SPST switches for manual operation (open/close) of the door.
2 SPST switches for automatic motor shutoff at limit of open & close.
1 SPST Relay 3V coil for switching 12v motor power supply.
1 DPDT Relay 3V coil for reversing polarity on motor for open and close direction.
I got the arduino sketch operating properly on the Node MCU without ST_Anything and response to manually activating switches is as expected and nearly instantaneous as monitored in serial monitor and via LED activation. Boolean logic for activating motor below:
if (digitalRead(closeLimitPin) == HIGH || digitalRead(openLimitPin)==HIGH) {
digitalWrite(motorStatePin, LOW); // Set pin to 0V for motor power OFF.
}
else if (digitalRead(closeButtonPin) == HIGH || digitalRead(remoteControl) == HIGH) {
digitalWrite(motorStatePin, HIGH); // Set pin to 1V for motor power on.
digitalWrite(motorDirPin, LOW); // Set pin to 0V for CLOSE Direction.
}
else if (digitalRead(openButtonPin) == HIGH) || digitalRead(PIN_remoteControl) == LOW) {
digitalWrite(motorStatePin, HIGH); // Set pin to 1V for motor power on.
digitalWrite(motorDirPin, HIGH); // Set pin to 1V for OPEN direction.
}
else {
digitalWrite(motorStatePin, LOW); // Set pin to 0V for motor power OFF.
I added ST_Anything with 4 contact sensors and one switch defined. The contact sensors are for monitoring status of the physical switches and the virtual switch is for activating a Digital Output pin which is used in the boolean logic for remotely opening and closing the door.
Successfully recognized my ST_Anything Parent and 5 Child devices in Smartthings Classic App.
I have two problems:
A) when I attempt to toggle the switch from the app I just get a “TurningOn” message indefinitely.
B) response times to physical interactions (switch activations) is delayed 1-30 seconds as evidenced both in the serial monitor and direct observation of test LEDs.
2) What is the expected behaviour?
A) Toggling switch device in Smartthings App will toggle HIGH/LOW value of NodeMCU pin.
B) no delay in response to activation of switches.
3) What is happening/not happening?
I have two problems:
A) when I attempt to toggle the switch from the app I just get a “TurningOn” message indefinately.
B) response times to physical interactions (switch activations) is delayed 1-30 seconds as evidenced both in the serial monitor and direct observation of test LEDs.
**4) Post a Green Snapshot of the piston![image|45x37]
5) Attach logs after turning logging level to Full
N/A
REMOVE BELOW AFTER READING
.