Merge remote-tracking branch 'upstream/development' into development

This commit is contained in:
Gennaro Tortone 2018-01-05 21:17:41 +01:00
commit e4ec89b1a6
24 changed files with 1166 additions and 1596 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.0g** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
Current version is **5.10.0i** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
### ATTENTION All versions

View File

@ -1,4 +1,13 @@
/* 5.10.0g
/* 5.10.0i
* Add device function pointers
* Moved Command and JSON English language defines to one file (i18n.h)
* Update it-IT.h language file (#1449)
* Fix Wemo and Hue emulation by adding M-Search response delay (#1486)
*
* 5.10.0h
* Fix Wemo Emulation for Gen 2 devices (#1486)
*
* 5.10.0g
* Add 2nd Gen Alexa support to Wemo emulation discovery (#1357, #1450)
*
* 5.10.0f

View File

@ -20,6 +20,231 @@
#ifndef _I18N_H_
#define _I18N_H_
/********************************************************************************************/
// Text used in JSON messages only in English (#1473)
#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"
// Result
#define D_RSLT_RESULT "RESULT"
#define D_RSLT_INFO "INFO"
#define D_RSLT_STATE "STATE"
#define D_RSLT_SENSOR "SENSOR"
#define D_RSLT_UPTIME "UPTIME"
#define D_RSLT_MARGINS "MARGINS"
#define D_RSLT_WARNING "WARNING"
#define D_RSLT_ENERGY "ENERGY"
// Commands sonoff.ino
#define D_CMND_MQTTHOST "MqttHost"
#define D_CMND_MQTTPORT "MqttPort"
#define D_CMND_MQTTRETRY "MqttRetry"
#define D_CMND_STATETEXT "StateText"
#define D_CMND_MQTTFINGERPRINT "MqttFingerprint"
#define D_CMND_MQTTCLIENT "MqttClient"
#define D_CMND_MQTTUSER "MqttUser"
#define D_CMND_MQTTPASSWORD "MqttPassword"
#define D_CMND_FULLTOPIC "FullTopic"
#define D_CMND_PREFIX "Prefix"
#define PRFX_MAX_STRING_LENGTH 5
#define D_CMND "cmnd"
#define D_STAT "stat"
#define D_TELE "tele"
#define D_CMND_GROUPTOPIC "GroupTopic"
#define D_CMND_TOPIC "Topic"
#define D_CMND_BUTTONTOPIC "ButtonTopic"
#define D_CMND_SWITCHTOPIC "SwitchTopic"
#define D_CMND_BUTTONRETAIN "ButtonRetain"
#define D_CMND_SWITCHRETAIN "SwitchRetain"
#define D_CMND_POWERRETAIN "PowerRetain"
#define D_CMND_SENSORRETAIN "SensorRetain"
#define D_CMND_BACKLOG "Backlog"
#define D_CMND_DELAY "Delay"
#define D_CMND_STATUS "Status"
#define D_STATUS1_PARAMETER "PRM"
#define D_STATUS2_FIRMWARE "FWR"
#define D_STATUS3_LOGGING "LOG"
#define D_STATUS4_MEMORY "MEM"
#define D_STATUS5_NETWORK "NET"
#define D_STATUS6_MQTT "MQT"
#define D_STATUS7_TIME "TIM"
#define D_STATUS8_POWER "PWR"
#define D_STATUS9_MARGIN "PTH"
#define D_STATUS10_SENSOR "SNS"
#define D_STATUS11_STATUS "STS"
#define D_CMND_POWER "Power"
#define D_RSLT_POWER "POWER"
#define D_CMND_POWERONSTATE "PowerOnState"
#define D_CMND_PULSETIME "PulseTime"
#define D_CMND_BLINKTIME "BlinkTime"
#define D_CMND_BLINKCOUNT "BlinkCount"
#define D_CMND_SAVEDATA "SaveData"
#define D_CMND_SETOPTION "SetOption"
#define D_CMND_TEMPERATURE_RESOLUTION "TempRes"
#define D_CMND_HUMIDITY_RESOLUTION "HumRes"
#define D_CMND_PRESSURE_RESOLUTION "PressRes"
#define D_CMND_POWER_RESOLUTION "WattRes"
#define D_CMND_VOLTAGE_RESOLUTION "VoltRes"
#define D_CMND_CURRENT_RESOLUTION "AmpRes"
#define D_CMND_ENERGY_RESOLUTION "EnergyRes"
#define D_CMND_MODULE "Module"
#define D_CMND_MODULES "Modules"
#define D_CMND_GPIO "GPIO"
#define D_NOT_SUPPORTED "Not supported"
#define D_CMND_GPIOS "GPIOs"
#define D_CMND_PWM "PWM"
#define D_CMND_PWMFREQUENCY "PWMFrequency"
#define D_CMND_PWMRANGE "PWMRange"
#define D_CMND_COUNTER "Counter"
#define D_CMND_COUNTERTYPE "CounterType"
#define D_CMND_COUNTERDEBOUNCE "CounterDebounce"
#define D_CMND_SLEEP "Sleep"
#define D_CMND_UPLOAD "Upload"
#define D_CMND_UPGRADE "Upgrade"
#define D_ONE_OR_GT "1 or >%s to upgrade"
#define D_CMND_OTAURL "OtaUrl"
#define D_CMND_SERIALLOG "SerialLog"
#define D_CMND_SYSLOG "SysLog"
#define D_CMND_LOGHOST "LogHost"
#define D_CMND_LOGPORT "LogPort"
#define D_CMND_IPADDRESS "IPAddress"
#define D_CMND_NTPSERVER "NtpServer"
#define D_CMND_AP "Ap"
#define D_CMND_SSID "SSId"
#define D_CMND_PASSWORD "Password"
#define D_CMND_HOSTNAME "Hostname"
#define D_CMND_WIFICONFIG "WifiConfig"
#define WCFG_MAX_STRING_LENGTH 12
#define D_WCFG_0_RESTART "Restart"
#define D_WCFG_1_SMARTCONFIG "SmartConfig"
#define D_WCFG_2_WIFIMANAGER "WifiManager"
#define D_WCFG_3_WPSCONFIG "WPSConfig"
#define D_WCFG_4_RETRY "Retry"
#define D_WCFG_5_WAIT "Wait"
#define D_CMND_FRIENDLYNAME "FriendlyName"
#define D_CMND_SWITCHMODE "SwitchMode"
#define D_CMND_WEBSERVER "Webserver"
#define D_WEBSERVER_MODE "WebServerMode"
#define D_ACTIVE_FOR "Active for"
#define D_ON_DEVICE "on"
#define D_CMND_WEBPASSWORD "WebPassword"
#define D_CMND_WEBLOG "WebLog"
#define D_CMND_EMULATION "Emulation"
#define D_CMND_TELEPERIOD "TelePeriod"
#define D_CMND_RESTART "Restart"
#define D_ONE_TO_RESTART "1 to restart"
#define D_CMND_RESET "Reset"
#define D_RESET_AND_RESTARTING "Reset and Restarting"
#define D_ONE_TO_RESET "1 to reset"
#define D_CMND_TIMEZONE "Timezone"
#define D_CMND_ALTITUDE "Altitude"
#define D_CMND_LEDPOWER "LedPower"
#define D_CMND_LEDSTATE "LedState"
#define D_CMND_CFGDUMP "CfgDump"
#define D_CMND_I2CSCAN "I2CScan"
#define D_CMND_INA219MODE "Ina219Mode"
#define D_CMND_EXCEPTION "Exception"
// Commands xdrv_01_light.ino
#define D_CMND_COLOR "Color"
#define D_CMND_COLORTEMPERATURE "CT"
#define D_CMND_DIMMER "Dimmer"
#define D_CMND_LED "Led"
#define D_CMND_LEDTABLE "LedTable"
#define D_CMND_FADE "Fade"
#define D_CMND_PIXELS "Pixels"
#define D_CMND_SCHEME "Scheme"
#define D_CMND_SPEED "Speed"
#define D_CMND_WAKEUP "Wakeup"
#define D_CMND_WAKEUPDURATION "WakeUpDuration"
#define D_CMND_WIDTH "Width"
// Commands xdrv_02_irremote.ino
#define D_CMND_IRSEND "IRSend"
#define D_CMND_IRHVAC "IRHVAC"
// Commands xsns_03_energy.ino
#define D_CMND_POWERLOW "PowerLow"
#define D_CMND_POWERHIGH "PowerHigh"
#define D_CMND_VOLTAGELOW "VoltageLow"
#define D_CMND_VOLTAGEHIGH "VoltageHigh"
#define D_CMND_CURRENTLOW "CurrentLow"
#define D_CMND_CURRENTHIGH "CurrentHigh"
#define D_CMND_ENERGYRESET "EnergyReset"
#define D_CMND_HLWPCAL "HlwPcal"
#define D_CMND_HLWPSET "HlwPset"
#define D_CMND_HLWUCAL "HlwUcal"
#define D_CMND_HLWUSET "HlwUset"
#define D_CMND_HLWICAL "HlwIcal"
#define D_CMND_HLWISET "HlwIset"
#define D_CMND_MAXPOWER "MaxPower"
#define D_CMND_MAXPOWERHOLD "MaxPowerHold"
#define D_CMND_MAXPOWERWINDOW "MaxPowerWindow"
#define D_CMND_SAFEPOWER "SafePower"
#define D_CMND_SAFEPOWERHOLD "SafePowerHold"
#define D_CMND_SAFEPOWERWINDOW "SafePowerWindow"
#define D_CMND_MAXENERGY "MaxEnergy"
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
// Commands xdrv_04_snfbridge.ino
#define D_CMND_RFCODE "RfCode"
#define D_CMND_RFHIGH "RfHigh"
#define D_CMND_RFHOST "RfHost"
#define D_CMND_RFKEY "RfKey"
#define D_CMND_RFLOW "RfLow"
#define D_CMND_RFSYNC "RfSync"
// Commands xdrv_05_domoticz.ino
#define D_CMND_DOMOTICZ "Domoticz"
#define D_CMND_IDX "Idx"
#define D_CMND_KEYIDX "KeyIdx"
#define D_CMND_SWITCHIDX "SwitchIdx"
#define D_CMND_SENSORIDX "SensorIdx"
#define D_CMND_UPDATETIMER "UpdateTimer"
// Commands xdrv_06_display.ino
#define D_CMND_DISPLAY "Display"
#define D_CMND_DISP_ADDRESS "Address"
#define D_CMND_DISP_COLS "Cols"
#define D_CMND_DISP_DIMMER "Dimmer"
#define D_CMND_DISP_MODE "Mode"
#define D_CMND_DISP_MODEL "Model"
#define D_CMND_DISP_REFRESH "Refresh"
#define D_CMND_DISP_ROWS "Rows"
#define D_CMND_DISP_SIZE "Size"
#define D_CMND_DISP_TEXT "Text"
/********************************************************************************************/
#ifndef MY_LANGUAGE
#include "language/en-GB.h"
#else

View File

@ -192,44 +192,6 @@
#define D_WEB_SERVER "Web-Server"
#define D_WIFI "WLAN"
// 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"
#define D_LOADED_FROM_FLASH_AT "aus Flash geladen am"
#define D_USE_DEFAULTS "Standard verwenden"
#define D_ERASED_SECTOR "gelöschter Sektor"
// sonoff.ino
#define D_LEVEL_10 "level 1-0"
#define D_LEVEL_01 "level 0-1"
@ -271,6 +233,12 @@
#define D_I2CSCAN_NO_DEVICES_FOUND "keine Geräte gefunden"
#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host nicht gefunden"
// settings.ino
#define D_SAVED_TO_FLASH_AT "in Flash gespeichert am"
#define D_LOADED_FROM_FLASH_AT "aus Flash geladen am"
#define D_USE_DEFAULTS "Standard verwenden"
#define D_ERASED_SECTOR "gelöschter Sektor"
// webserver.ino
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMUM-Firmware - bitte upgraden"
#define D_WEBSERVER_ACTIVE_ON "Web-Server aktiv bei"
@ -391,7 +359,51 @@
#define D_ENABLE_WEBLOG_FOR_RESPONSE "Aktivere Web Log Level 2 falls Reaktion erwartet"
#define D_NEED_USER_AND_PASSWORD "Benutzer benötigt=<Benutzername>&password=<Passwort>"
// xdrv_domoticz.ino
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast deaktiviert"
#define D_MULTICAST_REJOINED "Multicast (wieder-)verbunden"
#define D_MULTICAST_JOIN_FAILED "Multicast Verbindung fehlgeschlagen"
#define D_FAILED_TO_SEND_RESPONSE "Antwort senden fehlgeschlagen"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo basic event"
#define D_WEMO_EVENT_SERVICE "WeMo event service"
#define D_WEMO_META_SERVICE "WeMo meta service"
#define D_WEMO_SETUP "WeMo-Setup"
#define D_RESPONSE_SENT "Antwort gesendet"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue-Setup"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API nicht implementiert"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST args"
#define D_3_RESPONSE_PACKETS_SENT "3 Antwortpakete gesendet"
// xdrv_02_irremote.ino
#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_04_snfbridge.ino
#define D_RFRECEIVED "RF empfangen"
#define D_START_LEARNING "starte Anlernen"
#define D_SET_TO_DEFAULT "auf Standard zurücksetzen"
#define D_DEFAULT_SENT "Standard gesendet"
#define D_LEARNED_SENT "Anlernen gesendet"
#define D_LEARNING_ACTIVE "Anlernen aktiv"
#define D_LEARN_FAILED "Anlernen fehlgeschlagen"
#define D_LEARNED "angelernt"
#define D_SAVED "gespeichert"
// xdrv_05_domoticz.ino
#define D_DOMOTICZ_PARAMETERS "Domoticz parameters"
#define D_DOMOTICZ_IDX "Idx"
#define D_DOMOTICZ_KEY_IDX "Key idx"
@ -408,49 +420,6 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"
// xdrv_irremote.ino
#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"
#define D_START_LEARNING "starte Anlernen"
#define D_SET_TO_DEFAULT "auf Standard zurücksetzen"
#define D_DEFAULT_SENT "Standard gesendet"
#define D_LEARNED_SENT "Anlernen gesendet"
#define D_LEARNING_ACTIVE "Anlernen aktiv"
#define D_LEARN_FAILED "Anlernen fehlgeschlagen"
#define D_LEARNED "angelernt"
#define D_SAVED "gespeichert"
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast deaktiviert"
#define D_MULTICAST_REJOINED "Multicast (wieder-)verbunden"
#define D_MULTICAST_JOIN_FAILED "Multicast Verbindung fehlgeschlagen"
#define D_FAILED_TO_SEND_RESPONSE "Antwort senden fehlgeschlagen"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo basic event"
#define D_WEMO_EVENT_SERVICE "WeMo event service"
#define D_WEMO_SETUP "WeMo-Setup"
#define D_RESPONSE_SENT "Antwort gesendet"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue-Setup"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API nicht implementiert"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST args"
#define D_3_RESPONSE_PACKETS_SENT "3 Antwortpakete gesendet"
// xsns_03_energy.ino
#define D_MAXPOWERREACHED "MaxPowerReached"
#define D_MAXPOWERREACHEDRETRY "MaxPowerReachedRetry"
@ -503,7 +472,7 @@
#define D_SENSOR_SAIR_TX "SAir Tx"
#define D_SENSOR_SPI_CS "SPI CS"
#define D_SENSOR_SPI_DC "SPI DC"
#define D_SENSOR_BACKLIGHT "BLight"
#define D_SENSOR_BACKLIGHT "BkLight"
// Units
#define D_UNIT_AMPERE "A"
@ -548,181 +517,4 @@
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
// Result
#define D_RSLT_RESULT "ERGEBNIS"
#define D_RSLT_INFO "INFO"
#define D_RSLT_STATE "STATUS"
#define D_RSLT_SENSOR "SENSOR"
#define D_RSLT_UPTIME "LAUFZEIT"
#define D_RSLT_MARGINS "TOLERANZ"
#define D_RSLT_WARNING "WARNUNG"
#define D_RSLT_ENERGY "ENERGIE"
// Commands
#define D_CMND_MQTTHOST "MqttHost"
#define D_CMND_MQTTPORT "MqttPort"
#define D_CMND_MQTTRETRY "MqttRetry"
#define D_CMND_STATETEXT "StateText"
#define D_CMND_MQTTFINGERPRINT "MqttFingerprint"
#define D_CMND_MQTTCLIENT "MqttClient"
#define D_CMND_MQTTUSER "MqttUser"
#define D_CMND_MQTTPASSWORD "MqttPassword"
#define D_CMND_FULLTOPIC "FullTopic"
#define D_CMND_PREFIX "Prefix"
#define PRFX_MAX_STRING_LENGTH 5
#define D_CMND "cmnd"
#define D_STAT "stat"
#define D_TELE "tele"
#define D_CMND_GROUPTOPIC "GroupTopic"
#define D_CMND_TOPIC "Topic"
#define D_CMND_BUTTONTOPIC "ButtonTopic"
#define D_CMND_SWITCHTOPIC "SwitchTopic"
#define D_CMND_BUTTONRETAIN "ButtonRetain"
#define D_CMND_SWITCHRETAIN "SwitchRetain"
#define D_CMND_POWERRETAIN "PowerRetain"
#define D_CMND_SENSORRETAIN "SensorRetain"
#define D_CMND_BACKLOG "Backlog"
#define D_CMND_DELAY "Delay"
#define D_CMND_STATUS "Status"
#define D_STATUS1_PARAMETER "PRM"
#define D_STATUS2_FIRMWARE "FWR"
#define D_STATUS3_LOGGING "LOG"
#define D_STATUS4_MEMORY "MEM"
#define D_STATUS5_NETWORK "NET"
#define D_STATUS6_MQTT "MQT"
#define D_STATUS7_TIME "TIM"
#define D_STATUS8_POWER "PWR"
#define D_STATUS9_MARGIN "PTH"
#define D_STATUS10_SENSOR "SNS"
#define D_STATUS11_STATUS "STS"
#define D_CMND_POWER "Power"
#define D_RSLT_POWER "POWER"
#define D_CMND_POWERONSTATE "PowerOnState"
#define D_CMND_PULSETIME "PulseTime"
#define D_CMND_BLINKTIME "BlinkTime"
#define D_CMND_BLINKCOUNT "BlinkCount"
#define D_CMND_SAVEDATA "SaveData"
#define D_CMND_SETOPTION "SetOption"
#define D_CMND_TEMPERATURE_RESOLUTION "TempRes"
#define D_CMND_HUMIDITY_RESOLUTION "HumRes"
#define D_CMND_PRESSURE_RESOLUTION "PressRes"
#define D_CMND_POWER_RESOLUTION "WattRes"
#define D_CMND_VOLTAGE_RESOLUTION "VoltRes"
#define D_CMND_CURRENT_RESOLUTION "AmpRes"
#define D_CMND_ENERGY_RESOLUTION "EnergyRes"
#define D_CMND_MODULE "Module"
#define D_CMND_MODULES "Modules"
#define D_CMND_GPIO "GPIO"
#define D_NOT_SUPPORTED "Not supported"
#define D_CMND_GPIOS "GPIOs"
#define D_CMND_PWM "PWM"
#define D_CMND_PWMFREQUENCY "PWMFrequency"
#define D_CMND_PWMRANGE "PWMRange"
#define D_CMND_COUNTER "Counter"
#define D_CMND_COUNTERTYPE "CounterType"
#define D_CMND_COUNTERDEBOUNCE "CounterDebounce"
#define D_CMND_SLEEP "Sleep"
#define D_CMND_UPLOAD "Upload"
#define D_CMND_UPGRADE "Upgrade"
#define D_ONE_OR_GT "1 or >%s to upgrade"
#define D_CMND_OTAURL "OtaUrl"
#define D_CMND_SERIALLOG "SerialLog"
#define D_CMND_SYSLOG "SysLog"
#define D_CMND_LOGHOST "LogHost"
#define D_CMND_LOGPORT "LogPort"
#define D_CMND_IPADDRESS "IPAddress"
#define D_CMND_NTPSERVER "NtpServer"
#define D_CMND_AP "Ap"
#define D_CMND_SSID "SSId"
#define D_CMND_PASSWORD "Password"
#define D_CMND_HOSTNAME "Hostname"
#define D_CMND_WIFICONFIG "WifiConfig"
#define WCFG_MAX_STRING_LENGTH 12
#define D_WCFG_0_RESTART "Restart"
#define D_WCFG_1_SMARTCONFIG "SmartConfig"
#define D_WCFG_2_WIFIMANAGER "WifiManager"
#define D_WCFG_3_WPSCONFIG "WPSConfig"
#define D_WCFG_4_RETRY "Retry"
#define D_WCFG_5_WAIT "Wait"
#define D_CMND_FRIENDLYNAME "FriendlyName"
#define D_CMND_SWITCHMODE "SwitchMode"
#define D_CMND_WEBSERVER "Webserver"
#define D_WEBSERVER_MODE "WebServerMode"
#define D_ACTIVE_FOR "Active for"
#define D_ON_DEVICE "on"
#define D_CMND_WEBPASSWORD "WebPassword"
#define D_CMND_WEBLOG "WebLog"
#define D_CMND_EMULATION "Emulation"
#define D_CMND_TELEPERIOD "TelePeriod"
#define D_CMND_RESTART "Restart"
#define D_ONE_TO_RESTART "1 to restart"
#define D_CMND_RESET "Reset"
#define D_RESET_AND_RESTARTING "Reset and Restarting"
#define D_ONE_TO_RESET "1 to reset"
#define D_CMND_TIMEZONE "Timezone"
#define D_CMND_ALTITUDE "Altitude"
#define D_CMND_LEDPOWER "LedPower"
#define D_CMND_LEDSTATE "LedState"
#define D_CMND_CFGDUMP "CfgDump"
#define D_CMND_I2CSCAN "I2CScan"
#define D_CMND_INA219MODE "Ina219Mode"
#define D_CMND_EXCEPTION "Exception"
// Commands xdrv_domoticz.ino
#define D_CMND_DOMOTICZ "Domoticz"
#define D_CMND_IDX "Idx"
#define D_CMND_KEYIDX "KeyIdx"
#define D_CMND_SWITCHIDX "SwitchIdx"
#define D_CMND_SENSORIDX "SensorIdx"
#define D_CMND_UPDATETIMER "UpdateTimer"
// Commands xdrv_irremote.ino
#define D_CMND_IRSEND "IRSend"
#define D_CMND_IRHVAC "IRHVAC"
// Commands xdrv_light.ino
#define D_CMND_COLOR "Color"
#define D_CMND_COLORTEMPERATURE "CT"
#define D_CMND_DIMMER "Dimmer"
#define D_CMND_LED "Led"
#define D_CMND_LEDTABLE "LedTable"
#define D_CMND_FADE "Fade"
#define D_CMND_PIXELS "Pixels"
#define D_CMND_SCHEME "Scheme"
#define D_CMND_SPEED "Speed"
#define D_CMND_WAKEUP "Wakeup"
#define D_CMND_WAKEUPDURATION "WakeUpDuration"
#define D_CMND_WIDTH "Width"
// Commands xdrv_snfbridge.ino
#define D_CMND_RFCODE "RfCode"
#define D_CMND_RFHIGH "RfHigh"
#define D_CMND_RFHOST "RfHost"
#define D_CMND_RFKEY "RfKey"
#define D_CMND_RFLOW "RfLow"
#define D_CMND_RFSYNC "RfSync"
// Commands xsns_03_energy.ino
#define D_CMND_POWERLOW "PowerLow"
#define D_CMND_POWERHIGH "PowerHigh"
#define D_CMND_VOLTAGELOW "VoltageLow"
#define D_CMND_VOLTAGEHIGH "VoltageHigh"
#define D_CMND_CURRENTLOW "CurrentLow"
#define D_CMND_CURRENTHIGH "CurrentHigh"
#define D_CMND_ENERGYRESET "EnergyReset"
#define D_CMND_HLWPCAL "HlwPcal"
#define D_CMND_HLWPSET "HlwPset"
#define D_CMND_HLWUCAL "HlwUcal"
#define D_CMND_HLWUSET "HlwUset"
#define D_CMND_HLWICAL "HlwIcal"
#define D_CMND_HLWISET "HlwIset"
#define D_CMND_MAXPOWER "MaxPower"
#define D_CMND_MAXPOWERHOLD "MaxPowerHold"
#define D_CMND_MAXPOWERWINDOW "MaxPowerWindow"
#define D_CMND_SAFEPOWER "SafePower"
#define D_CMND_SAFEPOWERHOLD "SafePowerHold"
#define D_CMND_SAFEPOWERWINDOW "SafePowerWindow"
#define D_CMND_MAXENERGY "MaxEnergy"
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
#endif // _LANGUAGE_DE_DE_H_

View File

@ -192,44 +192,6 @@
#define D_WEB_SERVER "Web Server"
#define D_WIFI "Wifi"
// 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"
#define D_LOADED_FROM_FLASH_AT "Loaded from flash at"
#define D_USE_DEFAULTS "Use defaults"
#define D_ERASED_SECTOR "Erased sector"
// sonoff.ino
#define D_LEVEL_10 "level 1-0"
#define D_LEVEL_01 "level 0-1"
@ -271,6 +233,12 @@
#define D_I2CSCAN_NO_DEVICES_FOUND "No devices found"
#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host not found"
// settings.ino
#define D_SAVED_TO_FLASH_AT "Saved to flash at"
#define D_LOADED_FROM_FLASH_AT "Loaded from flash at"
#define D_USE_DEFAULTS "Use defaults"
#define D_ERASED_SECTOR "Erased sector"
// webserver.ino
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - please upgrade"
#define D_WEBSERVER_ACTIVE_ON "Web server active on"
@ -391,7 +359,51 @@
#define D_ENABLE_WEBLOG_FOR_RESPONSE "Enable weblog 2 if response expected"
#define D_NEED_USER_AND_PASSWORD "Need user=<username>&password=<password>"
// xdrv_domoticz.ino
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast disabled"
#define D_MULTICAST_REJOINED "Multicast (re)joined"
#define D_MULTICAST_JOIN_FAILED "Multicast join failed"
#define D_FAILED_TO_SEND_RESPONSE "Failed to send response"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo basic event"
#define D_WEMO_EVENT_SERVICE "WeMo event service"
#define D_WEMO_META_SERVICE "WeMo meta service"
#define D_WEMO_SETUP "WeMo setup"
#define D_RESPONSE_SENT "Response sent"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue setup"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API not implemented"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST args"
#define D_3_RESPONSE_PACKETS_SENT "3 response packets sent"
// xdrv_02_irremote.ino
#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_04_snfbridge.ino
#define D_RFRECEIVED "RfReceived"
#define D_START_LEARNING "Start learning"
#define D_SET_TO_DEFAULT "Set to default"
#define D_DEFAULT_SENT "Default sent"
#define D_LEARNED_SENT "Learned sent"
#define D_LEARNING_ACTIVE "Learning active"
#define D_LEARN_FAILED "Learn failed"
#define D_LEARNED "Learned"
#define D_SAVED "Saved"
// xdrv_05_domoticz.ino
#define D_DOMOTICZ_PARAMETERS "Domoticz parameters"
#define D_DOMOTICZ_IDX "Idx"
#define D_DOMOTICZ_KEY_IDX "Key idx"
@ -408,49 +420,6 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Update timer"
// xdrv_irremote.ino
#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"
#define D_START_LEARNING "Start learning"
#define D_SET_TO_DEFAULT "Set to default"
#define D_DEFAULT_SENT "Default sent"
#define D_LEARNED_SENT "Learned sent"
#define D_LEARNING_ACTIVE "Learning active"
#define D_LEARN_FAILED "Learn failed"
#define D_LEARNED "Learned"
#define D_SAVED "Saved"
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast disabled"
#define D_MULTICAST_REJOINED "Multicast (re)joined"
#define D_MULTICAST_JOIN_FAILED "Multicast join failed"
#define D_FAILED_TO_SEND_RESPONSE "Failed to send response"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo basic event"
#define D_WEMO_EVENT_SERVICE "WeMo event service"
#define D_WEMO_SETUP "WeMo setup"
#define D_RESPONSE_SENT "Response sent"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue setup"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API not implemented"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST args"
#define D_3_RESPONSE_PACKETS_SENT "3 response packets sent"
// xsns_03_energy.ino
#define D_MAXPOWERREACHED "MaxPowerReached"
#define D_MAXPOWERREACHEDRETRY "MaxPowerReachedRetry"
@ -503,7 +472,7 @@
#define D_SENSOR_SAIR_TX "SAir Tx"
#define D_SENSOR_SPI_CS "SPI CS"
#define D_SENSOR_SPI_DC "SPI DC"
#define D_SENSOR_BACKLIGHT "BLight"
#define D_SENSOR_BACKLIGHT "BkLight"
// Units
#define D_UNIT_AMPERE "A"
@ -548,181 +517,4 @@
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
// Result
#define D_RSLT_RESULT "RESULT"
#define D_RSLT_INFO "INFO"
#define D_RSLT_STATE "STATE"
#define D_RSLT_SENSOR "SENSOR"
#define D_RSLT_UPTIME "UPTIME"
#define D_RSLT_MARGINS "MARGINS"
#define D_RSLT_WARNING "WARNING"
#define D_RSLT_ENERGY "ENERGY"
// Commands
#define D_CMND_MQTTHOST "MqttHost"
#define D_CMND_MQTTPORT "MqttPort"
#define D_CMND_MQTTRETRY "MqttRetry"
#define D_CMND_STATETEXT "StateText"
#define D_CMND_MQTTFINGERPRINT "MqttFingerprint"
#define D_CMND_MQTTCLIENT "MqttClient"
#define D_CMND_MQTTUSER "MqttUser"
#define D_CMND_MQTTPASSWORD "MqttPassword"
#define D_CMND_FULLTOPIC "FullTopic"
#define D_CMND_PREFIX "Prefix"
#define PRFX_MAX_STRING_LENGTH 5
#define D_CMND "cmnd"
#define D_STAT "stat"
#define D_TELE "tele"
#define D_CMND_GROUPTOPIC "GroupTopic"
#define D_CMND_TOPIC "Topic"
#define D_CMND_BUTTONTOPIC "ButtonTopic"
#define D_CMND_SWITCHTOPIC "SwitchTopic"
#define D_CMND_BUTTONRETAIN "ButtonRetain"
#define D_CMND_SWITCHRETAIN "SwitchRetain"
#define D_CMND_POWERRETAIN "PowerRetain"
#define D_CMND_SENSORRETAIN "SensorRetain"
#define D_CMND_BACKLOG "Backlog"
#define D_CMND_DELAY "Delay"
#define D_CMND_STATUS "Status"
#define D_STATUS1_PARAMETER "PRM"
#define D_STATUS2_FIRMWARE "FWR"
#define D_STATUS3_LOGGING "LOG"
#define D_STATUS4_MEMORY "MEM"
#define D_STATUS5_NETWORK "NET"
#define D_STATUS6_MQTT "MQT"
#define D_STATUS7_TIME "TIM"
#define D_STATUS8_POWER "PWR"
#define D_STATUS9_MARGIN "PTH"
#define D_STATUS10_SENSOR "SNS"
#define D_STATUS11_STATUS "STS"
#define D_CMND_POWER "Power"
#define D_RSLT_POWER "POWER"
#define D_CMND_POWERONSTATE "PowerOnState"
#define D_CMND_PULSETIME "PulseTime"
#define D_CMND_BLINKTIME "BlinkTime"
#define D_CMND_BLINKCOUNT "BlinkCount"
#define D_CMND_SAVEDATA "SaveData"
#define D_CMND_SETOPTION "SetOption"
#define D_CMND_TEMPERATURE_RESOLUTION "TempRes"
#define D_CMND_HUMIDITY_RESOLUTION "HumRes"
#define D_CMND_PRESSURE_RESOLUTION "PressRes"
#define D_CMND_POWER_RESOLUTION "WattRes"
#define D_CMND_VOLTAGE_RESOLUTION "VoltRes"
#define D_CMND_CURRENT_RESOLUTION "AmpRes"
#define D_CMND_ENERGY_RESOLUTION "EnergyRes"
#define D_CMND_MODULE "Module"
#define D_CMND_MODULES "Modules"
#define D_CMND_GPIO "GPIO"
#define D_NOT_SUPPORTED "Not supported"
#define D_CMND_GPIOS "GPIOs"
#define D_CMND_PWM "PWM"
#define D_CMND_PWMFREQUENCY "PWMFrequency"
#define D_CMND_PWMRANGE "PWMRange"
#define D_CMND_COUNTER "Counter"
#define D_CMND_COUNTERTYPE "CounterType"
#define D_CMND_COUNTERDEBOUNCE "CounterDebounce"
#define D_CMND_SLEEP "Sleep"
#define D_CMND_UPLOAD "Upload"
#define D_CMND_UPGRADE "Upgrade"
#define D_ONE_OR_GT "1 or >%s to upgrade"
#define D_CMND_OTAURL "OtaUrl"
#define D_CMND_SERIALLOG "SerialLog"
#define D_CMND_SYSLOG "SysLog"
#define D_CMND_LOGHOST "LogHost"
#define D_CMND_LOGPORT "LogPort"
#define D_CMND_IPADDRESS "IPAddress"
#define D_CMND_NTPSERVER "NtpServer"
#define D_CMND_AP "Ap"
#define D_CMND_SSID "SSId"
#define D_CMND_PASSWORD "Password"
#define D_CMND_HOSTNAME "Hostname"
#define D_CMND_WIFICONFIG "WifiConfig"
#define WCFG_MAX_STRING_LENGTH 12
#define D_WCFG_0_RESTART "Restart"
#define D_WCFG_1_SMARTCONFIG "SmartConfig"
#define D_WCFG_2_WIFIMANAGER "WifiManager"
#define D_WCFG_3_WPSCONFIG "WPSConfig"
#define D_WCFG_4_RETRY "Retry"
#define D_WCFG_5_WAIT "Wait"
#define D_CMND_FRIENDLYNAME "FriendlyName"
#define D_CMND_SWITCHMODE "SwitchMode"
#define D_CMND_WEBSERVER "Webserver"
#define D_WEBSERVER_MODE "WebServerMode"
#define D_ACTIVE_FOR "Active for"
#define D_ON_DEVICE "on"
#define D_CMND_WEBPASSWORD "WebPassword"
#define D_CMND_WEBLOG "WebLog"
#define D_CMND_EMULATION "Emulation"
#define D_CMND_TELEPERIOD "TelePeriod"
#define D_CMND_RESTART "Restart"
#define D_ONE_TO_RESTART "1 to restart"
#define D_CMND_RESET "Reset"
#define D_RESET_AND_RESTARTING "Reset and Restarting"
#define D_ONE_TO_RESET "1 to reset"
#define D_CMND_TIMEZONE "Timezone"
#define D_CMND_ALTITUDE "Altitude"
#define D_CMND_LEDPOWER "LedPower"
#define D_CMND_LEDSTATE "LedState"
#define D_CMND_CFGDUMP "CfgDump"
#define D_CMND_I2CSCAN "I2CScan"
#define D_CMND_INA219MODE "Ina219Mode"
#define D_CMND_EXCEPTION "Exception"
// Commands xdrv_domoticz.ino
#define D_CMND_DOMOTICZ "Domoticz"
#define D_CMND_IDX "Idx"
#define D_CMND_KEYIDX "KeyIdx"
#define D_CMND_SWITCHIDX "SwitchIdx"
#define D_CMND_SENSORIDX "SensorIdx"
#define D_CMND_UPDATETIMER "UpdateTimer"
// Commands xdrv_irremote.ino
#define D_CMND_IRSEND "IRSend"
#define D_CMND_IRHVAC "IRHVAC"
// Commands xdrv_light.ino
#define D_CMND_COLOR "Color"
#define D_CMND_COLORTEMPERATURE "CT"
#define D_CMND_DIMMER "Dimmer"
#define D_CMND_LED "Led"
#define D_CMND_LEDTABLE "LedTable"
#define D_CMND_FADE "Fade"
#define D_CMND_PIXELS "Pixels"
#define D_CMND_SCHEME "Scheme"
#define D_CMND_SPEED "Speed"
#define D_CMND_WAKEUP "Wakeup"
#define D_CMND_WAKEUPDURATION "WakeUpDuration"
#define D_CMND_WIDTH "Width"
// Commands xdrv_snfbridge.ino
#define D_CMND_RFCODE "RfCode"
#define D_CMND_RFHIGH "RfHigh"
#define D_CMND_RFHOST "RfHost"
#define D_CMND_RFKEY "RfKey"
#define D_CMND_RFLOW "RfLow"
#define D_CMND_RFSYNC "RfSync"
// Commands xsns_03_energy.ino
#define D_CMND_POWERLOW "PowerLow"
#define D_CMND_POWERHIGH "PowerHigh"
#define D_CMND_VOLTAGELOW "VoltageLow"
#define D_CMND_VOLTAGEHIGH "VoltageHigh"
#define D_CMND_CURRENTLOW "CurrentLow"
#define D_CMND_CURRENTHIGH "CurrentHigh"
#define D_CMND_ENERGYRESET "EnergyReset"
#define D_CMND_HLWPCAL "HlwPcal"
#define D_CMND_HLWPSET "HlwPset"
#define D_CMND_HLWUCAL "HlwUcal"
#define D_CMND_HLWUSET "HlwUset"
#define D_CMND_HLWICAL "HlwIcal"
#define D_CMND_HLWISET "HlwIset"
#define D_CMND_MAXPOWER "MaxPower"
#define D_CMND_MAXPOWERHOLD "MaxPowerHold"
#define D_CMND_MAXPOWERWINDOW "MaxPowerWindow"
#define D_CMND_SAFEPOWER "SafePower"
#define D_CMND_SAFEPOWERHOLD "SafePowerHold"
#define D_CMND_SAFEPOWERWINDOW "SafePowerWindow"
#define D_CMND_MAXENERGY "MaxEnergy"
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
#endif // _LANGUAGE_EN_GB_H_

View File

@ -192,44 +192,6 @@
#define D_WEB_SERVER "Web Server"
#define D_WIFI "Wifi"
// 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"
#define D_LOADED_FROM_FLASH_AT "Caricato dalla flash da"
#define D_USE_DEFAULTS "Utilizzo valori default"
#define D_ERASED_SECTOR "Settore cancellato"
// sonoff.ino
#define D_LEVEL_10 "level 1-0"
#define D_LEVEL_01 "level 0-1"
@ -271,6 +233,12 @@
#define D_I2CSCAN_NO_DEVICES_FOUND "Nessun dispositivo trovato"
#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host non trovato"
// settings.ino
#define D_SAVED_TO_FLASH_AT "Salvato nella flash in"
#define D_LOADED_FROM_FLASH_AT "Caricato dalla flash da"
#define D_USE_DEFAULTS "Utilizzo valori default"
#define D_ERASED_SECTOR "Settore cancellato"
// webserver.ino
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - effettuare aggiornamento"
#define D_WEBSERVER_ACTIVE_ON "Web server attivo su"
@ -391,7 +359,51 @@
#define D_ENABLE_WEBLOG_FOR_RESPONSE "Abilitare weblog 2 se e' attesa una risposta"
#define D_NEED_USER_AND_PASSWORD "Richiesto user=<username>&password=<password>"
// xdrv_domoticz.ino
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast disabilitato"
#define D_MULTICAST_REJOINED "Multicast (ri)associato"
#define D_MULTICAST_JOIN_FAILED "Associazione Multicast fallita"
#define D_FAILED_TO_SEND_RESPONSE "Invio risposta fallito"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo evento base"
#define D_WEMO_EVENT_SERVICE "WeMo servizio eventi"
#define D_WEMO_META_SERVICE "WeMo meta service"
#define D_WEMO_SETUP "Impostazione WeMo"
#define D_RESPONSE_SENT "Risposta inviata"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Impostazione Hue"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API non implementata"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST argomenti"
#define D_3_RESPONSE_PACKETS_SENT "3 pacchetti di risposta inviati"
// xdrv_02_irremote.ino
#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_04_snfbridge.ino
#define D_RFRECEIVED "RfReceived"
#define D_START_LEARNING "Avvio apprendimento"
#define D_SET_TO_DEFAULT "Imposta al default"
#define D_DEFAULT_SENT "Default inviato"
#define D_LEARNED_SENT "Apprendimento inviato"
#define D_LEARNING_ACTIVE "Apprendimento attivo"
#define D_LEARN_FAILED "Apprendimento fallito"
#define D_LEARNED "Appreso"
#define D_SAVED "Salvato"
// xdrv_05_domoticz.ino
#define D_DOMOTICZ_PARAMETERS "Parametri Domoticz"
#define D_DOMOTICZ_IDX "Idx"
#define D_DOMOTICZ_KEY_IDX "Key idx"
@ -408,49 +420,6 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Intervallo di aggiornamento"
// xdrv_irremote.ino
#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"
#define D_START_LEARNING "Avvio apprendimento"
#define D_SET_TO_DEFAULT "Imposta al default"
#define D_DEFAULT_SENT "Default inviato"
#define D_LEARNED_SENT "Apprendimento inviato"
#define D_LEARNING_ACTIVE "Apprendimento attivo"
#define D_LEARN_FAILED "Apprendimento fallito"
#define D_LEARNED "Appreso"
#define D_SAVED "Salvato"
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast disabilitato"
#define D_MULTICAST_REJOINED "Multicast (ri)associato"
#define D_MULTICAST_JOIN_FAILED "Associazione Multicast fallita"
#define D_FAILED_TO_SEND_RESPONSE "Invio risposta fallito"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo evento base"
#define D_WEMO_EVENT_SERVICE "WeMo servizio eventi"
#define D_WEMO_SETUP "Impostazione WeMo"
#define D_RESPONSE_SENT "Risposta inviata"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Impostazione Hue"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API non implementata"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST argomenti"
#define D_3_RESPONSE_PACKETS_SENT "3 pacchetti di risposta inviati"
// xsns_03_energy.ino
#define D_MAXPOWERREACHED "MaxPowerReached"
#define D_MAXPOWERREACHEDRETRY "MaxPowerReachedRetry"
@ -503,7 +472,7 @@
#define D_SENSOR_SAIR_TX "SAir Tx"
#define D_SENSOR_SPI_CS "SPI CS"
#define D_SENSOR_SPI_DC "SPI DC"
#define D_SENSOR_BACKLIGHT "BLight"
#define D_SENSOR_BACKLIGHT "BkLight"
// Units
#define D_UNIT_AMPERE "A"
@ -548,181 +517,4 @@
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
// Result
#define D_RSLT_RESULT "RESULT"
#define D_RSLT_INFO "INFO"
#define D_RSLT_STATE "STATE"
#define D_RSLT_SENSOR "SENSOR"
#define D_RSLT_UPTIME "UPTIME"
#define D_RSLT_MARGINS "MARGINS"
#define D_RSLT_WARNING "WARNING"
#define D_RSLT_ENERGY "ENERGY"
// Commands
#define D_CMND_MQTTHOST "MqttHost"
#define D_CMND_MQTTPORT "MqttPort"
#define D_CMND_MQTTRETRY "MqttRetry"
#define D_CMND_STATETEXT "StateText"
#define D_CMND_MQTTFINGERPRINT "MqttFingerprint"
#define D_CMND_MQTTCLIENT "MqttClient"
#define D_CMND_MQTTUSER "MqttUser"
#define D_CMND_MQTTPASSWORD "MqttPassword"
#define D_CMND_FULLTOPIC "FullTopic"
#define D_CMND_PREFIX "Prefix"
#define PRFX_MAX_STRING_LENGTH 5
#define D_CMND "cmnd"
#define D_STAT "stat"
#define D_TELE "tele"
#define D_CMND_GROUPTOPIC "GroupTopic"
#define D_CMND_TOPIC "Topic"
#define D_CMND_BUTTONTOPIC "ButtonTopic"
#define D_CMND_SWITCHTOPIC "SwitchTopic"
#define D_CMND_BUTTONRETAIN "ButtonRetain"
#define D_CMND_SWITCHRETAIN "SwitchRetain"
#define D_CMND_POWERRETAIN "PowerRetain"
#define D_CMND_SENSORRETAIN "SensorRetain"
#define D_CMND_BACKLOG "Backlog"
#define D_CMND_DELAY "Delay"
#define D_CMND_STATUS "Status"
#define D_STATUS1_PARAMETER "PRM"
#define D_STATUS2_FIRMWARE "FWR"
#define D_STATUS3_LOGGING "LOG"
#define D_STATUS4_MEMORY "MEM"
#define D_STATUS5_NETWORK "NET"
#define D_STATUS6_MQTT "MQT"
#define D_STATUS7_TIME "TIM"
#define D_STATUS8_POWER "PWR"
#define D_STATUS9_MARGIN "PTH"
#define D_STATUS10_SENSOR "SNS"
#define D_STATUS11_STATUS "STS"
#define D_CMND_POWER "Power"
#define D_RSLT_POWER "POWER"
#define D_CMND_POWERONSTATE "PowerOnState"
#define D_CMND_PULSETIME "PulseTime"
#define D_CMND_BLINKTIME "BlinkTime"
#define D_CMND_BLINKCOUNT "BlinkCount"
#define D_CMND_SAVEDATA "SaveData"
#define D_CMND_SETOPTION "SetOption"
#define D_CMND_TEMPERATURE_RESOLUTION "TempRes"
#define D_CMND_HUMIDITY_RESOLUTION "HumRes"
#define D_CMND_PRESSURE_RESOLUTION "PressRes"
#define D_CMND_POWER_RESOLUTION "WattRes"
#define D_CMND_VOLTAGE_RESOLUTION "VoltRes"
#define D_CMND_CURRENT_RESOLUTION "AmpRes"
#define D_CMND_ENERGY_RESOLUTION "EnergyRes"
#define D_CMND_MODULE "Module"
#define D_CMND_MODULES "Modules"
#define D_CMND_GPIO "GPIO"
#define D_NOT_SUPPORTED "Not supported"
#define D_CMND_GPIOS "GPIOs"
#define D_CMND_PWM "PWM"
#define D_CMND_PWMFREQUENCY "PWMFrequency"
#define D_CMND_PWMRANGE "PWMRange"
#define D_CMND_COUNTER "Counter"
#define D_CMND_COUNTERTYPE "CounterType"
#define D_CMND_COUNTERDEBOUNCE "CounterDebounce"
#define D_CMND_SLEEP "Sleep"
#define D_CMND_UPLOAD "Upload"
#define D_CMND_UPGRADE "Upgrade"
#define D_ONE_OR_GT "1 or >%s to upgrade"
#define D_CMND_OTAURL "OtaUrl"
#define D_CMND_SERIALLOG "SerialLog"
#define D_CMND_SYSLOG "SysLog"
#define D_CMND_LOGHOST "LogHost"
#define D_CMND_LOGPORT "LogPort"
#define D_CMND_IPADDRESS "IPAddress"
#define D_CMND_NTPSERVER "NtpServer"
#define D_CMND_AP "Ap"
#define D_CMND_SSID "SSId"
#define D_CMND_PASSWORD "Password"
#define D_CMND_HOSTNAME "Hostname"
#define D_CMND_WIFICONFIG "WifiConfig"
#define WCFG_MAX_STRING_LENGTH 12
#define D_WCFG_0_RESTART "Restart"
#define D_WCFG_1_SMARTCONFIG "SmartConfig"
#define D_WCFG_2_WIFIMANAGER "WifiManager"
#define D_WCFG_3_WPSCONFIG "WPSConfig"
#define D_WCFG_4_RETRY "Retry"
#define D_WCFG_5_WAIT "Wait"
#define D_CMND_FRIENDLYNAME "FriendlyName"
#define D_CMND_SWITCHMODE "SwitchMode"
#define D_CMND_WEBSERVER "Webserver"
#define D_WEBSERVER_MODE "WebServerMode"
#define D_ACTIVE_FOR "Active for"
#define D_ON_DEVICE "on"
#define D_CMND_WEBPASSWORD "WebPassword"
#define D_CMND_WEBLOG "WebLog"
#define D_CMND_EMULATION "Emulation"
#define D_CMND_TELEPERIOD "TelePeriod"
#define D_CMND_RESTART "Restart"
#define D_ONE_TO_RESTART "1 to restart"
#define D_CMND_RESET "Reset"
#define D_RESET_AND_RESTARTING "Reset and Restarting"
#define D_ONE_TO_RESET "1 to reset"
#define D_CMND_TIMEZONE "Timezone"
#define D_CMND_ALTITUDE "Altitude"
#define D_CMND_LEDPOWER "LedPower"
#define D_CMND_LEDSTATE "LedState"
#define D_CMND_CFGDUMP "CfgDump"
#define D_CMND_I2CSCAN "I2CScan"
#define D_CMND_INA219MODE "Ina219Mode"
#define D_CMND_EXCEPTION "Exception"
// Commands xdrv_domoticz.ino
#define D_CMND_DOMOTICZ "Domoticz"
#define D_CMND_IDX "Idx"
#define D_CMND_KEYIDX "KeyIdx"
#define D_CMND_SWITCHIDX "SwitchIdx"
#define D_CMND_SENSORIDX "SensorIdx"
#define D_CMND_UPDATETIMER "UpdateTimer"
// Commands xdrv_irremote.ino
#define D_CMND_IRSEND "IRSend"
#define D_CMND_IRHVAC "IRHVAC"
// Commands xdrv_light.ino
#define D_CMND_COLOR "Color"
#define D_CMND_COLORTEMPERATURE "CT"
#define D_CMND_DIMMER "Dimmer"
#define D_CMND_LED "Led"
#define D_CMND_LEDTABLE "LedTable"
#define D_CMND_FADE "Fade"
#define D_CMND_PIXELS "Pixels"
#define D_CMND_SCHEME "Scheme"
#define D_CMND_SPEED "Speed"
#define D_CMND_WAKEUP "Wakeup"
#define D_CMND_WAKEUPDURATION "WakeUpDuration"
#define D_CMND_WIDTH "Width"
// Commands xdrv_snfbridge.ino
#define D_CMND_RFCODE "RfCode"
#define D_CMND_RFHIGH "RfHigh"
#define D_CMND_RFHOST "RfHost"
#define D_CMND_RFKEY "RfKey"
#define D_CMND_RFLOW "RfLow"
#define D_CMND_RFSYNC "RfSync"
// Commands xsns_03_energy.ino
#define D_CMND_POWERLOW "PowerLow"
#define D_CMND_POWERHIGH "PowerHigh"
#define D_CMND_VOLTAGELOW "VoltageLow"
#define D_CMND_VOLTAGEHIGH "VoltageHigh"
#define D_CMND_CURRENTLOW "CurrentLow"
#define D_CMND_CURRENTHIGH "CurrentHigh"
#define D_CMND_ENERGYRESET "EnergyReset"
#define D_CMND_HLWPCAL "HlwPcal"
#define D_CMND_HLWPSET "HlwPset"
#define D_CMND_HLWUCAL "HlwUcal"
#define D_CMND_HLWUSET "HlwUset"
#define D_CMND_HLWICAL "HlwIcal"
#define D_CMND_HLWISET "HlwIset"
#define D_CMND_MAXPOWER "MaxPower"
#define D_CMND_MAXPOWERHOLD "MaxPowerHold"
#define D_CMND_MAXPOWERWINDOW "MaxPowerWindow"
#define D_CMND_SAFEPOWER "SafePower"
#define D_CMND_SAFEPOWERHOLD "SafePowerHold"
#define D_CMND_SAFEPOWERWINDOW "SafePowerWindow"
#define D_CMND_MAXENERGY "MaxEnergy"
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
#endif // _LANGUAGE_IT_IT_H_

View File

@ -192,44 +192,6 @@
#define D_WEB_SERVER "Webserver"
#define D_WIFI "Wifi"
// 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"
#define D_LOADED_FROM_FLASH_AT "Geladen vanuit flash op"
#define D_USE_DEFAULTS "Gebruik standaardwaarden"
#define D_ERASED_SECTOR "Wis sector"
// sonoff.ino
#define D_LEVEL_10 "niveau 1-0"
#define D_LEVEL_01 "niveau 0-1"
@ -271,6 +233,12 @@
#define D_I2CSCAN_NO_DEVICES_FOUND "Geen apparaten gevonden"
#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host niet gevonden"
// settings.ino
#define D_SAVED_TO_FLASH_AT "Opgeslagen in flash op"
#define D_LOADED_FROM_FLASH_AT "Geladen vanuit flash op"
#define D_USE_DEFAULTS "Gebruik standaardwaarden"
#define D_ERASED_SECTOR "Wis sector"
// webserver.ino
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - opwaarderen"
#define D_WEBSERVER_ACTIVE_ON "Webserver actief op"
@ -391,7 +359,51 @@
#define D_ENABLE_WEBLOG_FOR_RESPONSE "Schakel weblog 2 in indien antwoord verwacht"
#define D_NEED_USER_AND_PASSWORD "Benodig user=<gebruiker>&password=<webwachtwoord>"
// xdrv_domoticz.ino
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast uitgeschakeld"
#define D_MULTICAST_REJOINED "Multicast verbonden"
#define D_MULTICAST_JOIN_FAILED "Multicast verbinding mislukt"
#define D_FAILED_TO_SEND_RESPONSE "Antwoord versturen mislukt"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo basis gebeurtenis"
#define D_WEMO_EVENT_SERVICE "WeMo gebeurtenis dienst"
#define D_WEMO_META_SERVICE "WeMo meta service"
#define D_WEMO_SETUP "WeMo installatie"
#define D_RESPONSE_SENT "Antwoord verstuurd"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue installatie"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API niet beschikbaar"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST argumenten"
#define D_3_RESPONSE_PACKETS_SENT "3 antwoord paketten verstuurd"
// xdrv_02_irremote.ino
#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_04_snfbridge.ino
#define D_RFRECEIVED "RfReceived"
#define D_START_LEARNING "Start leren"
#define D_SET_TO_DEFAULT "Zet standaard waarden"
#define D_DEFAULT_SENT "Standaard verzonden"
#define D_LEARNED_SENT "Geleerde verzonden"
#define D_LEARNING_ACTIVE "Leren actief"
#define D_LEARN_FAILED "Leren mislukt"
#define D_LEARNED "Geleerd"
#define D_SAVED "Opgeslagen"
// xdrv_05_domoticz.ino
#define D_DOMOTICZ_PARAMETERS "Domoticz parameters"
#define D_DOMOTICZ_IDX "Idx"
#define D_DOMOTICZ_KEY_IDX "Toets idx"
@ -408,49 +420,6 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Bijwerk timer"
// xdrv_irremote.ino
#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"
#define D_START_LEARNING "Start leren"
#define D_SET_TO_DEFAULT "Zet standaard waarden"
#define D_DEFAULT_SENT "Standaard verzonden"
#define D_LEARNED_SENT "Geleerde verzonden"
#define D_LEARNING_ACTIVE "Leren actief"
#define D_LEARN_FAILED "Leren mislukt"
#define D_LEARNED "Geleerd"
#define D_SAVED "Opgeslagen"
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast uitgeschakeld"
#define D_MULTICAST_REJOINED "Multicast verbonden"
#define D_MULTICAST_JOIN_FAILED "Multicast verbinding mislukt"
#define D_FAILED_TO_SEND_RESPONSE "Antwoord versturen mislukt"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo basis gebeurtenis"
#define D_WEMO_EVENT_SERVICE "WeMo gebeurtenis dienst"
#define D_WEMO_SETUP "WeMo installatie"
#define D_RESPONSE_SENT "Antwoord verstuurd"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue installatie"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API niet beschikbaar"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST argumenten"
#define D_3_RESPONSE_PACKETS_SENT "3 antwoord paketten verstuurd"
// xsns_03_energy.ino
#define D_MAXPOWERREACHED "MaxPowerReached"
#define D_MAXPOWERREACHEDRETRY "MaxPowerReachedRetry"
@ -503,7 +472,7 @@
#define D_SENSOR_SAIR_TX "SAir Tx"
#define D_SENSOR_SPI_CS "SPI CS"
#define D_SENSOR_SPI_DC "SPI DC"
#define D_SENSOR_BACKLIGHT "BLight"
#define D_SENSOR_BACKLIGHT "BkLight"
// Units
#define D_UNIT_AMPERE "A"
@ -548,181 +517,4 @@
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
// Result
#define D_RSLT_RESULT "RESULTAAT"
#define D_RSLT_INFO "INFO"
#define D_RSLT_STATE "TOESTAND"
#define D_RSLT_SENSOR "SENSOR"
#define D_RSLT_UPTIME "BEDRIJFSTIJD"
#define D_RSLT_MARGINS "GRENSWAARDEN"
#define D_RSLT_WARNING "WAARSCHUWING"
#define D_RSLT_ENERGY "ENERGIE"
// Commands
#define D_CMND_MQTTHOST "MqttHost"
#define D_CMND_MQTTPORT "MqttPort"
#define D_CMND_MQTTRETRY "MqttRetry"
#define D_CMND_STATETEXT "StateText"
#define D_CMND_MQTTFINGERPRINT "MqttFingerprint"
#define D_CMND_MQTTCLIENT "MqttClient"
#define D_CMND_MQTTUSER "MqttUser"
#define D_CMND_MQTTPASSWORD "MqttPassword"
#define D_CMND_FULLTOPIC "FullTopic"
#define D_CMND_PREFIX "Prefix"
#define PRFX_MAX_STRING_LENGTH 5
#define D_CMND "cmnd"
#define D_STAT "stat"
#define D_TELE "tele"
#define D_CMND_GROUPTOPIC "GroupTopic"
#define D_CMND_TOPIC "Topic"
#define D_CMND_BUTTONTOPIC "ButtonTopic"
#define D_CMND_SWITCHTOPIC "SwitchTopic"
#define D_CMND_BUTTONRETAIN "ButtonRetain"
#define D_CMND_SWITCHRETAIN "SwitchRetain"
#define D_CMND_POWERRETAIN "PowerRetain"
#define D_CMND_SENSORRETAIN "SensorRetain"
#define D_CMND_BACKLOG "Backlog"
#define D_CMND_DELAY "Delay"
#define D_CMND_STATUS "Status"
#define D_STATUS1_PARAMETER "PRM"
#define D_STATUS2_FIRMWARE "FWR"
#define D_STATUS3_LOGGING "LOG"
#define D_STATUS4_MEMORY "MEM"
#define D_STATUS5_NETWORK "NET"
#define D_STATUS6_MQTT "MQT"
#define D_STATUS7_TIME "TIM"
#define D_STATUS8_POWER "PWR"
#define D_STATUS9_MARGIN "PTH"
#define D_STATUS10_SENSOR "SNS"
#define D_STATUS11_STATUS "STS"
#define D_CMND_POWER "Power"
#define D_RSLT_POWER "POWER"
#define D_CMND_POWERONSTATE "PowerOnState"
#define D_CMND_PULSETIME "PulseTime"
#define D_CMND_BLINKTIME "BlinkTime"
#define D_CMND_BLINKCOUNT "BlinkCount"
#define D_CMND_SAVEDATA "SaveData"
#define D_CMND_SETOPTION "SetOption"
#define D_CMND_TEMPERATURE_RESOLUTION "TempRes"
#define D_CMND_HUMIDITY_RESOLUTION "HumRes"
#define D_CMND_PRESSURE_RESOLUTION "PressRes"
#define D_CMND_POWER_RESOLUTION "WattRes"
#define D_CMND_VOLTAGE_RESOLUTION "VoltRes"
#define D_CMND_CURRENT_RESOLUTION "AmpRes"
#define D_CMND_ENERGY_RESOLUTION "EnergyRes"
#define D_CMND_MODULE "Module"
#define D_CMND_MODULES "Modules"
#define D_CMND_GPIO "GPIO"
#define D_NOT_SUPPORTED "Not supported"
#define D_CMND_GPIOS "GPIOs"
#define D_CMND_PWM "PWM"
#define D_CMND_PWMFREQUENCY "PWMFrequency"
#define D_CMND_PWMRANGE "PWMRange"
#define D_CMND_COUNTER "Counter"
#define D_CMND_COUNTERTYPE "CounterType"
#define D_CMND_COUNTERDEBOUNCE "CounterDebounce"
#define D_CMND_SLEEP "Sleep"
#define D_CMND_UPLOAD "Upload"
#define D_CMND_UPGRADE "Upgrade"
#define D_ONE_OR_GT "1 or >%s to upgrade"
#define D_CMND_OTAURL "OtaUrl"
#define D_CMND_SERIALLOG "SerialLog"
#define D_CMND_SYSLOG "SysLog"
#define D_CMND_LOGHOST "LogHost"
#define D_CMND_LOGPORT "LogPort"
#define D_CMND_IPADDRESS "IPAddress"
#define D_CMND_NTPSERVER "NtpServer"
#define D_CMND_AP "Ap"
#define D_CMND_SSID "SSId"
#define D_CMND_PASSWORD "Password"
#define D_CMND_HOSTNAME "Hostname"
#define D_CMND_WIFICONFIG "WifiConfig"
#define WCFG_MAX_STRING_LENGTH 12
#define D_WCFG_0_RESTART "Restart"
#define D_WCFG_1_SMARTCONFIG "SmartConfig"
#define D_WCFG_2_WIFIMANAGER "WifiManager"
#define D_WCFG_3_WPSCONFIG "WPSConfig"
#define D_WCFG_4_RETRY "Opnieuw"
#define D_WCFG_5_WAIT "Wacht"
#define D_CMND_FRIENDLYNAME "FriendlyName"
#define D_CMND_SWITCHMODE "SwitchMode"
#define D_CMND_WEBSERVER "Webserver"
#define D_WEBSERVER_MODE "WebServerSoort"
#define D_ACTIVE_FOR "Aktief als"
#define D_ON_DEVICE "op"
#define D_CMND_WEBPASSWORD "WebPassword"
#define D_CMND_WEBLOG "WebLog"
#define D_CMND_EMULATION "Emulation"
#define D_CMND_TELEPERIOD "TelePeriod"
#define D_CMND_RESTART "Restart"
#define D_ONE_TO_RESTART "1 voor herstart"
#define D_CMND_RESET "Reset"
#define D_RESET_AND_RESTARTING "Reset en herstarten"
#define D_ONE_TO_RESET "1 voor reset"
#define D_CMND_TIMEZONE "Timezone"
#define D_CMND_ALTITUDE "Altitude"
#define D_CMND_LEDPOWER "LedPower"
#define D_CMND_LEDSTATE "LedState"
#define D_CMND_CFGDUMP "CfgDump"
#define D_CMND_I2CSCAN "I2CScan"
#define D_CMND_INA219MODE "Ina219Mode"
#define D_CMND_EXCEPTION "Exception"
// Commands xdrv_domoticz.ino
#define D_CMND_DOMOTICZ "Domoticz"
#define D_CMND_IDX "Idx"
#define D_CMND_KEYIDX "KeyIdx"
#define D_CMND_SWITCHIDX "SwitchIdx"
#define D_CMND_SENSORIDX "SensorIdx"
#define D_CMND_UPDATETIMER "UpdateTimer"
// Commands xdrv_irremote.ino
#define D_CMND_IRSEND "IRSend"
#define D_CMND_IRHVAC "IRHVAC"
// Commands xdrv_light.ino
#define D_CMND_COLOR "Color"
#define D_CMND_COLORTEMPERATURE "CT"
#define D_CMND_DIMMER "Dimmer"
#define D_CMND_LED "Led"
#define D_CMND_LEDTABLE "LedTable"
#define D_CMND_FADE "Fade"
#define D_CMND_PIXELS "Pixels"
#define D_CMND_SCHEME "Scheme"
#define D_CMND_SPEED "Speed"
#define D_CMND_WAKEUP "Wakeup"
#define D_CMND_WAKEUPDURATION "WakeUpDuration"
#define D_CMND_WIDTH "Width"
// Commands xdrv_snfbridge.ino
#define D_CMND_RFCODE "RfCode"
#define D_CMND_RFHIGH "RfHigh"
#define D_CMND_RFHOST "RfHost"
#define D_CMND_RFKEY "RfKey"
#define D_CMND_RFLOW "RfLow"
#define D_CMND_RFSYNC "RfSync"
// Commands xsns_03_energy.ino
#define D_CMND_POWERLOW "PowerLow"
#define D_CMND_POWERHIGH "PowerHigh"
#define D_CMND_VOLTAGELOW "VoltageLow"
#define D_CMND_VOLTAGEHIGH "VoltageHigh"
#define D_CMND_CURRENTLOW "CurrentLow"
#define D_CMND_CURRENTHIGH "CurrentHigh"
#define D_CMND_ENERGYRESET "EnergyReset"
#define D_CMND_HLWPCAL "HlwPcal"
#define D_CMND_HLWPSET "HlwPset"
#define D_CMND_HLWUCAL "HlwUcal"
#define D_CMND_HLWUSET "HlwUset"
#define D_CMND_HLWICAL "HlwIcal"
#define D_CMND_HLWISET "HlwIset"
#define D_CMND_MAXPOWER "MaxPower"
#define D_CMND_MAXPOWERHOLD "MaxPowerHold"
#define D_CMND_MAXPOWERWINDOW "MaxPowerWindow"
#define D_CMND_SAFEPOWER "SafePower"
#define D_CMND_SAFEPOWERHOLD "SafePowerHold"
#define D_CMND_SAFEPOWERWINDOW "SafePowerWindow"
#define D_CMND_MAXENERGY "MaxEnergy"
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
#endif // _LANGUAGE_NL_NL_H_

View File

@ -192,44 +192,6 @@
#define D_WEB_SERVER "Web Server"
#define D_WIFI "Wifi"
// 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"
#define D_LOADED_FROM_FLASH_AT "Wczytane z pamieci flash z"
#define D_USE_DEFAULTS "Uzyj domyslnych"
#define D_ERASED_SECTOR "Wymazany sektor"
// sonoff.ino
#define D_LEVEL_10 "poziom 1-0"
#define D_LEVEL_01 "poziom 0-1"
@ -271,6 +233,12 @@
#define D_I2CSCAN_NO_DEVICES_FOUND "Nie znaleziono urzadzen"
#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host nie znaleziony"
// settings.ino
#define D_SAVED_TO_FLASH_AT "Zapisane do pamieci flash w"
#define D_LOADED_FROM_FLASH_AT "Wczytane z pamieci flash z"
#define D_USE_DEFAULTS "Uzyj domyslnych"
#define D_ERASED_SECTOR "Wymazany sektor"
// webserver.ino
#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "Oprogramowanie MINIMAL - prosze uaktualnic"
#define D_WEBSERVER_ACTIVE_ON "Aktywny serwer Web"
@ -391,7 +359,51 @@
#define D_ENABLE_WEBLOG_FOR_RESPONSE "Wlacz poziom 2 zapisu Weblog, jesli oczekiwana jest odpowiedz"
#define D_NEED_USER_AND_PASSWORD "Wymagany uzytkownik=<username>&haslo=<password>"
// xdrv_domoticz.ino
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast jest wylaczony"
#define D_MULTICAST_REJOINED "Multicast (re)dolaczony"
#define D_MULTICAST_JOIN_FAILED "Multicast nie powiodlo sie"
#define D_FAILED_TO_SEND_RESPONSE "Nie udalo sie wyslac odpowiedzi"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo podstawowe zdarzenie"
#define D_WEMO_EVENT_SERVICE "WeMo zdarzenie service"
#define D_WEMO_META_SERVICE "WeMo meta service"
#define D_WEMO_SETUP "WeMo setup"
#define D_RESPONSE_SENT "Odpowiedz wyslana"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue setup"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API nie zaimplementowane"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST args"
#define D_3_RESPONSE_PACKETS_SENT "3 pakiety odpowiedzi wysylane"
// xdrv_02_irremote.ino
#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_04_snfbridge.ino
#define D_RFRECEIVED "RfReceived"
#define D_START_LEARNING "Zacznij nauke"
#define D_SET_TO_DEFAULT "Ustaw domyslne"
#define D_DEFAULT_SENT "Domyslne wyslane"
#define D_LEARNED_SENT "Wyuczone wyslane"
#define D_LEARNING_ACTIVE "Wyuczone aktywne"
#define D_LEARN_FAILED "Uczenie niepowodzenie"
#define D_LEARNED "Wyuczone"
#define D_SAVED "Zapisane"
// xdrv_05_domoticz.ino
#define D_DOMOTICZ_PARAMETERS "Parametry Domoticz"
#define D_DOMOTICZ_IDX "Idx"
#define D_DOMOTICZ_KEY_IDX "Key idx"
@ -408,49 +420,6 @@
#define D_DOMOTICZ_AIRQUALITY "AirQuality"
#define D_DOMOTICZ_UPDATE_TIMER "Zaktualizuj czasomierz"
// xdrv_irremote.ino
#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"
#define D_START_LEARNING "Zacznij nauke"
#define D_SET_TO_DEFAULT "Ustaw domyslne"
#define D_DEFAULT_SENT "Domyslne wyslane"
#define D_LEARNED_SENT "Wyuczone wyslane"
#define D_LEARNING_ACTIVE "Wyuczone aktywne"
#define D_LEARN_FAILED "Uczenie niepowodzenie"
#define D_LEARNED "Wyuczone"
#define D_SAVED "Zapisane"
// xdrv_wemohue.ino
#define D_MULTICAST_DISABLED "Multicast jest wylaczony"
#define D_MULTICAST_REJOINED "Multicast (re)dolaczony"
#define D_MULTICAST_JOIN_FAILED "Multicast nie powiodlo sie"
#define D_FAILED_TO_SEND_RESPONSE "Nie udalo sie wyslac odpowiedzi"
#define D_WEMO "WeMo"
#define D_WEMO_BASIC_EVENT "WeMo podstawowe zdarzenie"
#define D_WEMO_EVENT_SERVICE "WeMo zdarzenie service"
#define D_WEMO_SETUP "WeMo setup"
#define D_RESPONSE_SENT "Odpowiedz wyslana"
#define D_HUE "Hue"
#define D_HUE_BRIDGE_SETUP "Hue setup"
#define D_HUE_API_NOT_IMPLEMENTED "Hue API nie zaimplementowane"
#define D_HUE_API "Hue API"
#define D_HUE_POST_ARGS "Hue POST args"
#define D_3_RESPONSE_PACKETS_SENT "3 pakiety odpowiedzi wysylane"
// xsns_03_energy.ino
#define D_MAXPOWERREACHED "MaksMocOsiagnieta"
#define D_MAXPOWERREACHEDRETRY "MaksMocOsiagnietaPonowienie"
@ -503,7 +472,7 @@
#define D_SENSOR_SAIR_TX "SAir Tx"
#define D_SENSOR_SPI_CS "SPI CS"
#define D_SENSOR_SPI_DC "SPI DC"
#define D_SENSOR_BACKLIGHT "BLight"
#define D_SENSOR_BACKLIGHT "BkLight"
// Units
#define D_UNIT_AMPERE "A"
@ -548,181 +517,4 @@
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
// Result
#define D_RSLT_RESULT "REZULTAT"
#define D_RSLT_INFO "INFO"
#define D_RSLT_STATE "STAN"
#define D_RSLT_SENSOR "SENSOR"
#define D_RSLT_UPTIME "UPTIME"
#define D_RSLT_MARGINS "MARGINES"
#define D_RSLT_WARNING "OSTRZEZENIE"
#define D_RSLT_ENERGY "ENERGIA"
// Commands
#define D_CMND_MQTTHOST "MqttHost"
#define D_CMND_MQTTPORT "MqttPort"
#define D_CMND_MQTTRETRY "MqttRetry"
#define D_CMND_STATETEXT "StateText"
#define D_CMND_MQTTFINGERPRINT "MqttFingerprint"
#define D_CMND_MQTTCLIENT "MqttClient"
#define D_CMND_MQTTUSER "MqttUser"
#define D_CMND_MQTTPASSWORD "MqttPassword"
#define D_CMND_FULLTOPIC "FullTopic"
#define D_CMND_PREFIX "Prefix"
#define PRFX_MAX_STRING_LENGTH 5
#define D_CMND "cmnd"
#define D_STAT "stat"
#define D_TELE "tele"
#define D_CMND_GROUPTOPIC "GroupTopic"
#define D_CMND_TOPIC "Topic"
#define D_CMND_BUTTONTOPIC "ButtonTopic"
#define D_CMND_SWITCHTOPIC "SwitchTopic"
#define D_CMND_BUTTONRETAIN "ButtonRetain"
#define D_CMND_SWITCHRETAIN "SwitchRetain"
#define D_CMND_POWERRETAIN "PowerRetain"
#define D_CMND_SENSORRETAIN "SensorRetain"
#define D_CMND_BACKLOG "Backlog"
#define D_CMND_DELAY "Delay"
#define D_CMND_STATUS "Status"
#define D_STATUS1_PARAMETER "PRM"
#define D_STATUS2_FIRMWARE "FWR"
#define D_STATUS3_LOGGING "LOG"
#define D_STATUS4_MEMORY "MEM"
#define D_STATUS5_NETWORK "NET"
#define D_STATUS6_MQTT "MQT"
#define D_STATUS7_TIME "TIM"
#define D_STATUS8_POWER "PWR"
#define D_STATUS9_MARGIN "PTH"
#define D_STATUS10_SENSOR "SNS"
#define D_STATUS11_STATUS "STS"
#define D_CMND_POWER "Power"
#define D_RSLT_POWER "POWER"
#define D_CMND_POWERONSTATE "PowerOnState"
#define D_CMND_PULSETIME "PulseTime"
#define D_CMND_BLINKTIME "BlinkTime"
#define D_CMND_BLINKCOUNT "BlinkCount"
#define D_CMND_SAVEDATA "SaveData"
#define D_CMND_SETOPTION "SetOption"
#define D_CMND_TEMPERATURE_RESOLUTION "TempRes"
#define D_CMND_HUMIDITY_RESOLUTION "HumRes"
#define D_CMND_PRESSURE_RESOLUTION "PressRes"
#define D_CMND_POWER_RESOLUTION "WattRes"
#define D_CMND_VOLTAGE_RESOLUTION "VoltRes"
#define D_CMND_CURRENT_RESOLUTION "AmpRes"
#define D_CMND_ENERGY_RESOLUTION "EnergyRes"
#define D_CMND_MODULE "Module"
#define D_CMND_MODULES "Modules"
#define D_CMND_GPIO "GPIO"
#define D_NOT_SUPPORTED "Not supported"
#define D_CMND_GPIOS "GPIOs"
#define D_CMND_PWM "PWM"
#define D_CMND_PWMFREQUENCY "PWMFrequency"
#define D_CMND_PWMRANGE "PWMRange"
#define D_CMND_COUNTER "Counter"
#define D_CMND_COUNTERTYPE "CounterType"
#define D_CMND_COUNTERDEBOUNCE "CounterDebounce"
#define D_CMND_SLEEP "Sleep"
#define D_CMND_UPLOAD "Upload"
#define D_CMND_UPGRADE "Upgrade"
#define D_ONE_OR_GT "1 or >%s to upgrade"
#define D_CMND_OTAURL "OtaUrl"
#define D_CMND_SERIALLOG "SerialLog"
#define D_CMND_SYSLOG "SysLog"
#define D_CMND_LOGHOST "LogHost"
#define D_CMND_LOGPORT "LogPort"
#define D_CMND_IPADDRESS "IPAddress"
#define D_CMND_NTPSERVER "NtpServer"
#define D_CMND_AP "Ap"
#define D_CMND_SSID "SSID"
#define D_CMND_PASSWORD "Password"
#define D_CMND_HOSTNAME "Hostname"
#define D_CMND_WIFICONFIG "WifiConfig"
#define WCFG_MAX_STRING_LENGTH 12
#define D_WCFG_0_RESTART "Restart"
#define D_WCFG_1_SMARTCONFIG "SmartConfig"
#define D_WCFG_2_WIFIMANAGER "WifiManager"
#define D_WCFG_3_WPSCONFIG "WPSConfig"
#define D_WCFG_4_RETRY "Retry"
#define D_WCFG_5_WAIT "Wait"
#define D_CMND_FRIENDLYNAME "FriendlyName"
#define D_CMND_SWITCHMODE "SwitchMode"
#define D_CMND_WEBSERVER "Webserver"
#define D_WEBSERVER_MODE "WebServerMode"
#define D_ACTIVE_FOR "Active for"
#define D_ON_DEVICE "on"
#define D_CMND_WEBPASSWORD "WebPassword"
#define D_CMND_WEBLOG "WebLog"
#define D_CMND_EMULATION "Emulation"
#define D_CMND_TELEPERIOD "TelePeriod"
#define D_CMND_RESTART "Restart"
#define D_ONE_TO_RESTART "1 to restart"
#define D_CMND_RESET "Reset"
#define D_RESET_AND_RESTARTING "Reset and Restarting"
#define D_ONE_TO_RESET "1 to reset"
#define D_CMND_TIMEZONE "Timezone"
#define D_CMND_ALTITUDE "Altitude"
#define D_CMND_LEDPOWER "LedPower"
#define D_CMND_LEDSTATE "LedState"
#define D_CMND_CFGDUMP "CfgDump"
#define D_CMND_I2CSCAN "I2CScan"
#define D_CMND_INA219MODE "Ina219Mode"
#define D_CMND_EXCEPTION "Exception"
// Commands xdrv_domoticz.ino
#define D_CMND_DOMOTICZ "Domoticz"
#define D_CMND_IDX "Idx"
#define D_CMND_KEYIDX "KeyIdx"
#define D_CMND_SWITCHIDX "SwitchIdx"
#define D_CMND_SENSORIDX "SensorIdx"
#define D_CMND_UPDATETIMER "UpdateTimer"
// Commands xdrv_irremote.ino
#define D_CMND_IRSEND "IRSend"
#define D_CMND_IRHVAC "IRHVAC"
// Commands xdrv_light.ino
#define D_CMND_COLOR "Color"
#define D_CMND_COLORTEMPERATURE "CT"
#define D_CMND_DIMMER "Dimmer"
#define D_CMND_LED "Led"
#define D_CMND_LEDTABLE "LedTable"
#define D_CMND_FADE "Fade"
#define D_CMND_PIXELS "Pixels"
#define D_CMND_SCHEME "Scheme"
#define D_CMND_SPEED "Speed"
#define D_CMND_WAKEUP "Wakeup"
#define D_CMND_WAKEUPDURATION "WakeUpDuration"
#define D_CMND_WIDTH "Width"
// Commands xdrv_snfbridge.ino
#define D_CMND_RFCODE "RfCode"
#define D_CMND_RFHIGH "RfHigh"
#define D_CMND_RFHOST "RfHost"
#define D_CMND_RFKEY "RfKey"
#define D_CMND_RFLOW "RfLow"
#define D_CMND_RFSYNC "RfSync"
// Commands xsns_03_energy.ino
#define D_CMND_POWERLOW "PowerLow"
#define D_CMND_POWERHIGH "PowerHigh"
#define D_CMND_VOLTAGELOW "VoltageLow"
#define D_CMND_VOLTAGEHIGH "VoltageHigh"
#define D_CMND_CURRENTLOW "CurrentLow"
#define D_CMND_CURRENTHIGH "CurrentHigh"
#define D_CMND_ENERGYRESET "EnergyReset"
#define D_CMND_HLWPCAL "HlwPcal"
#define D_CMND_HLWPSET "HlwPset"
#define D_CMND_HLWUCAL "HlwUcal"
#define D_CMND_HLWUSET "HlwUset"
#define D_CMND_HLWICAL "HlwIcal"
#define D_CMND_HLWISET "HlwIset"
#define D_CMND_MAXPOWER "MaxPower"
#define D_CMND_MAXPOWERHOLD "MaxPowerHold"
#define D_CMND_MAXPOWERWINDOW "MaxPowerWindow"
#define D_CMND_SAFEPOWER "SafePower"
#define D_CMND_SAFEPOWERHOLD "SafePowerHold"
#define D_CMND_SAFEPOWERWINDOW "SafePowerWindow"
#define D_CMND_MAXENERGY "MaxEnergy"
#define D_CMND_MAXENERGYSTART "MaxEnergyStart"
#endif // _LANGUAGE_PL_PL_H_

View File

@ -134,7 +134,16 @@ struct SYSCFG {
char mqtt_topic[33]; // 26F
char button_topic[33]; // 290
char mqtt_grptopic[33]; // 2B1
uint8_t mqtt_fingerprinth[20]; // 2D2 Reserved for binary fingerprint
uint8_t display_model; // 2D2
uint8_t display_mode; // 2D3
uint8_t display_refresh; // 2D4
uint8_t display_rows; // 2D5
uint8_t display_cols[2]; // 2D6
uint8_t display_address[8]; // 2D8
uint8_t display_dimmer; // 2E0
uint8_t display_size; // 2E1
uint8_t free_2E2[4]; // 2E2
uint16_t pwm_frequency; // 2E6
power_t power; // 2E8
@ -286,6 +295,15 @@ struct TimeChangeRule
TimeChangeRule DaylightSavingTime = { TIME_DST }; // Daylight Saving Time
TimeChangeRule StandardTime = { TIME_STD }; // Standard Time
struct XDRVMAILBOX {
uint16_t valid;
uint16_t index;
uint16_t data_len;
int16_t payload;
char *topic;
char *data;
} XdrvMailbox;
// See issue https://github.com/esp8266/Arduino/issues/2913
#ifdef USE_ADC_VCC
ADC_MODE(ADC_VCC); // Set ADC input for Power Supply Voltage usage

View File

@ -531,6 +531,9 @@ void SettingsDefaultSet2()
// 5.9.2
Settings.flag2.current_resolution = 3;
// 5.10.1
SettingsDefaultSet_5_10_1();
}
/********************************************************************************************/
@ -640,6 +643,28 @@ void SettingsDefaultSet_5_8_1()
Settings.ws_color[WS_HOUR][WS_BLUE] = 0;
}
void SettingsDefaultSet_5_10_1()
{
Settings.display_model = 0;
Settings.display_mode = 1;
Settings.display_refresh = 2;
Settings.display_rows = 2;
Settings.display_cols[0] = 16;
Settings.display_cols[1] = 8;
//#if defined(USE_I2C) && defined(USE_DISPLAY)
Settings.display_address[0] = MTX_ADDRESS1;
Settings.display_address[1] = MTX_ADDRESS2;
Settings.display_address[2] = MTX_ADDRESS3;
Settings.display_address[3] = MTX_ADDRESS4;
Settings.display_address[4] = MTX_ADDRESS5;
Settings.display_address[5] = MTX_ADDRESS6;
Settings.display_address[6] = MTX_ADDRESS7;
Settings.display_address[7] = MTX_ADDRESS8;
//#endif // USE_DISPLAY
Settings.display_dimmer = 1;
Settings.display_size = 1;
}
/********************************************************************************************/
void SettingsDelta()
@ -798,6 +823,9 @@ void SettingsDelta()
Settings.flag2.current_resolution = 3;
Settings.ina219_mode = 0;
}
if (Settings.version < 0x050A0009) {
SettingsDefaultSet_5_10_1();
}
Settings.version = VERSION;
SettingsSave(1);

View File

@ -96,6 +96,7 @@ typedef unsigned long power_t; // Power (Relay) type
#define APP_BAUDRATE 115200 // Default serial baudrate
#define MAX_STATUS 11 // Max number of status lines
#define XDRV_MAX 10 // Max number of allowed Xdrv drivers (Update xdrv_interface.ino if changed)
#define XSNS_MAX 20 // Max number of allowed Xsns External Sensors (Update xsns_interface.ino if changed)
/*
@ -127,13 +128,16 @@ enum ButtonStates {PRESSED, NOT_PRESSED};
enum SettingsParmaIndex {P_HOLD_TIME, P_MAX_POWER_RETRY, P_MAX_PARAM8};
enum DomoticzSensors {DZ_TEMP, DZ_TEMP_HUM, DZ_TEMP_HUM_BARO, DZ_POWER_ENERGY, DZ_ILLUMINANCE, DZ_COUNT, DZ_VOLTAGE, DZ_CURRENT, DZ_AIRQUALITY, DZ_MAX_SENSORS};
enum Ws2812ClockIndex {WS_SECOND, WS_MINUTE, WS_HOUR};
enum Ws2812Color {WS_RED, WS_GREEN, WS_BLUE};
enum LightTypes {LT_BASIC, LT_PWM1, LT_PWM2, LT_PWM3, LT_PWM4, LT_PWM5, LT_PWM6, LT_PWM7, LT_NU8, LT_NU9, LT_NU10, LT_WS2812, LT_RGBW, LT_RGBWC};
enum LichtSubtypes {LST_NONE, LST_SINGLE, LST_COLDWARM, LST_RGB, LST_RGBW, LST_RGBWC};
enum LichtSchemes {LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MAX};
enum XsnsFunctions {FUNC_INIT, FUNC_EVERY_50_MSECOND, FUNC_EVERY_SECOND, FUNC_PREP_BEFORE_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_APPEND, FUNC_SAVE_BEFORE_RESTART};
enum XsnsFunctions {FUNC_INIT, FUNC_EVERY_50_MSECOND, FUNC_EVERY_SECOND, FUNC_PREP_BEFORE_TELEPERIOD, FUNC_JSON_APPEND, FUNC_WEB_APPEND, FUNC_SAVE_BEFORE_RESTART,
FUNC_COMMAND, FUNC_MQTT_SUBSCRIBE, FUNC_MQTT_DATA, FUNC_SET_POWER, FUNC_SHOW_SENSOR};
const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 };

View File

@ -25,8 +25,8 @@
- Select IDE Tools - Flash Size: "1M (no SPIFFS)"
====================================================*/
#define VERSION 0x050A0007
#define VERSION_STRING "5.10.0g" // Would be great to have a macro that fills this from VERSION ...
#define VERSION 0x050A0009
#define VERSION_STRING "5.10.0i" // Would be great to have a macro that fills this from VERSION ...
// Location specific includes
#include "sonoff.h" // Enumaration used in user_config.h
@ -184,6 +184,8 @@ uint8_t light_type = 0; // Light types
boolean mdns_begun = false;
uint8_t xdrv_present = 0; // Number of drivers found
boolean (*xdrv_func_ptr[XDRV_MAX])(byte); // Driver Function Pointers
uint8_t xsns_present = 0; // Number of External Sensors found
boolean (*xsns_func_ptr[XSNS_MAX])(byte); // External Sensor Function Pointers for simple implementation of sensors
char my_hostname[33]; // Composed Wifi hostname
@ -302,9 +304,9 @@ void SetDevicePower(power_t rpower)
rpower = 0;
}
}
if (light_type) {
LightSetPower(bitRead(rpower, devices_present -1));
}
XdrvSetPower(bitRead(rpower, devices_present -1));
if ((SONOFF_DUAL == Settings.module) || (CH4 == Settings.module)) {
Serial.write(0xA0);
Serial.write(0x04);
@ -325,7 +327,6 @@ void SetDevicePower(power_t rpower)
rpower >>= 1;
}
}
EnergySetPowerSteadyCounter(2);
}
void SetLedPower(uint8_t state)
@ -461,9 +462,8 @@ void MqttConnected()
fallback_topic_flag = 0;
MqttSubscribe(stopic);
}
#ifdef USE_DOMOTICZ
DomoticzMqttSubscribe();
#endif // USE_DOMOTICZ
XdrvCall(FUNC_MQTT_SUBSCRIBE);
}
if (mqtt_connection_flag) {
@ -758,15 +758,7 @@ boolean MqttCommand(boolean grpflg, char *type, uint16_t index, char *dataBuf, u
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, GetStateText(Settings.flag.mqtt_sensor_retain));
}
#ifdef USE_DOMOTICZ
else if (DomoticzCommand(type, index, dataBuf, data_len, payload)) {
// Serviced
}
#endif // USE_DOMOTICZ
else {
serviced = false;
}
else serviced = false;
return serviced;
}
@ -819,13 +811,9 @@ void MqttDataCallback(char* topic, byte* data, unsigned int data_len)
AddLog(LOG_LEVEL_DEBUG_MORE);
// if (LOG_LEVEL_DEBUG_MORE <= seriallog_level) Serial.println(dataBuf);
#ifdef USE_DOMOTICZ
if (Settings.flag.mqtt_enabled) {
if (DomoticzMqttData(topicBuf, sizeof(topicBuf), dataBuf, sizeof(dataBuf))) {
return;
}
if (XdrvMqttData(topicBuf, sizeof(topicBuf), dataBuf, sizeof(dataBuf))) {
return;
}
#endif // USE_DOMOTICZ
grpflg = (strstr(topicBuf, Settings.mqtt_grptopic) != NULL);
fallback_topic_flag = (strstr(topicBuf, mqtt_client) != NULL);
@ -972,9 +960,9 @@ void MqttDataCallback(char* topic, byte* data, unsigned int data_len)
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.blinkcount);
}
else if (light_type && LightCommand(type, index, dataBuf, data_len, payload)) {
// else if (light_type && LightCommand(type, index, dataBuf, data_len, payload)) {
// Serviced
}
// }
else if (CMND_SAVEDATA == command_code) {
if ((payload >= 0) && (payload <= 3600)) {
Settings.save_data = payload;
@ -1499,17 +1487,9 @@ void MqttDataCallback(char* topic, byte* data, unsigned int data_len)
else if (Settings.flag.mqtt_enabled && MqttCommand(grpflg, type, index, dataBuf, data_len, payload, payload16)) {
// Serviced
}
else if (energy_flg && EnergyCommand(type, index, dataBuf, data_len, payload)) {
else if (XdrvCommand(type, index, dataBuf, data_len, payload)) {
// Serviced
}
else if ((SONOFF_BRIDGE == Settings.module) && SonoffBridgeCommand(type, index, dataBuf, data_len, payload)) {
// Serviced
}
#ifdef USE_IR_REMOTE
else if ((pin[GPIO_IRSEND] < 99) && IrSendCommand(type, index, dataBuf, data_len, payload)) {
// Serviced
}
#endif // USE_IR_REMOTE
#ifdef DEBUG_THEO
else if (CMND_EXCEPTION == command_code) {
if (data_len > 0) {
@ -1819,6 +1799,10 @@ boolean MqttShowSensor()
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_TEMPERATURE_UNIT "\":\"%c\""), mqtt_data, TempUnit());
}
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data);
if (json_data_available) {
XdrvCall(FUNC_SHOW_SENSOR);
}
return json_data_available;
}
@ -1856,10 +1840,6 @@ void PerformEverySecond()
}
}
#ifdef USE_DOMOTICZ
DomoticzMqttUpdate();
#endif // USE_DOMOTICZ
if (status_update_timer) {
status_update_timer--;
if (!status_update_timer) {
@ -1885,9 +1865,11 @@ void PerformEverySecond()
if (MqttShowSensor()) {
MqttPublishPrefixTopic_P(2, PSTR(D_RSLT_SENSOR), Settings.flag.mqtt_sensor_retain);
}
}
}
XdrvCall(FUNC_EVERY_SECOND);
XsnsCall(FUNC_EVERY_SECOND);
if ((2 == RtcTime.minute) && latest_uptime_flag) {
@ -2196,20 +2178,6 @@ void StateLoop()
}
}
#ifdef USE_IR_REMOTE
#ifdef USE_IR_RECEIVE
if (pin[GPIO_IRRECV] < 99) {
IrReceiveCheck(); // check if there's anything on IR side
}
#endif // USE_IR_RECEIVE
#endif // USE_IR_REMOTE
#ifdef USE_ARILUX_RF
if (pin[GPIO_ARIRFRCV] < 99) {
AriluxRfHandler();
}
#endif // USE_ARILUX_RF
/*-------------------------------------------------------------------------------------------*\
* Every 0.05 second
\*-------------------------------------------------------------------------------------------*/
@ -2217,10 +2185,7 @@ void StateLoop()
ButtonHandler();
SwitchHandler();
if (light_type) {
LightAnimate();
}
XdrvCall(FUNC_EVERY_50_MSECOND);
XsnsCall(FUNC_EVERY_50_MSECOND);
/*-------------------------------------------------------------------------------------------*\
@ -2516,6 +2481,23 @@ void GpioInit()
analogWriteRange(Settings.pwm_range); // Default is 1023 (Arduino.h)
analogWriteFreq(Settings.pwm_frequency); // Default is 1000 (core_esp8266_wiring_pwm.c)
#ifdef USE_SPI
spi_flg = ((((pin[GPIO_SPI_CS] < 99) && (pin[GPIO_SPI_CS] > 14)) || (pin[GPIO_SPI_CS] < 12)) || (((pin[GPIO_SPI_DC] < 99) && (pin[GPIO_SPI_DC] > 14)) || (pin[GPIO_SPI_DC] < 12)));
if (spi_flg) {
for (byte i = 0; i < GPIO_MAX; i++) {
if ((pin[i] >= 12) && (pin[i] <=14)) {
pin[i] = 99;
}
}
my_module.gp.io[12] = GPIO_SPI_MISO;
pin[GPIO_SPI_MISO] = 12;
my_module.gp.io[13] = GPIO_SPI_MOSI;
pin[GPIO_SPI_MOSI] = 13;
my_module.gp.io[14] = GPIO_SPI_CLK;
pin[GPIO_SPI_CLK] = 14;
}
#endif // USE_SPI
#ifdef USE_I2C
i2c_flg = ((pin[GPIO_I2C_SCL] < 99) && (pin[GPIO_I2C_SDA] < 99));
if (i2c_flg) {
@ -2598,9 +2580,7 @@ void GpioInit()
light_type = LT_WS2812;
}
#endif // USE_WS2812
if (light_type) { // Any Led light under Dimmer/Color control
LightInit();
} else {
if (!light_type) {
for (byte i = 0; i < MAX_PWMS; i++) { // Basic PWM control only
if (pin[GPIO_PWM1 +i] < 99) {
pinMode(pin[GPIO_PWM1 +i], OUTPUT);
@ -2615,16 +2595,7 @@ void GpioInit()
}
SetLedPower(Settings.ledstate &8);
#ifdef USE_IR_REMOTE
if (pin[GPIO_IRSEND] < 99) {
IrSendInit();
}
#ifdef USE_IR_RECEIVE
if (pin[GPIO_IRRECV] < 99) {
IrReceiveInit();
}
#endif // USE_IR_RECEIVE
#endif // USE_IR_REMOTE
XDrvInit();
}
extern "C" {

View File

@ -84,6 +84,9 @@ enum UserSelectablePins {
GPIO_PZEM_RX, // PZEM004T Serial interface
GPIO_SAIR_TX, // SenseAir Serial interface
GPIO_SAIR_RX, // SenseAir Serial interface
GPIO_SPI_CS, // SPI Chip Select
GPIO_SPI_DC, // SPI Data Direction
GPIO_BACKLIGHT,
GPIO_SENSOR_END };
// Text in webpage Module Parameters and commands GPIOS and GPIO
@ -149,13 +152,19 @@ const char kSensors[GPIO_SENSOR_END][9] PROGMEM = {
D_SENSOR_PZEM_TX,
D_SENSOR_PZEM_RX,
D_SENSOR_SAIR_TX,
D_SENSOR_SAIR_RX
D_SENSOR_SAIR_RX,
D_SENSOR_SPI_CS,
D_SENSOR_SPI_DC,
D_SENSOR_BACKLIGHT
};
// Programmer selectable GPIO functionality offset by user selectable GPIOs
enum ProgramSelectablePins {
GPIO_RXD = GPIO_SENSOR_END, // Serial interface
GPIO_TXD, // Serial interface
GPIO_SPI_MISO, // SPI MISO library fixed pin GPIO12
GPIO_SPI_MOSI, // SPI MOSI library fixed pin GPIO13
GPIO_SPI_CLK, // SPI Clk library fixed pin GPIO14
GPIO_HLW_SEL, // HLW8012 Sel output (Sonoff Pow)
GPIO_HLW_CF1, // HLW8012 CF1 voltage / current (Sonoff Pow)
GPIO_HLW_CF, // HLW8012 CF power (Sonoff Pow)
@ -824,6 +833,17 @@ const mytmplt kModules[MAXMODULE] PROGMEM = {
GPIO_REL3, // GPIO15 Relay 3
0, 0
}
{ "PowStro Basic", // PowStro (ESP8266) - (#1419)
0, 0, 0, 0,
GPIO_REL1, // GPIO04 Relay (0 = Off, 1 = On)
0,
0, 0, 0, 0, 0, 0, // Flash connection
GPIO_KEY1, // GPIO12 Button
0, 0,
GPIO_LED1, // GPIO15 Led (1 = On, 0 = Off)
0, 0
}
*/
#endif // _SONOFF_TEMPLATE_H_

View File

@ -172,6 +172,7 @@
// -- I2C sensors ---------------------------------
#define USE_I2C // I2C using library wire (+10k code, 0k2 mem, 124 iram)
#ifdef USE_I2C
#define USE_SHT // Add I2C emulating code for SHT1X sensor (+1k4 code)
#define USE_SHT3X // Add I2C code for SHT3x sensor (+0k6 code)
#define USE_HTU // Add I2C code for HTU21/SI7013/SI7020/SI7021 sensor (+1k5 code)
@ -183,6 +184,23 @@
// #define USE_ADS1115 // Add I2C code for ADS1115 16 bit A/D converter based on Adafruit ADS1x15 library (no library needed) (+0k7 code)
// #define USE_ADS1115_I2CDEV // Add I2C code for ADS1115 16 bit A/D converter using library i2cdevlib-Core and i2cdevlib-ADS1115 (+2k code)
// #define USE_INA219 // Add I2C code for INA219 Low voltage and current sensor (+1k code)
// #define USE_DISPLAY // Add I2C Display Support for LCD, Oled and up to eigth Matrices
#define MTX_ADDRESS1 0x71 // [DisplayAddress[1]] I2C address of first 8x8 matrix module
#define MTX_ADDRESS2 0x74 // [DisplayAddress[2]] I2C address of second 8x8 matrix module
#define MTX_ADDRESS3 0x75 // [DisplayAddress[3]] I2C address of third 8x8 matrix module
#define MTX_ADDRESS4 0x72 // [DisplayAddress[4]] I2C address of fourth 8x8 matrix module
#define MTX_ADDRESS5 0x73 // [DisplayAddress[5]] I2C address of fifth 8x8 matrix module
#define MTX_ADDRESS6 0x76 // [DisplayAddress[6]] I2C address of sixth 8x8 matrix module
#define MTX_ADDRESS7 0x00 // [DisplayAddress[7]] I2C address of seventh 8x8 matrix module
#define MTX_ADDRESS8 0x00 // [DisplayAddress[8]] I2C address of eigth 8x8 matrix module
#endif // USE_I2C
//#define USE_SPI // SPI using library theo_TFT
#ifdef USE_SPI
#ifndef USE_DISPLAY
#define USE_DISPLAY // Add SPI Display support for 320x240 and 480x320 TFT
#endif
#endif // USE_SPI
// -- Carbon dioxide (CO2) sensors ----------------
#define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code)

View File

@ -338,6 +338,7 @@ void StartWebserver(int type, IPAddress ipweb)
if (EMUL_WEMO == Settings.flag2.emulation) {
WebServer->on("/upnp/control/basicevent1", HTTP_POST, HandleUpnpEvent);
WebServer->on("/eventservice.xml", HandleUpnpService);
WebServer->on("/metainfoservice.xml", HandleUpnpMetaService);
WebServer->on("/setup.xml", HandleUpnpSetupWemo);
}
if (EMUL_HUE == Settings.flag2.emulation) {
@ -1594,6 +1595,9 @@ void HandleRestart()
void HandleNotFound()
{
// snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_HTTP "Not fount (%s)"), WebServer->uri().c_str());
// AddLog(LOG_LEVEL_DEBUG);
if (CaptivePortal()) { // If captive portal redirect instead of displaying the error page.
return;
}

View File

@ -1,5 +1,5 @@
/*
xdrv_light.ino - PWM, WS2812 and sonoff led support for Sonoff-Tasmota
xdrv_01_light.ino - PWM, WS2812 and sonoff led support for Sonoff-Tasmota
Copyright (C) 2018 Theo Arends
@ -333,7 +333,7 @@ void LightMy92x1Duty(uint8_t duty_r, uint8_t duty_g, uint8_t duty_b, uint8_t dut
/********************************************************************************************/
void LightInit(void)
void LightInit()
{
uint8_t max_scheme = LS_MAX -1;
@ -634,9 +634,9 @@ void LightRandomColor()
LightFade();
}
void LightSetPower(uint8_t mpower)
void LightSetPower()
{
light_power = mpower;
light_power = XdrvMailbox.index;
if (light_wakeup_active) {
light_wakeup_active--;
}
@ -994,92 +994,93 @@ boolean LightColorEntry(char *buffer, uint8_t buffer_length)
/********************************************************************************************/
boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_len, int16_t payload)
//boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t XdrvMailbox.data_len, int16_t XdrvMailbox.payload)
boolean LightCommand()
{
char command [CMDSZ];
boolean serviced = true;
boolean coldim = false;
boolean valid_entry = false;
char scolor[25];
char option = (1 == data_len) ? dataBuf[0] : '\0';
char option = (1 == XdrvMailbox.data_len) ? XdrvMailbox.data[0] : '\0';
int command_code = GetCommandCode(command, sizeof(command), type, kLightCommands);
if ((CMND_COLOR == command_code) && (light_subtype > LST_SINGLE) && (index > 0) && (index <= 5)) {
if (data_len > 0) {
valid_entry = LightColorEntry(dataBuf, data_len);
int command_code = GetCommandCode(command, sizeof(command), XdrvMailbox.topic, kLightCommands);
if ((CMND_COLOR == command_code) && (light_subtype > LST_SINGLE) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= 5)) {
if (XdrvMailbox.data_len > 0) {
valid_entry = LightColorEntry(XdrvMailbox.data, XdrvMailbox.data_len);
if (valid_entry) {
if (index <= 2) { // Color(1), 2
if (XdrvMailbox.index <= 2) { // Color(1), 2
memcpy(light_current_color, light_entry_color, sizeof(light_current_color));
uint8_t dimmer = Settings.light_dimmer;
LightSetColor();
if (2 == index) {
if (2 == XdrvMailbox.index) {
Settings.light_dimmer = dimmer;
}
Settings.light_scheme = 0;
coldim = true;
} else { // Color3, 4 and 5
for (byte i = 0; i < LST_RGB; i++) {
Settings.ws_color[index -3][i] = light_entry_color[i];
Settings.ws_color[XdrvMailbox.index -3][i] = light_entry_color[i];
}
}
}
}
if (!valid_entry && (index <= 2)) {
if (!valid_entry && (XdrvMailbox.index <= 2)) {
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, LightGetColor(0, scolor));
}
if (index >= 3) {
if (XdrvMailbox.index >= 3) {
scolor[0] = '\0';
for (byte i = 0; i < LST_RGB; i++) {
if (Settings.flag.decimal_text) {
snprintf_P(scolor, 25, PSTR("%s%s%d"), scolor, (i > 0) ? "," : "", Settings.ws_color[index -3][i]);
snprintf_P(scolor, 25, PSTR("%s%s%d"), scolor, (i > 0) ? "," : "", Settings.ws_color[XdrvMailbox.index -3][i]);
} else {
snprintf_P(scolor, 25, PSTR("%s%02X"), scolor, Settings.ws_color[index -3][i]);
snprintf_P(scolor, 25, PSTR("%s%02X"), scolor, Settings.ws_color[XdrvMailbox.index -3][i]);
}
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, scolor);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, XdrvMailbox.index, scolor);
}
}
#ifdef USE_WS2812 // ***********************************************************************
else if ((CMND_LED == command_code) && (LT_WS2812 == light_type) && (index > 0) && (index <= Settings.light_pixels)) {
if (data_len > 0) {
if (LightColorEntry(dataBuf, data_len)) {
Ws2812SetColor(index, light_entry_color[0], light_entry_color[1], light_entry_color[2], light_entry_color[3]);
else if ((CMND_LED == command_code) && (LT_WS2812 == light_type) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= Settings.light_pixels)) {
if (XdrvMailbox.data_len > 0) {
if (LightColorEntry(XdrvMailbox.data, XdrvMailbox.data_len)) {
Ws2812SetColor(XdrvMailbox.index, light_entry_color[0], light_entry_color[1], light_entry_color[2], light_entry_color[3]);
}
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, Ws2812GetColor(index, scolor));
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, XdrvMailbox.index, Ws2812GetColor(XdrvMailbox.index, scolor));
}
else if ((CMND_PIXELS == command_code) && (LT_WS2812 == light_type)) {
if ((payload > 0) && (payload <= WS2812_MAX_LEDS)) {
Settings.light_pixels = payload;
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= WS2812_MAX_LEDS)) {
Settings.light_pixels = XdrvMailbox.payload;
Ws2812Clear();
light_update = 1;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.light_pixels);
}
else if ((CMND_WIDTH == command_code) && (LT_WS2812 == light_type) && (index > 0) && (index <= 4)) {
if (1 == index) {
if ((payload >= 0) && (payload <= 4)) {
Settings.light_width = payload;
else if ((CMND_WIDTH == command_code) && (LT_WS2812 == light_type) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= 4)) {
if (1 == XdrvMailbox.index) {
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 4)) {
Settings.light_width = XdrvMailbox.payload;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.light_width);
} else {
if ((payload > 0) && (payload < 32)) {
Settings.ws_width[index -2] = payload;
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload < 32)) {
Settings.ws_width[XdrvMailbox.index -2] = XdrvMailbox.payload;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_NVALUE, command, index, Settings.ws_width[index -2]);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_NVALUE, command, XdrvMailbox.index, Settings.ws_width[XdrvMailbox.index -2]);
}
}
#endif // USE_WS2812 ************************************************************************
else if ((CMND_SCHEME == command_code) && (light_subtype >= LST_RGB)) {
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
XdrvMailbox.payload = Settings.light_scheme + ((0 == Settings.light_scheme) ? 2 : 1); // Skip wakeup
}
else if (('-' == option) && (Settings.light_scheme > 0)) {
payload = Settings.light_scheme - ((2 == Settings.light_scheme) ? 2 : 1); // Skip wakeup
XdrvMailbox.payload = Settings.light_scheme - ((2 == Settings.light_scheme) ? 2 : 1); // Skip wakeup
}
if ((payload >= 0) && (payload <= max_scheme)) {
Settings.light_scheme = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= max_scheme)) {
Settings.light_scheme = XdrvMailbox.payload;
if (LS_WAKEUP == Settings.light_scheme) {
light_wakeup_active = 3;
}
@ -1089,8 +1090,8 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.light_scheme);
}
else if (CMND_WAKEUP == command_code) {
if ((payload >= 0) && (payload <= 100)) {
Settings.light_dimmer = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 100)) {
Settings.light_dimmer = XdrvMailbox.payload;
}
light_wakeup_active = 3;
Settings.light_scheme = LS_WAKEUP;
@ -1101,14 +1102,14 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
if (option != '\0') {
uint16_t value = LightGetColorTemp();
if ('+' == option) {
payload = (value > 466) ? 500 : value + 34;
XdrvMailbox.payload = (value > 466) ? 500 : value + 34;
}
else if ('-' == option) {
payload = (value < 187) ? 153 : value - 34;
XdrvMailbox.payload = (value < 187) ? 153 : value - 34;
}
}
if ((payload >= 153) && (payload <= 500)) { // https://developers.meethue.com/documentation/core-concepts
LightSetColorTemp(payload);
if ((XdrvMailbox.payload >= 153) && (XdrvMailbox.payload <= 500)) { // https://developers.meethue.com/documentation/core-concepts
LightSetColorTemp(XdrvMailbox.payload);
coldim = true;
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, LightGetColorTemp());
@ -1116,13 +1117,13 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
}
else if (CMND_DIMMER == command_code) {
if ('+' == option) {
payload = (Settings.light_dimmer > 89) ? 100 : Settings.light_dimmer + 10;
XdrvMailbox.payload = (Settings.light_dimmer > 89) ? 100 : Settings.light_dimmer + 10;
}
else if ('-' == option) {
payload = (Settings.light_dimmer < 11) ? 1 : Settings.light_dimmer - 10;
XdrvMailbox.payload = (Settings.light_dimmer < 11) ? 1 : Settings.light_dimmer - 10;
}
if ((payload >= 0) && (payload <= 100)) {
Settings.light_dimmer = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 100)) {
Settings.light_dimmer = XdrvMailbox.payload;
light_update = 1;
coldim = true;
} else {
@ -1130,11 +1131,11 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
}
}
else if (CMND_LEDTABLE == command_code) {
if ((payload >= 0) && (payload <= 2)) {
switch (payload) {
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 2)) {
switch (XdrvMailbox.payload) {
case 0: // Off
case 1: // On
Settings.light_correction = payload;
Settings.light_correction = XdrvMailbox.payload;
break;
case 2: // Toggle
Settings.light_correction ^= 1;
@ -1145,10 +1146,10 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, GetStateText(Settings.light_correction));
}
else if (CMND_FADE == command_code) {
switch (payload) {
switch (XdrvMailbox.payload) {
case 0: // Off
case 1: // On
Settings.light_fade = payload;
Settings.light_fade = XdrvMailbox.payload;
break;
case 2: // Toggle
Settings.light_fade ^= 1;
@ -1158,19 +1159,19 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
}
else if (CMND_SPEED == command_code) { // 1 - fast, 20 - very slow
if (('+' == option) && (Settings.light_speed > 1)) {
payload = Settings.light_speed -1;
XdrvMailbox.payload = Settings.light_speed -1;
}
else if (('-' == option) && (Settings.light_speed < STATES)) {
payload = Settings.light_speed +1;
XdrvMailbox.payload = Settings.light_speed +1;
}
if ((payload > 0) && (payload <= STATES)) {
Settings.light_speed = payload;
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload <= STATES)) {
Settings.light_speed = XdrvMailbox.payload;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.light_speed);
}
else if (CMND_WAKEUPDURATION == command_code) {
if ((payload > 0) && (payload < 3001)) {
Settings.light_wakeup = payload;
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload < 3001)) {
Settings.light_wakeup = XdrvMailbox.payload;
light_wakeup_active = 0;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.light_wakeup);
@ -1180,7 +1181,7 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
scolor[6] = '\0'; // RGB only
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,%d,%d,%d,%d,%d"),
scolor, Settings.light_fade, Settings.light_correction, Settings.light_scheme, Settings.light_speed, Settings.light_width);
MqttPublishPrefixTopic_P(1, type);
MqttPublishPrefixTopic_P(1, XdrvMailbox.topic);
mqtt_data[0] = '\0';
}
else {
@ -1192,3 +1193,36 @@ boolean LightCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_le
return serviced;
}
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
#define XDRV_01
boolean Xdrv01(byte function)
{
boolean result = false;
if (light_type) {
switch (function) {
case FUNC_INIT:
LightInit();
break;
case FUNC_EVERY_50_MSECOND:
LightAnimate();
#ifdef USE_ARILUX_RF
if (pin[GPIO_ARIRFRCV] < 99) {
AriluxRfHandler();
}
#endif // USE_ARILUX_RF
break;
case FUNC_COMMAND:
result = LightCommand();
break;
case FUNC_SET_POWER:
LightSetPower();
break;
}
}
return result;
}

View File

@ -1,5 +1,5 @@
/*
xdrv_irremote.ino - infra red support for Sonoff-Tasmota
xdrv_02_irremote.ino - infra red support for Sonoff-Tasmota
Copyright (C) 2018 Heiko Krupp, Lazar Obradovic and Theo Arends
@ -275,11 +275,12 @@ boolean IrHvacMitsubishi(const char *HVAC_Mode, const char *HVAC_FanMode, boolea
{ "Vendor": "<Toshiba|Mitsubishi>", "Power": <0|1>, "Mode": "<Hot|Cold|Dry|Auto>", "FanSpeed": "<1|2|3|4|5|Auto|Silence>", "Temp": <17..30> }
*/
boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_len, int16_t payload)
//boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_len, int16_t payload)
boolean IrSendCommand()
{
boolean serviced = true;
boolean error = false;
char dataBufUc[data_len];
char dataBufUc[XdrvMailbox.data_len];
char protocol_text[20];
const char *protocol;
uint32_t bits = 0;
@ -292,10 +293,10 @@ boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
boolean HVAC_Power = true;
for (uint16_t i = 0; i <= sizeof(dataBufUc); i++) {
dataBufUc[i] = toupper(dataBuf[i]);
dataBufUc[i] = toupper(XdrvMailbox.data[i]);
}
if (!strcasecmp_P(type, PSTR(D_CMND_IRSEND))) {
if (data_len) {
if (!strcasecmp_P(XdrvMailbox.topic, PSTR(D_CMND_IRSEND))) {
if (XdrvMailbox.data_len) {
StaticJsonBuffer<128> jsonBuf;
JsonObject &ir_json = jsonBuf.parseObject(dataBufUc);
if (!ir_json.success()) {
@ -342,8 +343,8 @@ boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
}
}
#ifdef USE_IR_HVAC
else if (!strcasecmp_P(type, PSTR(D_CMND_IRHVAC))) {
if (data_len) {
else if (!strcasecmp_P(XdrvMailbox.topic, PSTR(D_CMND_IRHVAC))) {
if (XdrvMailbox.data_len) {
StaticJsonBuffer<164> jsonBufer;
JsonObject &root = jsonBufer.parseObject(dataBufUc);
if (!root.success()) {
@ -380,9 +381,47 @@ boolean IrSendCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
}
}
#endif // USE_IR_HVAC
else {
serviced = false; // Unknown command
}
else serviced = false; // Unknown command
return serviced;
}
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
#define XDRV_02
boolean Xdrv02(byte function)
{
boolean result = false;
if ((pin[GPIO_IRSEND] < 99) || (pin[GPIO_IRRECV] < 99)) {
switch (function) {
case FUNC_INIT:
if (pin[GPIO_IRSEND] < 99) {
IrSendInit();
}
#ifdef USE_IR_RECEIVE
if (pin[GPIO_IRRECV] < 99) {
IrReceiveInit();
}
#endif // USE_IR_RECEIVE
break;
case FUNC_EVERY_50_MSECOND:
#ifdef USE_IR_RECEIVE
if (pin[GPIO_IRRECV] < 99) {
IrReceiveCheck(); // check if there's anything on IR side
}
#endif // USE_IR_RECEIVE
break;
case FUNC_COMMAND:
if (pin[GPIO_IRSEND] < 99) {
result = IrSendCommand();
}
break;
}
}
return result;
}
#endif // USE_IR_REMOTE

View File

@ -1,5 +1,5 @@
/*
xdrv_snfbridge.ino - sonoff RF bridge 433 support for Sonoff-Tasmota
xdrv_04_snfbridge.ino - sonoff RF bridge 433 support for Sonoff-Tasmota
Copyright (C) 2018 Theo Arends
@ -198,12 +198,12 @@ void SonoffBridgeLearn(uint8_t key)
* Commands
\*********************************************************************************************/
boolean SonoffBridgeCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_len, int16_t payload)
boolean SonoffBridgeCommand()
{
char command [CMDSZ];
boolean serviced = true;
int command_code = GetCommandCode(command, sizeof(command), type, kSonoffBridgeCommands);
int command_code = GetCommandCode(command, sizeof(command), XdrvMailbox.topic, kSonoffBridgeCommands);
if ((command_code >= CMND_RFSYNC) && (command_code <= CMND_RFCODE)) { // RfSync, RfLow, RfHigh, RfHost and RfCode
char *p;
char stemp [10];
@ -212,20 +212,20 @@ boolean SonoffBridgeCommand(char *type, uint16_t index, char *dataBuf, uint16_t
uint8_t set_index = command_code *2;
if (dataBuf[0] == '#') {
dataBuf++;
data_len--;
if (XdrvMailbox.data[0] == '#') {
XdrvMailbox.data++;
XdrvMailbox.data_len--;
radix = 16;
}
if (data_len) {
code = strtol(dataBuf, &p, radix);
if (XdrvMailbox.data_len) {
code = strtol(XdrvMailbox.data, &p, radix);
if (code) {
if (CMND_RFCODE == command_code) {
sonoff_bridge_last_send_code = code;
SonoffBridgeSendCode(code);
} else {
if (1 == payload) {
if (1 == XdrvMailbox.payload) {
code = pgm_read_byte(kDefaultRfCode + set_index) << 8 | pgm_read_byte(kDefaultRfCode + set_index +1);
}
uint8_t msb = code >> 8;
@ -249,41 +249,59 @@ boolean SonoffBridgeCommand(char *type, uint16_t index, char *dataBuf, uint16_t
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_XVALUE, command, stemp);
}
else if ((CMND_RFKEY == command_code) && (index > 0) && (index <= 16)) {
else if ((CMND_RFKEY == command_code) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= 16)) {
unsigned long now = millis();
if ((!sonoff_bridge_learn_active) || (now - sonoff_bridge_last_learn_time > 60100)) {
sonoff_bridge_learn_active = 0;
if (2 == payload) { // Learn RF data
SonoffBridgeLearn(index);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, D_START_LEARNING);
if (2 == XdrvMailbox.payload) { // Learn RF data
SonoffBridgeLearn(XdrvMailbox.index);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, XdrvMailbox.index, D_START_LEARNING);
}
else if (3 == payload) { // Unlearn RF data
Settings.rf_code[index][0] = 0;
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, D_SET_TO_DEFAULT);
else if (3 == XdrvMailbox.payload) { // Unlearn RF data
Settings.rf_code[XdrvMailbox.index][0] = 0;
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, XdrvMailbox.index, D_SET_TO_DEFAULT);
}
else if (4 == payload) { // Save RF data provided by RFSync, RfLow, RfHigh and last RfCode
else if (4 == XdrvMailbox.payload) { // Save RF data provided by RFSync, RfLow, RfHigh and last RfCode
for (byte i = 0; i < 6; i++) {
Settings.rf_code[index][i] = Settings.rf_code[0][i];
Settings.rf_code[XdrvMailbox.index][i] = Settings.rf_code[0][i];
}
Settings.rf_code[index][6] = (sonoff_bridge_last_send_code >> 16) & 0xff;
Settings.rf_code[index][7] = (sonoff_bridge_last_send_code >> 8) & 0xff;
Settings.rf_code[index][8] = sonoff_bridge_last_send_code & 0xff;
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, D_SAVED);
Settings.rf_code[XdrvMailbox.index][6] = (sonoff_bridge_last_send_code >> 16) & 0xff;
Settings.rf_code[XdrvMailbox.index][7] = (sonoff_bridge_last_send_code >> 8) & 0xff;
Settings.rf_code[XdrvMailbox.index][8] = sonoff_bridge_last_send_code & 0xff;
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, XdrvMailbox.index, D_SAVED);
} else {
if ((1 == payload) || (0 == Settings.rf_code[index][0])) {
SonoffBridgeSend(0, index); // Send default RF data
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, D_DEFAULT_SENT);
if ((1 == XdrvMailbox.payload) || (0 == Settings.rf_code[XdrvMailbox.index][0])) {
SonoffBridgeSend(0, XdrvMailbox.index); // Send default RF data
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, XdrvMailbox.index, D_DEFAULT_SENT);
} else {
SonoffBridgeSend(index, 0); // Send learned RF data
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, index, D_LEARNED_SENT);
SonoffBridgeSend(XdrvMailbox.index, 0); // Send learned RF data
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, XdrvMailbox.index, D_LEARNED_SENT);
}
}
} else {
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_INDEX_SVALUE, command, sonoff_bridge_learn_key, D_LEARNING_ACTIVE);
}
} else {
serviced = false;
}
} else serviced = false;
return serviced;
}
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
#define XDRV_04
boolean Xdrv04(byte function)
{
boolean result = false;
if (SONOFF_BRIDGE == Settings.module) {
switch (function) {
case FUNC_COMMAND:
result = SonoffBridgeCommand();
break;
}
}
return result;
}

View File

@ -1,5 +1,5 @@
/*
xdrv_domoticz.ino - domoticz support for Sonoff-Tasmota
xdrv_05_domoticz.ino - domoticz support for Sonoff-Tasmota
Copyright (C) 2018 Theo Arends
@ -40,7 +40,7 @@ enum DomoticzCommands {
const char kDomoticzCommands[] PROGMEM =
D_CMND_IDX "|" D_CMND_KEYIDX "|" D_CMND_SWITCHIDX "|" D_CMND_SENSORIDX "|" D_CMND_UPDATETIMER ;
enum DomoticzSensors {DZ_TEMP, DZ_TEMP_HUM, DZ_TEMP_HUM_BARO, DZ_POWER_ENERGY, DZ_ILLUMINANCE, DZ_COUNT, DZ_VOLTAGE, DZ_CURRENT, DZ_AIRQUALITY, DZ_MAX_SENSORS};
//enum DomoticzSensors {DZ_TEMP, DZ_TEMP_HUM, DZ_TEMP_HUM_BARO, DZ_POWER_ENERGY, DZ_ILLUMINANCE, DZ_COUNT, DZ_VOLTAGE, DZ_CURRENT, DZ_AIRQUALITY, DZ_MAX_SENSORS};
#if MAX_DOMOTICZ_SNS_IDX < DZ_MAX_SENSORS
#error "Domoticz: Too many sensors or change settings.h layout"
@ -131,7 +131,7 @@ void DomoticzMqttSubscribe()
}
*/
boolean DomoticzMqttData(char *topicBuf, uint16_t stopicBuf, char *dataBuf, uint16_t sdataBuf)
boolean DomoticzMqttData()
{
char stemp1[10];
char scommand[10];
@ -140,12 +140,12 @@ boolean DomoticzMqttData(char *topicBuf, uint16_t stopicBuf, char *dataBuf, uint
int16_t found = 0;
domoticz_update_flag = 1;
if (!strncmp(topicBuf, domoticz_out_topic, strlen(domoticz_out_topic))) {
if (sdataBuf < 20) {
if (!strncmp(XdrvMailbox.topic, domoticz_out_topic, strlen(domoticz_out_topic))) {
if (XdrvMailbox.data_len < 20) {
return 1;
}
StaticJsonBuffer<400> jsonBuf;
JsonObject& domoticz = jsonBuf.parseObject(dataBuf);
JsonObject& domoticz = jsonBuf.parseObject(XdrvMailbox.data);
if (!domoticz.success()) {
return 1;
}
@ -168,15 +168,15 @@ boolean DomoticzMqttData(char *topicBuf, uint16_t stopicBuf, char *dataBuf, uint
if (light_type && (Settings.light_dimmer == nvalue) && ((power >> i) &1)) {
return 1;
}
snprintf_P(topicBuf, stopicBuf, PSTR("/" D_CMND_DIMMER));
snprintf_P(dataBuf, sdataBuf, PSTR("%d"), nvalue);
snprintf_P(XdrvMailbox.topic, XdrvMailbox.index, PSTR("/" D_CMND_DIMMER));
snprintf_P(XdrvMailbox.data, XdrvMailbox.data_len, PSTR("%d"), nvalue);
found = 1;
} else {
if (((power >> i) &1) == nvalue) {
return 1;
}
snprintf_P(topicBuf, stopicBuf, PSTR("/" D_CMND_POWER "%s"), (devices_present > 1) ? stemp1 : "");
snprintf_P(dataBuf, sdataBuf, PSTR("%d"), nvalue);
snprintf_P(XdrvMailbox.topic, XdrvMailbox.index, PSTR("/" D_CMND_POWER "%s"), (devices_present > 1) ? stemp1 : "");
snprintf_P(XdrvMailbox.data, XdrvMailbox.data_len, PSTR("%d"), nvalue);
found = 1;
}
break;
@ -187,7 +187,7 @@ boolean DomoticzMqttData(char *topicBuf, uint16_t stopicBuf, char *dataBuf, uint
return 1;
}
snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_DOMOTICZ D_RECEIVED_TOPIC " %s, " D_DATA " %s"), topicBuf, dataBuf);
snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_DOMOTICZ D_RECEIVED_TOPIC " %s, " D_DATA " %s"), XdrvMailbox.topic, XdrvMailbox.data);
AddLog(LOG_LEVEL_DEBUG_MORE);
domoticz_update_flag = 0;
@ -199,42 +199,42 @@ boolean DomoticzMqttData(char *topicBuf, uint16_t stopicBuf, char *dataBuf, uint
* Commands
\*********************************************************************************************/
boolean DomoticzCommand(const char *type, uint16_t index, char *dataBuf, uint16_t data_len, int16_t payload)
boolean DomoticzCommand()
{
char command [CMDSZ];
boolean serviced = true;
uint8_t dmtcz_len = strlen(D_CMND_DOMOTICZ); // Prep for string length change
if (!strncasecmp_P(type, PSTR(D_CMND_DOMOTICZ), dmtcz_len)) { // Prefix
int command_code = GetCommandCode(command, sizeof(command), type +dmtcz_len, kDomoticzCommands);
if ((CMND_IDX == command_code) && (index > 0) && (index <= MAX_DOMOTICZ_IDX)) {
if (payload >= 0) {
Settings.domoticz_relay_idx[index -1] = payload;
if (!strncasecmp_P(XdrvMailbox.topic, PSTR(D_CMND_DOMOTICZ), dmtcz_len)) { // Prefix
int command_code = GetCommandCode(command, sizeof(command), XdrvMailbox.topic +dmtcz_len, kDomoticzCommands);
if ((CMND_IDX == command_code) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= MAX_DOMOTICZ_IDX)) {
if (XdrvMailbox.payload >= 0) {
Settings.domoticz_relay_idx[XdrvMailbox.index -1] = XdrvMailbox.payload;
restart_flag = 2;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_DOMOTICZ_COMMAND_INDEX_NVALUE, command, index, Settings.domoticz_relay_idx[index -1]);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_DOMOTICZ_COMMAND_INDEX_NVALUE, command, XdrvMailbox.index, Settings.domoticz_relay_idx[XdrvMailbox.index -1]);
}
else if ((CMND_KEYIDX == command_code) && (index > 0) && (index <= MAX_DOMOTICZ_IDX)) {
if (payload >= 0) {
Settings.domoticz_key_idx[index -1] = payload;
else if ((CMND_KEYIDX == command_code) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= MAX_DOMOTICZ_IDX)) {
if (XdrvMailbox.payload >= 0) {
Settings.domoticz_key_idx[XdrvMailbox.index -1] = XdrvMailbox.payload;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_DOMOTICZ_COMMAND_INDEX_NVALUE, command, index, Settings.domoticz_key_idx[index -1]);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_DOMOTICZ_COMMAND_INDEX_NVALUE, command, XdrvMailbox.index, Settings.domoticz_key_idx[XdrvMailbox.index -1]);
}
else if ((CMND_SWITCHIDX == command_code) && (index > 0) && (index <= MAX_DOMOTICZ_IDX)) {
if (payload >= 0) {
Settings.domoticz_switch_idx[index -1] = payload;
else if ((CMND_SWITCHIDX == command_code) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= MAX_DOMOTICZ_IDX)) {
if (XdrvMailbox.payload >= 0) {
Settings.domoticz_switch_idx[XdrvMailbox.index -1] = XdrvMailbox.payload;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_DOMOTICZ_COMMAND_INDEX_NVALUE, command, index, Settings.domoticz_key_idx[index -1]);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_DOMOTICZ_COMMAND_INDEX_NVALUE, command, XdrvMailbox.index, Settings.domoticz_key_idx[XdrvMailbox.index -1]);
}
else if ((CMND_SENSORIDX == command_code) && (index > 0) && (index <= DZ_MAX_SENSORS)) {
if (payload >= 0) {
Settings.domoticz_sensor_idx[index -1] = payload;
else if ((CMND_SENSORIDX == command_code) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= DZ_MAX_SENSORS)) {
if (XdrvMailbox.payload >= 0) {
Settings.domoticz_sensor_idx[XdrvMailbox.index -1] = XdrvMailbox.payload;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_DOMOTICZ_COMMAND_INDEX_NVALUE, command, index, Settings.domoticz_sensor_idx[index -1]);
snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_DOMOTICZ_COMMAND_INDEX_NVALUE, command, XdrvMailbox.index, Settings.domoticz_sensor_idx[XdrvMailbox.index -1]);
}
else if (CMND_UPDATETIMER == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.domoticz_update_timer = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.domoticz_update_timer = XdrvMailbox.payload;
}
snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_DOMOTICZ "%s\":%d}"), command, Settings.domoticz_update_timer);
}
@ -398,5 +398,38 @@ void DomoticzSaveSettings()
ssensor_indices, Settings.domoticz_update_timer);
AddLog(LOG_LEVEL_INFO);
}
/*********************************************************************************************\
* Interface
\*********************************************************************************************/
#define XDRV_05
boolean Xdrv05(byte function)
{
boolean result = false;
if (Settings.flag.mqtt_enabled) {
switch (function) {
case FUNC_COMMAND:
result = DomoticzCommand();
break;
case FUNC_MQTT_SUBSCRIBE:
DomoticzMqttSubscribe();
break;
case FUNC_MQTT_DATA:
result = DomoticzMqttData();
break;
case FUNC_EVERY_SECOND:
DomoticzMqttUpdate();
break;
case FUNC_SHOW_SENSOR:
// DomoticzSendSensor();
break;
}
}
return result;
}
#endif // USE_WEBSERVER
#endif // USE_DOMOTICZ

119
sonoff/xdrv_interface.ino Normal file
View File

@ -0,0 +1,119 @@
/*
xdrv_interface.ino - Driver interface support for Sonoff-Tasmota
Copyright (C) 2018 Theo Arends inspired by ESPEasy
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
void XDrvInit()
{
for (byte i = 0; i < XDRV_MAX; i++) {
xdrv_func_ptr[i] = NULL;
}
xdrv_present = 0;
#ifdef XDRV_01
xdrv_func_ptr[xdrv_present++] = &Xdrv01;
#endif
#ifdef XDRV_02
xdrv_func_ptr[xdrv_present++] = &Xdrv02;
#endif
#ifdef XDRV_03
xdrv_func_ptr[xdrv_present++] = &Xdrv03;
#endif
#ifdef XDRV_04
xdrv_func_ptr[xdrv_present++] = &Xdrv04;
#endif
#ifdef XDRV_05
xdrv_func_ptr[xdrv_present++] = &Xdrv05;
#endif
#ifdef XDRV_06
xdrv_func_ptr[xdrv_present++] = &Xdrv06;
#endif
#ifdef XDRV_07
xdrv_func_ptr[xdrv_present++] = &Xdrv07;
#endif
#ifdef XDRV_08
xdrv_func_ptr[xdrv_present++] = &Xdrv08;
#endif
#ifdef XDRV_09
xdrv_func_ptr[xdrv_present++] = &Xdrv09;
#endif
#ifdef XDRV_10
xdrv_func_ptr[xdrv_present++] = &Xdrv10;
#endif
// snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_DEBUG "Drivers %d"), xdrv_present);
// AddLog(LOG_LEVEL_DEBUG);
XdrvCall(FUNC_INIT);
}
boolean XdrvCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_len, int16_t payload)
{
// XdrvMailbox.valid = 1;
XdrvMailbox.index = index;
XdrvMailbox.data_len = data_len;
XdrvMailbox.payload = payload;
XdrvMailbox.topic = type;
XdrvMailbox.data = dataBuf;
return XdrvCall(FUNC_COMMAND);
}
void XdrvSetPower(uint8_t mpower)
{
// XdrvMailbox.valid = 1;
XdrvMailbox.index = mpower;
XdrvCall(FUNC_SET_POWER);
}
boolean XdrvMqttData(char *topicBuf, uint16_t stopicBuf, char *dataBuf, uint16_t sdataBuf)
{
XdrvMailbox.index = stopicBuf;
XdrvMailbox.data_len = sdataBuf;
XdrvMailbox.topic = topicBuf;
XdrvMailbox.data = dataBuf;
return XdrvCall(FUNC_MQTT_DATA);
}
/*********************************************************************************************\
* Function call to all xdrv
\*********************************************************************************************/
boolean XdrvCall(byte Function)
{
boolean result = false;
for (byte x = 0; x < xdrv_present; x++) {
result = xdrv_func_ptr[x](Function);
if (result) {
break;
}
}
return result;
}

115
sonoff/xdrv_wemohue.ino → sonoff/xplg_wemohue.ino Executable file → Normal file
View File

@ -1,5 +1,5 @@
/*
xdrv_wemohue.ino - wemo and hue support for Sonoff-Tasmota
xplg_wemohue.ino - wemo and hue support for Sonoff-Tasmota
Copyright (C) 2018 Heiko Krupp and Theo Arends
@ -17,19 +17,26 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifdef USE_EMULATION
/*********************************************************************************************\
* Belkin WeMo and Philips Hue bridge emulation
\*********************************************************************************************/
#ifdef USE_EMULATION
#define UDP_BUFFER_SIZE 200 // Max UDP buffer size needed for M-SEARCH message
#define UDP_MSEARCH_SEND_DELAY 1500 // Delay in ms before M-Search response is send
#define UDP_BUFFER_SIZE 200 // Max UDP buffer size needed for M-SEARCH message
#include <Ticker.h>
Ticker TickerMSearch;
boolean udp_connected = false;
char packet_buffer[UDP_BUFFER_SIZE]; // buffer to hold incoming UDP packet
IPAddress ipMulticast(239,255,255,250); // Simple Service Discovery Protocol (SSDP)
uint32_t port_multicast = 1900; // Multicast address and port
char packet_buffer[UDP_BUFFER_SIZE]; // buffer to hold incoming UDP packet
IPAddress ipMulticast(239,255,255,250); // Simple Service Discovery Protocol (SSDP)
uint32_t port_multicast = 1900; // Multicast address and port
bool udp_response_mutex = false; // M-Search response mutex to control re-entry
IPAddress udp_remote_ip; // M-Search remote IP address
uint16_t udp_remote_port; // M-Search remote port
/*********************************************************************************************\
* WeMo UPNP support routines
@ -44,8 +51,8 @@ const char WEMO_MSEARCH[] PROGMEM =
"OPT: \"http://schemas.upnp.org/upnp/1/0/\"; ns=01\r\n"
"01-NLS: b9200ebb-736d-4b93-bf03-835149d13983\r\n"
"SERVER: Unspecified, UPnP/1.0, Unspecified\r\n"
"ST: urn:Belkin:device:**\r\n"
"USN: uuid:{r2::urn:Belkin:device:**\r\n"
"ST: {r3\r\n" // type1 = urn:Belkin:device:**, type2 = upnp:rootdevice
"USN: uuid:{r2::{r3\r\n" // type1 = urn:Belkin:device:**, type2 = upnp:rootdevice
"X-User-Agent: redsonic\r\n"
"\r\n";
@ -65,23 +72,31 @@ String WemoUuid()
return String(uuid);
}
void WemoRespondToMSearch()
void WemoRespondToMSearch(int echo_type)
{
char message[TOPSZ];
if (PortUdp.beginPacket(PortUdp.remoteIP(), PortUdp.remotePort())) {
TickerMSearch.detach();
if (PortUdp.beginPacket(udp_remote_ip, udp_remote_port)) {
String response = FPSTR(WEMO_MSEARCH);
response.replace("{r1", WiFi.localIP().toString());
response.replace("{r2", WemoUuid());
if (1 == echo_type) { // type1 echo 1g & dot 2g
response.replace("{r3", F("urn:Belkin:device:**"));
} else { // type2 echo 2g (echo, plus, show)
response.replace("{r3", F("upnp:rootdevice"));
}
PortUdp.write(response.c_str());
PortUdp.endPacket();
snprintf_P(message, sizeof(message), PSTR(D_RESPONSE_SENT));
} else {
snprintf_P(message, sizeof(message), PSTR(D_FAILED_TO_SEND_RESPONSE));
}
snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_UPNP D_WEMO " %s " D_TO " %s:%d"),
message, PortUdp.remoteIP().toString().c_str(), PortUdp.remotePort());
snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_UPNP D_WEMO " " D_JSON_TYPE " %d, %s " D_TO " %s:%d"),
echo_type, message, udp_remote_ip.toString().c_str(), udp_remote_port);
AddLog(LOG_LEVEL_DEBUG);
udp_response_mutex = false;
}
/*********************************************************************************************\
@ -140,7 +155,8 @@ void HueRespondToMSearch()
{
char message[TOPSZ];
if (PortUdp.beginPacket(PortUdp.remoteIP(), PortUdp.remotePort())) {
TickerMSearch.detach();
if (PortUdp.beginPacket(udp_remote_ip, udp_remote_port)) {
String response1 = FPSTR(HUE_RESPONSE);
response1.replace("{r1", WiFi.localIP().toString());
response1.replace("{r2", HueBridgeId());
@ -168,8 +184,10 @@ void HueRespondToMSearch()
snprintf_P(message, sizeof(message), PSTR(D_FAILED_TO_SEND_RESPONSE));
}
snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_UPNP D_HUE " %s " D_TO " %s:%d"),
message, PortUdp.remoteIP().toString().c_str(), PortUdp.remotePort());
message, udp_remote_ip.toString().c_str(), udp_remote_port);
AddLog(LOG_LEVEL_DEBUG);
udp_response_mutex = false;
}
/*********************************************************************************************\
@ -191,6 +209,7 @@ boolean UdpConnect()
if (!udp_connected) {
if (PortUdp.beginMulticast(WiFi.localIP(), ipMulticast, port_multicast)) {
AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_UPNP D_MULTICAST_REJOINED));
udp_response_mutex = false;
udp_connected = true;
} else {
AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_UPNP D_MULTICAST_JOIN_FAILED));
@ -202,7 +221,7 @@ boolean UdpConnect()
void PollUdp()
{
if (udp_connected) {
if (udp_connected && !udp_response_mutex) {
if (PortUdp.parsePacket()) {
int len = PortUdp.read(packet_buffer, UDP_BUFFER_SIZE -1);
if (len > 0) {
@ -220,19 +239,27 @@ 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) ||
(request.indexOf(F("upnp:rootdevice")) > 0) || // Needed by 2nd generation Echo
(request.indexOf(F("ssdpsearch:all")) > 0) ||
(request.indexOf(F("ssdp:all")) > 0))) {
WemoRespondToMSearch();
udp_remote_ip = PortUdp.remoteIP();
udp_remote_port = PortUdp.remotePort();
if (EMUL_WEMO == Settings.flag2.emulation) {
if (request.indexOf(F("urn:belkin:device:**")) > 0) { // type1 echo dot 2g, echo 1g's
udp_response_mutex = true;
TickerMSearch.attach_ms(UDP_MSEARCH_SEND_DELAY, WemoRespondToMSearch, 1);
}
else if ((request.indexOf(F("upnp:rootdevice")) > 0) || // type2 Echo 2g (echo & echo plus)
(request.indexOf(F("ssdpsearch:all")) > 0) ||
(request.indexOf(F("ssdp:all")) > 0)) {
udp_response_mutex = true;
TickerMSearch.attach_ms(UDP_MSEARCH_SEND_DELAY, WemoRespondToMSearch, 2);
}
}
else if ((EMUL_HUE == Settings.flag2.emulation) &&
((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();
udp_response_mutex = true;
TickerMSearch.attach_ms(UDP_MSEARCH_SEND_DELAY, HueRespondToMSearch);
}
}
}
@ -282,11 +309,35 @@ const char WEMO_EVENTSERVICE_XML[] PROGMEM =
"<defaultValue>0</defaultValue>"
"</stateVariable>"
"</serviceStateTable>"
"</scpd>\r\n"
"\r\n";
"</scpd>\r\n\r\n";
const char WEMO_METASERVICE_XML[] PROGMEM =
"<scpd xmlns=\"urn:Belkin:service-1-0\">"
"<specVersion>"
"<major>1</major>"
"<minor>0</minor>"
"</specVersion>"
"<actionList>"
"<action>"
"<name>GetMetaInfo</name>"
"<argumentList>"
"<retval />"
"<name>GetMetaInfo</name>"
"<relatedStateVariable>MetaInfo</relatedStateVariable>"
"<direction>in</direction>"
"</argumentList>"
"</action>"
"</actionList>"
"<serviceStateTable>"
"<stateVariable sendEvents=\"yes\">"
"<name>MetaInfo</name>"
"<dataType>string</dataType>"
"<defaultValue>0</defaultValue>"
"</stateVariable>"
"</serviceStateTable>"
"</scpd>\r\n\r\n";
const char WEMO_RESPONSE_STATE_SOAP[] PROGMEM =
// Reloxx13 from #1357
"<s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\">"
"<s:Body>"
"<u:SetBinaryStateResponse xmlns:u=\"urn:Belkin:service:basicevent:1\">"
@ -315,6 +366,13 @@ const char WEMO_SETUP_XML[] PROGMEM =
"<eventSubURL>/upnp/event/basicevent1</eventSubURL>"
"<SCPDURL>/eventservice.xml</SCPDURL>"
"</service>"
"<service>"
"<serviceType>urn:Belkin:service:metainfo:1</serviceType>"
"<serviceId>urn:Belkin:serviceId:metainfo1</serviceId>"
"<controlURL>/upnp/control/metainfo1</controlURL>"
"<eventSubURL>/upnp/event/metainfo1</eventSubURL>"
"<SCPDURL>/metainfoservice.xml</SCPDURL>"
"</service>"
"</serviceList>"
"</device>"
"</root>\r\n";
@ -350,6 +408,13 @@ void HandleUpnpService()
WebServer->send(200, FPSTR(HDR_CTYPE_PLAIN), FPSTR(WEMO_EVENTSERVICE_XML));
}
void HandleUpnpMetaService()
{
AddLog_P(LOG_LEVEL_DEBUG, S_LOG_HTTP, PSTR(D_WEMO_META_SERVICE));
WebServer->send(200, FPSTR(HDR_CTYPE_PLAIN), FPSTR(WEMO_METASERVICE_XML));
}
void HandleUpnpSetupWemo()
{
AddLog_P(LOG_LEVEL_DEBUG, S_LOG_HTTP, PSTR(D_WEMO_SETUP));

View File

@ -1,5 +1,5 @@
/*
xdrv_ws2812.ino - ws2812 led string support for Sonoff-Tasmota
xplg_ws2812.ino - ws2812 led string support for Sonoff-Tasmota
Copyright (C) 2018 Heiko Krupp and Theo Arends

View File

@ -500,7 +500,7 @@ boolean EnergyMargin(byte type, uint16_t margin, uint16_t value, byte &flag, byt
return (change != save_flag);
}
void EnergySetPowerSteadyCounter(byte value)
void EnergySetPowerSteadyCounter()
{
energy_power_steady_cntr = 2;
}
@ -638,7 +638,7 @@ void EnergyMqttShow()
* Commands
\*********************************************************************************************/
boolean EnergyCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_len, int16_t payload)
boolean EnergyCommand()
{
char command [CMDSZ];
char sunit[CMDSZ];
@ -647,54 +647,54 @@ boolean EnergyCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
uint8_t unit = 0;
unsigned long nvalue = 0;
int command_code = GetCommandCode(command, sizeof(command), type, kEnergyCommands);
int command_code = GetCommandCode(command, sizeof(command), XdrvMailbox.topic, kEnergyCommands);
if (CMND_POWERLOW == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.energy_min_power = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.energy_min_power = XdrvMailbox.payload;
}
nvalue = Settings.energy_min_power;
unit = UNIT_WATT;
}
else if (CMND_POWERHIGH == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.energy_max_power = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.energy_max_power = XdrvMailbox.payload;
}
nvalue = Settings.energy_max_power;
unit = UNIT_WATT;
}
else if (CMND_VOLTAGELOW == command_code) {
if ((payload >= 0) && (payload < 501)) {
Settings.energy_min_voltage = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 501)) {
Settings.energy_min_voltage = XdrvMailbox.payload;
}
nvalue = Settings.energy_min_voltage;
unit = UNIT_VOLT;
}
else if (CMND_VOLTAGEHIGH == command_code) {
if ((payload >= 0) && (payload < 501)) {
Settings.energy_max_voltage = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 501)) {
Settings.energy_max_voltage = XdrvMailbox.payload;
}
nvalue = Settings.energy_max_voltage;
unit = UNIT_VOLT;
}
else if (CMND_CURRENTLOW == command_code) {
if ((payload >= 0) && (payload < 16001)) {
Settings.energy_min_current = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 16001)) {
Settings.energy_min_current = XdrvMailbox.payload;
}
nvalue = Settings.energy_min_current;
unit = UNIT_MILLIAMPERE;
}
else if (CMND_CURRENTHIGH == command_code) {
if ((payload >= 0) && (payload < 16001)) {
Settings.energy_max_current = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 16001)) {
Settings.energy_max_current = XdrvMailbox.payload;
}
nvalue = Settings.energy_max_current;
unit = UNIT_MILLIAMPERE;
}
else if ((CMND_ENERGYRESET == command_code) && (index > 0) && (index <= 3)) {
else if ((CMND_ENERGYRESET == command_code) && (XdrvMailbox.index > 0) && (XdrvMailbox.index <= 3)) {
char *p;
unsigned long lnum = strtoul(dataBuf, &p, 10);
if (p != dataBuf) {
switch (index) {
unsigned long lnum = strtoul(XdrvMailbox.data, &p, 10);
if (p != XdrvMailbox.data) {
switch (XdrvMailbox.index) {
case 1:
energy_kWhtoday = lnum *100000;
RtcSettings.energy_kWhtoday = energy_kWhtoday;
@ -720,45 +720,45 @@ boolean EnergyCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
status_flag = 1;
}
else if ((ENERGY_HLW8012 == energy_flg) && (CMND_HLWPCAL == command_code)) {
if ((payload > 0) && (payload < 32001)) {
Settings.hlw_power_calibration = (payload > 4000) ? payload : HLW_PREF_PULSE; // 12530
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload < 32001)) {
Settings.hlw_power_calibration = (XdrvMailbox.payload > 4000) ? XdrvMailbox.payload : HLW_PREF_PULSE; // 12530
}
nvalue = Settings.hlw_power_calibration;
unit = UNIT_MICROSECOND;
}
else if ((ENERGY_HLW8012 == energy_flg) && (CMND_HLWPSET == command_code)) {
if ((payload > 0) && (payload < 3601) && hlw_cf_pulse_length) {
Settings.hlw_power_calibration = (payload * 10 * hlw_cf_pulse_length) / HLW_PREF;
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload < 3601) && hlw_cf_pulse_length) {
Settings.hlw_power_calibration = (XdrvMailbox.payload * 10 * hlw_cf_pulse_length) / HLW_PREF;
}
snprintf_P(command, sizeof(command), PSTR(D_CMND_HLWPCAL));
nvalue = Settings.hlw_power_calibration;
unit = UNIT_MICROSECOND;
}
else if ((ENERGY_HLW8012 == energy_flg) && (CMND_HLWUCAL == command_code)) {
if ((payload > 0) && (payload < 32001)) {
Settings.hlw_voltage_calibration = (payload > 999) ? payload : HLW_UREF_PULSE; // 1950
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload < 32001)) {
Settings.hlw_voltage_calibration = (XdrvMailbox.payload > 999) ? XdrvMailbox.payload : HLW_UREF_PULSE; // 1950
}
nvalue = Settings.hlw_voltage_calibration;
unit = UNIT_MICROSECOND;
}
else if ((ENERGY_HLW8012 == energy_flg) && (CMND_HLWUSET == command_code)) {
if ((payload > 0) && (payload < 501) && hlw_cf1_voltage_pulse_length) {
Settings.hlw_voltage_calibration = (payload * 10 * hlw_cf1_voltage_pulse_length) / HLW_UREF;
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload < 501) && hlw_cf1_voltage_pulse_length) {
Settings.hlw_voltage_calibration = (XdrvMailbox.payload * 10 * hlw_cf1_voltage_pulse_length) / HLW_UREF;
}
snprintf_P(command, sizeof(command), PSTR(D_CMND_HLWUCAL));
nvalue = Settings.hlw_voltage_calibration;
unit = UNIT_MICROSECOND;
}
else if ((ENERGY_HLW8012 == energy_flg) && (CMND_HLWICAL == command_code)) {
if ((payload > 0) && (payload < 32001)) {
Settings.hlw_current_calibration = (payload > 1100) ? payload : HLW_IREF_PULSE; // 3500
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload < 32001)) {
Settings.hlw_current_calibration = (XdrvMailbox.payload > 1100) ? XdrvMailbox.payload : HLW_IREF_PULSE; // 3500
}
nvalue = Settings.hlw_current_calibration;
unit = UNIT_MICROSECOND;
}
else if ((ENERGY_HLW8012 == energy_flg) && (CMND_HLWISET == command_code)) {
if ((payload > 0) && (payload < 16001) && hlw_cf1_current_pulse_length) {
Settings.hlw_current_calibration = (payload * hlw_cf1_current_pulse_length) / HLW_IREF;
if ((XdrvMailbox.payload > 0) && (XdrvMailbox.payload < 16001) && hlw_cf1_current_pulse_length) {
Settings.hlw_current_calibration = (XdrvMailbox.payload * hlw_cf1_current_pulse_length) / HLW_IREF;
}
snprintf_P(command, sizeof(command), PSTR(D_CMND_HLWICAL));
nvalue = Settings.hlw_current_calibration;
@ -766,58 +766,58 @@ boolean EnergyCommand(char *type, uint16_t index, char *dataBuf, uint16_t data_l
}
#if FEATURE_POWER_LIMIT
else if (CMND_MAXPOWER == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.energy_max_power_limit = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.energy_max_power_limit = XdrvMailbox.payload;
}
nvalue = Settings.energy_max_power_limit;
unit = UNIT_WATT;
}
else if (CMND_MAXPOWERHOLD == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.energy_max_power_limit_hold = (1 == payload) ? MAX_POWER_HOLD : payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.energy_max_power_limit_hold = (1 == XdrvMailbox.payload) ? MAX_POWER_HOLD : XdrvMailbox.payload;
}
nvalue = Settings.energy_max_power_limit_hold;
unit = UNIT_SECOND;
}
else if (CMND_MAXPOWERWINDOW == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.energy_max_power_limit_window = (1 == payload) ? MAX_POWER_WINDOW : payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.energy_max_power_limit_window = (1 == XdrvMailbox.payload) ? MAX_POWER_WINDOW : XdrvMailbox.payload;
}
nvalue = Settings.energy_max_power_limit_window;
unit = UNIT_SECOND;
}
else if (CMND_SAFEPOWER == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.energy_max_power_safe_limit = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.energy_max_power_safe_limit = XdrvMailbox.payload;
}
nvalue = Settings.energy_max_power_safe_limit;
unit = UNIT_WATT;
}
else if (CMND_SAFEPOWERHOLD == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.energy_max_power_safe_limit_hold = (1 == payload) ? SAFE_POWER_HOLD : payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.energy_max_power_safe_limit_hold = (1 == XdrvMailbox.payload) ? SAFE_POWER_HOLD : XdrvMailbox.payload;
}
nvalue = Settings.energy_max_power_safe_limit_hold;
unit = UNIT_SECOND;
}
else if (CMND_SAFEPOWERWINDOW == command_code) {
if ((payload >= 0) && (payload < 1440)) {
Settings.energy_max_power_safe_limit_window = (1 == payload) ? SAFE_POWER_WINDOW : payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 1440)) {
Settings.energy_max_power_safe_limit_window = (1 == XdrvMailbox.payload) ? SAFE_POWER_WINDOW : XdrvMailbox.payload;
}
nvalue = Settings.energy_max_power_safe_limit_window;
unit = UNIT_MINUTE;
}
else if (CMND_MAXENERGY == command_code) {
if ((payload >= 0) && (payload < 3601)) {
Settings.energy_max_energy = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 3601)) {
Settings.energy_max_energy = XdrvMailbox.payload;
energy_max_energy_state = 3;
}
nvalue = Settings.energy_max_energy;
unit = UNIT_WATTHOUR;
}
else if (CMND_MAXENERGYSTART == command_code) {
if ((payload >= 0) && (payload < 24)) {
Settings.energy_max_energy_start = payload;
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload < 24)) {
Settings.energy_max_energy_start = XdrvMailbox.payload;
}
nvalue = Settings.energy_max_energy_start;
unit = UNIT_HOUR;
@ -925,6 +925,25 @@ void EnergyShow(boolean json)
* Interface
\*********************************************************************************************/
#define XDRV_03
boolean Xdrv03(byte function)
{
boolean result = false;
if (energy_flg) {
switch (function) {
case FUNC_COMMAND:
result = EnergyCommand();
break;
case FUNC_SET_POWER:
EnergySetPowerSteadyCounter();
break;
}
}
return result;
}
#define XSNS_03
boolean Xsns03(byte function)

View File

@ -118,23 +118,9 @@ boolean XsnsCall(byte Function)
{
boolean result = false;
/*
switch (Function) {
case FUNC_INIT:
case FUNC_EVERY_50_MSECOND:
case FUNC_EVERY_SECOND:
case FUNC_PREP_BEFORE_TELEPERIOD:
case FUNC_JSON_APPEND:
case FUNC_WEB_APPEND:
case FUNC_SAVE_BEFORE_RESTART:
*/
for (byte x = 0; x < xsns_present; x++) {
xsns_func_ptr[x](Function);
}
/*
break;
for (byte x = 0; x < xsns_present; x++) {
xsns_func_ptr[x](Function);
}
*/
return result;
}