From 392f4e4762429cc22703b38aef8b4d8ddbb8c8e7 Mon Sep 17 00:00:00 2001 From: Pascal Brunot Date: Thu, 16 Nov 2023 18:51:21 +0100 Subject: [PATCH] Update secrets.h.example --- include/secrets.h.example | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/include/secrets.h.example b/include/secrets.h.example index 2a099b06..db7666e5 100644 --- a/include/secrets.h.example +++ b/include/secrets.h.example @@ -29,25 +29,28 @@ namespace secrets::cards namespace secrets::machine { + // Machine connected to the ESP32 + static constexpr std::string_view machine_name = "MACHINE1"; static constexpr Machine::MachineType machine_type = Machine::MachineType::LASER; - static constexpr Machine::MachineID machine_id{45678}; /* ID of the machine. Will be used to compose MQTT topic*/ - static constexpr std::string_view machine_name = "LASER1"; -} + static constexpr std::string_view machine_topic = "shelly/command/switch:0"; + static constexpr Machine::MachineID machine_id{1}; /* ID of the machine. Will be used to compose MQTT topic*/ + +} // namespace secrets::machine namespace secrets::wifi { - static constexpr std::string_view ssid = "SSID"; /* Change with WIFI SSID name */ - static constexpr std::string_view password = "KEY"; /* Change with WIFI SSID password */ + static constexpr std::string_view ssid = "aa"; /* Change with WIFI SSID name */ + static constexpr std::string_view password = "bb"; /* Change with WIFI SSID password */ } // namespace secrets::wifi namespace secrets::mqtt { - static constexpr std::string_view client = "ESP32"; /* Name of with MQTT client */ - static constexpr std::string_view user = "user!"; /* Change with MQTT user */ - static constexpr std::string_view password = "password"; /* Change with MQTT password */ - static constexpr std::string_view server = "127.0.0.1"; /* IP or name of MQTT broker. Arduino stack includes mDNS */ - static constexpr std::string_view machine_topic = "shellyplus1-007/command/switch:0"; - + static constexpr std::string_view client = "BOARD"; /* Name of with MQTT client */ + static constexpr std::string_view user = "user"; /* Change with MQTT user */ + static constexpr std::string_view password = "password"; /* Change with MQTT password */ + static constexpr std::string_view server = "192.168.1.1"; /* IP of MQTT broker*/ + static constexpr std::string_view topic = "/machine"; /* Initial part of the topic, machine ID will be added */ + static constexpr std::string_view response_topic = "/reply"; /* Server reply (sub-topic of the full machine topic) */ } // namespace secrets::mqtt #endif // SECRETS_H_ \ No newline at end of file