mirror of https://github.com/arendst/Tasmota.git
Merge pull request #22 from arendst/development
Change SGP30 CO2 into eCO2
This commit is contained in:
commit
42cb3fd602
|
@ -48,6 +48,7 @@
|
|||
#define D_JSON_DATA "Data"
|
||||
#define D_JSON_DNSSERVER "DNSServer"
|
||||
#define D_JSON_DONE "Done"
|
||||
#define D_JSON_ECO2 "eCO2"
|
||||
#define D_JSON_EMPTY "Empty"
|
||||
#define D_JSON_ENDDST "EndDST" // End Daylight Savings Time
|
||||
#define D_JSON_ERASE "Erase"
|
||||
|
@ -481,7 +482,7 @@ const char HTTP_SNS_PRESSURE[] PROGMEM = "%s{s}%s " D_PRESSURE "{m}%s " D_UNIT_P
|
|||
const char HTTP_SNS_SEAPRESSURE[] PROGMEM = "%s{s}%s " D_PRESSUREATSEALEVEL "{m}%s " D_UNIT_PRESSURE "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
|
||||
const char HTTP_SNS_ANALOG[] PROGMEM = "%s{s}%s " D_ANALOG_INPUT "%d{m}%d{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
|
||||
|
||||
#if defined(USE_MHZ19) || defined(USE_SENSEAIR) || defined(USE_SGP30)
|
||||
#if defined(USE_MHZ19) || defined(USE_SENSEAIR)
|
||||
const char HTTP_SNS_CO2[] PROGMEM = "%s{s}%s " D_CO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
|
||||
#endif // USE_WEBSERVER
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "Server DNS"
|
||||
#define D_DONE "Provedeno"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulace"
|
||||
#define D_ENABLED "Otevřený"
|
||||
#define D_ERASE "Smaž"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS Server"
|
||||
#define D_DONE "erledigt"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulation"
|
||||
#define D_ENABLED "aktiviert"
|
||||
#define D_ERASE "löschen"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS Server"
|
||||
#define D_DONE "Done"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulation"
|
||||
#define D_ENABLED "Enabled"
|
||||
#define D_ERASE "Erase"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS Server"
|
||||
#define D_DONE "Listo"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulación"
|
||||
#define D_ENABLED "Habilitado"
|
||||
#define D_ERASE "Borrar"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "Serveur DNS"
|
||||
#define D_DONE "Fait"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulation"
|
||||
#define D_ENABLED "Activé"
|
||||
#define D_ERASE "Effacer"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS Szerver"
|
||||
#define D_DONE "Kész"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emuláció"
|
||||
#define D_ENABLED "Engedélyezve"
|
||||
#define D_ERASE "Törlés"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS Server"
|
||||
#define D_DONE "Fatto"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulazione"
|
||||
#define D_ENABLED "Abilitato"
|
||||
#define D_ERASE "Cancellare"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS Server"
|
||||
#define D_DONE "Klaar"
|
||||
#define D_DST_TIME "ZT"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulatie"
|
||||
#define D_ENABLED "Geactiveerd"
|
||||
#define D_ERASE "Wissen"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "Server DNS"
|
||||
#define D_DONE "Wykonane"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulacja"
|
||||
#define D_ENABLED "Otwarty"
|
||||
#define D_ERASE "Nadpisz"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "Servidor DNS"
|
||||
#define D_DONE "Concluído"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Emulação"
|
||||
#define D_ENABLED "Habilitado"
|
||||
#define D_ERASE "Apagar"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS Сервер"
|
||||
#define D_DONE "Выполнено"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "Эмуляция"
|
||||
#define D_ENABLED "Активно"
|
||||
#define D_ERASE "Стирать"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS服务器"
|
||||
#define D_DONE "完成"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "设备模拟"
|
||||
#define D_ENABLED "启用"
|
||||
#define D_ERASE "擦除"
|
||||
|
|
|
@ -77,6 +77,7 @@
|
|||
#define D_DNS_SERVER "DNS伺服器"
|
||||
#define D_DONE "完成"
|
||||
#define D_DST_TIME "DST"
|
||||
#define D_ECO2 "eCO2"
|
||||
#define D_EMULATION "設備模擬"
|
||||
#define D_ENABLED "啟用"
|
||||
#define D_ERASE "刪除"
|
||||
|
|
|
@ -64,20 +64,21 @@ void Sgp30Update() // Perform every second to ensure proper operation of the ba
|
|||
}
|
||||
}
|
||||
|
||||
const char HTTP_SNS_TVOC[] PROGMEM = "%s{s}SGP30 " D_TVOC "{m}%d " D_UNIT_PARTS_PER_BILLION "{e}";
|
||||
const char HTTP_SNS_SGP30[] PROGMEM = "%s"
|
||||
"{s}SGP30 " D_ECO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}" // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
|
||||
"{s}SGP30 " D_TVOC "{m}%d " D_UNIT_PARTS_PER_BILLION "{e}";
|
||||
|
||||
void Sgp30Show(boolean json)
|
||||
{
|
||||
if (sgp30_ready) {
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"SGP30\":{\"" D_JSON_CO2 "\":%d,\"" D_JSON_TVOC "\":%d}"), mqtt_data, sgp.eCO2, sgp.TVOC);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"SGP30\":{\"" D_JSON_ECO2 "\":%d,\"" D_JSON_TVOC "\":%d}"), mqtt_data, sgp.eCO2, sgp.TVOC);
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_AIRQUALITY, sgp.eCO2);
|
||||
DomoticzSensor(DZ_AIRQUALITY, sgp.eCO2);
|
||||
#endif // USE_DOMOTICZ
|
||||
} else {
|
||||
#ifdef USE_WEBSERVER
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_CO2, mqtt_data, "SGP30", sgp.eCO2);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_TVOC, mqtt_data, sgp.TVOC);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_SGP30, mqtt_data, sgp.eCO2, sgp.TVOC);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue