mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-23 18:56:38 +00:00
Add Wifi channel number
Add Wifi channel number to state message (#3664)
This commit is contained in:
parent
c6a14c5fe7
commit
5623924813
@ -1,6 +1,7 @@
|
||||
/* 6.2.0.1 20180902
|
||||
* Fix possible ambiguity on command parameters if StateText contains numbers only (#3656)
|
||||
* Fix possible exception due to buffer overflow (#3659)
|
||||
* Add Wifi channel number to state message (#3664)
|
||||
*
|
||||
* 6.2.0 20180901
|
||||
* Allow user override of define MAX_RULE_VARS and MAX_RULE_TIMERS (#3561)
|
||||
|
@ -40,6 +40,7 @@
|
||||
#define D_JSON_BOOTVERSION "Boot"
|
||||
#define D_JSON_BOOTCOUNT "BootCount"
|
||||
#define D_JSON_BUILDDATETIME "BuildDateTime"
|
||||
#define D_JSON_CHANNEL "Channel"
|
||||
#define D_JSON_CO2 "CarbonDioxide"
|
||||
#define D_JSON_COMMAND "Command"
|
||||
#define D_JSON_CONNECT_FAILED "Connect failed"
|
||||
|
@ -1532,8 +1532,8 @@ void MqttShowState()
|
||||
MqttShowPWMState();
|
||||
}
|
||||
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_WIFI "\":{\"" D_JSON_AP "\":%d,\"" D_JSON_SSID "\":\"%s\",\"" D_JSON_RSSI "\":%d,\"" D_JSON_APMAC_ADDRESS "\":\"%s\"}}"),
|
||||
mqtt_data, Settings.sta_active +1, Settings.sta_ssid[Settings.sta_active], WifiGetRssiAsQuality(WiFi.RSSI()), WiFi.BSSIDstr().c_str());
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_WIFI "\":{\"" D_JSON_AP "\":%d,\"" D_JSON_SSID "\":\"%s\",\"" D_JSON_CHANNEL "\":%d,\"" D_JSON_RSSI "\":%d,\"" D_JSON_APMAC_ADDRESS "\":\"%s\"}}"),
|
||||
mqtt_data, Settings.sta_active +1, Settings.sta_ssid[Settings.sta_active], WiFi.channel(), WifiGetRssiAsQuality(WiFi.RSSI()), WiFi.BSSIDstr().c_str());
|
||||
}
|
||||
|
||||
boolean MqttShowSensor()
|
||||
|
Loading…
x
Reference in New Issue
Block a user