From f5f304d7720fdbdefa00d667bf7dab36a85d84e7 Mon Sep 17 00:00:00 2001 From: Alexey Date: Sun, 21 Jul 2024 19:00:39 +0400 Subject: [PATCH] Update camera.ino --- camera.ino | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/camera.ino b/camera.ino index 39de025..8541b97 100644 --- a/camera.ino +++ b/camera.ino @@ -9,6 +9,8 @@ // =========================== const char *ssid = "YOUR_WIFI_NAME"; const char *password = "YOUR_WIFI_PASSWORD"; +const char *cameraName = "YOUR_CAMERA_NAME"; // Used to create a hostname. Will be used in HomeSauron-Aggregator to determine the camera + bool tryingToConnectWifi = true; void startCameraServer(); void setupLedFlash(int pin); @@ -97,6 +99,10 @@ void setup() { setupLedFlash(LED_GPIO_NUM); #endif + std::string hostname = "home-sauron-"; + hostname += cameraName; + WiFi.setHostname(hostname.c_str()); + WiFi.begin(ssid, password); tryingToConnectWifi = false; WiFi.setSleep(false);