diff options
Diffstat (limited to 'platformio/temphum')
-rw-r--r-- | platformio/temphum/CMakeLists.txt | 33 | ||||
-rw-r--r-- | platformio/temphum/platformio.ini | 23 | ||||
-rw-r--r-- | platformio/temphum/src/config.cpp | 84 | ||||
-rw-r--r-- | platformio/temphum/src/config.def.h.example | 33 | ||||
-rw-r--r-- | platformio/temphum/src/config.h | 34 | ||||
-rw-r--r-- | platformio/temphum/src/http_server.cpp | 279 | ||||
-rw-r--r-- | platformio/temphum/src/http_server.h | 56 | ||||
-rw-r--r-- | platformio/temphum/src/led.cpp | 9 | ||||
-rw-r--r-- | platformio/temphum/src/led.h | 39 | ||||
-rw-r--r-- | platformio/temphum/src/leds.cpp | 11 | ||||
-rw-r--r-- | platformio/temphum/src/leds.h | 15 | ||||
-rw-r--r-- | platformio/temphum/src/logging.h | 18 | ||||
-rw-r--r-- | platformio/temphum/src/main.cpp | 70 | ||||
-rw-r--r-- | platformio/temphum/src/mqtt.cpp | 43 | ||||
-rw-r--r-- | platformio/temphum/src/mqtt.h | 11 | ||||
-rw-r--r-- | platformio/temphum/src/static.cpp | 450 | ||||
-rw-r--r-- | platformio/temphum/src/static.h | 22 | ||||
-rw-r--r-- | platformio/temphum/src/stopwatch.h | 30 | ||||
-rw-r--r-- | platformio/temphum/src/temphum.cpp | 18 | ||||
-rw-r--r-- | platformio/temphum/src/util.h | 13 | ||||
-rw-r--r-- | platformio/temphum/src/wifi.cpp | 48 | ||||
-rw-r--r-- | platformio/temphum/src/wifi.h | 36 |
22 files changed, 115 insertions, 1260 deletions
diff --git a/platformio/temphum/CMakeLists.txt b/platformio/temphum/CMakeLists.txt deleted file mode 100644 index 6a8c3f1..0000000 --- a/platformio/temphum/CMakeLists.txt +++ /dev/null @@ -1,33 +0,0 @@ -# !!! WARNING !!! AUTO-GENERATED FILE, PLEASE DO NOT MODIFY IT AND USE
-# https://docs.platformio.org/page/projectconf/section_env_build.html#build-flags
-#
-# If you need to override existing CMake configuration or add extra,
-# please create `CMakeListsUser.txt` in the root of project.
-# The `CMakeListsUser.txt` will not be overwritten by PlatformIO.
-
-cmake_minimum_required(VERSION 3.13)
-set(CMAKE_SYSTEM_NAME Generic)
-set(CMAKE_C_COMPILER_WORKS 1)
-set(CMAKE_CXX_COMPILER_WORKS 1)
-
-project("temphum" C CXX)
-
-include(CMakeListsPrivate.txt)
-
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeListsUser.txt)
-include(CMakeListsUser.txt)
-endif()
-
-add_custom_target(
- Production ALL
- COMMAND platformio -c clion run "$<$<NOT:$<CONFIG:All>>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_custom_target(
- Debug ALL
- COMMAND platformio -c clion debug "$<$<NOT:$<CONFIG:All>>:-e${CMAKE_BUILD_TYPE}>"
- WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
-)
-
-add_executable(Z_DUMMY_TARGET ${SRC_LIST})
diff --git a/platformio/temphum/platformio.ini b/platformio/temphum/platformio.ini deleted file mode 100644 index ad579fa..0000000 --- a/platformio/temphum/platformio.ini +++ /dev/null @@ -1,23 +0,0 @@ -; PlatformIO Project Configuration File -; -; Build options: build flags, source filter -; Upload options: custom upload port, speed and extra flags -; Library options: dependencies, extra library storages -; Advanced options: extra scripting -; -; Please visit documentation for the other options and examples -; https://docs.platformio.org/page/projectconf.html - -[env:esp12e] -platform = espressif8266 -board = esp12e -framework = arduino -upload_port = /dev/ttyUSB0 -monitor_speed = 115200 -lib_deps = - https://github.com/bertmelis/espMqttClient#unordered-acks -;build_flags = -; -DDEBUG -; -DDEBUG_ESP_SSL -; -DDEBUG_ESP_PORT=Serial -build_type = release diff --git a/platformio/temphum/src/config.cpp b/platformio/temphum/src/config.cpp deleted file mode 100644 index 54922c1..0000000 --- a/platformio/temphum/src/config.cpp +++ /dev/null @@ -1,84 +0,0 @@ -#include <EEPROM.h> -#include <strings.h> -#include "config.h" -#include "logging.h" - -#define GET_DATA_CRC(data) \ - eeprom_crc(reinterpret_cast<uint8_t*>(&(data))+4, sizeof(ConfigData)-4) - -namespace homekit::config { - -static const uint32_t magic = 0xdeadbeef; -static const uint32_t crc_table[16] PROGMEM = { - 0x00000000, 0x1db71064, 0x3b6e20c8, 0x26d930ac, - 0x76dc4190, 0x6b6b51f4, 0x4db26158, 0x5005713c, - 0xedb88320, 0xf00f9344, 0xd6d6a3e8, 0xcb61b38c, - 0x9b64c2b0, 0x86d3d2d4, 0xa00ae278, 0xbdbdf21c -}; - -static uint32_t eeprom_crc(const uint8_t* data, size_t len) { - uint32_t crc = ~0L; - for (size_t index = 0; index < len; index++) { - crc = pgm_read_word(&crc_table[(crc ^ data[index]) & 0x0f]) ^ (crc >> 4); - crc = pgm_read_word(&crc_table[(crc ^ (data[index] >> 4)) & 0x0f]) ^ (crc >> 4); - crc = ~crc; - } - return crc; -} - -ConfigData read() { - ConfigData data; - EEPROM.begin(sizeof(ConfigData)); - EEPROM.get(0, data); - EEPROM.end(); -#ifdef DEBUG - if (!isValid(data)) { - PRINTLN("config::read(): data is not valid!"); - } -#endif - return data; -} - -void write(ConfigData& data) { - EEPROM.begin(sizeof(ConfigData)); - data.magic = magic; - data.crc = GET_DATA_CRC(data); - EEPROM.put(0, data); - EEPROM.end(); -} - -void erase() { - ConfigData data; - erase(data); -} - -void erase(ConfigData& data) { - bzero(reinterpret_cast<uint8_t*>(&data), sizeof(data)); - write(data); -} - -bool isValid(ConfigData& data) { - return data.crc == GET_DATA_CRC(data); -} - -bool isDirty(ConfigData& data) { - return data.magic != magic; -} - -char* ConfigData::escapeHomeId(char* buf, size_t len) { - if (len < 32) - return nullptr; - size_t id_len = strlen(node_id); - char* c = node_id; - char* dst = buf; - for (size_t i = 0; i < id_len; i++) { - if (*c == '"') - *(dst++) = '\\'; - *(dst++) = *c; - c++; - } - *dst = '\0'; - return buf; -} - -}
\ No newline at end of file diff --git a/platformio/temphum/src/config.def.h.example b/platformio/temphum/src/config.def.h.example deleted file mode 100644 index 06c551e..0000000 --- a/platformio/temphum/src/config.def.h.example +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#define FW_VERSION 7 - -#define DEFAULT_WIFI_AP_SSID "" -#define DEFAULT_WIFI_STA_SSID "" -#define DEFAULT_WIFI_STA_PSK "" - -#define DEFAULT_MQTT_SERVER "mqtt.solarmon.ru" -#define DEFAULT_MQTT_PORT 8883 -#define DEFAULT_MQTT_USERNAME "" -#define DEFAULT_MQTT_PASSWORD "" -#define DEFAULT_MQTT_CLIENT_ID "" -#define DEFAULT_MQTT_CA_FINGERPRINT { \ - 0x0e, 0xb6, 0x3a, 0x02, 0x1f, \ - 0x4e, 0x1e, 0xe1, 0x6a, 0x67, \ - 0x62, 0xec, 0x64, 0xd4, 0x84, \ - 0x8a, 0xb0, 0xc9, 0x9c, 0xbb \ -}; - -#define DEFAULT_NODE_ID "relay-node" - -#define FLASH_BUTTON_PIN 0 -#define ESP_LED_PIN 2 -#define BOARD_LED_PIN 16 -#define RELAY_PIN 5 - -// 12 bytes string -#define HOME_SECRET_SIZE 12 -#define HOME_SECRET "" -#define MQTT_BLINK 1 - -#define ARRAY_SIZE(X) sizeof((X))/sizeof((X)[0])
\ No newline at end of file diff --git a/platformio/temphum/src/config.h b/platformio/temphum/src/config.h deleted file mode 100644 index 2a5b36a..0000000 --- a/platformio/temphum/src/config.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once - -#include <Arduino.h> - -namespace homekit::config { - -struct ConfigFlags { - uint8_t wifi_configured: 1; - uint8_t node_configured: 1; - uint8_t reserved: 6; -} __attribute__((packed)); - -struct ConfigData { - // helpers - uint32_t crc = 0; - uint32_t magic = 0; - char node_id[16] = {0}; - char wifi_ssid[32] = {0}; - char wifi_psk[63] = {0}; - ConfigFlags flags {0}; - - // helper methods - char* escapeHomeId(char* buf, size_t len); -} __attribute__((packed)); - - -ConfigData read(); -void write(ConfigData& data); -void erase(); -void erase(ConfigData& data); -bool isValid(ConfigData& data); -bool isDirty(ConfigData& data); - -}
\ No newline at end of file diff --git a/platformio/temphum/src/http_server.cpp b/platformio/temphum/src/http_server.cpp deleted file mode 100644 index 5fbcb8a..0000000 --- a/platformio/temphum/src/http_server.cpp +++ /dev/null @@ -1,279 +0,0 @@ -#include <Arduino.h> -#include <string.h> - -#include "static.h" -#include "http_server.h" -#include "config.h" -#include "config.def.h" -#include "logging.h" -#include "util.h" -#include "led.h" - -namespace homekit { - -using files::StaticFile; - -static const char CONTENT_TYPE_HTML[] PROGMEM = "text/html; charset=utf-8"; -static const char CONTENT_TYPE_CSS[] PROGMEM = "text/css"; -static const char CONTENT_TYPE_JS[] PROGMEM = "application/javascript"; -static const char CONTENT_TYPE_JSON[] PROGMEM = "application/json"; -static const char CONTENT_TYPE_FAVICON[] PROGMEM = "image/x-icon"; - -static const char JSON_UPDATE_FMT[] PROGMEM = "{\"result\":%d}"; -static const char JSON_STATUS_FMT[] PROGMEM = "{\"node_id\":\"%s\"" -#ifdef DEBUG - ",\"configured\":%d" - ",\"crc\":%u" - ",\"fl_n\":%d" - ",\"fl_w\":%d" -#endif - "}"; -static const size_t JSON_BUF_SIZE = 192; - -static const char JSON_SCAN_FIRST_LIST[] PROGMEM = "{\"list\":["; - -static const char MSG_IS_INVALID[] PROGMEM = " is invalid"; -static const char MSG_IS_MISSING[] PROGMEM = " is missing"; - -static const char GZIP[] PROGMEM = "gzip"; -static const char CONTENT_ENCODING[] PROGMEM = "Content-Encoding"; -static const char NOT_FOUND[] PROGMEM = "Not Found"; - -static const char ROUTE_STYLE_CSS[] PROGMEM = "/style.css"; -static const char ROUTE_APP_JS[] PROGMEM = "/app.js"; -static const char ROUTE_MD5_JS[] PROGMEM = "/md5.js"; -static const char ROUTE_FAVICON_ICO[] PROGMEM = "/favicon.ico"; -static const char ROUTE_STATUS[] PROGMEM = "/status"; -static const char ROUTE_SCAN[] PROGMEM = "/scan"; -static const char ROUTE_RESET[] PROGMEM = "/reset"; -// #ifdef DEBUG -static const char ROUTE_HEAP[] PROGMEM = "/heap"; -// #endif -static const char ROUTE_UPDATE[] PROGMEM = "/update"; - -void HttpServer::start() { - server.on(FPSTR(ROUTE_STYLE_CSS), HTTP_GET, [&]() { sendGzip(files::style_css, CONTENT_TYPE_CSS); }); - server.on(FPSTR(ROUTE_APP_JS), HTTP_GET, [&]() { sendGzip(files::app_js, CONTENT_TYPE_JS); }); - server.on(FPSTR(ROUTE_MD5_JS), HTTP_GET, [&]() { sendGzip(files::md5_js, CONTENT_TYPE_JS); }); - server.on(FPSTR(ROUTE_FAVICON_ICO), HTTP_GET, [&]() { sendGzip(files::favicon_ico, CONTENT_TYPE_FAVICON); }); - - server.on("/", HTTP_GET, [&]() { sendGzip(files::index_html, CONTENT_TYPE_HTML); }); - server.on(FPSTR(ROUTE_STATUS), HTTP_GET, [&]() { - char json_buf[JSON_BUF_SIZE]; - auto cfg = config::read(); - - if (!isValid(cfg) || !cfg.flags.node_configured) { - sprintf_P(json_buf, JSON_STATUS_FMT - , DEFAULT_NODE_ID -#ifdef DEBUG - , 0 - , cfg.crc - , cfg.flags.node_configured - , cfg.flags.wifi_configured -#endif - ); - } else { - char escaped_node_id[32]; - char *escaped_node_id_res = cfg.escapeHomeId(escaped_node_id, 32); - sprintf_P(json_buf, JSON_STATUS_FMT - , escaped_node_id_res == nullptr ? "?" : escaped_node_id -#ifdef DEBUG - , 1 - , cfg.crc - , cfg.flags.node_configured - , cfg.flags.wifi_configured -#endif - ); - } - server.send(200, FPSTR(CONTENT_TYPE_JSON), json_buf); - }); - server.on(FPSTR(ROUTE_STATUS), HTTP_POST, [&]() { - auto cfg = config::read(); - String s; - - if (!getInputParam("ssid", 32, s)) return; - strncpy(cfg.wifi_ssid, s.c_str(), 32); - PRINTF("saving ssid: %s\n", cfg.wifi_ssid); - - if (!getInputParam("psk", 63, s)) return; - strncpy(cfg.wifi_psk, s.c_str(), 63); - PRINTF("saving psk: %s\n", cfg.wifi_psk); - - if (!getInputParam("hid", 16, s)) return; - strcpy(cfg.node_id, s.c_str()); - PRINTF("saving home id: %s\n", cfg.node_id); - - cfg.flags.node_configured = 1; - cfg.flags.wifi_configured = 1; - - config::write(cfg); - - restartTimer.once(0, restart); - }); - - server.on(FPSTR(ROUTE_RESET), HTTP_POST, [&]() { - config::erase(); - restartTimer.once(1, restart); - }); - - server.on(FPSTR(ROUTE_HEAP), HTTP_GET, [&]() { - server.send(200, FPSTR(CONTENT_TYPE_HTML), String(ESP.getFreeHeap())); - }); - - server.on(FPSTR(ROUTE_SCAN), HTTP_GET, [&]() { - size_t i = 0; - size_t len; - const char* ssid; - bool enough = false; - - bzero(reinterpret_cast<uint8_t*>(scanBuf), scanBufSize); - char* cur = scanBuf; - - strncpy_P(cur, JSON_SCAN_FIRST_LIST, scanBufSize); - cur += 9; - - for (auto& res: *scanResults) { - ssid = res.ssid.c_str(); - len = res.ssid.length(); - - // new item (array with 2 items) - *cur++ = '['; - - // 1. ssid (string) - *cur++ = '"'; - for (size_t j = 0; j < len; j++) { - if (*(ssid+j) == '"') - *cur++ = '\\'; - *cur++ = *(ssid+j); - } - *cur++ = '"'; - *cur++ = ','; - - // 2. rssi (number) - cur += sprintf(cur, "%d", res.rssi); - - // close array - *cur++ = ']'; - - if ((size_t)(cur - scanBuf) >= (size_t) ARRAY_SIZE(scanBuf) - 40) - enough = true; - - if (i < scanResults->size() - 1 || enough) - *cur++ = ','; - - if (enough) - break; - - i++; - } - - *cur++ = ']'; - *cur++ = '}'; - *cur++ = '\0'; - - server.send(200, FPSTR(CONTENT_TYPE_JSON), scanBuf); - }); - - server.on(FPSTR(ROUTE_UPDATE), HTTP_POST, [&]() { - char json_buf[16]; - bool should_reboot = !Update.hasError() && !ota.invalidMd5; - Update.clearError(); - - sprintf_P(json_buf, JSON_UPDATE_FMT, should_reboot ? 1 : 0); - - server.send(200, FPSTR(CONTENT_TYPE_JSON), json_buf); - - if (should_reboot) - restartTimer.once(1, restart); - }, [&]() { - HTTPUpload& upload = server.upload(); - - if (upload.status == UPLOAD_FILE_START) { - ota.clean(); - - String s; - if (!getInputParam("md5", 0, s)) { - ota.invalidMd5 = true; - PRINTLN("http/ota: md5 not found"); - return; - } - - if (!Update.setMD5(s.c_str())) { - ota.invalidMd5 = true; - PRINTLN("http/ota: setMD5() failed"); - return; - } - - Serial.printf("http/ota: starting, filename=%s\n", upload.filename.c_str()); - if (!Update.begin(otaGetMaxUpdateSize())) { -#ifdef DEBUG - Update.printError(Serial); -#endif - } - } else if (upload.status == UPLOAD_FILE_WRITE) { - if (!Update.isRunning()) - return; - - PRINTF("http/ota: writing %ul\n", upload.currentSize); - esp_led.blink(1, 1); - if (Update.write(upload.buf, upload.currentSize) != upload.currentSize) { -#ifdef DEBUG - Update.printError(Serial); -#endif - } - } else if (upload.status == UPLOAD_FILE_END) { - if (!Update.isRunning()) - return; - - if (Update.end(true)) { - PRINTF("http/ota: ok, total size %ul\n", upload.totalSize); - } else { -#ifdef DEBUG - Update.printError(Serial); -#endif - } - } - }); - - server.onNotFound([&]() { - server.send(404, FPSTR(CONTENT_TYPE_HTML), NOT_FOUND); - }); - - server.begin(); -} - -void HttpServer::loop() { - server.handleClient(); -} - -void HttpServer::sendGzip(const StaticFile& file, PGM_P content_type) { - server.sendHeader(FPSTR(CONTENT_ENCODING), FPSTR(GZIP)); - server.send_P(200, content_type, (const char*)file.content, file.size); -} - -void HttpServer::sendError(const String& message) { - char buf[32]; - if (snprintf_P(buf, 32, PSTR("error: %s"), message.c_str()) == 32) - buf[31] = '\0'; - server.send(400, FPSTR(CONTENT_TYPE_HTML), buf); -} - -bool HttpServer::getInputParam(const char *field_name, - size_t max_len, - String& dst) { - if (!server.hasArg(field_name)) { - sendError(String(field_name) + String(MSG_IS_MISSING)); - return false; - } - - String field = server.arg(field_name); - if (!field.length() || (max_len != 0 && field.length() > max_len)) { - sendError(String(field_name) + String(MSG_IS_INVALID)); - return false; - } - - dst = field; - return true; -} - -}
\ No newline at end of file diff --git a/platformio/temphum/src/http_server.h b/platformio/temphum/src/http_server.h deleted file mode 100644 index 35f7c08..0000000 --- a/platformio/temphum/src/http_server.h +++ /dev/null @@ -1,56 +0,0 @@ -#pragma once -#include <ESP8266WebServer.h> -#include <Ticker.h> -#include <memory> -#include <list> -#include <utility> -#include "config.h" -#include "wifi.h" -#include "static.h" - -namespace homekit { - -struct OTAStatus { - bool invalidMd5; - - OTAStatus() : invalidMd5(false) {} - - inline void clean() { - invalidMd5 = false; - } -}; - -using files::StaticFile; - -class HttpServer { -private: - ESP8266WebServer server; - Ticker restartTimer; - std::shared_ptr<std::list<wifi::ScanResult>> scanResults; - OTAStatus ota; - - char* scanBuf; - size_t scanBufSize; - - void sendGzip(const StaticFile& file, PGM_P content_type); - void sendError(const String& message); - - bool getInputParam(const char* field_name, size_t max_len, String& dst); - -public: - explicit HttpServer(std::shared_ptr<std::list<wifi::ScanResult>> scanResults) - : server(80) - , scanResults(std::move(scanResults)) - , scanBufSize(512) { - scanBuf = new char[scanBufSize]; - }; - - ~HttpServer() { - delete[] scanBuf; - } - - void start(); - void loop(); -}; - -}
\ No newline at end of file diff --git a/platformio/temphum/src/led.cpp b/platformio/temphum/src/led.cpp deleted file mode 100644 index b6b0d81..0000000 --- a/platformio/temphum/src/led.cpp +++ /dev/null @@ -1,9 +0,0 @@ -#include "led.h" -#include "config.def.h" - -namespace homekit { - -Led board_led(BOARD_LED_PIN); -Led esp_led(ESP_LED_PIN); - -}
\ No newline at end of file diff --git a/platformio/temphum/src/led.h b/platformio/temphum/src/led.h deleted file mode 100644 index 315523a..0000000 --- a/platformio/temphum/src/led.h +++ /dev/null @@ -1,39 +0,0 @@ -#pragma once - -#include <Arduino.h> - -namespace homekit { - -class Led { -private: - uint8_t _pin; - -public: - explicit Led(uint8_t pin) : _pin(pin) { - pinMode(_pin, OUTPUT); - off(); - } - - inline void off() const { digitalWrite(_pin, HIGH); } - inline void on() const { digitalWrite(_pin, LOW); } - - void on_off(uint16_t delay_ms, bool last_delay = false) const { - on(); - delay(delay_ms); - - off(); - if (last_delay) - delay(delay_ms); - } - - void blink(uint8_t count, uint16_t delay_ms) const { - for (uint8_t i = 0; i < count; i++) { - on_off(delay_ms, i < count-1); - } - } -}; - -extern Led board_led; -extern Led esp_led; - -}
\ No newline at end of file diff --git a/platformio/temphum/src/leds.cpp b/platformio/temphum/src/leds.cpp new file mode 100644 index 0000000..f0c9d51 --- /dev/null +++ b/platformio/temphum/src/leds.cpp @@ -0,0 +1,11 @@ +#include "leds.h" + +namespace homekit { + +#ifdef CONFIG_TARGET_NODEMCU +Led* board_led = new Led(CONFIG_BOARD_LED_GPIO); +#endif +Led* mcu_led = new Led(CONFIG_MCU_LED_GPIO); + +} + diff --git a/platformio/temphum/src/leds.h b/platformio/temphum/src/leds.h new file mode 100644 index 0000000..04c1f79 --- /dev/null +++ b/platformio/temphum/src/leds.h @@ -0,0 +1,15 @@ +#ifndef HOMEKIT_TEMPHUM_LEDS_H +#define HOMEKIT_TEMPHUM_LEDS_H + +#include <homekit/led.h> + +namespace homekit { + +#ifdef CONFIG_TARGET_NODEMCU +extern Led* board_led; +#endif +extern Led* mcu_led; + +} + +#endif //HOMEKIT_TEMPHUM_LEDS_H
\ No newline at end of file diff --git a/platformio/temphum/src/logging.h b/platformio/temphum/src/logging.h deleted file mode 100644 index 070f367..0000000 --- a/platformio/temphum/src/logging.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#include <stdlib.h> -#include "config.def.h" - -#ifdef DEBUG - -#define PRINTLN(s) Serial.println(s) -#define PRINT(s) Serial.print(s) -#define PRINTF(fmt, ...) Serial.printf(fmt, ##__VA_ARGS__) - -#else - -#define PRINTLN(s) -#define PRINT(s) -#define PRINTF(...) - -#endif diff --git a/platformio/temphum/src/main.cpp b/platformio/temphum/src/main.cpp index 1fa7e66..83f35b4 100644 --- a/platformio/temphum/src/main.cpp +++ b/platformio/temphum/src/main.cpp @@ -4,42 +4,48 @@ #include <Ticker.h> #include <Wire.h> +#include <homekit/config.h> +#include <homekit/logging.h> +#ifndef CONFIG_TARGET_ESP01 +#include <homekit/http_server.h> +#endif +#include <homekit/wifi.h> + #include "mqtt.h" -#include "config.h" -#include "logging.h" -#include "http_server.h" -#include "led.h" -#include "config.def.h" -#include "wifi.h" +#include "leds.h" #include "temphum.h" -#include "stopwatch.h" using namespace homekit; +#ifndef CONFIG_TARGET_ESP01 enum class WorkingMode { RECOVERY, // AP mode, http server with configuration NORMAL, // MQTT client }; static enum WorkingMode working_mode = WorkingMode::NORMAL; +static const uint16_t recovery_boot_detection_ms = 2000; +static const uint8_t recovery_boot_delay_ms = 100; +#endif + enum class WiFiConnectionState { WAITING = 0, JUST_CONNECTED = 1, CONNECTED = 2 }; -static const uint16_t recovery_boot_detection_ms = 2000; -static const uint8_t recovery_boot_delay_ms = 100; - static volatile enum WiFiConnectionState wifi_state = WiFiConnectionState::WAITING; static void* service = nullptr; static WiFiEventHandler wifiConnectHandler, wifiDisconnectHandler; static Ticker wifiTimer; + #if MQTT_BLINK static StopWatch blinkStopWatch; #endif +#ifndef CONFIG_TARGET_ESP01 static DNSServer* dnsServer = nullptr; +#endif static void onWifiConnected(const WiFiEventStationModeGotIP& event); static void onWifiDisconnected(const WiFiEventStationModeDisconnected& event); @@ -60,8 +66,9 @@ static void wifiConnect() { PRINT("connecting to wifi.."); } +#ifndef CONFIG_TARGET_ESP01 static void wifiHotspot() { - esp_led.on(); + mcu_led->on(); auto scanResults = wifi::scan(); @@ -76,57 +83,72 @@ static void wifiHotspot() { } static void waitForRecoveryPress() { - pinMode(FLASH_BUTTON_PIN, INPUT_PULLUP); + pinMode(CONFIG_FLASH_GPIO, INPUT_PULLUP); for (uint16_t i = 0; i < recovery_boot_detection_ms; i += recovery_boot_delay_ms) { delay(recovery_boot_delay_ms); - if (digitalRead(FLASH_BUTTON_PIN) == LOW) { + if (digitalRead(CONFIG_FLASH_GPIO) == LOW) { working_mode = WorkingMode::RECOVERY; break; } } } +#endif void setup() { WiFi.disconnect(); +#ifndef CONFIG_TARGET_ESP01 waitForRecoveryPress(); - - temphum::setup(); +#endif #ifdef DEBUG Serial.begin(115200); #endif + temphum::setup(); + auto cfg = config::read(); if (config::isDirty(cfg)) { PRINTLN("config is dirty, erasing..."); config::erase(cfg); - board_led.blink(10, 50); +#ifdef CONFIG_TARGET_NODEMCU + board_led->blink(10, 50); +#else + mcu_led->blink(10, 50); +#endif } +#ifndef CONFIG_TARGET_ESP01 switch (working_mode) { case WorkingMode::RECOVERY: wifiHotspot(); break; case WorkingMode::NORMAL: +#endif wifiConnectHandler = WiFi.onStationModeGotIP(onWifiConnected); wifiDisconnectHandler = WiFi.onStationModeDisconnected(onWifiDisconnected); wifiConnect(); +#ifndef CONFIG_TARGET_ESP01 break; } +#endif } void loop() { +#ifndef CONFIG_TARGET_ESP01 if (working_mode == WorkingMode::NORMAL) { +#endif if (wifi_state == WiFiConnectionState::WAITING) { PRINT("."); - esp_led.blink(2, 50); + mcu_led->blink(2, 50); delay(1000); return; } if (wifi_state == WiFiConnectionState::JUST_CONNECTED) { - board_led.blink(3, 300); +#ifdef CONFIG_TARGET_NODEMCU + board_led->blink(3, 300); +#endif wifi_state = WiFiConnectionState::CONNECTED; if (service == nullptr) @@ -144,21 +166,30 @@ void loop() { if (mqtt->ota.readyToRestart) { mqtt->disconnect(); + } else if (mqtt->diagnosticsStopWatch.elapsed(10000)) { mqtt->sendDiagnostics(); auto data = temphum::read(); + PRINT("temp:"); + PRINT(data.temp); + PRINT(", rh: "); + PRINTLN(data.rh); + mqtt->sendTempHumData(data.temp, data.rh); } #if MQTT_BLINK // periodically blink board led if (blinkStopWatch.elapsed(5000)) { - board_led.blink(1, 10); +#ifdef CONFIG_TARGET_NODEMCU + board_led->blink(1, 10); +#endif blinkStopWatch.save(); } #endif } +#ifndef CONFIG_TARGET_ESP01 } else { if (dnsServer != nullptr) dnsServer->processNextRequest(); @@ -167,6 +198,7 @@ void loop() { if (httpServer != nullptr) httpServer->loop(); } +#endif } static void onWifiConnected(const WiFiEventStationModeGotIP& event) { diff --git a/platformio/temphum/src/mqtt.cpp b/platformio/temphum/src/mqtt.cpp index ff13e43..b3305ce 100644 --- a/platformio/temphum/src/mqtt.cpp +++ b/platformio/temphum/src/mqtt.cpp @@ -1,23 +1,14 @@ #include <ESP8266httpUpdate.h> +#include <homekit/logging.h> +#include <homekit/config.h> +#include <homekit/util.h> +#include <homekit/wifi.h> + #include "mqtt.h" -#include "logging.h" -#include "wifi.h" -#include "config.def.h" -#include "config.h" -#include "static.h" -#include "util.h" -#include "led.h" +#include "leds.h" namespace homekit::mqtt { -static const uint8_t MQTT_CA_FINGERPRINT[] = DEFAULT_MQTT_CA_FINGERPRINT; -static const char MQTT_SERVER[] = DEFAULT_MQTT_SERVER; -static const uint16_t MQTT_PORT = DEFAULT_MQTT_PORT; -static const char MQTT_USERNAME[] = DEFAULT_MQTT_USERNAME; -static const char MQTT_PASSWORD[] = DEFAULT_MQTT_PASSWORD; -static const char MQTT_CLIENT_ID[] = DEFAULT_MQTT_CLIENT_ID; -static const char MQTT_SECRET[HOME_SECRET_SIZE+1] = HOME_SECRET; - static const char TOPIC_DIAGNOSTICS[] = "stat"; static const char TOPIC_INITIAL_DIAGNOSTICS[] = "stat1"; static const char TOPIC_OTA_RESPONSE[] = "otares"; @@ -168,7 +159,7 @@ void MQTT::sendInitialDiagnostics() { auto cfg = config::read(); InitialDiagnosticsPayload stat{ .ip = wifi::getIPAsInteger(), - .fw_version = FW_VERSION, + .fw_version = CONFIG_FW_VERSION, .rssi = wifi::getRSSI(), .free_heap = ESP.getFreeHeap(), .flags = DiagnosticsFlags{ @@ -224,19 +215,19 @@ void MQTT::handleAdminOtaPayload(uint16_t packetId, const uint8_t *payload, size Update.runAsync(true); if (index == 0) { - if (length < HOME_SECRET_SIZE + MD5_SIZE) { + if (length < CONFIG_NODE_SECRET_SIZE + MD5_SIZE) { PRINTLN("mqtt/ota: failed to check secret, first packet size is too small"); return; } - if (memcmp((const char*)payload, HOME_SECRET, HOME_SECRET_SIZE) != 0) { + if (memcmp((const char*)payload, CONFIG_NODE_SECRET, CONFIG_NODE_SECRET_SIZE) != 0) { PRINTLN("mqtt/ota: invalid secret"); return; } - PRINTF("mqtt/ota: starting update, total=%ul\n", total-HOME_SECRET_SIZE); + PRINTF("mqtt/ota: starting update, total=%ul\n", total-NODE_SECRET_SIZE); for (int i = 0; i < MD5_SIZE; i++) { - md5Ptr += sprintf(md5Ptr, "%02x", *((unsigned char*)(payload+HOME_SECRET_SIZE+i))); + md5Ptr += sprintf(md5Ptr, "%02x", *((unsigned char*)(payload+CONFIG_NODE_SECRET_SIZE+i))); } md5[32] = '\0'; PRINTF("mqtt/ota: md5 is %s\n", md5); @@ -256,7 +247,7 @@ void MQTT::handleAdminOtaPayload(uint16_t packetId, const uint8_t *payload, size ota.dataPacketId = packetId; - if (!Update.begin(total - HOME_SECRET_SIZE - MD5_SIZE)) { + if (!Update.begin(total - CONFIG_NODE_SECRET_SIZE - MD5_SIZE)) { ota.clean(); #ifdef DEBUG Update.printError(Serial); @@ -264,10 +255,10 @@ void MQTT::handleAdminOtaPayload(uint16_t packetId, const uint8_t *payload, size sendOtaResponse(OTAResult::UPDATE_ERROR, Update.getError()); } - ota.written = Update.write(const_cast<uint8_t*>(payload)+HOME_SECRET_SIZE + MD5_SIZE, length-HOME_SECRET_SIZE - MD5_SIZE); - ota.written += HOME_SECRET_SIZE + MD5_SIZE; + ota.written = Update.write(const_cast<uint8_t*>(payload)+CONFIG_NODE_SECRET_SIZE + MD5_SIZE, length-CONFIG_NODE_SECRET_SIZE - MD5_SIZE); + ota.written += CONFIG_NODE_SECRET_SIZE + MD5_SIZE; - esp_led.blink(1, 1); + mcu_led->blink(1, 1); PRINTF("mqtt/ota: updating %u/%u\n", ota.written, Update.size()); } else { @@ -289,9 +280,9 @@ void MQTT::handleAdminOtaPayload(uint16_t packetId, const uint8_t *payload, size } ota.written += length; - esp_led.blink(1, 1); + mcu_led->blink(1, 1); PRINTF("mqtt/ota: updating %u/%u\n", - ota.written - HOME_SECRET_SIZE - MD5_SIZE, + ota.written - NODE_SECRET_SIZE - MD5_SIZE, Update.size()); } else { PRINTF("mqtt/ota: position is invalid, expected %ul, got %ul\n", ota.written, index); diff --git a/platformio/temphum/src/mqtt.h b/platformio/temphum/src/mqtt.h index 38ed988..84df5b1 100644 --- a/platformio/temphum/src/mqtt.h +++ b/platformio/temphum/src/mqtt.h @@ -1,7 +1,12 @@ +#ifndef HOMEKIT_TEMPHUM_MQTT_H +#define HOMEKIT_TEMPHUM_MQTT_H + #include <ESP8266WiFi.h> #include <espMqttClient.h> #include <Ticker.h> -#include "stopwatch.h" + +#include <homekit/stopwatch.h> +#include <homekit/mqtt.h> namespace homekit { namespace mqtt { @@ -104,4 +109,6 @@ struct OTAResponse { uint8_t error_code; } __attribute__((packed)); -} }
\ No newline at end of file +} } + +#endif //HOMEKIT_TEMPHUM_MQTT_H
\ No newline at end of file diff --git a/platformio/temphum/src/static.cpp b/platformio/temphum/src/static.cpp deleted file mode 100644 index 366a09f..0000000 --- a/platformio/temphum/src/static.cpp +++ /dev/null @@ -1,450 +0,0 @@ -/** - * This file is autogenerated with make_static.sh script - */ - -#include "static.h" - -namespace homekit::files { - -static const uint8_t index_html_content[] PROGMEM = { - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x9d, 0x56, 0x4d, 0x6f, 0xdb, 0x38, - 0x10, 0xbd, 0xe7, 0x57, 0xb0, 0x3c, 0x14, 0x09, 0x10, 0x4b, 0x9b, 0x14, 0xcd, 0x16, 0xad, 0x24, - 0xa0, 0xd8, 0x76, 0xb1, 0x05, 0x7a, 0x08, 0x6a, 0x14, 0x0b, 0xec, 0xc5, 0xa0, 0xa8, 0x91, 0xc5, - 0x9a, 0x22, 0x59, 0x71, 0x24, 0xc7, 0xfd, 0xf5, 0x1d, 0x52, 0x92, 0x3f, 0xb2, 0x46, 0xfa, 0x71, - 0xb1, 0x34, 0xc3, 0x99, 0x37, 0x6f, 0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 0xa7, 0x2c, 0x5e, 0xbc, 0x1f, 0xd6, 0x60, 0x76, 0xec, 0x3f, 0x65, 0x2c, 0x5d, 0xd1, 0x43, 0x4c, - 0x78, 0x2e, 0xad, 0xdb, 0xbd, 0x61, 0xb7, 0x7f, 0xdc, 0xde, 0x1e, 0x8e, 0x76, 0xb8, 0x74, 0xe2, - 0x1d, 0x14, 0xff, 0x36, 0x7c, 0x07, 0x90, 0xb9, 0x94, 0x17, 0x47, 0x08, 0x00, 0x00, -}; -const StaticFile index_html PROGMEM = {(sizeof(index_html_content)/sizeof(index_html_content[0])), index_html_content}; - -static const uint8_t app_js_content[] PROGMEM = { - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x9d, 0x57, 0x6d, 0x6f, 0xdb, 0x46, - 0x12, 0xfe, 0xde, 0x5f, 0x41, 0x2d, 0x70, 0x06, 0xf7, 0x44, 0xd3, 0x2f, 0xd7, 0x02, 0x85, 0x18, - 0x42, 0x48, 0xda, 0xe4, 0x92, 0x22, 0xa9, 0x8b, 0x24, 0x57, 0x1c, 0x60, 0xf8, 0x82, 0x95, 0x38, - 0xb2, 0x18, 0x53, 0xbb, 0xec, 0xee, 0xd2, 0xb2, 0x4f, 0x11, 0x70, 0x69, 0x0a, 0xb4, 0x40, 0x0b, - 0x04, 0xe8, 0xf7, 0xcb, 0xa7, 0xfe, 0x00, 0x37, 0x77, 0xbe, 0x4b, 0x2e, 0x4d, 0xfa, 0x17, 0xa8, - 0x7f, 0xd4, 0x99, 0x25, 0x29, 0xd1, 0xb2, 0x81, 0x06, 0xf7, 0xc1, 0x12, 0xb5, 0x9c, 0x9d, 0x9d, - 0x79, 0x66, 0x9e, 0x67, 0xc7, 0xa3, 0x42, 0x0e, 0x6d, 0xaa, 0xa4, 0x07, 0x3e, 0xf0, 0x99, 0x06, - 0x5b, 0x68, 0xc9, 0xf6, 0xd5, 0xe0, 0x31, 0x0c, 0xad, 0xb7, 0xe7, 0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 0x2a, 0xa7, 0x8d, 0x66, - 0xdf, 0x1e, 0xe0, 0x6a, 0xab, 0xd6, 0x31, 0x63, 0x55, 0xc2, 0xe2, 0xb1, 0x38, 0x21, 0xb9, 0xf0, - 0xd9, 0x16, 0xb2, 0xcb, 0x16, 0x86, 0x05, 0xb3, 0x79, 0xeb, 0x48, 0x1b, 0x48, 0x3e, 0xb3, 0xfa, - 0x74, 0x96, 0x8e, 0x7c, 0xcb, 0xed, 0x58, 0xab, 0xa9, 0x67, 0x23, 0xf0, 0x5d, 0x2b, 0x05, 0x32, - 0x94, 0x2a, 0x81, 0x47, 0x69, 0xf2, 0xe4, 0x09, 0x11, 0x00, 0x09, 0x5e, 0x1d, 0x12, 0xac, 0x7e, - 0x55, 0x35, 0xa8, 0x17, 0xb0, 0xf3, 0xe7, 0x43, 0x61, 0x87, 0x63, 0xf4, 0x35, 0xab, 0x8a, 0x92, - 0xe2, 0x23, 0x9f, 0xaf, 0x87, 0x82, 0x32, 0xb1, 0x16, 0x88, 0x63, 0x59, 0x1d, 0x08, 0xd4, 0x81, - 0x40, 0x54, 0x83, 0x97, 0x4a, 0x44, 0xec, 0xf6, 0xc3, 0x7b, 0x77, 0x31, 0xaf, 0x08, 0xc9, 0xe2, - 0x13, 0x4c, 0x12, 0x39, 0x27, 0xaf, 0xd9, 0x30, 0x43, 0x44, 0xeb, 0xde, 0x8e, 0x64, 0xb7, 0x5b, - 0x61, 0xa8, 0xe3, 0xea, 0xc5, 0xbe, 0x3c, 0xd8, 0xdf, 0x3e, 0x08, 0x54, 0xeb, 0xe7, 0xce, 0x41, - 0xe3, 0x56, 0xe4, 0x39, 0xc8, 0xc4, 0x97, 0x30, 0xf5, 0xf6, 0x1c, 0x90, 0xbe, 0xee, 0x32, 0xcf, - 0x67, 0x5d, 0x85, 0x5f, 0xc9, 0x8d, 0x09, 0x67, 0x81, 0xc6, 0xe0, 0x85, 0x5f, 0xd9, 0xb7, 0xf3, - 0x83, 0x55, 0x7e, 0x50, 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9d, 0xdd, 0xdd, 0x3f, - 0x6d, 0x85, 0x16, 0xe3, 0xf1, 0x31, 0x38, 0xf7, 0x9a, 0x5f, 0xee, 0x94, 0x31, 0xa6, 0xe8, 0xd1, - 0xe9, 0x1e, 0xeb, 0x2e, 0xcd, 0xa2, 0xd4, 0x77, 0x1d, 0xda, 0x52, 0x2f, 0x73, 0x51, 0xbd, 0x48, - 0x71, 0xcc, 0x95, 0x8a, 0x83, 0x5a, 0x53, 0x8d, 0x14, 0x64, 0xe0, 0x04, 0xc5, 0xf5, 0x1a, 0xa1, - 0xd4, 0xa7, 0xf5, 0x9e, 0xc6, 0x2c, 0xe7, 0x35, 0xc9, 0x69, 0xb0, 0x88, 0x67, 0xc8, 0xa3, 0x9e, - 0x0d, 0x07, 0x29, 0xdd, 0x05, 0x81, 0xb3, 0xe6, 0x41, 0xae, 0x4c, 0x7b, 0xd1, 0x21, 0x8d, 0x87, - 0xe2, 0x7f, 0x2a, 0xf5, 0xd6, 0x54, 0xa6, 0xf6, 0x7a, 0x9e, 0xb7, 0xc1, 0xc1, 0xe9, 0xdf, 0xdd, - 0xf3, 0xd1, 0x07, 0xbf, 0x01, 0xdd, 0x89, 0x77, 0x95, 0xce, 0x0d, 0x00, 0x00, -}; -const StaticFile app_js PROGMEM = {(sizeof(app_js_content)/sizeof(app_js_content[0])), app_js_content}; - -static const uint8_t md5_js_content[] PROGMEM = { - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xad, 0x59, 0x79, 0x73, 0x1b, 0xb7, - 0x15, 0xff, 0xbf, 0x9f, 0x42, 0xe2, 0x4c, 0x39, 0xbb, 0xb3, 0x2b, 0x05, 0xf7, 0x61, 0x72, 0xe5, - 0x89, 0x93, 0x1e, 0xe9, 0x95, 0xb6, 0x69, 0xd2, 0x83, 0x43, 0xcd, 0xd0, 0xd2, 0xd2, 0xbb, 0x89, - 0x42, 0xaa, 0x58, 0xd0, 0xb2, 0x62, 0xd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05, 0xe1, 0x9a, - 0x20, 0x0d, 0x94, 0x84, 0x6c, 0x8d, 0xa3, 0x04, 0xe1, 0x25, 0x50, 0xbe, 0x8a, 0x1a, 0x7f, 0x29, - 0x50, 0xeb, 0x2b, 0x05, 0x86, 0x93, 0x48, 0xb3, 0xc3, 0x49, 0xbd, 0x22, 0x92, 0x56, 0x13, 0x89, - 0xc7, 0xd2, 0xec, 0x7a, 0xe2, 0x73, 0x33, 0x8e, 0xca, 0xf3, 0xc2, 0x0f, 0x13, 0x28, 0x48, 0x84, - 0x0a, 0x4a, 0x4c, 0xa0, 0x18, 0x60, 0x37, 0x8d, 0x42, 0xa0, 0x5a, 0x9e, 0xdb, 0x31, 0xfc, 0x2e, - 0xe3, 0x46, 0x05, 0x54, 0x69, 0x2e, 0x18, 0x57, 0xe2, 0x5e, 0x15, 0xd8, 0x73, 0xd3, 0x20, 0x4f, - 0x04, 0x12, 0x18, 0x71, 0x85, 0xf5, 0xa3, 0xc0, 0x11, 0x63, 0x9c, 0x70, 0x4a, 0xd1, 0x5d, 0xe0, - 0xf1, 0x5d, 0x68, 0x45, 0x08, 0x88, 0x01, 0xbb, 0x14, 0x0c, 0x2b, 0xa5, 0xe5, 0xe7, 0x00, 0xe2, - 0xf3, 0x04, 0x83, 0x9d, 0x91, 0x42, 0x8c, 0x3c, 0x8c, 0x48, 0xc0, 0x48, 0x0c, 0x9c, 0x83, 0x62, - 0xca, 0xf0, 0x83, 0x90, 0xe4, 0xfc, 0x84, 0x71, 0x89, 0xb8, 0x56, 0xf4, 0x2e, 0xa0, 0x47, 0xf0, - 0x28, 0x98, 0x8f, 0x94, 0x08, 0x51, 0xce, 0xf0, 0x67, 0x59, 0x48, 0xc3, 0x34, 0xb5, 0x73, 0x60, - 0xc6, 0xb0, 0x7c, 0x10, 0x10, 0x44, 0xfb, 0x09, 0x23, 0xc8, 0xe7, 0xf6, 0xc3, 0x60, 0xb0, 0xf3, - 0x7a, 0xad, 0x11, 0x43, 0x30, 0x21, 0xf2, 0x6c, 0x3c, 0x90, 0x46, 0x12, 0x08, 0x21, 0x26, 0x10, - 0x15, 0x8a, 0x7c, 0x96, 0xcb, 0x81, 0x87, 0x30, 0x04, 0x3a, 0xc7, 0x08, 0x3f, 0x8c, 0xc7, 0xf9, - 0x02, 0x47, 0x60, 0x4d, 0x42, 0x34, 0x7a, 0x18, 0x94, 0x37, 0x3b, 0x15, 0x9c, 0x72, 0x4a, 0xee, - 0x09, 0xb7, 0x1e, 0x54, 0x3b, 0x25, 0x98, 0xcd, 0xb8, 0x87, 0x08, 0xe8, 0x06, 0x31, 0x81, 0x05, - 0x97, 0x5a, 0x70, 0xec, 0x46, 0xe5, 0x35, 0x40, 0xd9, 0x02, 0xec, 0xbd, 0x07, 0x09, 0xcd, 0x11, - 0x16, 0xd4, 0xa9, 0x41, 0xd7, 0x28, 0x68, 0x83, 0xc2, 0x01, 0xee, 0x34, 0x61, 0x9d, 0x02, 0x03, - 0xfd, 0x27, 0x82, 0x51, 0x48, 0x2c, 0x12, 0x7b, 0x4b, 0xb1, 0x1a, 0x94, 0x6a, 0x40, 0xf5, 0x81, - 0x4d, 0x25, 0x84, 0xa6, 0xa4, 0xc8, 0x1b, 0x09, 0xd5, 0x78, 0xc8, 0x67, 0xe0, 0xe1, 0xf3, 0x13, - 0x89, 0x30, 0x87, 0x08, 0xd7, 0xf8, 0x20, 0x1e, 0x70, 0x9e, 0x84, 0x2a, 0x40, 0x83, 0xbc, 0x93, - 0x3f, 0x1d, 0x0e, 0x48, 0x17, 0x02, 0xb9, 0x8c, 0x48, 0xf9, 0x61, 0x38, 0xcc, 0xd9, 0x1c, 0x36, - 0x3d, 0x52, 0x31, 0xf5, 0x42, 0x38, 0x7a, 0x9e, 0x70, 0xa1, 0x18, 0x03, 0x25, 0xaa, 0xc3, 0x70, - 0x9c, 0xef, 0x20, 0xac, 0x15, 0xb8, 0xa9, 0xf7, 0x9d, 0x27, 0x03, 0x72, 0xf9, 0x4b, 0x49, 0x2a, - 0xa8, 0x16, 0xf8, 0x30, 0x1e, 0x17, 0xd6, 0x60, 0x79, 0x4e, 0xc1, 0x41, 0xf1, 0x0b, 0x01, 0xb9, - 0x80, 0x80, 0xe8, 0x66, 0x42, 0x61, 0x26, 0xe4, 0x41, 0x48, 0xb0, 0xf6, 0x70, 0x0c, 0x81, 0x03, - 0x2a, 0x7c, 0x0e, 0x1e, 0xe9, 0x12, 0x90, 0x0b, 0x0b, 0x05, 0xc9, 0xee, 0x30, 0x20, 0xec, 0x96, - 0x36, 0x4d, 0xc0, 0x94, 0x12, 0x36, 0xc1, 0x0f, 0x21, 0xca, 0xb3, 0x0e, 0x54, 0x54, 0x65, 0x0e, - 0xc4, 0x79, 0x87, 0xab, 0x02, 0x69, 0xb5, 0xc7, 0xc1, 0x34, 0xc1, 0xe3, 0x40, 0x0e, 0xab, 0xc1, - 0xa8, 0x06, 0x4c, 0xad, 0xbc, 0x13, 0x02, 0x31, 0xcd, 0x25, 0x60, 0xf6, 0x53, 0xc2, 0x35, 0x18, - 0xdc, 0x81, 0x09, 0xd2, 0x48, 0x0e, 0xf0, 0x9b, 0xb0, 0xc1, 0x8a, 0x6a, 0x44, 0x11, 0xf7, 0x69, - 0x0b, 0x8b, 0x1a, 0x87, 0x68, 0x70, 0xb4, 0x56, 0x07, 0xa8, 0x48, 0x73, 0xee, 0x72, 0x2d, 0xa1, - 0x1e, 0x82, 0xfe, 0x0c, 0x04, 0x2e, 0x07, 0x38, 0x41, 0xb0, 0x7a, 0x0b, 0x74, 0x3f, 0x0a, 0xe6, - 0x52, 0x8e, 0x24, 0x4a, 0x83, 0xe3, 0x3f, 0x15, 0x85, 0x74, 0x62, 0x39, 0xd3, 0xb2, 0x4e, 0x1a, - 0xf7, 0x62, 0x40, 0xce, 0x73, 0x35, 0x18, 0x0b, 0x09, 0x86, 0x5e, 0x88, 0x82, 0x42, 0xae, 0x51, - 0x30, 0x4b, 0x8d, 0x25, 0xbb, 0x1f, 0x85, 0xcb, 0x33, 0x5c, 0x41, 0x60, 0x12, 0x42, 0x9e, 0x08, - 0x02, 0xdc, 0x15, 0xa8, 0x39, 0xc1, 0x5a, 0xea, 0x03, 0x20, 0xc4, 0x3c, 0x91, 0x02, 0x11, 0x8d, - 0x95, 0x7e, 0x19, 0x02, 0x58, 0xfd, 0x40, 0x0b, 0x54, 0x30, 0xa6, 0xe4, 0xfd, 0x00, 0x9c, 0xe3, - 0x32, 0x82, 0x15, 0xe6, 0xaa, 0x4e, 0x40, 0x4f, 0x71, 0x26, 0x58, 0x2e, 0xc0, 0xba, 0x92, 0x01, - 0x0a, 0x74, 0x00, 0x02, 0x88, 0xd5, 0x1a, 0xf6, 0x30, 0x0a, 0x96, 0x81, 0x07, 0x30, 0xf4, 0xf1, - 0x1d, 0x46, 0x77, 0x64, 0xb6, 0x9f, 0xba, 0x3c, 0x0e, 0x59, 0x48, 0x50, 0x04, 0x19, 0x0b, 0xc4, - 0x88, 0x1a, 0x80, 0x68, 0x00, 0x6c, 0x3f, 0x95, 0x5d, 0x90, 0xc2, 0xbe, 0x52, 0x69, 0xcc, 0x30, - 0xaf, 0x8f, 0x83, 0x1e, 0x04, 0x69, 0x41, 0x84, 0xc1, 0x1d, 0x15, 0xdb, 0x4f, 0x41, 0x96, 0x63, - 0x2e, 0x0f, 0x31, 0x8d, 0x3c, 0x1f, 0xaf, 0x81, 0xc8, 0x06, 0xc8, 0xf6, 0x93, 0x6d, 0x97, 0x00, - 0x88, 0x36, 0xea, 0x52, 0xb0, 0xc3, 0x82, 0xeb, 0xd0, 0xc6, 0xcf, 0x05, 0xe3, 0x17, 0x7f, 0xd8, - 0xcc, 0x30, 0x88, 0x6d, 0x89, 0x0f, 0xc3, 0xf1, 0x39, 0x14, 0xce, 0x5a, 0x0a, 0xd2, 0x89, 0x78, - 0x06, 0x1c, 0xef, 0xfa, 0x1c, 0x73, 0x42, 0x1f, 0xc0, 0x82, 0x5d, 0xf6, 0x00, 0xc0, 0x04, 0xdc, - 0x5a, 0xbf, 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, 0x7f, 0xf1, 0xc2, 0x99, 0x50, 0xc3, 0x1f, 0x00, 0x00, -}; -const StaticFile md5_js PROGMEM = {(sizeof(md5_js_content)/sizeof(md5_js_content[0])), md5_js_content}; - -static const uint8_t style_css_content[] PROGMEM = { - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x9d, 0x53, 0x5d, 0x6b, 0xdb, 0x30, - 0x14, 0x7d, 0xdf, 0xaf, 0x08, 0x94, 0x41, 0x0b, 0x76, 0xb0, 0x9b, 0x26, 0x59, 0x64, 0xf6, 0xb0, - 0x3d, 0x8c, 0xed, 0x61, 0x4f, 0x65, 0x4f, 0xa3, 0x14, 0x7d, 0x5c, 0xd9, 0x22, 0xb2, 0x25, 0xa4, - 0xeb, 0x26, 0x99, 0xf1, 0x7f, 0x9f, 0xfc, 0x11, 0x37, 0x69, 0x32, 0x28, 0xc3, 0x20, 0xb8, 0x1f, - 0xd2, 0x39, 0xf7, 0xdc, 0x63, 0x66, 0xc4, 0x21, 0x2a, 0xb0, 0xd4, 0x8d, 0xa5, 0x42, 0xa8, 0x2a, - 0x27, 0x49, 0x56, 0x52, 0x97, 0xab, 0x8a, 0x24, 0x2d, 0xeb, 0x8a, 0xac, 0x46, 0x34, 0x55, 0xa4, - 0x2a, 0x5b, 0xe3, 0x6f, 0x3c, 0x58, 0xf8, 0x6c, 0xa9, 0xf7, 0x3b, 0xe3, 0xc4, 0xd3, 0x69, 0x12, - 0x61, 0x8f, 0x4f, 0x8d, 0x34, 0x15, 0xc6, 0x5e, 0xfd, 0x01, 0x92, 0xae, 0xec, 0x3e, 0xeb, 0x43, - 0x49, 0x4b, 0xa5, 0x0f, 0x24, 0xa6, 0xd6, 0x6a, 0x88, 0xfd, 0xc1, 0x23, 0x94, 0xd1, 0x57, 0xad, - 0xaa, 0xed, 0x4f, 0xca, 0x1f, 0xfb, 0xf0, 0x5b, 0xe8, 0x8b, 0x1e, 0x21, 0x37, 0x30, 0x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0x93, 0xae, 0xdb, 0x0f, 0x7f, 0x01, 0x37, - 0xdb, 0x6e, 0xf6, 0xae, 0x04, 0x00, 0x00, -}; -const StaticFile style_css PROGMEM = {(sizeof(style_css_content)/sizeof(style_css_content[0])), style_css_content}; - -static const uint8_t favicon_ico_content[] PROGMEM = { - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xed, 0x99, 0x4b, 0x48, 0x15, 0x61, - 0x14, 0xc7, 0xcf, 0xc5, 0x17, 0x2e, 0x4a, 0x57, 0xe5, 0x63, 0xe1, 0x85, 0x42, 0x23, 0x8c, 0x8c, - 0x20, 0x4d, 0x45, 0xdb, 0x59, 0x14, 0x2e, 0x7a, 0xab, 0x68, 0x1b, 0x17, 0xae, 0x24, 0x41, 0xf1, - 0x41, 0xa0, 0x41, 0xa1, 0x11, 0x28, 0x1a, 0x2e, 0x12, 0x72, 0xe7, 0x03, 0x09, 0x74, 0x15, 0x54, - 0x1b, 0x97, 0xd9, 0x53, 0x23, 0x8a, 0x5a, 0x94, 0x25, 0x59, 0x91, 0x82, 0xa0, 0x81, 0x99, 0x39, - 0xfd, 0x8f, 0x73, 0x46, 0xbf, 0xc6, 0xb9, 0x73, 0x67, 0xee, 0x9d, 0xab, 0x41, 0x1e, 0xf8, 0x71, - 0xe7, 0x7e, 0xe7, 0xf1, 0x9f, 0xb9, 0xdf, 0x7c, 0x8f, 0x99, 0x4b, 0xe4, 0xa3, 0x28, 0x4a, 0x4c, - 0x24, 0x7c, 0xfa, 0xa9, 0x2a, 0x9a, 0xe8, 0x08, 0x11, 0x25, 0x25, 0xe9, 0xdf, 0xdb, 0xe2, 0x89, - 0x7a, 0xd1, 0xe6, 0xf7, 0xeb, 0xdf, 0x07, 0x11, 0x97, 0xbe, 0x93, 0x68, 0x1f, 0x62, 0x70, 0x88, - 0x16, 0xbd, 0x7d, 0xd5, 0x10, 0x37, 0x43, 0x3a, 0x0e, 0x2c, 0x06, 0xdc, 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0xf1, - 0x16, 0xfa, 0xfc, 0x50, 0x31, 0xbe, 0x09, 0xfa, 0xfc, 0x0e, 0xcd, 0x67, 0xf3, 0x1b, 0x1c, 0x02, - 0x87, 0x4d, 0xd4, 0x28, 0xf9, 0xc3, 0x16, 0x7e, 0x83, 0x61, 0x25, 0xae, 0xc6, 0xc2, 0x7f, 0xc8, - 0xea, 0xda, 0x1d, 0xdc, 0x93, 0xc5, 0x4a, 0xdd, 0x1e, 0x9b, 0xb8, 0x1e, 0x25, 0xae, 0xd8, 0xad, - 0xce, 0xb6, 0xfe, 0x3f, 0xab, 0x7f, 0x42, 0xa9, 0xdb, 0x6d, 0x13, 0xa7, 0xfe, 0x67, 0x75, 0xdc, - 0x43, 0xfd, 0x1d, 0xa4, 0xbf, 0x27, 0xe2, 0x77, 0xfc, 0x47, 0x6d, 0xe2, 0x72, 0x49, 0xdf, 0xef, - 0x3e, 0xe2, 0x1c, 0x27, 0xb5, 0xb5, 0xe5, 0x42, 0x6d, 0x03, 0x93, 0x71, 0x9a, 0xd6, 0xe2, 0xd3, - 0x70, 0x11, 0x1a, 0x36, 0x42, 0xcd, 0xcb, 0x78, 0x0e, 0x60, 0x16, 0xf1, 0x9c, 0x6f, 0x30, 0x47, - 0x94, 0x60, 0xc7, 0x24, 0x51, 0xdc, 0x28, 0x51, 0x14, 0xc3, 0xc7, 0x5a, 0xeb, 0x47, 0xcd, 0x8a, - 0x3f, 0x05, 0x2f, 0x43, 0xb9, 0xce, 0x1e, 0x00, 0x00, -}; -const StaticFile favicon_ico PROGMEM = {(sizeof(favicon_ico_content)/sizeof(favicon_ico_content[0])), favicon_ico_content}; - -} diff --git a/platformio/temphum/src/static.h b/platformio/temphum/src/static.h deleted file mode 100644 index 90560bf..0000000 --- a/platformio/temphum/src/static.h +++ /dev/null @@ -1,22 +0,0 @@ -/** - * This file is autogenerated with make_static.sh script - */ - -#pragma once - -#include <stdlib.h> - -namespace homekit::files { - -typedef struct { - size_t size; - const uint8_t* content; -} StaticFile; - -extern const StaticFile index_html; -extern const StaticFile app_js; -extern const StaticFile md5_js; -extern const StaticFile style_css; -extern const StaticFile favicon_ico; - -} diff --git a/platformio/temphum/src/stopwatch.h b/platformio/temphum/src/stopwatch.h deleted file mode 100644 index bac2fcc..0000000 --- a/platformio/temphum/src/stopwatch.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once - -#include <Arduino.h> - -namespace homekit { - -class StopWatch { -private: - unsigned long time; - -public: - StopWatch() : time(0) {}; - - inline void save() { - time = millis(); - } - - inline bool elapsed(unsigned long ms) { - unsigned long now = millis(); - if (now < time) { - // rollover? - time = now; - } else if (now - time >= ms) { - return true; - } - return false; - } -}; - -}
\ No newline at end of file diff --git a/platformio/temphum/src/temphum.cpp b/platformio/temphum/src/temphum.cpp index 0b6fbbe..9fcc2cc 100644 --- a/platformio/temphum/src/temphum.cpp +++ b/platformio/temphum/src/temphum.cpp @@ -1,16 +1,22 @@ -#include "temphum.h" -#include "logging.h" +#ifndef CONFIG_TARGET_ESP01 #include <Arduino.h> +#endif + +#include "temphum.h" namespace homekit::temphum { static const int addr = 0x40; void setup() { - pinMode(D2, OUTPUT); - pinMode(D3, OUTPUT); - - Wire.begin(D2, D3); +#ifndef CONFIG_TARGET_ESP01 + pinMode(CONFIG_SDA_GPIO, OUTPUT); + pinMode(CONFIG_SCL_GPIO, OUTPUT); + + Wire.begin(CONFIG_SDA_GPIO, CONFIG_SCL_GPIO); +#else + Wire.begin(); +#endif Wire.beginTransmission(addr); Wire.write(0xfe); diff --git a/platformio/temphum/src/util.h b/platformio/temphum/src/util.h deleted file mode 100644 index e0780d8..0000000 --- a/platformio/temphum/src/util.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once - -namespace homekit { - -inline size_t otaGetMaxUpdateSize() { - return (ESP.getFreeSketchSpace() - 0x1000) & 0xFFFFF000; -} - -inline void restart() { - ESP.restart(); -} - -}
\ No newline at end of file diff --git a/platformio/temphum/src/wifi.cpp b/platformio/temphum/src/wifi.cpp deleted file mode 100644 index 3d7e092..0000000 --- a/platformio/temphum/src/wifi.cpp +++ /dev/null @@ -1,48 +0,0 @@ -#include <pgmspace.h> -#include "config.def.h" -#include "wifi.h" -#include "config.h" -#include "logging.h" - -namespace homekit::wifi { - -using namespace homekit; -using homekit::config::ConfigData; - -const char NODE_ID[] = DEFAULT_NODE_ID; -const char AP_SSID[] = DEFAULT_WIFI_AP_SSID; -const char STA_SSID[] = DEFAULT_WIFI_STA_SSID; -const char STA_PSK[] = DEFAULT_WIFI_STA_PSK; - -void getConfig(ConfigData &cfg, const char** ssid, const char** psk, const char** hostname) { - if (cfg.flags.wifi_configured) { - *ssid = cfg.wifi_ssid; - *psk = cfg.wifi_psk; - *hostname = cfg.node_id; - } else { - *ssid = STA_SSID; - *psk = STA_PSK; - *hostname = NODE_ID; - } -} - -std::shared_ptr<std::list<ScanResult>> scan() { - if (WiFi.getMode() != WIFI_STA) { - PRINTLN("wifi::scan: switching mode to STA"); - WiFi.mode(WIFI_STA); - } - - std::shared_ptr<std::list<ScanResult>> results(new std::list<ScanResult>); - int count = WiFi.scanNetworks(); - for (int i = 0; i < count; i++) { - results->push_back(ScanResult { - .rssi = WiFi.RSSI(i), - .ssid = WiFi.SSID(i) - }); - } - - WiFi.scanDelete(); - return results; -} - -}
\ No newline at end of file diff --git a/platformio/temphum/src/wifi.h b/platformio/temphum/src/wifi.h deleted file mode 100644 index 1b95b2f..0000000 --- a/platformio/temphum/src/wifi.h +++ /dev/null @@ -1,36 +0,0 @@ -#pragma once - -#include <ESP8266WiFi.h> -#include <list> -#include <memory> -#include "config.h" - -namespace homekit::wifi { - -using homekit::config::ConfigData; - -struct ScanResult { - int rssi; - String ssid; -}; - -void getConfig(ConfigData& cfg, const char** ssid, const char** psk, const char** hostname); - -std::shared_ptr<std::list<ScanResult>> scan(); - -inline uint32_t getIPAsInteger() { - if (!WiFi.isConnected()) - return 0; - return WiFi.localIP().v4(); -} - -inline int8_t getRSSI() { - return WiFi.RSSI(); -} - -extern const char AP_SSID[]; -extern const char STA_SSID[]; -extern const char STA_PSK[]; -extern const char NODE_ID[]; - -}
\ No newline at end of file |