Skip to content

easy-homelab-server-switch/esp32

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Logo

Easy Homelab Server Switch

» Microcontroller (ESP32) component «

Explore the docs »

Table of Contents
  1. Useful shortcuts
  2. Getting started
  3. Configuration

Useful shortcuts

Module Repository README License
Project overview project-overview project-overview project-overview
Cloudflare cloudflare cloudflare cloudflare
Server server server server
Microcontroller (ESP32) microcontroller-esp32 microcontroller-esp32 microcontroller-esp32
Client client client client

(back to top)

Getting started

This repository is part of the Easy Homelab Server Switch project. If you are exploring it for the first time, start with the Project Overview README which explains the architecture and interaction between all components.

(back to top)

Configuration

The system is configured via the config.cpp file using environment variables.

Category Variable Description
Device DEVICE_NAME The hostname/identity of this ESP32 unit.
Server SERVER_MAC Physical MAC address of the server, used for Wake-on-LAN packets.
SERVER_IP Local IP address of the server to monitor its presence.
SERVER_PORT Port used for the availability check. (default: 445)
Server - shutting down SHUTTING_CHECK_INTERVAL How often (in ms) the device verifies if the server has shut down.
SHUTTING_COOLDOWN Grace period (in ms) to wait while the server is physically powering off.
WiFi SSID The name of your local WiFi network.
PASSWORD The password for your local WiFi network.
TLS client MQTT_CA_CERTIFICATE ISRG Root X1 certificate for validating the MQTT broker connection.
CF_CA_CERTIFICATE Root certificate bundle required for HTTPS requests to Cloudflare.
MQTT broker MQTT_IP The IP address of the cloud cluster in MQTT broker.
MQTT_PORT The secure MQTT port. (default: 8883 for TLS)
MQTT client MQTT_USER Username used for authenticating with the broker.
MQTT_PASSWORD Password used for authenticating with the broker.
MQTT topics Check here and here
Cloudflare worker CF_DOMAIN The primary domain name managed by the Cloudflare Worker.
CF_API_TOKEN Token required to authenticate API calls to Cloudflare.
CF_ZONE_ID The unique ID of the Cloudflare zone for your domain.
CF_WORKER_SCRIPT_NAME The name of the specific worker script to be enabled/disabled. (default: offline-mode)

(back to top)