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
First, thank you very much for this plugin. Now I can create my own Homekit compatible devices without the the of Homebridge. It is very nice how this plugin lets me to use ESP32 and connect directly to Homekit without the of a 3rd party bridge.
I am working on this home project to control my son's beside led strip light with ESP32.
I prototyped it using ESP32-WROOM-32, but I do not need that many GPIO and want to use a smaller ESP32 and I went with the ESP32-C3 Mini Development Board (aka ESP32-C3-Zero) by waveshare. It is a very tiny dev board that suit my needs.
However, I found that there is an issue with the ESP32-C3-Zero, it does not connect to WiFi, this is what I get in the logs:
11:35:18.383 -> Accessory configuration has changed. Updating configuration number to 2
11:35:18.383 ->
11:35:18.383 -> esp32-lighting is READY!
11:35:18.383 ->
11:35:18.383 -> Trying to connect to SSID. Waiting 1 sec...
11:35:19.415 -> Trying to connect to SSID. Waiting 2 sec...
11:35:19.415 -> E (4395) wifi:sta is connecting, return error
11:35:21.447 -> Trying to connect to SSID. Waiting 4 sec...
11:35:25.434 -> Trying to connect to SSID. Waiting 8 sec...
11:35:33.419 -> Trying to connect to NETGEAR54. Waiting 16 sec...
11:35:49.426 ->
11:35:49.426 -> *** Can't connect to SSID. You may type 'W <return>' to re-configure WiFi, or 'X <return>' to erase WiFi credentials. Will try connecting again in 60 seconds.
11:35:49.426 ->
It connects only if I add this line after WiFi.begin():
WiFi.begin(ssid, password);
WiFi.setTxPower(WIFI_POWER_8_5dBm); // <- need to add this line
Since HomeSpan sets the WiFi credentials using CLI. I have found no way to set WiFi.setTxPower other than with this workaround: call both WiFi.begin and WiFi.setTxPower in my setup() like this:
#defineLED_PIN1
#definePUSH_BUTTON_PIN2constchar* ssid = "<YOUR_SSID>";
constchar* password = "<YOUR_PASSWORD>";
voidconnectToWifi() {
WiFi.begin(ssid, password);
WiFi.setTxPower(WIFI_POWER_8_5dBm); // <-- This is the important line
Serial.print("Connecting to WiFi");
int i = 0;
while (WiFi.status() != WL_CONNECTED) {
Serial.print(".");
digitalWrite(LED_PIN, (i++) % 2);
delay(50);
}
digitalWrite(LED_PIN, LOW);
Serial.print("\nConnected to WiFi network with IP Address: ");
Serial.println(WiFi.localIP());
}
voidsetup() {
Serial.begin(115200);
connectToWifi();
... // the rest of my stuff
}
voidloop() {
homeSpan.poll(); // run HomeSpan!
}
When I do this it connects to the WiFi. But I need to set WiFi credential in both CLI and inside the setup() method. Is there a more elegant way to tackle this? How can I edit the CLI command to set WiFi.setTxPower(WIFI_POWER_8_5dBm) as well?
The text was updated successfully, but these errors were encountered:
First, thank you very much for this plugin. Now I can create my own Homekit compatible devices without the the of Homebridge. It is very nice how this plugin lets me to use ESP32 and connect directly to Homekit without the of a 3rd party bridge.
I am working on this home project to control my son's beside led strip light with ESP32.
I prototyped it using ESP32-WROOM-32, but I do not need that many GPIO and want to use a smaller ESP32 and I went with the ESP32-C3 Mini Development Board (aka ESP32-C3-Zero) by waveshare. It is a very tiny dev board that suit my needs.
However, I found that there is an issue with the ESP32-C3-Zero, it does not connect to WiFi, this is what I get in the logs:
It connects only if I add this line after WiFi.begin():
WiFi.begin(ssid, password); WiFi.setTxPower(WIFI_POWER_8_5dBm); // <- need to add this line
I found that workaround in this thread.
Since HomeSpan sets the WiFi credentials using CLI. I have found no way to set WiFi.setTxPower other than with this workaround: call both WiFi.begin and WiFi.setTxPower in my setup() like this:
When I do this it connects to the WiFi. But I need to set WiFi credential in both CLI and inside the setup() method. Is there a more elegant way to tackle this? How can I edit the CLI command to set WiFi.setTxPower(WIFI_POWER_8_5dBm) as well?
The text was updated successfully, but these errors were encountered: