2021-05-24 21:47:45 +02:00
|
|
|
// Dummy main.cpp file for the PlatformIO project in the git repository.
|
|
|
|
// Primarily used to get IDE integration working (so the contents here don't
|
|
|
|
// matter at all, as long as it compiles).
|
|
|
|
// Not used during runtime nor for CI.
|
|
|
|
|
2023-01-17 01:02:54 +01:00
|
|
|
#include <esphome/components/gpio/switch/gpio_switch.h>
|
2019-04-17 12:06:00 +02:00
|
|
|
#include <esphome/components/logger/logger.h>
|
2024-04-02 04:47:56 +02:00
|
|
|
#include <esphome/components/esphome/ota/ota_esphome.h>
|
2023-01-17 01:02:54 +01:00
|
|
|
#include <esphome/components/wifi/wifi_component.h>
|
|
|
|
#include <esphome/core/application.h>
|
2019-04-17 12:06:00 +02:00
|
|
|
|
|
|
|
using namespace esphome;
|
|
|
|
|
|
|
|
void setup() {
|
2023-10-27 00:38:52 +02:00
|
|
|
App.pre_setup("livingroom", "LivingRoom", "LivingRoomArea", "comment", __DATE__ ", " __TIME__, false);
|
2022-10-20 05:50:39 +02:00
|
|
|
auto *log = new logger::Logger(115200, 512); // NOLINT
|
2019-04-17 12:06:00 +02:00
|
|
|
log->pre_setup();
|
2022-10-20 05:50:39 +02:00
|
|
|
log->set_uart_selection(logger::UART_SELECTION_UART0);
|
2019-04-17 12:06:00 +02:00
|
|
|
App.register_component(log);
|
|
|
|
|
2021-09-13 11:31:02 +02:00
|
|
|
auto *wifi = new wifi::WiFiComponent(); // NOLINT
|
2019-04-17 12:06:00 +02:00
|
|
|
App.register_component(wifi);
|
|
|
|
wifi::WiFiAP ap;
|
|
|
|
ap.set_ssid("Test SSID");
|
|
|
|
ap.set_password("password1");
|
|
|
|
wifi->add_sta(ap);
|
|
|
|
|
2024-04-02 04:47:56 +02:00
|
|
|
auto *ota = new ota_esphome::OTAESPHomeComponent(); // NOLINT
|
2021-05-24 21:47:45 +02:00
|
|
|
ota->set_port(8266);
|
2019-04-17 12:06:00 +02:00
|
|
|
|
|
|
|
App.setup();
|
|
|
|
}
|
|
|
|
|
2019-05-24 23:08:04 +02:00
|
|
|
void loop() { App.loop(); }
|