You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During ZigBee development, I encountered an issue where the ESP does not enter normal execution mode after power on on its own. Previously the ESP showed up as an "Unknown Device" on the Device Manager on Windows, but now when I plug it in it just instantly goes into flash mode, where I can program it. Normally before that I needed to hold down the boot button and then power it on to enter flash mode.
How can I reverse this behavior? Is there a way I can completely wipe everything on the ESP and reset it to "the original state"?
Sketch
#include"ZigbeeCore.h"
#include"ep/ZigbeeWindowCovering.h"
#defineZIGBEE_COVERING_ENDPOINT10
#defineBUTTON_PIN9// ESP32-C6/H2 Boot button
#defineUP_PIN10
#defineSTOP_PIN11
#defineDOWN_PIN12
ZigbeeWindowCovering zbCovering = ZigbeeWindowCovering(ZIGBEE_COVERING_ENDPOINT);
voidsetup() {
Serial.begin(115200);
// Init button for factory resetpinMode(BUTTON_PIN, INPUT_PULLUP);
pinMode(UP_PIN, OUTPUT);
pinMode(STOP_PIN, OUTPUT);
pinMode(DOWN_PIN, OUTPUT);
// Optional: set Zigbee device name and model
zbCovering.setManufacturerAndModel("ESMART", "Professional MIMOTO");
// Set proper covering type
zbCovering.setCoveringType(PROJECTOR_SCREEN);
// Set configuration (keine Positionssteuerung)
zbCovering.setConfigStatus(
true, // operationaltrue, // onlinefalse, // not command reversedfalse, // lift closed loopfalse, // tilt closed loopfalse, // lift encoder controlledfalse// tilt encoder controlled
);
// Set mode: keine Positionssteuerung
zbCovering.setMode(false, false, false, false);
// Deaktiviere Lift- und Tilt-Positionslimits
zbCovering.setLimits(0, 100, 0, 0); // Keine Limits für Positionen// Set callback functions for open, close, and stop
zbCovering.onOpen(fullUp);
zbCovering.onClose(fullDown);
zbCovering.onStop(stopMotor);
// Entferne Callbacks für Positionssteuerung// zbCovering.onGoToLiftPercentage(nullptr); // Deaktiviere Positionssteuerung// zbCovering.onGoToTiltPercentage(nullptr); // Deaktiviere Tilt-Steuerung
zbCovering.setLiftPercentage(0);
zbCovering.setTiltPercentage(0);
// Add endpoint to Zigbee Core
Serial.println("Adding ZigbeeWindowCovering endpoint to Zigbee Core");
Zigbee.addEndpoint(&zbCovering);
// Start Zigbee
Serial.println("Calling Zigbee.begin()");
if (!Zigbee.begin()) {
Serial.println("Zigbee failed to start!");
Serial.println("Rebooting...");
ESP.restart();
}
Serial.println("Connecting to network");
while (!Zigbee.connected()) {
Serial.print(".");
delay(100);
}
Serial.println();
}
voidloop() {
// Factory reset handlingif (digitalRead(BUTTON_PIN) == LOW) {
delay(100);
int startTime = millis();
while (digitalRead(BUTTON_PIN) == LOW) {
delay(50);
if ((millis() - startTime) > 3000) {
Serial.printf("Resetting Zigbee to factory settings, reboot.\n");
Zigbee.factoryReset();
delay(30000);
}
}
}
delay(500);
}
voidtriggerPin(uint8_t pin) {
digitalWrite(pin, HIGH);
delay(10); // Kurzer Impuls für MotorsteuerungdigitalWrite(pin, LOW);
}
voidfullUp() {
triggerPin(UP_PIN);
}
voidfullDown() {
triggerPin(DOWN_PIN);
}
voidstopMotor() {
triggerPin(STOP_PIN);
}
Board
ESP32-H2
Device Description
Currently I use this Board without any attachments: https://de.aliexpress.com/item/1005007941405877.html
Hardware Configuration
None
Version
latest stable Release (if not listed below)
IDE Name
Arduino IDE
Operating System
Windows 10
Flash frequency
64MHz
PSRAM enabled
no
Upload speed
921600
Description
During ZigBee development, I encountered an issue where the ESP does not enter normal execution mode after power on on its own. Previously the ESP showed up as an "Unknown Device" on the Device Manager on Windows, but now when I plug it in it just instantly goes into flash mode, where I can program it. Normally before that I needed to hold down the boot button and then power it on to enter flash mode.
How can I reverse this behavior? Is there a way I can completely wipe everything on the ESP and reset it to "the original state"?
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: