mirror of https://github.com/arendst/Tasmota.git
Update PMS5003 naming
This commit is contained in:
parent
abdbe628db
commit
b60ccddfe6
|
@ -1,5 +1,5 @@
|
|||
/* 5.11.1g
|
||||
* Add support for PMS5003 particle concentration sensor
|
||||
* Add support for PMS5003 and PMS7003 particle concentration sensor
|
||||
* Reinstate console weblog to 20 lines after some webpage rewrite
|
||||
* Add command SetOption20 to allow update of Dimmer/Color/Ct without turning power on (#1719)
|
||||
* Update language files nl-NL (#1723) and es-AR (#1722)
|
||||
|
|
|
@ -376,9 +376,9 @@
|
|||
#define D_SHT1X_FOUND "SHT1X gefunden"
|
||||
|
||||
// xsns_18_pms5003.ino
|
||||
#define D_STANDARD_CONCENTRATION "Std Concentration"
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "Env Concentration"
|
||||
#define D_PARTICALS_BEYOND "Particals beyond"
|
||||
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
|
||||
#define D_PARTICALS_BEYOND "Particals"
|
||||
|
||||
// sonoff_template.h
|
||||
// Max string length is 8 characters including suffixes
|
||||
|
|
|
@ -376,9 +376,9 @@
|
|||
#define D_SHT1X_FOUND "SHT1X found"
|
||||
|
||||
// xsns_18_pms5003.ino
|
||||
#define D_STANDARD_CONCENTRATION "Std Concentration"
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "Env Concentration"
|
||||
#define D_PARTICALS_BEYOND "Particals beyond"
|
||||
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
|
||||
#define D_PARTICALS_BEYOND "Particals"
|
||||
|
||||
// sonoff_template.h
|
||||
// Max string length is 8 characters including suffixes
|
||||
|
|
|
@ -376,9 +376,9 @@
|
|||
#define D_SHT1X_FOUND "SHT1X encontrado"
|
||||
|
||||
// xsns_18_pms5003.ino
|
||||
#define D_STANDARD_CONCENTRATION "Concentración Standard"
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "Concentración en Medio Ambiente"
|
||||
#define D_PARTICALS_BEYOND "Partículas sobre"
|
||||
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
|
||||
#define D_PARTICALS_BEYOND "Partículas"
|
||||
|
||||
// sonoff_template.h
|
||||
// Max string length is 8 characters including suffixes
|
||||
|
|
|
@ -376,9 +376,9 @@
|
|||
#define D_SHT1X_FOUND "SHT1X found"
|
||||
|
||||
// xsns_18_pms5003.ino
|
||||
#define D_STANDARD_CONCENTRATION "Concentration standard"
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "Concentration environmentale"
|
||||
#define D_PARTICALS_BEYOND "Particules au-delà"
|
||||
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
|
||||
#define D_PARTICALS_BEYOND "Particules"
|
||||
|
||||
// sonoff_template.h
|
||||
// Max string length is 8 characters including suffixes
|
||||
|
|
|
@ -376,9 +376,9 @@
|
|||
#define D_SHT1X_FOUND "SHT1X trovato"
|
||||
|
||||
// xsns_18_pms5003.ino
|
||||
#define D_STANDARD_CONCENTRATION "Concentrazione Standard"
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "Concentrazione Ambientale"
|
||||
#define D_PARTICALS_BEYOND "Particelle oltre"
|
||||
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
|
||||
#define D_PARTICALS_BEYOND "Particelle"
|
||||
|
||||
// sonoff_template.h
|
||||
// Max string length is 8 characters including suffixes
|
||||
|
|
|
@ -376,9 +376,9 @@
|
|||
#define D_SHT1X_FOUND "SHT1X gevonden"
|
||||
|
||||
// xsns_18_pms5003.ino
|
||||
#define D_STANDARD_CONCENTRATION "Std concentratie"
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "Omg concentratie"
|
||||
#define D_PARTICALS_BEYOND "Deeltjes groter dan"
|
||||
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
|
||||
#define D_PARTICALS_BEYOND "Stofdeeltjes"
|
||||
|
||||
// sonoff_template.h
|
||||
// Max string length is 8 characters including suffixes
|
||||
|
|
|
@ -376,9 +376,9 @@
|
|||
#define D_SHT1X_FOUND "SHT1X znaleziony"
|
||||
|
||||
// xsns_18_pms5003.ino
|
||||
#define D_STANDARD_CONCENTRATION "Standard Concentration"
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "Environmental Concentration"
|
||||
#define D_PARTICALS_BEYOND "Particals beyond"
|
||||
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
|
||||
#define D_PARTICALS_BEYOND "Particals"
|
||||
|
||||
// sonoff_template.h
|
||||
// Max string length is 8 characters including suffixes
|
||||
|
|
|
@ -376,8 +376,8 @@
|
|||
#define D_SHT1X_FOUND "发现 SHT1X 传感器"
|
||||
|
||||
// xsns_18_pms5003.ino
|
||||
#define D_STANDARD_CONCENTRATION "标准颗粒物浓度"
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "大气环境下浓度"
|
||||
#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter
|
||||
#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter
|
||||
#define D_PARTICALS_BEYOND "颗粒物直径大于"
|
||||
|
||||
// sonoff_template.h
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
xsns_18_pms5003.ino - PMS5003 particle concentration sensor support for Sonoff-Tasmota
|
||||
xsns_18_pms5003.ino - PMS5003-7003 particle concentration sensor support for Sonoff-Tasmota
|
||||
|
||||
Copyright (C) 2018 Theo Arends
|
||||
|
||||
|
@ -19,7 +19,8 @@
|
|||
|
||||
#ifdef USE_PMS5003
|
||||
/*********************************************************************************************\
|
||||
* PlanTower PMS5003 particle concentration sensor
|
||||
* PlanTower PMS5003 and PMS7003 particle concentration sensor
|
||||
* For background information see http://aqicn.org/sensor/pms5003-7003/
|
||||
\*********************************************************************************************/
|
||||
|
||||
#include <TasmotaSerial.h>
|
||||
|
@ -105,32 +106,32 @@ void PmsInit()
|
|||
|
||||
#ifdef USE_WEBSERVER
|
||||
const char HTTP_PMS5003_SNS[] PROGMEM = "%s"
|
||||
"{s}" D_STANDARD_CONCENTRATION " 1" D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}" D_STANDARD_CONCENTRATION " 2" D_DECIMAL_SEPARATOR "5" D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}" D_STANDARD_CONCENTRATION " 10" D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}" D_ENVIRONMENTAL_CONCENTRATION " 1" D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}" D_ENVIRONMENTAL_CONCENTRATION " 2" D_DECIMAL_SEPARATOR "5" D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}" D_ENVIRONMENTAL_CONCENTRATION " 10" D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}" D_PARTICALS_BEYOND " 0" D_DECIMAL_SEPARATOR "3" D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}" D_PARTICALS_BEYOND " 0" D_DECIMAL_SEPARATOR "5" D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}" D_PARTICALS_BEYOND " 1" D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}" D_PARTICALS_BEYOND " 2" D_DECIMAL_SEPARATOR "5" D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}" D_PARTICALS_BEYOND " 5" D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}" D_PARTICALS_BEYOND " 10" D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
|
||||
// "{s}PMS5003 " D_STANDARD_CONCENTRATION " 1 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
// "{s}PMS5003 " D_STANDARD_CONCENTRATION " 2.5 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
// "{s}PMS5003 " D_STANDARD_CONCENTRATION " 10 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}PMS5003 " D_ENVIRONMENTAL_CONCENTRATION " 1 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}PMS5003 " D_ENVIRONMENTAL_CONCENTRATION " 2.5 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}PMS5003 " D_ENVIRONMENTAL_CONCENTRATION " 10 " D_UNIT_MICROMETER "{m}%d " D_UNIT_MICROGRAM_PER_CUBIC_METER "{e}"
|
||||
"{s}PMS5003 " D_PARTICALS_BEYOND " 0.3 " D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}PMS5003 " D_PARTICALS_BEYOND " 0.5 " D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}PMS5003 " D_PARTICALS_BEYOND " 1 " D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}PMS5003 " D_PARTICALS_BEYOND " 2.5 " D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}PMS5003 " D_PARTICALS_BEYOND " 5 " D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"
|
||||
"{s}PMS5003 " D_PARTICALS_BEYOND " 10 " D_UNIT_MICROMETER "{m}%d " D_UNIT_PARTS_PER_DECILITER "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
|
||||
#endif // USE_WEBSERVER
|
||||
|
||||
void PmsShow(boolean json)
|
||||
{
|
||||
if (pms_valid) {
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"PMS5003\":{\"SC1\":%d,\"SC2.5\":%d,\"SC10\":%d,\"EC1\":%d,\"EC2.5\":%d,\"EC10\":%d,\"PB0.3\":%d,\"PB0.5\":%d,\"PB1\":%d,\"PB2.5\":%d,\"PB5\":%d,\"PB10\":%d}"), mqtt_data,
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"PMS5003\":{\"CF1\":%d,\"CF2.5\":%d,\"CF10\":%d,\"PM1\":%d,\"PM2.5\":%d,\"PM10\":%d,\"PB0.3\":%d,\"PB0.5\":%d,\"PB1\":%d,\"PB2.5\":%d,\"PB5\":%d,\"PB10\":%d}"), mqtt_data,
|
||||
pms_data.pm10_standard, pms_data.pm25_standard, pms_data.pm100_standard,
|
||||
pms_data.pm10_env, pms_data.pm25_env, pms_data.pm100_env,
|
||||
pms_data.particles_03um, pms_data.particles_05um, pms_data.particles_10um, pms_data.particles_25um, pms_data.particles_50um, pms_data.particles_100um);
|
||||
#ifdef USE_WEBSERVER
|
||||
} else {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_PMS5003_SNS, mqtt_data,
|
||||
pms_data.pm10_standard, pms_data.pm25_standard, pms_data.pm100_standard,
|
||||
// pms_data.pm10_standard, pms_data.pm25_standard, pms_data.pm100_standard,
|
||||
pms_data.pm10_env, pms_data.pm25_env, pms_data.pm100_env,
|
||||
pms_data.particles_03um, pms_data.particles_05um, pms_data.particles_10um, pms_data.particles_25um, pms_data.particles_50um, pms_data.particles_100um);
|
||||
#endif // USE_WEBSERVER
|
||||
|
|
Loading…
Reference in New Issue