Merge branch 'arendst/development' into development

This commit is contained in:
reloxx13 2017-12-31 01:56:59 +01:00
commit 2d8a41a846
30 changed files with 308 additions and 275 deletions

View File

@ -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.0g** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
### ATTENTION All versions

View File

@ -1,7 +1,15 @@
/* 5.10.0e
/* 5.10.0g
* Add 2nd Gen Alexa support to Wemo emulation discovery (#1357, #1450)
*
* 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)
* Add define for additional number of WS2812 schemes (#1463)
*
* 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

View File

@ -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";

View File

@ -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"

View File

@ -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"

View File

@ -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_

View File

@ -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"

View File

@ -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"

View File

@ -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 0x050A0007
#define VERSION_STRING "5.10.0g" // 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') {

View File

@ -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;

View File

@ -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

View File

@ -51,6 +51,8 @@
*
\*********************************************************************************************/
#define WS2812_SCHEMES 7 // Number of additional WS2812 schemes supported by xdrv_ws2812.ino
enum LightCommands {
CMND_COLOR, CMND_COLORTEMPERATURE, CMND_DIMMER, CMND_LED, CMND_LEDTABLE, CMND_FADE,
CMND_PIXELS, CMND_SCHEME, CMND_SPEED, CMND_WAKEUP, CMND_WAKEUPDURATION, CMND_WIDTH, CMND_UNDOCA };
@ -377,7 +379,7 @@ void LightInit(void)
light_subtype++; // from RGB to RGBW
#endif
Ws2812Init();
max_scheme = LS_MAX +7;
max_scheme = LS_MAX + WS2812_SCHEMES;
}
#endif // USE_WS2812 ************************************************************************
else {
@ -698,7 +700,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;
@ -1069,7 +1071,7 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
}
#endif // USE_WS2812 ************************************************************************
else if ((CMND_SCHEME == command_code) && (light_subtype >= LST_RGB)) {
uint8_t max_scheme = (LT_WS2812 == light_type) ? LS_MAX +7 : LS_MAX -1;
uint8_t max_scheme = (LT_WS2812 == light_type) ? LS_MAX + WS2812_SCHEMES : LS_MAX -1;
if (('+' == option) && (Settings.light_scheme < max_scheme)) {
payload = Settings.light_scheme + ((0 == Settings.light_scheme) ? 2 : 1); // Skip wakeup
}

View File

@ -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

View File

@ -220,14 +220,18 @@ void PollUdp()
// AddLog_P(LOG_LEVEL_DEBUG_MORE, PSTR("UDP: M-SEARCH Packet received"));
// AddLog_P(LOG_LEVEL_DEBUG_MORE, request.c_str());
if ((EMUL_WEMO == Settings.flag2.emulation) && (request.indexOf(F("urn:belkin:device:**")) > 0)) {
if ((EMUL_WEMO == Settings.flag2.emulation) &&
((request.indexOf(F("urn:belkin:device:**")) > 0) ||
(request.indexOf(F("upnp:rootdevice")) > 0) || // Needed by 2nd generation Echo
(request.indexOf(F("ssdpsearch:all")) > 0) ||
(request.indexOf(F("ssdp:all")) > 0))) {
WemoRespondToMSearch();
}
else if ((EMUL_HUE == Settings.flag2.emulation) &&
((request.indexOf(F("st:urn:schemas-upnp-org:device:basic:1")) > 0) ||
(request.indexOf(F("st:upnp:rootdevice")) > 0) ||
(request.indexOf(F("st:ssdpsearch:all")) > 0) ||
(request.indexOf(F("st:ssdp:all")) > 0))) {
((request.indexOf(F("urn:schemas-upnp-org:device:basic:1")) > 0) ||
(request.indexOf(F("upnp:rootdevice")) > 0) ||
(request.indexOf(F("ssdpsearch:all")) > 0) ||
(request.indexOf(F("ssdp:all")) > 0))) {
HueRespondToMSearch();
}
}
@ -241,42 +245,7 @@ void PollUdp()
\*********************************************************************************************/
const char WEMO_EVENTSERVICE_XML[] PROGMEM =
/*
// Original
"<?scpd xmlns=\"urn:Belkin:service-1-0\"?>"
"<actionList>"
"<action>"
"<name>SetBinaryState</name>"
"<argumentList>"
"<argument>"
"<retval/>"
"<name>BinaryState</name>"
"<relatedStateVariable>BinaryState</relatedStateVariable>"
"<direction>in</direction>"
"</argument>"
"</argumentList>"
"<serviceStateTable>"
"<stateVariable sendEvents=\"yes\">"
"<name>BinaryState</name>"
"<dataType>Boolean</dataType>"
"<defaultValue>0</defaultValue>"
"</stateVariable>"
"<stateVariable sendEvents=\"yes\">"
"<name>level</name>"
"<dataType>string</dataType>"
"<defaultValue>0</defaultValue>"
"</stateVariable>"
"</serviceStateTable>"
"</action>"
"</scpd>\r\n"
"\r\n";
*/
/*
// XosePerez version 20171108 - v2.3.0
"<?xml version=\"1.0\"?>"
"<scpd xmlns=\"urn:Belkin:service-1-0\">"
"<specVersion><major>1</major><minor>0</minor></specVersion>"
"<actionList>"
"<action>"
"<name>SetBinaryState</name>"
@ -301,29 +270,6 @@ const char WEMO_EVENTSERVICE_XML[] PROGMEM =
"</argumentList>"
"</action>"
"</actionList>"
"<serviceStateTable>"
"<stateVariable sendEvents=\"yes\">"
"<name>BinaryState</name>"
"<dataType>Boolean</dataType>"
"<defaultValue>0</defaultValue>"
"</stateVariable>"
"</serviceStateTable>"
"</scpd>";
*/
// Reloxx13 from #1357
"<?scpd xmlns=\"urn:Belkin:service-1-0\"?>"
"<actionList>"
"<action>"
"<name>SetBinaryState</name>"
"<argumentList>"
"<argument>"
"<retval/>"
"<name>BinaryState</name>"
"<relatedStateVariable>BinaryState</relatedStateVariable>"
"<direction>in</direction>"
"</argument>"
"</argumentList>"
"<serviceStateTable>"
"<stateVariable sendEvents=\"yes\">"
"<name>BinaryState</name>"
@ -336,19 +282,6 @@ const char WEMO_EVENTSERVICE_XML[] PROGMEM =
"<defaultValue>0</defaultValue>"
"</stateVariable>"
"</serviceStateTable>"
"</action>"
"<action>"
"<name>GetBinaryState</name>"
"<argumentList>"
"<argument>"
"<retval/>"
"<name>BinaryState</name>"
"<relatedStateVariable>BinaryState</relatedStateVariable>"
"<direction>out</direction>"
"</argument>"
"</argumentList>"
"</action>"
"</actionList>"
"</scpd>\r\n"
"\r\n";
@ -360,8 +293,7 @@ const char WEMO_RESPONSE_STATE_SOAP[] PROGMEM =
"<BinaryState>{x1</BinaryState>"
"</u:SetBinaryStateResponse>"
"</s:Body>"
"</s:Envelope>\r\n"
"\r\n";
"</s:Envelope>\r\n";
const char WEMO_SETUP_XML[] PROGMEM =
"<?xml version=\"1.0\"?>"
@ -370,7 +302,7 @@ const char WEMO_SETUP_XML[] PROGMEM =
"<deviceType>urn:Belkin:device:controllee:1</deviceType>"
"<friendlyName>{x1</friendlyName>"
"<manufacturer>Belkin International Inc.</manufacturer>"
"<modelName>Sonoff Socket</modelName>"
"<modelName>Socket</modelName>"
"<modelNumber>3.1415</modelNumber>"
"<UDN>uuid:{x2</UDN>"
"<serialNumber>{x3</serialNumber>"
@ -385,7 +317,7 @@ const char WEMO_SETUP_XML[] PROGMEM =
"</service>"
"</serviceList>"
"</device>"
"</root>";
"</root>\r\n";
/********************************************************************************************/

View File

@ -62,7 +62,7 @@ WsColor kHanukkah[2] = { 0,0,255, 255,255,255 };
WsColor kwanzaa[3] = { 255,0,0, 0,0,0, 0,255,0 };
WsColor kRainbow[7] = { 255,0,0, 255,128,0, 255,255,0, 0,255,0, 0,0,255, 128,0,255, 255,0,255 };
WsColor kFire[3] = { 255,0,0, 255,102,0, 255,192,0 };
ColorScheme kSchemes[7] = {
ColorScheme kSchemes[WS2812_SCHEMES] = {
kIncandescent, 2,
kRgb, 3,
kChristmas, 2,

View File

@ -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]);

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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);

View File

@ -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

View File

@ -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

View File

@ -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