mirror of https://github.com/arendst/Tasmota.git
v5.10.0f
5.10.0f * Differentiate between JSON text defines and other text defines to allow for English JSON while using different locale (#1449) * Fix display of build date and time in non-english locale (#1465)
This commit is contained in:
parent
1e336f5e20
commit
5639b6d966
|
@ -1,7 +1,7 @@
|
|||
## Sonoff-Tasmota
|
||||
Provide ESP8266 based Sonoff by [iTead Studio](https://www.itead.cc/) and ElectroDragon IoT Relay with Serial, Web and MQTT control allowing 'Over the Air' or OTA firmware updates using Arduino IDE.
|
||||
|
||||
Current version is **5.10.0e** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
|
||||
Current version is **5.10.0f** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
|
||||
|
||||
### ATTENTION All versions
|
||||
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
/* 5.10.0e
|
||||
/* 5.10.0f
|
||||
* Differentiate between JSON text defines and other text defines to allow for English JSON while using different locale (#1449)
|
||||
* Fix display of build date and time in non-english locale (#1465)
|
||||
*
|
||||
* 5.10.0e
|
||||
* Add Italian language file (#1449)
|
||||
* Fix Wemo Emulation once again closest to issue (#1357)
|
||||
* Add support for sensor SHT3x
|
||||
* Add support for sensor SHT3x (#1314)
|
||||
*
|
||||
* 5.10.0d
|
||||
* Renamed commands Color2,3,4 to Color3,4,5
|
||||
|
|
|
@ -33,12 +33,14 @@
|
|||
enum UnitNames {
|
||||
UNIT_AMPERE,
|
||||
UNIT_HOUR,
|
||||
UNIT_KILOOHM,
|
||||
UNIT_KILOWATTHOUR,
|
||||
UNIT_LUX,
|
||||
UNIT_MICROSECOND,
|
||||
UNIT_MILLIAMPERE,
|
||||
UNIT_MILLISECOND,
|
||||
UNIT_MINUTE,
|
||||
UNIT_PPM,
|
||||
UNIT_PRESSURE,
|
||||
UNIT_SECOND,
|
||||
UNIT_SECTORS,
|
||||
|
@ -48,12 +50,14 @@ enum UnitNames {
|
|||
const char kUnitNames[] PROGMEM =
|
||||
D_UNIT_AMPERE "|"
|
||||
D_UNIT_HOUR "|"
|
||||
D_UNIT_KILOOHM "|"
|
||||
D_UNIT_KILOWATTHOUR "|"
|
||||
D_UNIT_LUX "|"
|
||||
D_UNIT_MICROSECOND "|"
|
||||
D_UNIT_MILLIAMPERE "|"
|
||||
D_UNIT_MILLISECOND "|"
|
||||
D_UNIT_MINUTE "|"
|
||||
D_UNIT_PPM "|"
|
||||
D_UNIT_PRESSURE "|"
|
||||
D_UNIT_SECOND "|"
|
||||
D_UNIT_SECTORS "|"
|
||||
|
@ -77,7 +81,7 @@ const char S_JSON_COMMAND_INDEX_NVALUE[] PROGMEM = "{\"%s%d\":%d}";
|
|||
const char S_JSON_COMMAND_INDEX_SVALUE[] PROGMEM = "{\"%s%d\":\"%s\"}";
|
||||
const char S_JSON_COMMAND_INDEX_SVALUE_SVALUE[] PROGMEM = "{\"%s%d\":\"%s%s\"}";
|
||||
|
||||
const char JSON_SNS_TEMPHUM[] PROGMEM = "%s,\"%s\":{\"" D_TEMPERATURE "\":%s,\"" D_HUMIDITY "\":%s}";
|
||||
const char JSON_SNS_TEMPHUM[] PROGMEM = "%s,\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s}";
|
||||
|
||||
const char S_LOG_I2C_FOUND_AT[] PROGMEM = D_LOG_I2C "%s " D_FOUND_AT " 0x%x";
|
||||
|
||||
|
|
|
@ -46,10 +46,8 @@
|
|||
// Common
|
||||
#define D_ABORTED "abgebrochen"
|
||||
#define D_ACTIVE "aktiv"
|
||||
#define D_ADDRESS "Addresse"
|
||||
#define D_ADMIN "Admin"
|
||||
#define D_AIR_QUALITY "Luftqualität"
|
||||
#define D_AIRQUALITY "LuftQualität"
|
||||
#define D_AP "AP" // Access Point
|
||||
#define D_APMAC_ADDRESS "AP-Mac"
|
||||
#define D_APPENDED "angehängt"
|
||||
|
@ -106,7 +104,6 @@
|
|||
#define D_GATEWAY "Gateway"
|
||||
#define D_GROUP "Gruppe"
|
||||
#define D_HEAPSIZE "Heap-Größe"
|
||||
#define D_HIGH "hoch"
|
||||
#define D_HOST "Host"
|
||||
#define D_HOSTNAME "Hostname"
|
||||
#define D_HUMIDITY "Feuchtigkeit"
|
||||
|
@ -120,7 +117,6 @@
|
|||
#define D_LIGHT "Licht"
|
||||
#define D_LIMIT "Grenzwert"
|
||||
#define D_LOCAL_TIME "lokale Zeit"
|
||||
#define D_LOW "niedrig"
|
||||
#define D_LWT "LWT"
|
||||
#define D_MAC "MAC"
|
||||
#define D_MASK "Maske"
|
||||
|
@ -135,12 +131,9 @@
|
|||
#define D_OK "OK"
|
||||
#define D_ON "an"
|
||||
#define D_ONLINE "online"
|
||||
#define D_OR "oder"
|
||||
#define D_PASSWORD "Passwort"
|
||||
#define D_PERIOD "Punkt"
|
||||
#define D_PORT "Port"
|
||||
#define D_POWER_FACTOR "Leistungsfaktor"
|
||||
#define D_POWERFACTOR "Faktor"
|
||||
#define D_POWERUSAGE "Leistung"
|
||||
#define D_PRESSURE "Druck"
|
||||
#define D_PRESSUREATSEALEVEL "MeeresDruck"
|
||||
|
@ -176,20 +169,15 @@
|
|||
#define D_SUBSCRIBE_TO "subscribe to"
|
||||
#define D_SUCCESSFUL "erfolgreich"
|
||||
#define D_SWITCH "Schalter"
|
||||
#define D_SYNC "sync"
|
||||
#define D_SYS "Sys " // Sys log
|
||||
#define D_TEMPERATURE "Temperatur"
|
||||
#define D_TEMPERATURE_UNIT "TempUnit"
|
||||
#define D_TIME "Zeit"
|
||||
#define D_TO "zu"
|
||||
#define D_TODAY "heute"
|
||||
#define D_TOGGLE "An/Aus"
|
||||
#define D_TOPIC "topic"
|
||||
#define D_TOTAL "Total"
|
||||
#define D_TRANSMIT "Übertragen"
|
||||
#define D_TRUE "wahr"
|
||||
#define D_TYPE "Art"
|
||||
#define D_UNKNOWN "unbekannt"
|
||||
#define D_UPGRADE "update"
|
||||
#define D_UPLOAD "Upload"
|
||||
#define D_UPTIME "Laufzeit"
|
||||
|
@ -203,8 +191,38 @@
|
|||
#define D_WEB "Web" // Web log
|
||||
#define D_WEB_SERVER "Web-Server"
|
||||
#define D_WIFI "WLAN"
|
||||
#define D_WRONG "falsch"
|
||||
#define D_YESTERDAY "gestern"
|
||||
|
||||
// Text used in JSON messages
|
||||
#define D_JSON_ADDRESS "Addresse"
|
||||
#define D_JSON_AIRQUALITY "LuftQualität"
|
||||
#define D_JSON_ANALOG_INPUT "Analog"
|
||||
#define D_JSON_CO2 "CO²"
|
||||
#define D_JSON_COUNTER "Zähler"
|
||||
#define D_JSON_CURRENT "Strom" // As in Voltage and Current
|
||||
#define D_JSON_DATA "Daten"
|
||||
#define D_JSON_DONE "erledigt"
|
||||
#define D_JSON_HIGH "hoch"
|
||||
#define D_JSON_HUMIDITY "Feuchtigkeit"
|
||||
#define D_JSON_ILLUMINANCE "Beleuchtungsintensität"
|
||||
#define D_JSON_UNKNOWN "unbekannt"
|
||||
#define D_JSON_LIGHT "Licht"
|
||||
#define D_JSON_LOW "niedrig"
|
||||
#define D_JSON_NOISE "Lautstärke"
|
||||
#define D_JSON_OR "oder"
|
||||
#define D_JSON_PERIOD "Punkt"
|
||||
#define D_JSON_POWERFACTOR "Faktor"
|
||||
#define D_JSON_POWERUSAGE "Leistung"
|
||||
#define D_JSON_PRESSURE "Druck"
|
||||
#define D_JSON_PRESSUREATSEALEVEL "MeeresDruck"
|
||||
#define D_JSON_SYNC "sync"
|
||||
#define D_JSON_TEMPERATURE "Temperatur"
|
||||
#define D_JSON_TODAY "heute"
|
||||
#define D_JSON_TOTAL "Total"
|
||||
#define D_JSON_TYPE "Art"
|
||||
#define D_JSON_UV_LEVEL "UV Level"
|
||||
#define D_JSON_VOLTAGE "Spannung"
|
||||
#define D_JSON_WRONG "falsch"
|
||||
#define D_JSON_YESTERDAY "gestern"
|
||||
|
||||
// settings.ino
|
||||
#define D_SAVED_TO_FLASH_AT "in Flash gespeichert am"
|
||||
|
@ -391,17 +409,17 @@
|
|||
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"
|
||||
|
||||
// xdrv_irremote.ino
|
||||
#define D_INVALID_JSON "ungültiger JSON"
|
||||
#define D_PROTOCOL_NOT_SUPPORTED "Protokoll nicht unterstützt"
|
||||
#define D_IR_PROTOCOL "PROTOKOLL"
|
||||
#define D_IR_BITS "BITS"
|
||||
#define D_IR_DATA "DATEN"
|
||||
#define D_IRHVAC_VENDOR "HERSTELLER"
|
||||
#define D_IRHVAC_POWER "STROM"
|
||||
#define D_IRHVAC_MODE "MODUS"
|
||||
#define D_IRHVAC_FANSPEED "LÜFTERGESCHWINDIGKEIT"
|
||||
#define D_IRHVAC_TEMP "TEMPERATUR"
|
||||
#define D_IRRECEIVED "IR empfangen"
|
||||
#define D_JSON_INVALID_JSON "ungültiger JSON"
|
||||
#define D_JSON_PROTOCOL_NOT_SUPPORTED "Protokoll nicht unterstützt"
|
||||
#define D_JSON_IR_PROTOCOL "PROTOKOLL"
|
||||
#define D_JSON_IR_BITS "BITS"
|
||||
#define D_JSON_IR_DATA "DATEN"
|
||||
#define D_JSON_IRHVAC_VENDOR "HERSTELLER"
|
||||
#define D_JSON_IRHVAC_POWER "STROM"
|
||||
#define D_JSON_IRHVAC_MODE "MODUS"
|
||||
#define D_JSON_IRHVAC_FANSPEED "LÜFTERGESCHWINDIGKEIT"
|
||||
#define D_JSON_IRHVAC_TEMP "TEMPERATUR"
|
||||
#define D_JSON_IRRECEIVED "IR empfangen"
|
||||
|
||||
// xdrv_snfbridge.ino
|
||||
#define D_RFRECEIVED "RF empfangen"
|
||||
|
@ -707,4 +725,4 @@
|
|||
#define D_CMND_MAXENERGY "MaxEnergy"
|
||||
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
|
||||
|
||||
#endif // _LANGUAGE_DE_DE_H_
|
||||
#endif // _LANGUAGE_DE_DE_H_
|
||||
|
|
|
@ -46,10 +46,8 @@
|
|||
// Common
|
||||
#define D_ABORTED "Aborted"
|
||||
#define D_ACTIVE "Active"
|
||||
#define D_ADDRESS "Address"
|
||||
#define D_ADMIN "Admin"
|
||||
#define D_AIR_QUALITY "Air quality"
|
||||
#define D_AIRQUALITY "AirQuality"
|
||||
#define D_AP "AP" // Access Point
|
||||
#define D_APMAC_ADDRESS "APMac"
|
||||
#define D_APPENDED "Appended"
|
||||
|
@ -106,7 +104,6 @@
|
|||
#define D_GATEWAY "Gateway"
|
||||
#define D_GROUP "Group"
|
||||
#define D_HEAPSIZE "Heap"
|
||||
#define D_HIGH "High"
|
||||
#define D_HOST "Host"
|
||||
#define D_HOSTNAME "Hostname"
|
||||
#define D_HUMIDITY "Humidity"
|
||||
|
@ -120,7 +117,6 @@
|
|||
#define D_LIGHT "Light"
|
||||
#define D_LIMIT "Limit"
|
||||
#define D_LOCAL_TIME "Local"
|
||||
#define D_LOW "Low"
|
||||
#define D_LWT "LWT"
|
||||
#define D_MAC "Mac"
|
||||
#define D_MASK "Mask"
|
||||
|
@ -135,12 +131,9 @@
|
|||
#define D_OK "Ok"
|
||||
#define D_ON "On"
|
||||
#define D_ONLINE "Online"
|
||||
#define D_OR "or"
|
||||
#define D_PASSWORD "Password"
|
||||
#define D_PERIOD "Period"
|
||||
#define D_PORT "Port"
|
||||
#define D_POWER_FACTOR "Power Factor"
|
||||
#define D_POWERFACTOR "Factor"
|
||||
#define D_POWERUSAGE "Power"
|
||||
#define D_PRESSURE "Pressure"
|
||||
#define D_PRESSUREATSEALEVEL "SeaPressure"
|
||||
|
@ -176,20 +169,15 @@
|
|||
#define D_SUBSCRIBE_TO "Subscribe to"
|
||||
#define D_SUCCESSFUL "Successful"
|
||||
#define D_SWITCH "Switch"
|
||||
#define D_SYNC "Sync"
|
||||
#define D_SYS "Sys" // Sys log
|
||||
#define D_TEMPERATURE "Temperature"
|
||||
#define D_TEMPERATURE_UNIT "TempUnit"
|
||||
#define D_TIME "Time"
|
||||
#define D_TO "to"
|
||||
#define D_TODAY "Today"
|
||||
#define D_TOGGLE "Toggle"
|
||||
#define D_TOPIC "Topic"
|
||||
#define D_TOTAL "Total"
|
||||
#define D_TRANSMIT "Transmit"
|
||||
#define D_TRUE "True"
|
||||
#define D_TYPE "Type"
|
||||
#define D_UNKNOWN "Unknown"
|
||||
#define D_UPGRADE "upgrade"
|
||||
#define D_UPLOAD "Upload"
|
||||
#define D_UPTIME "Uptime"
|
||||
|
@ -203,8 +191,38 @@
|
|||
#define D_WEB "Web" // Web log
|
||||
#define D_WEB_SERVER "Web Server"
|
||||
#define D_WIFI "Wifi"
|
||||
#define D_WRONG "Wrong"
|
||||
#define D_YESTERDAY "Yesterday"
|
||||
|
||||
// Text used in JSON messages
|
||||
#define D_JSON_ADDRESS "Address"
|
||||
#define D_JSON_AIRQUALITY "AirQuality"
|
||||
#define D_JSON_ANALOG_INPUT "Analog"
|
||||
#define D_JSON_CO2 "Carbon dioxide"
|
||||
#define D_JSON_COUNTER "Counter"
|
||||
#define D_JSON_CURRENT "Current" // As in Voltage and Current
|
||||
#define D_JSON_DATA "Data"
|
||||
#define D_JSON_DONE "Done"
|
||||
#define D_JSON_HIGH "High"
|
||||
#define D_JSON_HUMIDITY "Humidity"
|
||||
#define D_JSON_ILLUMINANCE "Illuminance"
|
||||
#define D_JSON_UNKNOWN "Unknown"
|
||||
#define D_JSON_LIGHT "Light"
|
||||
#define D_JSON_LOW "Low"
|
||||
#define D_JSON_NOISE "Noise"
|
||||
#define D_JSON_OR "or"
|
||||
#define D_JSON_PERIOD "Period"
|
||||
#define D_JSON_POWERFACTOR "Factor"
|
||||
#define D_JSON_POWERUSAGE "Power"
|
||||
#define D_JSON_PRESSURE "Pressure"
|
||||
#define D_JSON_PRESSUREATSEALEVEL "SeaPressure"
|
||||
#define D_JSON_SYNC "Sync"
|
||||
#define D_JSON_TEMPERATURE "Temperature"
|
||||
#define D_JSON_TODAY "Today"
|
||||
#define D_JSON_TOTAL "Total"
|
||||
#define D_JSON_TYPE "Type"
|
||||
#define D_JSON_UV_LEVEL "UV Level"
|
||||
#define D_JSON_VOLTAGE "Voltage"
|
||||
#define D_JSON_WRONG "Wrong"
|
||||
#define D_JSON_YESTERDAY "Yesterday"
|
||||
|
||||
// settings.ino
|
||||
#define D_SAVED_TO_FLASH_AT "Saved to flash at"
|
||||
|
@ -391,17 +409,17 @@
|
|||
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"
|
||||
|
||||
// xdrv_irremote.ino
|
||||
#define D_INVALID_JSON "Invalid JSON"
|
||||
#define D_PROTOCOL_NOT_SUPPORTED "Protocol not supported"
|
||||
#define D_IR_PROTOCOL "PROTOCOL"
|
||||
#define D_IR_BITS "BITS"
|
||||
#define D_IR_DATA "DATA"
|
||||
#define D_IRHVAC_VENDOR "VENDOR"
|
||||
#define D_IRHVAC_POWER "POWER"
|
||||
#define D_IRHVAC_MODE "MODE"
|
||||
#define D_IRHVAC_FANSPEED "FANSPEED"
|
||||
#define D_IRHVAC_TEMP "TEMP"
|
||||
#define D_IRRECEIVED "IrReceived"
|
||||
#define D_JSON_INVALID_JSON "Invalid JSON"
|
||||
#define D_JSON_PROTOCOL_NOT_SUPPORTED "Protocol not supported"
|
||||
#define D_JSON_IR_PROTOCOL "PROTOCOL"
|
||||
#define D_JSON_IR_BITS "BITS"
|
||||
#define D_JSON_IR_DATA "DATA"
|
||||
#define D_JSON_IRHVAC_VENDOR "VENDOR"
|
||||
#define D_JSON_IRHVAC_POWER "POWER"
|
||||
#define D_JSON_IRHVAC_MODE "MODE"
|
||||
#define D_JSON_IRHVAC_FANSPEED "FANSPEED"
|
||||
#define D_JSON_IRHVAC_TEMP "TEMP"
|
||||
#define D_JSON_IRRECEIVED "IrReceived"
|
||||
|
||||
// xdrv_snfbridge.ino
|
||||
#define D_RFRECEIVED "RfReceived"
|
||||
|
@ -707,4 +725,4 @@
|
|||
#define D_CMND_MAXENERGY "MaxEnergy"
|
||||
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
|
||||
|
||||
#endif // _LANGUAGE_EN_GB_H_
|
||||
#endif // _LANGUAGE_EN_GB_H_
|
||||
|
|
|
@ -46,10 +46,8 @@
|
|||
// Common
|
||||
#define D_ABORTED "Aborted"
|
||||
#define D_ACTIVE "Active"
|
||||
#define D_ADDRESS "Address"
|
||||
#define D_ADMIN "Admin"
|
||||
#define D_AIR_QUALITY "Qualita' dell'aria"
|
||||
#define D_AIRQUALITY "AirQuality"
|
||||
#define D_AP "AP" // Access Point
|
||||
#define D_APMAC_ADDRESS "APMac"
|
||||
#define D_APPENDED "Appended"
|
||||
|
@ -106,7 +104,6 @@
|
|||
#define D_GATEWAY "Gateway"
|
||||
#define D_GROUP "Gruppo"
|
||||
#define D_HEAPSIZE "Heap"
|
||||
#define D_HIGH "High"
|
||||
#define D_HOST "Host"
|
||||
#define D_HOSTNAME "Hostname"
|
||||
#define D_HUMIDITY "Humidity"
|
||||
|
@ -120,7 +117,6 @@
|
|||
#define D_LIGHT "Light"
|
||||
#define D_LIMIT "Limit"
|
||||
#define D_LOCAL_TIME "Local"
|
||||
#define D_LOW "Low"
|
||||
#define D_LWT "LWT"
|
||||
#define D_MAC "Mac"
|
||||
#define D_MASK "Mask"
|
||||
|
@ -135,12 +131,9 @@
|
|||
#define D_OK "Ok"
|
||||
#define D_ON "On"
|
||||
#define D_ONLINE "Online"
|
||||
#define D_OR "or"
|
||||
#define D_PASSWORD "Password"
|
||||
#define D_PERIOD "Period"
|
||||
#define D_PORT "Porta"
|
||||
#define D_POWER_FACTOR "Fattore di potenza"
|
||||
#define D_POWERFACTOR "Factor"
|
||||
#define D_POWERUSAGE "Power"
|
||||
#define D_PRESSURE "Pressure"
|
||||
#define D_PRESSUREATSEALEVEL "SeaPressure"
|
||||
|
@ -176,20 +169,15 @@
|
|||
#define D_SUBSCRIBE_TO "Sottoscrivi a"
|
||||
#define D_SUCCESSFUL "Successful"
|
||||
#define D_SWITCH "Switch"
|
||||
#define D_SYNC "Sync"
|
||||
#define D_SYS "Sys" // Sys log
|
||||
#define D_TEMPERATURE "Temperature"
|
||||
#define D_TEMPERATURE_UNIT "TempUnit"
|
||||
#define D_TIME "Time"
|
||||
#define D_TO "a"
|
||||
#define D_TODAY "Today"
|
||||
#define D_TOGGLE "Toggle"
|
||||
#define D_TOPIC "Topic"
|
||||
#define D_TOTAL "Total"
|
||||
#define D_TRANSMIT "Trasmesso"
|
||||
#define D_TRUE "True"
|
||||
#define D_TYPE "Type"
|
||||
#define D_UNKNOWN "Unknown"
|
||||
#define D_UPGRADE "aggiornamento"
|
||||
#define D_UPLOAD "Invio"
|
||||
#define D_UPTIME "Uptime"
|
||||
|
@ -203,8 +191,38 @@
|
|||
#define D_WEB "Web" // Web log
|
||||
#define D_WEB_SERVER "Web Server"
|
||||
#define D_WIFI "Wifi"
|
||||
#define D_WRONG "Wrong"
|
||||
#define D_YESTERDAY "Yesterday"
|
||||
|
||||
// Text used in JSON messages
|
||||
#define D_JSON_ADDRESS "Address"
|
||||
#define D_JSON_AIRQUALITY "AirQuality"
|
||||
#define D_JSON_ANALOG_INPUT "Analog"
|
||||
#define D_JSON_CO2 "Carbon dioxide"
|
||||
#define D_JSON_COUNTER "Counter"
|
||||
#define D_JSON_CURRENT "Current" // As in Voltage and Current
|
||||
#define D_JSON_DATA "Data"
|
||||
#define D_JSON_DONE "Done"
|
||||
#define D_JSON_HIGH "High"
|
||||
#define D_JSON_HUMIDITY "Humidity"
|
||||
#define D_JSON_ILLUMINANCE "Illuminance"
|
||||
#define D_JSON_UNKNOWN "Unknown"
|
||||
#define D_JSON_LIGHT "Light"
|
||||
#define D_JSON_LOW "Low"
|
||||
#define D_JSON_NOISE "Noise"
|
||||
#define D_JSON_OR "or"
|
||||
#define D_JSON_PERIOD "Period"
|
||||
#define D_JSON_POWERFACTOR "Factor"
|
||||
#define D_JSON_POWERUSAGE "Power"
|
||||
#define D_JSON_PRESSURE "Pressure"
|
||||
#define D_JSON_PRESSUREATSEALEVEL "SeaPressure"
|
||||
#define D_JSON_SYNC "Sync"
|
||||
#define D_JSON_TEMPERATURE "Temperature"
|
||||
#define D_JSON_TODAY "Today"
|
||||
#define D_JSON_TOTAL "Total"
|
||||
#define D_JSON_TYPE "Type"
|
||||
#define D_JSON_UV_LEVEL "UV Level"
|
||||
#define D_JSON_VOLTAGE "Voltage"
|
||||
#define D_JSON_WRONG "Wrong"
|
||||
#define D_JSON_YESTERDAY "Yesterday"
|
||||
|
||||
// settings.ino
|
||||
#define D_SAVED_TO_FLASH_AT "Salvato nella flash in"
|
||||
|
@ -391,17 +409,17 @@
|
|||
#define D_DOMOTICZ_UPDATE_TIMER "Intervallo di aggiornamento"
|
||||
|
||||
// xdrv_irremote.ino
|
||||
#define D_INVALID_JSON "JSON non valido"
|
||||
#define D_PROTOCOL_NOT_SUPPORTED "Protocollo non supportato"
|
||||
#define D_IR_PROTOCOL "PROTOCOL"
|
||||
#define D_IR_BITS "BITS"
|
||||
#define D_IR_DATA "DATA"
|
||||
#define D_IRHVAC_VENDOR "VENDOR"
|
||||
#define D_IRHVAC_POWER "POWER"
|
||||
#define D_IRHVAC_MODE "MODE"
|
||||
#define D_IRHVAC_FANSPEED "FANSPEED"
|
||||
#define D_IRHVAC_TEMP "TEMP"
|
||||
#define D_IRRECEIVED "IrReceived"
|
||||
#define D_JSON_INVALID_JSON "JSON non valido"
|
||||
#define D_JSON_PROTOCOL_NOT_SUPPORTED "Protocollo non supportato"
|
||||
#define D_JSON_IR_PROTOCOL "PROTOCOL"
|
||||
#define D_JSON_IR_BITS "BITS"
|
||||
#define D_JSON_IR_DATA "DATA"
|
||||
#define D_JSON_IRHVAC_VENDOR "VENDOR"
|
||||
#define D_JSON_IRHVAC_POWER "POWER"
|
||||
#define D_JSON_IRHVAC_MODE "MODE"
|
||||
#define D_JSON_IRHVAC_FANSPEED "FANSPEED"
|
||||
#define D_JSON_IRHVAC_TEMP "TEMP"
|
||||
#define D_JSON_IRRECEIVED "IrReceived"
|
||||
|
||||
// xdrv_snfbridge.ino
|
||||
#define D_RFRECEIVED "RfReceived"
|
||||
|
@ -707,4 +725,4 @@
|
|||
#define D_CMND_MAXENERGY "MaxEnergy"
|
||||
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
|
||||
|
||||
#endif // _LANGUAGE_EN_GB_H_
|
||||
#endif // _LANGUAGE_IT_IT_H_
|
||||
|
|
|
@ -46,10 +46,8 @@
|
|||
// Common
|
||||
#define D_ABORTED "Afgebroken"
|
||||
#define D_ACTIVE "Actief"
|
||||
#define D_ADDRESS "Adres"
|
||||
#define D_ADMIN "Admin"
|
||||
#define D_AIR_QUALITY "Lucht kwalitiet"
|
||||
#define D_AIRQUALITY "LuchtKwaliteit"
|
||||
#define D_AP "AP" // Access Point
|
||||
#define D_APMAC_ADDRESS "APMac"
|
||||
#define D_APPENDED "Aangevuld"
|
||||
|
@ -106,7 +104,6 @@
|
|||
#define D_GATEWAY "Gateway"
|
||||
#define D_GROUP "Groep"
|
||||
#define D_HEAPSIZE "Heap"
|
||||
#define D_HIGH "Hoog"
|
||||
#define D_HOST "Host"
|
||||
#define D_HOSTNAME "Hostnaam"
|
||||
#define D_HUMIDITY "Luchtvochtigheid"
|
||||
|
@ -117,10 +114,9 @@
|
|||
#define D_INFO "Info"
|
||||
#define D_INITIALIZED "Geinitialiseerd"
|
||||
#define D_IP_ADDRESS "IP Adres"
|
||||
#define D_LIGHT "Ligt"
|
||||
#define D_LIGHT "Licht"
|
||||
#define D_LIMIT "Grenswaarde"
|
||||
#define D_LOCAL_TIME "Plaatselijk"
|
||||
#define D_LOW "Laag"
|
||||
#define D_LWT "LWT"
|
||||
#define D_MAC "Mac"
|
||||
#define D_MASK "Masker"
|
||||
|
@ -135,12 +131,9 @@
|
|||
#define D_OK "Ok"
|
||||
#define D_ON "Ann"
|
||||
#define D_ONLINE "Online"
|
||||
#define D_OR "of"
|
||||
#define D_PASSWORD "Wachtwoord"
|
||||
#define D_PERIOD "Periode"
|
||||
#define D_PORT "Poort"
|
||||
#define D_POWER_FACTOR "Arbeidsfactor"
|
||||
#define D_POWERFACTOR "Factor"
|
||||
#define D_POWERUSAGE "Vermogen"
|
||||
#define D_PRESSURE "Luchtdruk"
|
||||
#define D_PRESSUREATSEALEVEL "ZeeLuchtdruk"
|
||||
|
@ -176,20 +169,15 @@
|
|||
#define D_SUBSCRIBE_TO "Abonneer op"
|
||||
#define D_SUCCESSFUL "Gelukt"
|
||||
#define D_SWITCH "Schakelaar"
|
||||
#define D_SYNC "Sync"
|
||||
#define D_SYS "Sys" // Sys log
|
||||
#define D_TEMPERATURE "Temperatuur"
|
||||
#define D_TEMPERATURE_UNIT "TempEenheid"
|
||||
#define D_TIME "Tijd"
|
||||
#define D_TO "naar"
|
||||
#define D_TODAY "Vandaag"
|
||||
#define D_TOGGLE "Toggle" // Wissel, Tuimel
|
||||
#define D_TOPIC "Topic" // Onderwerp
|
||||
#define D_TOTAL "Totaal"
|
||||
#define D_TRANSMIT "Verzend"
|
||||
#define D_TRUE "Waar"
|
||||
#define D_TYPE "Soort"
|
||||
#define D_UNKNOWN "Onbekend"
|
||||
#define D_UPGRADE "opwaarderen"
|
||||
#define D_UPLOAD "Verzenden"
|
||||
#define D_UPTIME "Bedrijfstijd"
|
||||
|
@ -203,8 +191,38 @@
|
|||
#define D_WEB "Web" // Web log
|
||||
#define D_WEB_SERVER "Webserver"
|
||||
#define D_WIFI "Wifi"
|
||||
#define D_WRONG "Fout"
|
||||
#define D_YESTERDAY "Gisteren"
|
||||
|
||||
// Text used in JSON messages
|
||||
#define D_JSON_ADDRESS "Adres"
|
||||
#define D_JSON_AIRQUALITY "LuchtKwaliteit"
|
||||
#define D_JSON_ANALOG_INPUT "Analoog"
|
||||
#define D_JSON_CO2 "Koolstofdioxide"
|
||||
#define D_JSON_COUNTER "Teller"
|
||||
#define D_JSON_CURRENT "Stroom" // As in Voltage and Current
|
||||
#define D_JSON_DATA "Data"
|
||||
#define D_JSON_DONE "Klaar"
|
||||
#define D_JSON_HIGH "Hoog"
|
||||
#define D_JSON_HUMIDITY "Luchtvochtigheid"
|
||||
#define D_JSON_ILLUMINANCE "Verlichtingssterkte"
|
||||
#define D_JSON_UNKNOWN "Onbekend"
|
||||
#define D_JSON_LIGHT "Licht"
|
||||
#define D_JSON_LOW "Laag"
|
||||
#define D_JSON_NOISE "Lawaai"
|
||||
#define D_JSON_OR "of"
|
||||
#define D_JSON_PERIOD "Periode"
|
||||
#define D_JSON_POWERFACTOR "Factor"
|
||||
#define D_JSON_POWERUSAGE "Vermogen"
|
||||
#define D_JSON_PRESSURE "Luchtdruk"
|
||||
#define D_JSON_PRESSUREATSEALEVEL "ZeeLuchtdruk"
|
||||
#define D_JSON_SYNC "Sync"
|
||||
#define D_JSON_TEMPERATURE "Temperatuur"
|
||||
#define D_JSON_TODAY "Vandaag"
|
||||
#define D_JSON_TOTAL "Totaal"
|
||||
#define D_JSON_TYPE "Soort"
|
||||
#define D_JSON_UV_LEVEL "UV niveau"
|
||||
#define D_JSON_VOLTAGE "Spanning"
|
||||
#define D_JSON_WRONG "Fout"
|
||||
#define D_JSON_YESTERDAY "Gisteren"
|
||||
|
||||
// settings.ino
|
||||
#define D_SAVED_TO_FLASH_AT "Opgeslagen in flash op"
|
||||
|
@ -391,17 +409,17 @@
|
|||
#define D_DOMOTICZ_UPDATE_TIMER "Bijwerk timer"
|
||||
|
||||
// xdrv_irremote.ino
|
||||
#define D_INVALID_JSON "Ongeldig JSON"
|
||||
#define D_PROTOCOL_NOT_SUPPORTED "Protocol wordt niet ondersteund"
|
||||
#define D_IR_PROTOCOL "PROTOCOL"
|
||||
#define D_IR_BITS "BITS"
|
||||
#define D_IR_DATA "DATA"
|
||||
#define D_IRHVAC_VENDOR "VENDOR"
|
||||
#define D_IRHVAC_POWER "POWER"
|
||||
#define D_IRHVAC_MODE "MODE"
|
||||
#define D_IRHVAC_FANSPEED "FANSPEED"
|
||||
#define D_IRHVAC_TEMP "TEMP"
|
||||
#define D_IRRECEIVED "IrReceived"
|
||||
#define D_JSON_INVALID_JSON "Ongeldig JSON"
|
||||
#define D_JSON_PROTOCOL_NOT_SUPPORTED "Protocol wordt niet ondersteund"
|
||||
#define D_JSON_IR_PROTOCOL "PROTOCOL"
|
||||
#define D_JSON_IR_BITS "BITS"
|
||||
#define D_JSON_IR_DATA "DATA"
|
||||
#define D_JSON_IRHVAC_VENDOR "VENDOR"
|
||||
#define D_JSON_IRHVAC_POWER "POWER"
|
||||
#define D_JSON_IRHVAC_MODE "MODE"
|
||||
#define D_JSON_IRHVAC_FANSPEED "FANSPEED"
|
||||
#define D_JSON_IRHVAC_TEMP "TEMP"
|
||||
#define D_JSON_IRRECEIVED "IrReceived"
|
||||
|
||||
// xdrv_snfbridge.ino
|
||||
#define D_RFRECEIVED "RfReceived"
|
||||
|
@ -707,4 +725,4 @@
|
|||
#define D_CMND_MAXENERGY "MaxEnergy"
|
||||
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
|
||||
|
||||
#endif // _LANGUAGE_NL_NL_H_
|
||||
#endif // _LANGUAGE_NL_NL_H_
|
||||
|
|
|
@ -46,10 +46,8 @@
|
|||
// Common
|
||||
#define D_ABORTED "Anulowany"
|
||||
#define D_ACTIVE "Aktywny"
|
||||
#define D_ADDRESS "Adres"
|
||||
#define D_ADMIN "Admin"
|
||||
#define D_AIR_QUALITY "Jakosc powietrza"
|
||||
#define D_AIRQUALITY "JakPowietrza"
|
||||
#define D_AP "AP" // Access Point
|
||||
#define D_APMAC_ADDRESS "APMac"
|
||||
#define D_APPENDED "Dolaczony"
|
||||
|
@ -106,7 +104,6 @@
|
|||
#define D_GATEWAY "Brama"
|
||||
#define D_GROUP "Grupa"
|
||||
#define D_HEAPSIZE "Stos"
|
||||
#define D_HIGH "Wysoki"
|
||||
#define D_HOST "Serwer"
|
||||
#define D_HOSTNAME "Nazwa serwera"
|
||||
#define D_HUMIDITY "Wilgotnosc"
|
||||
|
@ -120,7 +117,6 @@
|
|||
#define D_LIGHT "Swiatlo"
|
||||
#define D_LIMIT "Wartość graniczna"
|
||||
#define D_LOCAL_TIME "Lokalny"
|
||||
#define D_LOW "Niski"
|
||||
#define D_LWT "LWT"
|
||||
#define D_MAC "Mac"
|
||||
#define D_MASK "Maska"
|
||||
|
@ -135,12 +131,9 @@
|
|||
#define D_OK "Ok"
|
||||
#define D_ON "Wlaczony"
|
||||
#define D_ONLINE "Aktywny"
|
||||
#define D_OR "lub"
|
||||
#define D_PASSWORD "Haslo"
|
||||
#define D_PERIOD "Okres"
|
||||
#define D_PORT "Port"
|
||||
#define D_POWER_FACTOR "Wspolczynik mocy"
|
||||
#define D_POWERFACTOR "WspolczynikMocy"
|
||||
#define D_POWERUSAGE "Moc"
|
||||
#define D_PRESSURE "Cisnienie"
|
||||
#define D_PRESSUREATSEALEVEL "Cisnienie na poziomie morza"
|
||||
|
@ -176,20 +169,15 @@
|
|||
#define D_SUBSCRIBE_TO "Subskrybuj do"
|
||||
#define D_SUCCESSFUL "Powodzenie"
|
||||
#define D_SWITCH "Przelacznik"
|
||||
#define D_SYNC "Sync"
|
||||
#define D_SYS "System " // Sys log
|
||||
#define D_TEMPERATURE "Temperatura"
|
||||
#define D_TEMPERATURE_UNIT "JednTemp"
|
||||
#define D_TIME "Czas"
|
||||
#define D_TO "do"
|
||||
#define D_TODAY "Dzisiaj"
|
||||
#define D_TOGGLE "Przelacz"
|
||||
#define D_TOPIC "Temat"
|
||||
#define D_TOTAL "Suma"
|
||||
#define D_TRANSMIT "Wyslij"
|
||||
#define D_TRUE "Prawda"
|
||||
#define D_TYPE "Typ"
|
||||
#define D_UNKNOWN "Nieznany"
|
||||
#define D_UPGRADE "aktualizacji"
|
||||
#define D_UPLOAD "Wgraj"
|
||||
#define D_UPTIME "Uptime"
|
||||
|
@ -203,8 +191,38 @@
|
|||
#define D_WEB "Web" // Web log
|
||||
#define D_WEB_SERVER "Web Server"
|
||||
#define D_WIFI "Wifi"
|
||||
#define D_WRONG "Bledny"
|
||||
#define D_YESTERDAY "Wczoraj"
|
||||
|
||||
// Text used in JSON messages
|
||||
#define D_JSON_ADDRESS "Adres"
|
||||
#define D_JSON_AIRQUALITY "JakPowietrza"
|
||||
#define D_JSON_ANALOG_INPUT "Wej_analogowe"
|
||||
#define D_JSON_CO2 "Dwutlenku węgla"
|
||||
#define D_JSON_COUNTER "Licznik"
|
||||
#define D_JSON_CURRENT "Biezacy" // As in Voltage and Current
|
||||
#define D_JSON_DATA "Data"
|
||||
#define D_JSON_DONE "Wykonane"
|
||||
#define D_JSON_HIGH "Wysoki"
|
||||
#define D_JSON_HUMIDITY "Wilgotnosc"
|
||||
#define D_JSON_ILLUMINANCE "Oswietlenie"
|
||||
#define D_JSON_UNKNOWN "Nieznany"
|
||||
#define D_JSON_LIGHT "Swiatlo"
|
||||
#define D_JSON_LOW "Niski"
|
||||
#define D_JSON_NOISE "Halas"
|
||||
#define D_JSON_OR "lub"
|
||||
#define D_JSON_PERIOD "Okres"
|
||||
#define D_JSON_POWERFACTOR "WspolczynikMocy"
|
||||
#define D_JSON_POWERUSAGE "Moc"
|
||||
#define D_JSON_PRESSURE "Cisnienie"
|
||||
#define D_JSON_PRESSUREATSEALEVEL "Cisnienie na poziomie morza"
|
||||
#define D_JSON_SYNC "Sync"
|
||||
#define D_JSON_TEMPERATURE "Temperatura"
|
||||
#define D_JSON_TODAY "Dzisiaj"
|
||||
#define D_JSON_TOTAL "Suma"
|
||||
#define D_JSON_TYPE "Typ"
|
||||
#define D_JSON_UV_LEVEL "Poziom UV"
|
||||
#define D_JSON_VOLTAGE "Napiecie"
|
||||
#define D_JSON_WRONG "Bledny"
|
||||
#define D_JSON_YESTERDAY "Wczoraj"
|
||||
|
||||
// settings.ino
|
||||
#define D_SAVED_TO_FLASH_AT "Zapisane do pamieci flash w"
|
||||
|
@ -391,17 +409,17 @@
|
|||
#define D_DOMOTICZ_UPDATE_TIMER "Zaktualizuj czasomierz"
|
||||
|
||||
// xdrv_irremote.ino
|
||||
#define D_INVALID_JSON "Invalid JSON"
|
||||
#define D_PROTOCOL_NOT_SUPPORTED "Protokol nie jest obslugiwany"
|
||||
#define D_IR_PROTOCOL "PROTOCOL"
|
||||
#define D_IR_BITS "BITS"
|
||||
#define D_IR_DATA "DATA"
|
||||
#define D_IRHVAC_VENDOR "VENDOR"
|
||||
#define D_IRHVAC_POWER "POWER"
|
||||
#define D_IRHVAC_MODE "MODE"
|
||||
#define D_IRHVAC_FANSPEED "FANSPEED"
|
||||
#define D_IRHVAC_TEMP "TEMP"
|
||||
#define D_IRRECEIVED "IrReceived"
|
||||
#define D_JSON_INVALID_JSON "Invalid JSON"
|
||||
#define D_JSON_PROTOCOL_NOT_SUPPORTED "Protokol nie jest obslugiwany"
|
||||
#define D_JSON_IR_PROTOCOL "PROTOCOL"
|
||||
#define D_JSON_IR_BITS "BITS"
|
||||
#define D_JSON_IR_DATA "DATA"
|
||||
#define D_JSON_IRHVAC_VENDOR "VENDOR"
|
||||
#define D_JSON_IRHVAC_POWER "POWER"
|
||||
#define D_JSON_IRHVAC_MODE "MODE"
|
||||
#define D_JSON_IRHVAC_FANSPEED "FANSPEED"
|
||||
#define D_JSON_IRHVAC_TEMP "TEMP"
|
||||
#define D_JSON_IRRECEIVED "IrReceived"
|
||||
|
||||
// xdrv_snfbridge.ino
|
||||
#define D_RFRECEIVED "RfReceived"
|
||||
|
@ -707,4 +725,4 @@
|
|||
#define D_CMND_MAXENERGY "MaxEnergy"
|
||||
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
|
||||
|
||||
#endif // _LANGUAGE_PL_PL_H_
|
||||
#endif // _LANGUAGE_PL_PL_H_
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
- Select IDE Tools - Flash Size: "1M (no SPIFFS)"
|
||||
====================================================*/
|
||||
|
||||
#define VERSION 0x050A0005
|
||||
#define VERSION_STRING "5.10.0e" // Would be great to have a macro that fills this from VERSION ...
|
||||
#define VERSION 0x050A0006
|
||||
#define VERSION_STRING "5.10.0f" // Would be great to have a macro that fills this from VERSION ...
|
||||
|
||||
// Location specific includes
|
||||
#include "sonoff.h" // Enumaration used in user_config.h
|
||||
|
@ -1480,7 +1480,7 @@ void MqttDataCallback(char* topic, byte* data, unsigned int data_len)
|
|||
}
|
||||
else if (CMND_CFGDUMP == command_code) {
|
||||
SettingsDump(dataBuf);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, D_DONE);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, D_JSON_DONE);
|
||||
}
|
||||
#ifdef USE_I2C
|
||||
else if ((CMND_I2CSCAN == command_code) && i2c_flg) {
|
||||
|
@ -1515,7 +1515,7 @@ void MqttDataCallback(char* topic, byte* data, unsigned int data_len)
|
|||
if (data_len > 0) {
|
||||
ExceptionTest(payload);
|
||||
}
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, D_DONE);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, D_JSON_DONE);
|
||||
}
|
||||
#endif // DEBUG_THEO
|
||||
else {
|
||||
|
@ -1525,7 +1525,7 @@ void MqttDataCallback(char* topic, byte* data, unsigned int data_len)
|
|||
if (type == NULL) {
|
||||
blinks = 201;
|
||||
snprintf_P(topicBuf, sizeof(topicBuf), PSTR(D_COMMAND));
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_COMMAND "\":\"" D_UNKNOWN "\"}"));
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_COMMAND "\":\"" D_JSON_UNKNOWN "\"}"));
|
||||
type = (char*)topicBuf;
|
||||
}
|
||||
if (mqtt_data[0] != '\0') {
|
||||
|
|
|
@ -891,6 +891,7 @@ extern "C" {
|
|||
Ticker TickerRtc;
|
||||
|
||||
static const uint8_t kDaysInMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; // API starts months from 1, this array starts from 0
|
||||
static const char kMonthNamesEnglish[] = "JanFebMarAprMayJunJulAugSepOctNovDec";
|
||||
|
||||
uint32_t utc_time = 0;
|
||||
uint32_t local_time = 0;
|
||||
|
@ -926,7 +927,7 @@ String GetBuildDateAndTime()
|
|||
year = atoi(str);
|
||||
}
|
||||
}
|
||||
month = (strstr(kMonthNames, smonth) -kMonthNames) /3 +1;
|
||||
month = (strstr(kMonthNamesEnglish, smonth) -kMonthNamesEnglish) /3 +1;
|
||||
snprintf_P(bdt, sizeof(bdt), PSTR("%d" D_YEAR_MONTH_SEPARATOR "%02d" D_MONTH_DAY_SEPARATOR "%02d" D_DATE_TIME_SEPARATOR "%s"), year, month, day, __TIME__);
|
||||
return String(bdt);
|
||||
}
|
||||
|
@ -1317,7 +1318,7 @@ void AdcShow(boolean json)
|
|||
analog >>= 5;
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_ANALOG_INPUT "0\":%d"), mqtt_data, analog);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_ANALOG_INPUT "0\":%d"), mqtt_data, analog);
|
||||
#ifdef USE_WEBSERVER
|
||||
} else {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ANALOG, mqtt_data, "", 0, analog);
|
||||
|
@ -1337,10 +1338,6 @@ boolean Xsns02(byte function)
|
|||
|
||||
if (pin[GPIO_ADC0] < 99) {
|
||||
switch (function) {
|
||||
// case FUNC_INIT:
|
||||
// break;
|
||||
// case FUNC_PREP_BEFORE_TELEPERIOD:
|
||||
// break;
|
||||
case FUNC_JSON_APPEND:
|
||||
AdcShow(1);
|
||||
break;
|
||||
|
|
|
@ -107,9 +107,9 @@ void IrReceiveCheck()
|
|||
if ((iridx < 0) || (iridx > 14)) {
|
||||
iridx = 0;
|
||||
}
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_IRRECEIVED "\":{\"" D_IR_PROTOCOL "\":\"%s\",\"" D_IR_BITS "\":%d,\"" D_IR_DATA "\":\"%X\"}}"),
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_JSON_IRRECEIVED "\":{\"" D_JSON_IR_PROTOCOL "\":\"%s\",\"" D_JSON_IR_BITS "\":%d,\"" D_JSON_IR_DATA "\":\"%X\"}}"),
|
||||
GetTextIndexed(sirtype, sizeof(sirtype), iridx, kIrRemoteProtocols), results.bits, results.value);
|
||||
MqttPublishPrefixTopic_P(6, PSTR(D_IRRECEIVED));
|
||||
MqttPublishPrefixTopic_P(6, PSTR(D_JSON_IRRECEIVED));
|
||||
#ifdef USE_DOMOTICZ
|
||||
unsigned long value = results.value | (iridx << 28); // [Protocol:4, Data:28]
|
||||
DomoticzSensor(DZ_COUNT, value); // Send data as Domoticz Counter value
|
||||
|
@ -299,13 +299,13 @@ boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
|
|||
StaticJsonBuffer<128> jsonBuf;
|
||||
JsonObject &ir_json = jsonBuf.parseObject(dataBufUc);
|
||||
if (!ir_json.success()) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRSEND "\":\"" D_INVALID_JSON "\"}")); // JSON decode failed
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRSEND "\":\"" D_JSON_INVALID_JSON "\"}")); // JSON decode failed
|
||||
}
|
||||
else {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRSEND "\":\"" D_DONE "\"}"));
|
||||
protocol = ir_json[D_IR_PROTOCOL];
|
||||
bits = ir_json[D_IR_BITS];
|
||||
data = ir_json[D_IR_DATA];
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRSEND "\":\"" D_JSON_DONE "\"}"));
|
||||
protocol = ir_json[D_JSON_IR_PROTOCOL];
|
||||
bits = ir_json[D_JSON_IR_BITS];
|
||||
data = ir_json[D_JSON_IR_DATA];
|
||||
if (protocol && bits && data) {
|
||||
int protocol_code = GetCommandCode(protocol_text, sizeof(protocol_text), protocol, kIrRemoteProtocols);
|
||||
switch (protocol_code) {
|
||||
|
@ -326,7 +326,7 @@ boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
|
|||
case PANASONIC:
|
||||
irsend->sendPanasonic(bits, data); break;
|
||||
default:
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRSEND "\":\"" D_PROTOCOL_NOT_SUPPORTED "\"}"));
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRSEND "\":\"" D_JSON_PROTOCOL_NOT_SUPPORTED "\"}"));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -338,7 +338,7 @@ boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
|
|||
error = true;
|
||||
}
|
||||
if (error) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRSEND "\":\"" D_NO " " D_IR_PROTOCOL ", " D_IR_BITS " " D_OR " " D_IR_DATA "\"}"));
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRSEND "\":\"" D_NO " " D_JSON_IR_PROTOCOL ", " D_JSON_IR_BITS " " D_JSON_OR " " D_JSON_IR_DATA "\"}"));
|
||||
}
|
||||
}
|
||||
#ifdef USE_IR_HVAC
|
||||
|
@ -347,15 +347,15 @@ boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
|
|||
StaticJsonBuffer<164> jsonBufer;
|
||||
JsonObject &root = jsonBufer.parseObject(dataBufUc);
|
||||
if (!root.success()) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRHVAC "\":\"" D_INVALID_JSON "\"}")); // JSON decode failed
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRHVAC "\":\"" D_JSON_INVALID_JSON "\"}")); // JSON decode failed
|
||||
}
|
||||
else {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRHVAC "\":\"" D_DONE "\"}"));
|
||||
HVAC_Vendor = root[D_IRHVAC_VENDOR];
|
||||
HVAC_Power = root[D_IRHVAC_POWER];
|
||||
HVAC_Mode = root[D_IRHVAC_MODE];
|
||||
HVAC_FanMode = root[D_IRHVAC_FANSPEED];
|
||||
HVAC_Temp = root[D_IRHVAC_TEMP];
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRHVAC "\":\"" D_JSON_DONE "\"}"));
|
||||
HVAC_Vendor = root[D_JSON_IRHVAC_VENDOR];
|
||||
HVAC_Power = root[D_JSON_IRHVAC_POWER];
|
||||
HVAC_Mode = root[D_JSON_IRHVAC_MODE];
|
||||
HVAC_FanMode = root[D_JSON_IRHVAC_FANSPEED];
|
||||
HVAC_Temp = root[D_JSON_IRHVAC_TEMP];
|
||||
|
||||
// snprintf_P(log_data, sizeof(log_data), PSTR("IRHVAC: Received Vendor %s, Power %d, Mode %s, FanSpeed %s, Temp %d"),
|
||||
// HVAC_Vendor, HVAC_Power, HVAC_Mode, HVAC_FanMode, HVAC_Temp);
|
||||
|
@ -376,7 +376,7 @@ boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
|
|||
error = true;
|
||||
}
|
||||
if (error) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRHVAC "\":\"" D_WRONG " " D_IRHVAC_VENDOR ", " D_IRHVAC_MODE " " D_OR " " D_IRHVAC_FANSPEED "\"}"));
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_IRHVAC "\":\"" D_JSON_WRONG " " D_JSON_IRHVAC_VENDOR ", " D_JSON_IRHVAC_MODE " " D_JSON_OR " " D_JSON_IRHVAC_FANSPEED "\"}"));
|
||||
}
|
||||
}
|
||||
#endif // USE_IR_HVAC
|
||||
|
|
|
@ -698,7 +698,7 @@ void LightAnimate()
|
|||
light_new_color[i] = light_current_color[i];
|
||||
}
|
||||
} else {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_WAKEUP "\":\"" D_DONE "\"}"));
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_WAKEUP "\":\"" D_JSON_DONE "\"}"));
|
||||
MqttPublishPrefixTopic_P(2, PSTR(D_CMND_WAKEUP));
|
||||
light_wakeup_active = 0;
|
||||
Settings.light_scheme = LS_POWER;
|
||||
|
|
|
@ -100,7 +100,7 @@ void SonoffBridgeReceived()
|
|||
}
|
||||
}
|
||||
}
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_RFRECEIVED "\":{\"" D_SYNC "\":%d,\"" D_LOW "\":%d,\"" D_HIGH "\":%d,\"" D_DATA "\":\"%06X\",\"" D_CMND_RFKEY "\":%s}}"),
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_RFRECEIVED "\":{\"" D_JSON_SYNC "\":%d,\"" D_JSON_LOW "\":%d,\"" D_JSON_HIGH "\":%d,\"" D_JSON_DATA "\":\"%06X\",\"" D_CMND_RFKEY "\":%s}}"),
|
||||
sync_time, low_time, high_time, received_id, rfkey);
|
||||
MqttPublishPrefixTopic_P(6, PSTR(D_RFRECEIVED));
|
||||
#ifdef USE_DOMOTICZ
|
||||
|
|
|
@ -103,7 +103,7 @@ void CounterShow(boolean json)
|
|||
}
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_COUNTER "%d\":%s"), mqtt_data, i +1, counter);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_COUNTER "%d\":%s"), mqtt_data, i +1, counter);
|
||||
#ifdef USE_DOMOTICZ
|
||||
if (1 == dsxflg) {
|
||||
DomoticzSensor(DZ_COUNT, RtcSettings.pulse_counter[i]);
|
||||
|
|
|
@ -715,7 +715,7 @@ boolean EnergyCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
|
|||
dtostrfd((float)Settings.energy_kWhyesterday / 100000000, Settings.flag2.energy_resolution, energy_yesterday_chr);
|
||||
dtostrfd((float)RtcSettings.energy_kWhtoday / 100000000, Settings.flag2.energy_resolution, stoday_energy);
|
||||
dtostrfd((float)(RtcSettings.energy_kWhtotal + (energy_kWhtoday / 1000)) / 100000, Settings.flag2.energy_resolution, energy_total_chr);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"%s\":{\"" D_TOTAL "\":%s,\"" D_YESTERDAY "\":%s,\"" D_TODAY "\":%s}}"),
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"%s\":{\"" D_JSON_TOTAL "\":%s,\"" D_JSON_YESTERDAY "\":%s,\"" D_JSON_TODAY "\":%s}}"),
|
||||
command, energy_total_chr, energy_yesterday_chr, stoday_energy);
|
||||
status_flag = 1;
|
||||
}
|
||||
|
@ -903,8 +903,8 @@ void EnergyShow(boolean json)
|
|||
dtostrfd((float)Settings.energy_kWhyesterday / 100000000, Settings.flag2.energy_resolution, energy_yesterday_chr);
|
||||
|
||||
if (json) {
|
||||
snprintf_P(speriod, sizeof(speriod), PSTR(",\"" D_PERIOD "\":%s"), energy_period_chr);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_RSLT_ENERGY "\":{\"" D_TOTAL "\":%s,\"" D_YESTERDAY "\":%s,\"" D_TODAY "\":%s%s,\"" D_POWERUSAGE "\":%s,\"" D_POWERFACTOR "\":%s,\"" D_VOLTAGE "\":%s,\"" D_CURRENT "\":%s}"),
|
||||
snprintf_P(speriod, sizeof(speriod), PSTR(",\"" D_JSON_PERIOD "\":%s"), energy_period_chr);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_RSLT_ENERGY "\":{\"" D_JSON_TOTAL "\":%s,\"" D_JSON_YESTERDAY "\":%s,\"" D_JSON_TODAY "\":%s%s,\"" D_JSON_POWERUSAGE "\":%s,\"" D_JSON_POWERFACTOR "\":%s,\"" D_JSON_VOLTAGE "\":%s,\"" D_JSON_CURRENT "\":%s}"),
|
||||
mqtt_data, energy_total_chr, energy_yesterday_chr, energy_daily_chr, (show_energy_period) ? speriod : "", energy_power_chr, energy_power_factor_chr, energy_voltage_chr, energy_current_chr);
|
||||
#ifdef USE_DOMOTICZ
|
||||
if (show_energy_period) { // Only send if telemetry
|
||||
|
|
|
@ -120,7 +120,7 @@ void SonoffScShow(boolean json)
|
|||
dtostrfd(h, Settings.flag2.humidity_resolution, humidity);
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_TEMPERATURE "\":%s,\"" D_HUMIDITY "\":%s,\"" D_LIGHT "\":%d,\"" D_NOISE "\":%d,\"" D_AIRQUALITY "\":%d"),
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s,\"" D_JSON_LIGHT "\":%d,\"" D_JSON_NOISE "\":%d,\"" D_JSON_AIRQUALITY "\":%d"),
|
||||
mqtt_data, temperature, humidity, sc_value[2], sc_value[3], sc_value[4]);
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzTempHumSensor(temperature, humidity);
|
||||
|
|
|
@ -195,7 +195,7 @@ void Ds18b20Show(boolean json)
|
|||
dtostrfi(t, Settings.flag2.temperature_resolution, temperature);
|
||||
|
||||
if(json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"DS18B20\":{\"" D_TEMPERATURE "\":%s}"), mqtt_data, temperature);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"DS18B20\":{\"" D_JSON_TEMPERATURE "\":%s}"), mqtt_data, temperature);
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_TEMP, temperature);
|
||||
#endif // USE_DOMOTICZ
|
||||
|
|
|
@ -366,13 +366,13 @@ void Ds18x20Show(boolean json)
|
|||
snprintf_P(stemp, sizeof(stemp), PSTR("%s-%d"), ds18x20_types, i +1);
|
||||
if (json) {
|
||||
if (1 == ds18x20_sensors) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_TEMPERATURE "\":%s}"), mqtt_data, ds18x20_types, temperature);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_JSON_TEMPERATURE "\":%s}"), mqtt_data, ds18x20_types, temperature);
|
||||
} else {
|
||||
char address[17];
|
||||
for (byte j = 0; j < 6; j++) {
|
||||
sprintf(address+2*j, "%02X", ds18x20_address[ds18x20_index[i]][6-j]); // Skip sensor type and crc
|
||||
}
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_ID "\":\"%s\",\"" D_TEMPERATURE "\":%s}"), mqtt_data, stemp, address, temperature);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_ID "\":\"%s\",\"" D_JSON_TEMPERATURE "\":%s}"), mqtt_data, stemp, address, temperature);
|
||||
}
|
||||
#ifdef USE_DOMOTICZ
|
||||
if (domoticz_flag) {
|
||||
|
|
|
@ -179,7 +179,7 @@ void Ds18x20Show(boolean json)
|
|||
stemp[0] = '\0';
|
||||
}
|
||||
dsxflg++;
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s%s\"DS%d\":{\"" D_TYPE "\":\"%s\",\"" D_ADDRESS "\":\"%s\",\"" D_TEMPERATURE "\":%s}"),
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s%s\"DS%d\":{\"" D_JSON_TYPE "\":\"%s\",\"" D_JSON_ADDRESS "\":\"%s\",\"" D_JSON_TEMPERATURE "\":%s}"),
|
||||
mqtt_data, stemp, i +1, ds18x20_types, Ds18x20Addresses(i).c_str(), temperature);
|
||||
strcpy(stemp, ",");
|
||||
#ifdef USE_DOMOTICZ
|
||||
|
|
|
@ -455,16 +455,16 @@ void BmpShow(boolean json)
|
|||
|
||||
if (json) {
|
||||
char json_humidity[40];
|
||||
snprintf_P(json_humidity, sizeof(json_humidity), PSTR(",\"" D_HUMIDITY "\":%s"), humidity);
|
||||
snprintf_P(json_humidity, sizeof(json_humidity), PSTR(",\"" D_JSON_HUMIDITY "\":%s"), humidity);
|
||||
char json_sealevel[40];
|
||||
snprintf_P(json_sealevel, sizeof(json_sealevel), PSTR(",\"" D_PRESSUREATSEALEVEL "\":%s"), sea_pressure);
|
||||
snprintf_P(json_sealevel, sizeof(json_sealevel), PSTR(",\"" D_JSON_PRESSUREATSEALEVEL "\":%s"), sea_pressure);
|
||||
#ifdef USE_BME680
|
||||
char json_gas[40];
|
||||
snprintf_P(json_gas, sizeof(json_gas), PSTR(",\"" D_GAS "\":%s"), gas_resistance);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_TEMPERATURE "\":%s%s,\"" D_PRESSURE "\":%s%s%s}"),
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_JSON_TEMPERATURE "\":%s%s,\"" D_JSON_PRESSURE "\":%s%s%s}"),
|
||||
mqtt_data, bmp_name, temperature, (bmp_model >= 2) ? json_humidity : "", pressure, (Settings.altitude != 0) ? json_sealevel : "", (bmp_model >= 3) ? json_gas : "");
|
||||
#else
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_TEMPERATURE "\":%s%s,\"" D_PRESSURE "\":%s%s}"),
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_JSON_TEMPERATURE "\":%s%s,\"" D_JSON_PRESSURE "\":%s%s}"),
|
||||
mqtt_data, bmp_name, temperature, (bmp_model >= 2) ? json_humidity : "", pressure, (Settings.altitude != 0) ? json_sealevel : "");
|
||||
#endif // USE_BME680
|
||||
#ifdef USE_DOMOTICZ
|
||||
|
|
|
@ -75,7 +75,7 @@ void Bh1750Show(boolean json)
|
|||
uint16_t illuminance = Bh1750ReadLux();
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"BH1750\":{\"" D_ILLUMINANCE "\":%d}"), mqtt_data, illuminance);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"BH1750\":{\"" D_JSON_ILLUMINANCE "\":%d}"), mqtt_data, illuminance);
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_ILLUMINANCE, illuminance);
|
||||
#endif // USE_DOMOTICZ
|
||||
|
|
|
@ -80,7 +80,7 @@ void Veml6070Show(boolean json)
|
|||
uint16_t uvlevel = Veml6070ReadUv();
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"VEML6070\":{\"" D_UV_LEVEL "\":%d}"), mqtt_data, uvlevel);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"VEML6070\":{\"" D_JSON_UV_LEVEL "\":%d}"), mqtt_data, uvlevel);
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_ILLUMINANCE, uvlevel);
|
||||
#endif // USE_DOMOTICZ
|
||||
|
|
|
@ -190,7 +190,7 @@ void Ads1115Show(boolean json)
|
|||
stemp[0] = '\0';
|
||||
}
|
||||
dsxflg++;
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s%s\"" D_ANALOG_INPUT "%d\":%d"), mqtt_data, stemp, i, adc_value);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s%s\"" D_JSON_ANALOG_INPUT "%d\":%d"), mqtt_data, stemp, i, adc_value);
|
||||
strcpy(stemp, ",");
|
||||
#ifdef USE_WEBSERVER
|
||||
} else {
|
||||
|
|
|
@ -110,7 +110,7 @@ void Ads1115Show(boolean json)
|
|||
stemp[0] = '\0';
|
||||
}
|
||||
dsxflg++;
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s%s\"" D_ANALOG_INPUT "%d\":%d"), mqtt_data, stemp, i, adc_value);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s%s\"" D_JSON_ANALOG_INPUT "%d\":%d"), mqtt_data, stemp, i, adc_value);
|
||||
strcpy(stemp, ",");
|
||||
#ifdef USE_WEBSERVER
|
||||
} else {
|
||||
|
|
|
@ -193,7 +193,7 @@ void Ina219Show(boolean json)
|
|||
dtostrfd(fcurrent, Settings.flag2.current_resolution, current);
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"INA219\":{\"" D_VOLTAGE "\":%s,\"" D_CURRENT "\":%s,\"" D_POWERUSAGE "\":%s}"),
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"INA219\":{\"" D_JSON_VOLTAGE "\":%s,\"" D_JSON_CURRENT "\":%s,\"" D_JSON_POWERUSAGE "\":%s}"),
|
||||
mqtt_data, voltage, current, power);
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_VOLTAGE, voltage);
|
||||
|
|
|
@ -227,7 +227,7 @@ void MhzShow(boolean json)
|
|||
GetTextIndexed(mhz_types, sizeof(mhz_types), mhz_type -1, kMhzTypes);
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_CO2 "\":%d,\"" D_TEMPERATURE "\":%s}"), mqtt_data, mhz_types, mhz_last_ppm, temperature);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_JSON_CO2 "\":%d,\"" D_JSON_TEMPERATURE "\":%s}"), mqtt_data, mhz_types, mhz_last_ppm, temperature);
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_AIRQUALITY, mhz_last_ppm);
|
||||
#endif // USE_DOMOTICZ
|
||||
|
|
|
@ -67,7 +67,7 @@ void Tsl2561Show(boolean json)
|
|||
uint16_t illuminance = tsl->getLuminosity(TSL2561_VISIBLE);
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"TSL2561\":{\"" D_ILLUMINANCE "\":%d}"), mqtt_data, illuminance);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"TSL2561\":{\"" D_JSON_ILLUMINANCE "\":%d}"), mqtt_data, illuminance);
|
||||
#ifdef USE_DOMOTICZ
|
||||
DomoticzSensor(DZ_ILLUMINANCE, illuminance);
|
||||
#endif // USE_DOMOTICZ
|
||||
|
|
|
@ -203,9 +203,9 @@ void SenseairShow(boolean json)
|
|||
GetTextIndexed(senseair_types, sizeof(senseair_types), senseair_type -1, kSenseairTypes);
|
||||
|
||||
if (json) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_CO2 "\":%d"), mqtt_data, senseair_types, senseair_co2);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"%s\":{\"" D_JSON_CO2 "\":%d"), mqtt_data, senseair_types, senseair_co2);
|
||||
if (senseair_type != 2) {
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_TEMPERATURE "\":%s,\"" D_HUMIDITY "\":%s"), mqtt_data, temperature, humidity);
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s"), mqtt_data, temperature, humidity);
|
||||
}
|
||||
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data);
|
||||
#ifdef USE_DOMOTICZ
|
||||
|
|
Loading…
Reference in New Issue