mirror of
https://github.com/lumapu/ahoy.git
synced 2025-07-15 23:45:13 +02:00
Pacth from homeautomation22
This commit is contained in:
parent
2df3c26657
commit
000ed8ac53
12 changed files with 191 additions and 38 deletions
|
@ -142,6 +142,9 @@ void webApi::getSystem(JsonObject obj) {
|
|||
obj[F("build")] = String(AUTO_GIT_HASH);
|
||||
obj[F("ts_uptime")] = mApp->getUptime();
|
||||
obj[F("ts_now")] = mApp->getTimestamp();
|
||||
obj[F("ts_sunrise")] = mApp->getSunrise();
|
||||
obj[F("ts_sunset")] = mApp->getSunset();
|
||||
obj[F("ts_sun_upd")] = mApp->getLatestSunTimestamp();
|
||||
obj[F("wifi_rssi")] = WiFi.RSSI();
|
||||
obj[F("disclaimer")] = mConfig->disclaimer;
|
||||
}
|
||||
|
@ -200,6 +203,13 @@ void webApi::getNtp(JsonObject obj) {
|
|||
obj[F("port")] = String(mConfig->ntpPort);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void webApi::getSun(JsonObject obj) {
|
||||
obj[F("lat")] = mConfig->sunLat ? String(mConfig->sunLat, 5) : "";
|
||||
obj[F("lon")] = mConfig->sunLat ? String(mConfig->sunLon, 5) : "";
|
||||
obj[F("disnightcom")] = mConfig->sunDisNightCom;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
void webApi::getPinout(JsonObject obj) {
|
||||
|
@ -267,6 +277,7 @@ void webApi::getSetup(JsonObject obj) {
|
|||
getInverterList(obj.createNestedObject(F("inverter")));
|
||||
getMqtt(obj.createNestedObject(F("mqtt")));
|
||||
getNtp(obj.createNestedObject(F("ntp")));
|
||||
getSun(obj.createNestedObject(F("sun")));
|
||||
getPinout(obj.createNestedObject(F("pinout")));
|
||||
getRadio(obj.createNestedObject(F("radio")));
|
||||
getSerial(obj.createNestedObject(F("serial")));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue