Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
0ffbba0
Fix: Allow sending of ChannelChangeCommand even if EnableCommands is …
tbnobody Jul 9, 2023
fe3d658
Feature: Turn off LED 1 if no inverters are enabled for polling
tbnobody Jul 10, 2023
99b3165
webapp: Update dependencies
tbnobody Jul 10, 2023
1871a9a
use FSPI for esp32-c3 and revise device profiles
kiffie Jun 5, 2023
b8c75b0
Merge branch 'pr1003' into dev
tbnobody Jul 10, 2023
56e2b46
Update espressif32 from 6.3.1 to 6.3.2
tbnobody Jul 10, 2023
0d07b1a
webapp: add app.js.gz
tbnobody Jul 10, 2023
cf91839
Upgrade espMqttClient from 1.4.3 to 1.4.4
tbnobody Jul 12, 2023
3b02ffe
webapp: Update dependencies
tbnobody Jul 12, 2023
9dbeec3
Fix: Set WiFi setScanMethod and setSortMethod also on first connect
tbnobody Jul 20, 2023
bf4dc56
Fix: Reboot loop if negative display pins and type where provided
tbnobody Jul 21, 2023
972dea2
Fix: Prevent runtime errors in webapp when invalid pin_mapping.json i…
tbnobody Jul 22, 2023
eaacce7
Feature: Show error in webapp if pin_mapping.json contains syntax errors
tbnobody Jul 22, 2023
cc0af37
webapp: Update dependencies
tbnobody Jul 22, 2023
0d5b938
Update olikraus/U8g2 from 2.34.22 to 2.35.3
tbnobody Jul 22, 2023
736220c
Reorder config struct components
tbnobody Jul 22, 2023
a06a56a
Harden config parser by defining right unsigned data type
tbnobody Jul 22, 2023
658a42d
Apply code formatter without functional changes
tbnobody Jul 22, 2023
a68c553
Code formatting without functional changes
tbnobody Jul 22, 2023
2e25fdc
Formatting style in platformio.ini
tbnobody Jul 22, 2023
8bfa7e5
Feature: Admin AccessPoint Timeout now configurable
madmartin Apr 16, 2023
1146e15
Move units from description to postfix for AP timeout
tbnobody Jul 22, 2023
92c9544
webapp: add app.js.gz
tbnobody Jul 22, 2023
9821c19
Fix: Uninitliazed variable used before first use
tbnobody Jul 31, 2023
14305a9
Fix: Prevent wrong values of statistics data because of non-atomic tr…
tbnobody Jul 31, 2023
698ecbc
Fix: Prevent wrong values of alarm data because of non-atomic transac…
tbnobody Jul 31, 2023
74169c3
Fix: Prevent wrong values of systemconfigpara data because of non-ato…
tbnobody Jul 31, 2023
ef65094
Fix: Prevent wrong values of devinfo data because of non-atomic trans…
tbnobody Jul 31, 2023
a90073c
webapp: Update dependencies
tbnobody Jul 31, 2023
c374a83
Update bblanchon/ArduinoJson from 6.21.2 to 6.21.3
tbnobody Jul 31, 2023
2eeb742
Update olikraus/U8g2 from 2.35.3 to 2.35.4
tbnobody Jul 31, 2023
5bbc67b
Fix: Clear parser buffers to prevent random numbers if no data was re…
tbnobody Jul 31, 2023
ba9bddf
webapp: Update dependencies
tbnobody Aug 1, 2023
77528f6
webapp: add app.js.gz
tbnobody Aug 1, 2023
686112e
Fix: Wrong detection of HM-300 inverters
tbnobody Aug 2, 2023
be09c40
Fix: Ensure that only completly assembled packets are put into the co…
tbnobody Aug 2, 2023
832df5a
Implement the command queue thread safe
tbnobody Aug 2, 2023
0bdee6e
Fix: Prevent access to nullptr object when reconnecting to mqtt
tbnobody Aug 3, 2023
10ba10d
cpplint: do not complain mutex include
tbnobody Aug 3, 2023
43cba67
Fix: Virtual console scrambled output when the output came from diffe…
tbnobody Aug 3, 2023
f3e3ec0
webapp: Update dependencies
tbnobody Aug 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Feature: Turn off LED 1 if no inverters are enabled for polling
This means that e.g. at night, when polling at night is disabled, LED 1 will be turned off now.
  • Loading branch information
tbnobody committed Jul 10, 2023
commit fe3d6588bc5d114d8c42097116033da917fb0a80
4 changes: 4 additions & 0 deletions include/Datastore.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ class DatastoreClass {
// True if at least one inverter is producing
bool getIsAtLeastOneProducing();

// True if at least one inverter is enabled for polling
bool getIsAtLeastOnePollEnabled();

// True if all enabled inverters are producing
bool getIsAllEnabledProducing();

Expand All @@ -75,6 +78,7 @@ class DatastoreClass {
bool _isAtLeastOneProducing = false;
bool _isAllEnabledProducing = false;
bool _isAllEnabledReachable = false;
bool _isAtLeastOnePollEnabled = false;
};

extern DatastoreClass Datastore;
14 changes: 14 additions & 0 deletions src/Datastore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ void DatastoreClass::loop()

uint8_t isProducing = 0;
uint8_t isReachable = 0;
uint8_t pollEnabledCount = 0;

DAT_SEMAPHORE_TAKE();

Expand Down Expand Up @@ -62,6 +63,10 @@ void DatastoreClass::loop()
continue;
}

if (inv->getEnablePolling()) {
pollEnabledCount++;
}

if (inv->isProducing()) {
isProducing++;
} else {
Expand Down Expand Up @@ -107,6 +112,7 @@ void DatastoreClass::loop()

_isAtLeastOneProducing = isProducing > 0;
_isAtLeastOneReachable = isReachable > 0;
_isAtLeastOnePollEnabled = pollEnabledCount > 0;

_totalDcIrradiation = _totalDcIrradiationInstalled > 0 ? _totalDcPowerIrradiation / _totalDcIrradiationInstalled * 100.0f : 0;

Expand Down Expand Up @@ -235,3 +241,11 @@ bool DatastoreClass::getIsAllEnabledReachable()
DAT_SEMAPHORE_GIVE();
return retval;
}

bool DatastoreClass::getIsAtLeastOnePollEnabled()
{
DAT_SEMAPHORE_TAKE();
bool retval = _isAtLeastOnePollEnabled;
DAT_SEMAPHORE_GIVE();
return retval;
}
2 changes: 1 addition & 1 deletion src/Led_Single.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void LedSingleClass::loop()

// Update inverter status
_ledState[1] = LedState_t::Off;
if (Hoymiles.getNumInverters()) {
if (Hoymiles.getNumInverters() && Datastore.getIsAtLeastOnePollEnabled()) {
// set LED status
if (Datastore.getIsAllEnabledReachable() && Datastore.getIsAllEnabledProducing()) {
_ledState[1] = LedState_t::On;
Expand Down