Skip to content

Commit

Permalink
Development continues...
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieucarbou committed Mar 14, 2024
1 parent 6fc90c9 commit f67e13b
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 45 deletions.
9 changes: 1 addition & 8 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@

version: 2
updates:
- package-ecosystem: "gitsubmodule"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "mathieucarbou"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "weekly"
reviewers:
- "mathieucarbou"
2 changes: 1 addition & 1 deletion .github/workflows/build-oss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ jobs:

- name: Release
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body: ${{steps.github_release.outputs.changelog}}
draft: false
Expand Down
20 changes: 0 additions & 20 deletions .github/workflows/dependabot.yml

This file was deleted.

4 changes: 1 addition & 3 deletions lib/MycilaTime/MycilaTime.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
*/
#pragma once

#include <MycilaNTP.h>

#include <WString.h>
#include <time.h>

Expand Down Expand Up @@ -33,7 +31,7 @@ namespace Mycila {
static time_t getUnixTime() {
time_t now;
struct tm timeinfo;
if (!NTP.isSynced() || !getLocalTime(&timeinfo, 5))
if (!getLocalTime(&timeinfo, 5))
return 0;
time(&now);
return now;
Expand Down
6 changes: 3 additions & 3 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,22 @@ lib_compat_mode = strict
lib_ldf_mode = deep+
; https://registry.platformio.org/
lib_deps =
bblanchon/ArduinoJson @ 7.0.3
bblanchon/ArduinoJson @ 7.0.4
esp-arduino-libs/ESP32_Button @ 0.0.1
esphome/AsyncTCP-esphome @ 2.1.3
mathieucarbou/Dimmable Light for Arduino @ 2.0.0
mathieucarbou/ESP Async WebServer @ 2.7.0
mathieucarbou/MycilaHADiscovery @ 1.0.1
mathieucarbou/MycilaConfig @ 1.4.0
mathieucarbou/MycilaEasyDisplay @ 1.0.1
mathieucarbou/MycilaESPConnect @ 3.2.3
mathieucarbou/MycilaESPConnect @ 3.2.4
mathieucarbou/MycilaJSY @ 6.0.3
mathieucarbou/MycilaLogger @ 2.2.0
mathieucarbou/MycilaMQTT @ 3.0.0
mathieucarbou/MycilaNTP @ 2.2.1
mathieucarbou/MycilaPZEM004Tv3 @ 1.1.5
mathieucarbou/MycilaRelay @ 3.0.0
mathieucarbou/MycilaTaskManager @ 1.2.2
mathieucarbou/MycilaTaskManager @ 1.2.3
mathieucarbou/MycilaTaskMonitor @ 2.0.0
milesburton/DallasTemperature @ 3.11.0
olikraus/U8g2 @ 2.35.9
Expand Down
2 changes: 1 addition & 1 deletion src/YaSolR_Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
void YaSolR::YaSolRClass::_initConfig() {
Mycila::Logger.info(TAG, "Initializing Config System...");

Mycila::Config.begin(84);
Mycila::Config.begin(90);

String mqttName = String(Mycila::AppInfo.name + "_" + Mycila::AppInfo.id);
mqttName.toLowerCase();
Expand Down
19 changes: 11 additions & 8 deletions src/YaSolR_Tasks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,26 +87,29 @@ Mycila::Task resetTask("resetTask", [](void* params) {
});

Mycila::Task startNetworkServicesTask("startNetworkServicesTask", [](void* params) {
Mycila::Logger.info(TAG, "Starting network services...");

Mycila::Logger.info(TAG, "Enable Web Server...");
webServer.onNotFound([](AsyncWebServerRequest* request) {
request->send(404);
});
webServer.begin();
MDNS.addService("http", "tcp", 80);

if (!Mycila::Config.getBool(KEY_AP_MODE_ENABLE) && Mycila::Config.getBool(KEY_MQTT_ENABLE))
if (!Mycila::Config.getBool(KEY_AP_MODE_ENABLE) && Mycila::Config.getBool(KEY_MQTT_ENABLE)) {
Mycila::Logger.info(TAG, "Enable MQTT...");
Mycila::MQTT.begin(YaSolR::YaSolR.getMQTTConfig());
else
} else
Mycila::Logger.warn(TAG, "MQTT not enabled");
if (!Mycila::Config.getBool(KEY_AP_MODE_ENABLE))

if (!Mycila::Config.getBool(KEY_AP_MODE_ENABLE)) {
Mycila::Logger.info(TAG, "NTP Sync...");
Mycila::NTP.sync(Mycila::Config.get(KEY_NTP_SERVER));
}

Mycila::Buzzer.beep();
});

Mycila::Task stopNetworkServicesTask("stopNetworkServicesTask", [](void* params) {
Mycila::Logger.info(TAG, "Stopping network services...");
Mycila::Logger.info(TAG, "Disable MQTT...");
Mycila::MQTT.end();

Mycila::Logger.info(TAG, "Disable Web Server...");
Expand Down Expand Up @@ -675,10 +678,10 @@ void YaSolR::YaSolRClass::_initTasks() {
otaPrepareTask.setDebugWhen(DEBUG_ENABLED);
output1TemperatureTask.setDebugWhen(DEBUG_ENABLED);
output2TemperatureTask.setDebugWhen(DEBUG_ENABLED);
profilerTask.setDebugWhen(DEBUG_ENABLED);
// profilerTask.setDebugWhen(DEBUG_ENABLED);
resetTask.setDebugWhen(DEBUG_ENABLED);
restartTask.setDebugWhen(DEBUG_ENABLED);
stackMonitorTask.setDebugWhen(DEBUG_ENABLED);
// stackMonitorTask.setDebugWhen(DEBUG_ENABLED);
startNetworkServicesTask.setDebugWhen(DEBUG_ENABLED);
stopNetworkServicesTask.setDebugWhen(DEBUG_ENABLED);
systemTemperatureTask.setDebugWhen(DEBUG_ENABLED);
Expand Down
2 changes: 1 addition & 1 deletion src/YaSolR_Website_Update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ void YaSolR::WebsiteClass::_status(Card* card, const char* key, bool enabled, bo
if (!configEnabled)
card->update("Disabled", DASH_STATUS_IDLE);
else if (!enabled)
card->update("Unable to start", DASH_STATUS_DANGER);
card->update("Failed to start", DASH_STATUS_DANGER);
else if (!active)
card->update(err, DASH_STATUS_WARNING);
else
Expand Down

0 comments on commit f67e13b

Please sign in to comment.