-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add color_mode field which should be supplied for HomeAssistant * Use color_mode instead of bulb_mode by default * Paged aliases (#801) * Increase size of json document used for MQTT state messages
- Loading branch information
Showing
57 changed files
with
2,107 additions
and
682 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,4 @@ | |
.vscode/launch.json | ||
/test/remote/settings.json | ||
/test/remote/espmh.env | ||
lib/Environment/wifi_credentials.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// | ||
// Created by chris on 9/14/2023. | ||
// | ||
|
||
#ifndef ESP8266_MILIGHT_HUB_PROJECTFS_H | ||
#define ESP8266_MILIGHT_HUB_PROJECTFS_H | ||
|
||
#ifdef MILIGHT_USE_LITTLE_FS | ||
#include <LittleFS.h> | ||
#define ProjectFS LittleFS | ||
#else | ||
#include <FS.h> | ||
#define ProjectFS SPIFFS | ||
#endif | ||
|
||
#endif //ESP8266_MILIGHT_HUB_PROJECTFS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// | ||
// Created by chris on 9/17/2023. | ||
// | ||
|
||
#ifndef ESP8266_MILIGHT_HUB_PROJECTWIFI_H | ||
#define ESP8266_MILIGHT_HUB_PROJECTWIFI_H | ||
|
||
#if __has_include(<wifi_credentials.h>) | ||
#include <wifi_credentials.h> | ||
#endif | ||
|
||
#if defined(ESPMH_WIFI_SSID) && defined(ESPMH_WIFI_PASSWORD) | ||
#define ESPMH_SETUP_WIFI(settings) { \ | ||
Serial.println(F(">>> ESPMH_WIFI_SETUP() <<<"));\ | ||
if (settings.wifiStaticIP.length() > 0) { \ | ||
Serial.printf_P(PSTR("Configuring static IP...%s\n"), settings.wifiStaticIP.c_str()); \ | ||
IPAddress _ip, _subnet, _gw;\ | ||
_ip.fromString(settings.wifiStaticIP);\ | ||
_subnet.fromString(settings.wifiStaticIPNetmask);\ | ||
_gw.fromString(settings.wifiStaticIPGateway);\ | ||
WiFi.config(_ip, _gw, _subnet);\ | ||
};\ | ||
WiFi.begin(ESPMH_WIFI_SSID, ESPMH_WIFI_PASSWORD); \ | ||
Serial.printf_P(PSTR("Connecting to %s...\n"), ESPMH_WIFI_SSID); \ | ||
while (WiFi.status() != WL_CONNECTED) {\ | ||
delay(500);\ | ||
Serial.print(".");\ | ||
}\ | ||
Serial.printf_P(PSTR("Connected to: %s with IP: "), ESPMH_WIFI_SSID); \ | ||
Serial.println(WiFi.localIP()); \ | ||
} | ||
#else | ||
#define ESPMH_SETUP_WIFI(settings) { } | ||
#endif | ||
|
||
#endif //ESP8266_MILIGHT_HUB_PROJECTWIFI_H |
Oops, something went wrong.