ayushsharma82 / ESP-DASH

Blazing fast library to create a functional dashboard for ESP8266 / ESP32
https://espdash.pro
GNU General Public License v3.0
976 stars 200 forks source link

Custom URI for ESP DASH #232

Closed msanaullahsahar closed 3 months ago

msanaullahsahar commented 3 months ago

I am using the ESPDash library and can access the dashboard at the IP address of my ESP32. For example, I can access it at 192.168.1.95. However, the problem arises when I use the NetWizard library alongside it. NetWizard creates an access point, and after connecting to it, it directs me to 192.168.4.1. Thats totally fine but the problem is instead of the WiFi configuration portal, I am presented with the ‘DASHBOARD’. I know that I can create two instances of AsyncWebServer by specifying different ports, e.g.,

AsyncWebServer server(80) // For Net Wizard Configuration Portal
AsyncWebServer server1(8080) // For ESP Dashboard

But I want to achieve this in another way. Is there a method to host the dashboard at /dash, similar to how I access WebSerial at /webserial and the OTA page at /update? Can you please guide me on how to achieve this?

PS: Thank you for building such wonderful libraries.

msanaullahsahar commented 3 months ago

Oh, i found a solution. it's listed in esp-dash docs. ESPDash dashboard(&server, "/dash");