Skip to content

Commit ba84a06

Browse files
author
Luc
committed
Add signal strength in home page
seems having some difference between RSSI of current signal and RSSI of scanned AP - TBC
1 parent 88a15d5 commit ba84a06

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

esp8266/data/home.tpl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ $INCLUDE[header.inc]$
4343
<label>Connection to: </label><label class="text-info">$STA_SSID$</label><BR>
4444
<label>Channel: </label><label class="text-info">$STA_CHANNEL$</label><BR>
4545
<label>Status: </label><label class="text-info">$STA_STATUS$</label><BR>
46+
<label>Signal strength: </label><label class="text-info">$STA_SIGNAL$%</label><BR>
4647
<label>DHCP Client: </label><label class="text-info">$STA_DHCP_STATUS$</label><BR>
4748
<label>IP: </label><label class="text-info">$STA_IP$</label><BR>
4849
<label>Gateway: </label><label class="text-info">$STA_GW$</label><BR>

esp8266/webinterface.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,7 @@ const char VALUE_CHANGE_PASSWORD [] PROGMEM = "Change Password";
205205
const char MISSING_DATA [] PROGMEM = "Error: Missing data";
206206
const char EEPROM_NOWRITE [] PROGMEM = "Error: Cannot write to EEPROM";
207207
const char KEY_WEB_UPDATE [] PROGMEM = "$WEB_UPDATE_VISIBILITY$";
208+
const char KEY_STA_SIGNAL [] PROGMEM = "$STA_SIGNAL$";
208209

209210
bool WEBINTERFACE_CLASS::isHostnameValid(const char * hostname)
210211
{
@@ -994,6 +995,9 @@ void handle_web_interface_root()
994995
} else {
995996
ValuesList.add(FPSTR(VALUE_DISCONNECTED));
996997
}
998+
//Signal strength
999+
KeysList.add(FPSTR(KEY_STA_SIGNAL));
1000+
ValuesList.add(intTostr(100+WiFi.RSSI()));
9971001
//DHCP Client status
9981002
GetDHCPStatus(KeysList, ValuesList);
9991003
//IP address

keywords.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ $STA_MAC$ : Mac address of Station
6060
$STA_SSID$ : SSID used by STA
6161
$STA_CHANNEL$ : Channel
6262
$STA_STATUS$ : Connection Status
63+
$STA_SIGNAL$ : Signal strength
6364
$STA_DHCP_STATUS$ : DHCP Client status
6465
$STA_IP$ : STA IP
6566
$STA_GW$ : STA Gateway

0 commit comments

Comments
 (0)