mirror of
https://github.com/UtilitechAS/amsreader-firmware.git
synced 2026-01-26 04:11:18 +00:00
Continued work with v1.1.0
- Merge branch 'low_power' into dev-v1.1.0 - Corrected accumulated import/export from Aidon - Added VCC and RSSI to MQTT messages Changes in UI: - New top navbar - Show VCC and WiFi information - Show MQTT error messages - Show ESP, HAN, WiFi and MQTT status badge - Show accumulated Import/export
This commit is contained in:
@@ -28,8 +28,8 @@ void HanConfigAp::setup(int accessPointButtonPin, configuration* config, Stream*
|
||||
// Assign pin for boot as AP
|
||||
pinMode(accessPointButtonPin, INPUT_PULLUP);
|
||||
|
||||
// Test if we're holding down the AP pin, over 5 seconds
|
||||
int time = millis() + 5000;
|
||||
// Test if we're holding down the AP pin, over 1 second
|
||||
int time = millis() + 1000;
|
||||
print("Press the AP button now to boot as access point");
|
||||
while (millis() < time)
|
||||
{
|
||||
@@ -55,8 +55,8 @@ void HanConfigAp::setup(int accessPointButtonPin, configuration* config, Stream*
|
||||
WiFi.mode(WIFI_OFF);
|
||||
delay(2000);
|
||||
|
||||
WiFi.softAP(AP_SSID);
|
||||
WiFi.mode(WIFI_AP);
|
||||
WiFi.softAP(AP_SSID);
|
||||
|
||||
/* Setup the DNS server redirecting all the domains to this IP */
|
||||
dnsServer.setErrorReplyCode(DNSReplyCode::NoError);
|
||||
|
||||
@@ -102,10 +102,10 @@ static void hanToJsonAidon3phase(int listSize, JsonObject& data, HanReader& hanR
|
||||
|
||||
if (listSize >= (int)Aidon::List3PhaseLong)
|
||||
{
|
||||
data["tPI"] = hanReader.getInt( (int)Aidon_List3Phase::CumulativeActiveImportEnergy);
|
||||
data["tPO"] = hanReader.getInt( (int)Aidon_List3Phase::CumulativeActiveExportEnergy);
|
||||
data["tQI"] = hanReader.getInt( (int)Aidon_List3Phase::CumulativeReactiveImportEnergy);
|
||||
data["tQO"] = hanReader.getInt( (int)Aidon_List3Phase::CumulativeReactiveExportEnergy);
|
||||
data["tPI"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::CumulativeActiveImportEnergy)) / 100;
|
||||
data["tPO"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::CumulativeActiveExportEnergy)) / 100;
|
||||
data["tQI"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::CumulativeReactiveImportEnergy)) / 100;
|
||||
data["tQO"] = ((double) hanReader.getInt( (int)Aidon_List3Phase::CumulativeReactiveExportEnergy)) / 100;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,10 +126,10 @@ static void hanToJsonAidon1phase(int listSize, JsonObject& data, HanReader& hanR
|
||||
|
||||
if (listSize >= (int)Aidon::List1PhaseLong)
|
||||
{
|
||||
data["tPI"] = hanReader.getInt( (int)Aidon_List1Phase::CumulativeActiveImportEnergy);
|
||||
data["tPO"] = hanReader.getInt( (int)Aidon_List1Phase::CumulativeActiveExportEnergy);
|
||||
data["tQI"] = hanReader.getInt( (int)Aidon_List1Phase::CumulativeReactiveImportEnergy);
|
||||
data["tQO"] = hanReader.getInt( (int)Aidon_List1Phase::CumulativeReactiveExportEnergy);
|
||||
data["tPI"] = ((double) hanReader.getInt( (int)Aidon_List1Phase::CumulativeActiveImportEnergy)) / 100;
|
||||
data["tPO"] = ((double) hanReader.getInt( (int)Aidon_List1Phase::CumulativeActiveExportEnergy)) / 100;
|
||||
data["tQI"] = ((double) hanReader.getInt( (int)Aidon_List1Phase::CumulativeReactiveImportEnergy)) / 100;
|
||||
data["tQO"] = ((double) hanReader.getInt( (int)Aidon_List1Phase::CumulativeReactiveExportEnergy)) / 100;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -154,10 +154,10 @@ static void hanToJsonAidon3phaseIT(int listSize, JsonObject& data, HanReader& ha
|
||||
|
||||
if (listSize >= (int)Aidon::List3PhaseITLong)
|
||||
{
|
||||
data["tPI"] = hanReader.getInt( (int)Aidon_List3PhaseIT::CumulativeActiveImportEnergy);
|
||||
data["tPO"] = hanReader.getInt( (int)Aidon_List3PhaseIT::CumulativeActiveExportEnergy);
|
||||
data["tQI"] = hanReader.getInt( (int)Aidon_List3PhaseIT::CumulativeReactiveImportEnergy);
|
||||
data["tQO"] = hanReader.getInt( (int)Aidon_List3PhaseIT::CumulativeReactiveExportEnergy);
|
||||
data["tPI"] = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::CumulativeActiveImportEnergy)) / 100;
|
||||
data["tPO"] = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::CumulativeActiveExportEnergy)) / 100;
|
||||
data["tQI"] = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::CumulativeReactiveImportEnergy)) / 100;
|
||||
data["tQO"] = ((double) hanReader.getInt( (int)Aidon_List3PhaseIT::CumulativeReactiveExportEnergy)) / 100;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user