diff --git a/firmware/esp32/gdoor/main.cpp b/firmware/esp32/gdoor/main.cpp index 985d2eb..ad784c9 100644 --- a/firmware/esp32/gdoor/main.cpp +++ b/firmware/esp32/gdoor/main.cpp @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,6 +20,8 @@ #include "src/wifi_helper.h" #include "src/printer_helper.h" +GDOOR_DATA_PROTOCOL gdoor_data_idle(NULL, true); + boolean debug = false; // Global variable to indicate if we are in debug mode (true) const char* mqtt_topic_bus_rx = NULL; @@ -48,8 +50,8 @@ boolean parse(String &input) { * outputs valid bus messages. * @param busmessage The bus message to be send out to the user. */ -void output(GDOOR_DATA_PROTOCOL &busmessage, const char* topic) { - if(debug || busmessage.raw->valid) { +void output(GDOOR_DATA_PROTOCOL &busmessage, const char* topic, bool force=false) { + if(force || debug || (busmessage.raw != NULL && busmessage.raw->valid)) { MQTT_HELPER::printer.print("{"); MQTT_HELPER::printer.print(busmessage); MQTT_HELPER::printer.println("}"); @@ -60,19 +62,23 @@ void output(GDOOR_DATA_PROTOCOL &busmessage, const char* topic) { void setup() { Serial.begin(115200); Serial.setTimeout(1); - JSONDEBUG("GDOOR Setup start"); + JSONDEBUG("GDoor Setup start"); WIFI_HELPER::setup(); + MQTT_HELPER::setup(WIFI_HELPER::mqtt_server(), + WIFI_HELPER::mqtt_port(), + WIFI_HELPER::mqtt_user(), + WIFI_HELPER::mqtt_password(), + WIFI_HELPER::mqtt_topic_bus_tx(), + WIFI_HELPER::mqtt_topic_bus_rx()); GDOOR::setRxThreshold(PIN_RX_THRESH, WIFI_HELPER::rx_sensitivity()); GDOOR::setup(PIN_TX, PIN_TX_EN, WIFI_HELPER::rx_pin()); - MQTT_HELPER::setup(WIFI_HELPER::mqtt_server(), WIFI_HELPER::mqtt_port(), WIFI_HELPER::mqtt_user(), WIFI_HELPER::mqtt_password(), WIFI_HELPER::mqtt_topic_bus_tx()); - mqtt_topic_bus_rx = WIFI_HELPER::mqtt_topic_bus_rx(); debug = WIFI_HELPER::debug(); - JSONDEBUG("GDOOR Setup done"); + JSONDEBUG("GDoor Setup done"); JSONDEBUG("RX Pin: "); JSONDEBUG(WIFI_HELPER::rx_pin()); JSONDEBUG("RX Sensitivity: "); @@ -84,19 +90,28 @@ void loop() { MQTT_HELPER::loop(); GDOOR::loop(); GDOOR_DATA* rx_data = GDOOR::read(); + + // Output bus idle message on new MQTT connections to set a defined state + if(MQTT_HELPER::isNewConnection()) { + output(gdoor_data_idle, mqtt_topic_bus_rx, true); + } if(rx_data != NULL) { JSONDEBUG("Received data from bus"); GDOOR_DATA_PROTOCOL busmessage = GDOOR_DATA_PROTOCOL(rx_data); output(busmessage, mqtt_topic_bus_rx); - JSONDEBUG("Output bus data via Serial and MQTT, done"); + JSONDEBUG("Output bus data via Serial and MQTT, done"); + // Output idle message after bus message, to reset values so that + //home automation can trigger again + output(gdoor_data_idle, mqtt_topic_bus_rx, true); + } else if (!GDOOR::active()) { // Neither RX nor TX active, String str_received(""); if (Serial.available() > 0) { // let's check the serial port if something is in buffer str_received = Serial.readString(); - str_received.trim(); } else { str_received = MQTT_HELPER::receive(); } + str_received.trim(); if(str_received.length() > 0) { if(!parse(str_received)) { //Check if received string is a command diff --git a/firmware/esp32/gdoor/manifest.json b/firmware/esp32/gdoor/manifest.json new file mode 100644 index 0000000..5ebe8cf --- /dev/null +++ b/firmware/esp32/gdoor/manifest.json @@ -0,0 +1,15 @@ +{ + "name": "GDoor", + "version": "dev", + "builds": [ + { + "chipFamily": "ESP32", + "parts": [ + { + "path": "firmware_merged.bin", + "offset": 0 + } + ] + } + ] +} \ No newline at end of file diff --git a/firmware/esp32/gdoor/merge_firmware.py b/firmware/esp32/gdoor/merge_firmware.py index 993a91a..a1d8c7c 100644 --- a/firmware/esp32/gdoor/merge_firmware.py +++ b/firmware/esp32/gdoor/merge_firmware.py @@ -30,4 +30,4 @@ def merge_bin(source, target, env): ) # Add a post action that runs esptoolpy to merge available flash images -env.AddPostAction(APP_BIN , merge_bin) \ No newline at end of file +env.AddPostAction(APP_BIN, merge_bin) \ No newline at end of file diff --git a/firmware/esp32/gdoor/src/defines.h b/firmware/esp32/gdoor/src/defines.h index 03789bf..880bc2c 100644 --- a/firmware/esp32/gdoor/src/defines.h +++ b/firmware/esp32/gdoor/src/defines.h @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,7 +17,8 @@ #ifndef DEFINES_H #define DEFINES_H -// GDOOR +// GDoor +#define GDOOR_VERSION "dev" #define MAX_WORDLEN 25 // RX Statemachine @@ -40,7 +41,7 @@ #define STATE_SENDING 0x01 // WIFI -#define DEFAULT_WIFI_SSID "GDOOR" +#define DEFAULT_WIFI_SSID "GDoor" #define DEFAULT_WIFI_PASSWORD "12345678" // MQTT diff --git a/firmware/esp32/gdoor/src/gdoor.cpp b/firmware/esp32/gdoor/src/gdoor.cpp index 9d93790..4410b7f 100644 --- a/firmware/esp32/gdoor/src/gdoor.cpp +++ b/firmware/esp32/gdoor/src/gdoor.cpp @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ namespace GDOOR { /* - * Setup everything needed for GDOOR. + * Setup everything needed for GDoor. * @param int txpin Pin number where PWM is created when sending out data * @param int txenpin Pin number where output buffer is turned on/off * @param int rxpin Pin number where pulses from bus are received diff --git a/firmware/esp32/gdoor/src/gdoor.h b/firmware/esp32/gdoor/src/gdoor.h index 037b1a8..691e383 100644 --- a/firmware/esp32/gdoor/src/gdoor.h +++ b/firmware/esp32/gdoor/src/gdoor.h @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/firmware/esp32/gdoor/src/gdoor_data.cpp b/firmware/esp32/gdoor/src/gdoor_data.cpp index 92e9c18..fc08a7d 100644 --- a/firmware/esp32/gdoor/src/gdoor_data.cpp +++ b/firmware/esp32/gdoor/src/gdoor_data.cpp @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -131,11 +131,16 @@ bool GDOOR_DATA::parse(uint16_t *counts, uint16_t len) { * and stores a human readable form in its class elements. * * @param data GDOOR_DATA element, with parsed bus data. +* @param idle true: generate idle message */ -GDOOR_DATA_PROTOCOL::GDOOR_DATA_PROTOCOL(GDOOR_DATA* data) { - this->type = "TYPE_UNKOWN"; - this->action = "ACTION_UNKOWN"; - +GDOOR_DATA_PROTOCOL::GDOOR_DATA_PROTOCOL(GDOOR_DATA* data, bool idle) { + if(idle) { + this->type = "TYPE_GDOOR"; + this->action = "BUS_IDLE"; + } else { + this->type = "TYPE_UNKOWN"; + this->action = "ACTION_UNKOWN"; + } this->raw = data; this->source[0] = 0x00; @@ -149,7 +154,7 @@ GDOOR_DATA_PROTOCOL::GDOOR_DATA_PROTOCOL(GDOOR_DATA* data) { this->parameters[0] = 0x00; this->parameters[1] = 0x00; - if(data->valid && data->len >= 9) { + if(data != NULL && data->valid && data->len >= 9) { if(GDOOR_DATA_HWTYPE.find(data->data[8]) != GDOOR_DATA_HWTYPE.end()){ this->type = GDOOR_DATA_HWTYPE.at(data->data[8]); } diff --git a/firmware/esp32/gdoor/src/gdoor_data.h b/firmware/esp32/gdoor/src/gdoor_data.h index 12bbe6b..e32dbea 100644 --- a/firmware/esp32/gdoor/src/gdoor_data.h +++ b/firmware/esp32/gdoor/src/gdoor_data.h @@ -1,7 +1,7 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -59,7 +59,7 @@ class GDOOR_DATA_PROTOCOL : public Printable { // Class/Struct to collect bus hi uint8_t source[3]; uint8_t destination[3]; - GDOOR_DATA_PROTOCOL(GDOOR_DATA* data); + GDOOR_DATA_PROTOCOL(GDOOR_DATA* data, bool idle = false); virtual size_t printTo(Print& p) const { size_t r = 0; diff --git a/firmware/esp32/gdoor/src/gdoor_rx.cpp b/firmware/esp32/gdoor/src/gdoor_rx.cpp index 8b4637c..7c76ec9 100644 --- a/firmware/esp32/gdoor/src/gdoor_rx.cpp +++ b/firmware/esp32/gdoor/src/gdoor_rx.cpp @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -103,7 +103,7 @@ namespace GDOOR_RX { /* - * Function called by user to setup everything needed for GDOOR. + * Function called by user to setup everything needed for GDoor. * @param int rxpin Pin number where pulses from bus are received */ void setup(uint8_t rxpin) { diff --git a/firmware/esp32/gdoor/src/gdoor_rx.h b/firmware/esp32/gdoor/src/gdoor_rx.h index de65fc8..f073127 100644 --- a/firmware/esp32/gdoor/src/gdoor_rx.h +++ b/firmware/esp32/gdoor/src/gdoor_rx.h @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/firmware/esp32/gdoor/src/gdoor_tx.cpp b/firmware/esp32/gdoor/src/gdoor_tx.cpp index adaf06d..a7c322c 100644 --- a/firmware/esp32/gdoor/src/gdoor_tx.cpp +++ b/firmware/esp32/gdoor/src/gdoor_tx.cpp @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -130,7 +130,7 @@ namespace GDOOR_TX { } /* - * Function called by user to setup everything needed for GDOOR. + * Function called by user to setup everything needed for GDoor. * @param int txpin Pin number where PWM is created when sending out data * @param int txenpin Pin number where output buffer is turned on/off */ diff --git a/firmware/esp32/gdoor/src/gdoor_tx.h b/firmware/esp32/gdoor/src/gdoor_tx.h index 26cc103..6be152b 100644 --- a/firmware/esp32/gdoor/src/gdoor_tx.h +++ b/firmware/esp32/gdoor/src/gdoor_tx.h @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/firmware/esp32/gdoor/src/gdoor_utils.cpp b/firmware/esp32/gdoor/src/gdoor_utils.cpp index 20fe407..777d6eb 100644 --- a/firmware/esp32/gdoor/src/gdoor_utils.cpp +++ b/firmware/esp32/gdoor/src/gdoor_utils.cpp @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/firmware/esp32/gdoor/src/gdoor_utils.h b/firmware/esp32/gdoor/src/gdoor_utils.h index 9732c4b..077f0cd 100644 --- a/firmware/esp32/gdoor/src/gdoor_utils.h +++ b/firmware/esp32/gdoor/src/gdoor_utils.h @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/firmware/esp32/gdoor/src/mqtt_helper.cpp b/firmware/esp32/gdoor/src/mqtt_helper.cpp index dac28d3..429ab31 100644 --- a/firmware/esp32/gdoor/src/mqtt_helper.cpp +++ b/firmware/esp32/gdoor/src/mqtt_helper.cpp @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -17,6 +17,7 @@ #include "defines.h" #include "mqtt_helper.h" #include "printer_helper.h" +#include "gdoor_data.h" #include #include @@ -73,6 +74,7 @@ namespace MQTT_HELPER { //Namespace as we can only use it once MQTTClient mqttClient; // MQTT Library object const char* rx_topic_name; // Which callback topic + const char* tx_topic_name; // For HA discovery message const char* user; // Username const char* password; // Password @@ -80,16 +82,92 @@ namespace MQTT_HELPER { //Namespace as we can only use it once String received_mqtt_payload; // Global variable which stores received MQTT payload String empty(""); //Empty string, useful as global and fixed allocated value. + String availability_topic; //Topic where availabiliy is shown bool new_string_available = false; // Global variable to indicate that a new MQTT String was received bool newly_connected = true; // Global variable to indicate a newly established WIFI connection + bool new_connection_established = false; //Global variable to indicate we successfully connected new + bool ha_online = false; // Indicates if Home assistant messaged a new online state, so that we can resend our state + + /** + * Function which sends home assistant discovery message, + * e.g. + * { + * "name": "Bus Data", + * "force_update": True, + * "icon": "mdi:door", + * "state_topic": "gdoor/rx", + * "command_topic": "gdoor/tx", + * "json_attributes_topic": "gdoor/rx", + * "value_template": "{{ value_json.action }}", + * "uniq_id": "gdoor_data_mac", + * "device": { + * "sw_version": "3.0", + * "name": "GDoor Adapter", + * "model": "ESP32 (de:ad:be:ef)", + * "manufacturer": "GDoor Project", + * "configuration_url": "http://127.0.0.1", + * "ids": "gdoor_mac", + * "availability_topic": "homeassistant/sensor/gdoor/data/config/mac" + * } + * } + */ + void send_ha_discovery(){ + String mac = WiFi.macAddress(); + String mac_clean = mac; + mac_clean.replace(":", "_"); + + availability_topic = "homeassistant/sensor/gdoor/data/config/"+mac_clean; + + String ip; + ip = WiFi.localIP().toString(); + + String message = +R"""( +{ +"name": "Bus Data", +"force_update": true, +"icon": "mdi:door", +"value_template": "{{ value_json.action }}", +"device": { +"name": "GDoor Adapter", +"manufacturer": "GDoor Project", +)""" +""; + + message += "\"sw_version\": \"" + String(GDOOR_VERSION) + "\","; + message += "\"model\": \"ESP32 (" + mac + ")\","; + message += "\"configuration_url\": \"http://" + ip + "\","; + message += "\"ids\": \"gdoor_" + mac_clean + "\""; + message += "},"; + message += "\"availability_topic\": \"" + availability_topic + "\","; + message += "\"uniq_id\": \"gdoor_data_" + mac_clean + "\","; + message += "\"state_topic\": \"" + String(tx_topic_name) + "\","; + message += "\"json_attributes_topic\": \"" + String(tx_topic_name) + "\","; + message += "\"command_topic\": \"" + String(rx_topic_name) + "\""; + message += "}"; + mqttClient.publish("homeassistant/sensor/gdoor/data/config", message, true, 1); + } + + void setWill() { + String mac = WiFi.macAddress(); + String mac_clean = mac; + mac_clean.replace(":", "_"); + + availability_topic = "homeassistant/sensor/gdoor/data/config/"+mac_clean; + mqttClient.setWill(availability_topic.c_str(), "offline"); + } + /** * MQTT Callback function, * executes when a new String is received via the subscribed topic */ void on_message_received(String &topic, String &payload) { + if(topic == "homeassistant/status" && payload == "online") { + ha_online = true; + } new_string_available = true; received_mqtt_payload = payload; received_mqtt_payload.trim(); @@ -110,12 +188,15 @@ namespace MQTT_HELPER { //Namespace as we can only use it once * @param username MQTT Broker username * @param pw MQTT Broker password * @param rx_topic Topic from which data is received + * @param tx_topic Topic from which is announced in HA discovery as bus outgoing topic */ - void setup(const char* server, int port, const char* username, const char* pw, const char* rx_topic) { + void setup(const char* server, int port, const char* username, const char* pw, const char* rx_topic, const char* tx_topic) { WiFi.onEvent(on_wifi_active, WiFiEvent_t::ARDUINO_EVENT_WIFI_STA_GOT_IP); + mqttClient.begin(server, port, net); mqttClient.onMessage(on_message_received); rx_topic_name = rx_topic; + tx_topic_name = tx_topic; user = username; password = pw; } @@ -125,13 +206,21 @@ namespace MQTT_HELPER { //Namespace as we can only use it once * needs to be executed in main loop(). */ void loop() { + static uint16_t counter = 0; if(WiFi.getMode() == WIFI_MODE_STA && WiFi.status() == WL_CONNECTED) { if (newly_connected) { JSONDEBUG("Newly connected WIFI detected in MQTT loop"); + setWill(); if (mqttClient.connect("GDoor", user, password)) { JSONDEBUG("Successfully connected MQTT"); mqttClient.subscribe(rx_topic_name); + mqttClient.subscribe("homeassistant/status"); + + send_ha_discovery(); + newly_connected = false; + new_connection_established = true; + counter = 0; } } @@ -139,7 +228,21 @@ namespace MQTT_HELPER { //Namespace as we can only use it once if (!mqttClient.connected()) { JSONDEBUG("MQTT lost connection"); newly_connected = true; + } else { + // Send every 2^16 a availability message + if (! counter && !newly_connected ) { + mqttClient.publish(availability_topic, "online"); + } + + // Indicate a new connection if HA gets online, + // so that state is resend + if(ha_online) { + ha_online = false; + send_ha_discovery(); + new_connection_established = true; + } } + counter = counter + 1; } } @@ -156,4 +259,22 @@ namespace MQTT_HELPER { //Namespace as we can only use it once return empty; } + /** Returns true if MQTT was newly connected since last call*/ + bool isNewConnection() { + static uint16_t counter = 0; + + //Delay new connection return because otherwise discovery and value is send too fast after each other + if(new_connection_established) { + counter = counter + 1; + } else { + counter = 0; + } + + if (counter >= 1<<14 && new_connection_established) { + new_connection_established = false; + return true; + } + return false; + } + }; \ No newline at end of file diff --git a/firmware/esp32/gdoor/src/mqtt_helper.h b/firmware/esp32/gdoor/src/mqtt_helper.h index 9a62312..c0307df 100644 --- a/firmware/esp32/gdoor/src/mqtt_helper.h +++ b/firmware/esp32/gdoor/src/mqtt_helper.h @@ -1,7 +1,7 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -38,10 +38,10 @@ class MQTT_PRINTER : public Print { // Class/Struct to collect bus related infos namespace MQTT_HELPER { //Namespace as we can only use it once extern MQTT_PRINTER printer; - void setup(const char* server, int port, const char* username, const char* pw, const char* rx_topic); + void setup(const char* server, int port, const char* username, const char* pw, const char* rx_topic, const char* tx_topic); String& receive(); void loop(); - + bool isNewConnection(); }; #endif \ No newline at end of file diff --git a/firmware/esp32/gdoor/src/printer_helper.h b/firmware/esp32/gdoor/src/printer_helper.h index c6c9b2f..314caf3 100644 --- a/firmware/esp32/gdoor/src/printer_helper.h +++ b/firmware/esp32/gdoor/src/printer_helper.h @@ -1,7 +1,7 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/firmware/esp32/gdoor/src/wifi_helper.cpp b/firmware/esp32/gdoor/src/wifi_helper.cpp index 4c8d0af..a66aa20 100644 --- a/firmware/esp32/gdoor/src/wifi_helper.cpp +++ b/firmware/esp32/gdoor/src/wifi_helper.cpp @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -334,7 +334,7 @@ namespace WIFI_HELPER { //Namespace as we can only use it once wifiManager.setSaveConfigCallback(on_save); wifiManager.setSaveParamsCallback(on_save); - wifiManager.setHostname("GDOOR"); + wifiManager.setHostname("GDoor"); wifiManager.setShowPassword(true); wifiManager.setBreakAfterConfig(true); diff --git a/firmware/esp32/gdoor/src/wifi_helper.h b/firmware/esp32/gdoor/src/wifi_helper.h index 6b51918..0affb5d 100644 --- a/firmware/esp32/gdoor/src/wifi_helper.h +++ b/firmware/esp32/gdoor/src/wifi_helper.h @@ -1,6 +1,6 @@ /* - * This file is part of the GDOOR distribution (https://github.com/gdoor-org). - * Copyright (c) 2024 GDOOR Authors. + * This file is part of the GDoor distribution (https://github.com/gdoor-org). + * Copyright (c) 2024 GDoor authors. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by