diff --git a/lib/default/Unishox-1.0-shadinger/src/UnishoxStrings.cpp b/lib/default/Unishox-1.0-shadinger/src/UnishoxStrings.cpp new file mode 100644 index 000000000..223399e2f --- /dev/null +++ b/lib/default/Unishox-1.0-shadinger/src/UnishoxStrings.cpp @@ -0,0 +1,36 @@ +/* + UnishoxStrings.c - support library for compressed strings in Flash + + Copyright (C) 2020 Theo Arends and Stephan Hadinger + + 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 . +*/ + +#include "UnishoxStrings.h" +#include + +extern int32_t DecompressNoAlloc(const char * compressed, size_t uncompressed_size, String & content); + +// +// If first byte is NULL, then the string is compressed +// +UnishoxStrings::UnishoxStrings(const char *k_msg) { + if (pgm_read_byte(k_msg) == 0) { + size_t len = pgm_read_byte(k_msg + 1) * 16; + DecompressNoAlloc(k_msg + 2, len, _decompressed); + _msg = _decompressed.c_str(); + } else { + _msg = k_msg; + } +} diff --git a/lib/default/Unishox-1.0-shadinger/src/UnishoxStrings.h b/lib/default/Unishox-1.0-shadinger/src/UnishoxStrings.h new file mode 100644 index 000000000..12de778d4 --- /dev/null +++ b/lib/default/Unishox-1.0-shadinger/src/UnishoxStrings.h @@ -0,0 +1,98 @@ +/* + UnishoxStrings.c - support library for compressed strings in Flash + + Copyright (C) 2020 Theo Arends and Stephan Hadinger + + 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 . +*/ + +#ifndef __UNISHOX_STRINGS__ +#define __UNISHOX_STRINGS__ + +#include +#include +#include "WString.h" + + +/*******************************************************************************************/ +/* + * UnishoxStrings compressed literal strings + * + * To be typically used for web UI to have multiple strings like JS, CSS, HTML + * compressed in a single list of small strings. This is where Unishox shines. + * + * Strings before compression are separated with NULL chars, which makes them ready to use + * once you know the offset in the global array. + * + * The list of string is marked by an empty stings, i.e. two consecutive NULL chars + * + * To distinguish from uncompressed templates, and to indicate the global size + * the compressed array is prefixed with NULL and the uncompressed size * 16 bytes. + * + * Compressed format: + * - Byte 00 : \00 - if non-null, then it is not compressed + * - Byte 01 : - uncompressed size is * 16 bytes (always rounded up) + * - Byte [] : compressed data (does not contain NULL) + * - Byte n : \00 - final NULL + * +/*******************************************************************************************/ + + +/*******************************************************************************************/ +/* + * This class is initialzed with either a PMEM uncompressed list of strings + * or a PMEM unishox-compressed list of strings; in this case RAM is allocated + * to hold the uncompressed data, until the class gets out of scope. + * + * To encode, use https://tasmota.hadinger.fr/util + * and use the "Compress strings template with unishox" + * past the C code for the strings, and copy/paste the result + * (don't foget to rename the variable). + * + * Input: + * Each string must be terminated with an explicit NULL char "\0". The list is hence + * terminated with a double-NULL. + * + * Each string is then indexed as its byte offset in the whole template. + * The offsets are computed at the same time as the compressed version. + * You need to use the online compressor even if you don't use the comrpessed version. + * + * Indexes are marked as C++ comments starting with "//=" + * + * Example input: + * con + * // start of strings + * //=STRING_1 + * "This is string 1" + * "\0" + * //=STRING_2 + * "This is string 2" + * "continued here" + * "\0" + * ; + * +/*******************************************************************************************/ + +class UnishoxStrings { +public: + UnishoxStrings(const char *k_msg); + + inline const char * operator[](uint16_t i) const { return _msg + i; } + + const char * _msg = nullptr; + String _decompressed; +}; + + +#endif // __UNISHOX_STRINGS__ \ No newline at end of file diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h index ad6fc6c04..b5a2e80b2 100644 --- a/tasmota/language/bg_BG.h +++ b/tasmota/language/bg_BG.h @@ -460,6 +460,31 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" // xdrv_03_energy.ino #define D_ENERGY_TODAY "Използвана енергия днес" #define D_ENERGY_YESTERDAY "Използвана енергия вчера" diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h index 8b9ce3f26..86d6ea8a2 100644 --- a/tasmota/language/cs_CZ.h +++ b/tasmota/language/cs_CZ.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Spotřeba Dnes" #define D_ENERGY_YESTERDAY "Spotřeba Včera" diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h index bc3e948bf..fb8c9068c 100644 --- a/tasmota/language/de_DE.h +++ b/tasmota/language/de_DE.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energie heute" #define D_ENERGY_YESTERDAY "Energie gestern" diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h index 760dd4d20..6d069fab4 100644 --- a/tasmota/language/el_GR.h +++ b/tasmota/language/el_GR.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Ενέργεια σήμερα" #define D_ENERGY_YESTERDAY "Ενέργεια χθες" diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h index 92879c024..ea657251f 100644 --- a/tasmota/language/en_GB.h +++ b/tasmota/language/en_GB.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energy Today" #define D_ENERGY_YESTERDAY "Energy Yesterday" diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h index 1e8ffed22..162803eda 100644 --- a/tasmota/language/es_ES.h +++ b/tasmota/language/es_ES.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX ESCENA TX" #define D_KNX_RX_SCENE "KNX ESCENA RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energía Hoy" #define D_ENERGY_YESTERDAY "Energía Ayer" diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index 8133ef1f9..9e6ef3dfa 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -456,6 +456,32 @@ #define D_KNX_TX_SCENE "KNX Scène TX" #define D_KNX_RX_SCENE "KNX Scène RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xsns_03_energy.ino #define D_ENERGY_TODAY "Énergie aujourd'hui" #define D_ENERGY_YESTERDAY "Énergie hier" diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h index 04a4cb63d..003d553e2 100644 --- a/tasmota/language/he_HE.h +++ b/tasmota/language/he_HE.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "צריכה יומית" #define D_ENERGY_YESTERDAY "צריכה בעבר" diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h index deea51f5c..f4c40c182 100644 --- a/tasmota/language/hu_HU.h +++ b/tasmota/language/hu_HU.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Mai energia" #define D_ENERGY_YESTERDAY "Tegnapi energia" diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 95f03c339..07fa5342a 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "Scena - TX" #define D_KNX_RX_SCENE "Scena - RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energia - oggi" #define D_ENERGY_YESTERDAY "Energia - ieri" diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h index 10a25cdfc..2b4a62989 100644 --- a/tasmota/language/ko_KO.h +++ b/tasmota/language/ko_KO.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "금일 전력 사용량" #define D_ENERGY_YESTERDAY "어제 전력 사용량" diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h index ba8a3498b..cfe550e3d 100644 --- a/tasmota/language/nl_NL.h +++ b/tasmota/language/nl_NL.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Verbruik vandaag" #define D_ENERGY_YESTERDAY "Verbruik gisteren" diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index fe11f8d3d..2c4c96549 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energia dzisiaj" #define D_ENERGY_YESTERDAY "Energia wczoraj" diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h index 22ef232ce..5427e5a93 100644 --- a/tasmota/language/pt_BR.h +++ b/tasmota/language/pt_BR.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Consumo energético de hoje" #define D_ENERGY_YESTERDAY "Consumo energético de ontem" diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h index f72072461..4e036a3ef 100644 --- a/tasmota/language/pt_PT.h +++ b/tasmota/language/pt_PT.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Consumo energético de hoje" #define D_ENERGY_YESTERDAY "Consumo energético de ontem" diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h index 335853c3e..64cd876bd 100644 --- a/tasmota/language/ro_RO.h +++ b/tasmota/language/ro_RO.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energia de Azi" #define D_ENERGY_YESTERDAY "Energia de Ieri" diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h index 017ab3c02..eba040d20 100644 --- a/tasmota/language/ru_RU.h +++ b/tasmota/language/ru_RU.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Энергия Сегодня" #define D_ENERGY_YESTERDAY "Энергия Вчера" diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h index 9914326e8..33b63795a 100644 --- a/tasmota/language/sk_SK.h +++ b/tasmota/language/sk_SK.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Spotreba dnes" #define D_ENERGY_YESTERDAY "Spotreba včera" diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h index 14b1e615c..a30bbf9ec 100644 --- a/tasmota/language/sv_SE.h +++ b/tasmota/language/sv_SE.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energi idag" #define D_ENERGY_YESTERDAY "Energi igår" diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h index 84d45c7bf..44f1ad715 100644 --- a/tasmota/language/tr_TR.h +++ b/tasmota/language/tr_TR.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Energy Today" #define D_ENERGY_YESTERDAY "Energy Yesterday" diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h index e45043689..78ceca919 100644 --- a/tasmota/language/uk_UA.h +++ b/tasmota/language/uk_UA.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Енергія Сьогодні" #define D_ENERGY_YESTERDAY "Енергія Вчора" diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h index c8386cfd6..d31207bca 100644 --- a/tasmota/language/vi_VN.h +++ b/tasmota/language/vi_VN.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "Năng lượng tiêu thụ hôm nay" #define D_ENERGY_YESTERDAY "Năng lượng tiêu thụ hôm qua" diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h index 25b5c807c..f06f21ea8 100644 --- a/tasmota/language/zh_CN.h +++ b/tasmota/language/zh_CN.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "今日用电量" #define D_ENERGY_YESTERDAY "昨日用电量" diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h index 13c199320..d759dd63e 100644 --- a/tasmota/language/zh_TW.h +++ b/tasmota/language/zh_TW.h @@ -460,6 +460,32 @@ #define D_KNX_TX_SCENE "KNX SCENE TX" #define D_KNX_RX_SCENE "KNX SCENE RX" +// xdrv_23_zigbee +#define D_ZIGBEE_PERMITJOIN_ACTIVE "Devices allowed to join" +#define D_ZIGBEE_MAPPING_TITLE "Tasmota Zigbee Mapping" +#define D_ZIGBEE_NOT_STARTED "Zigbee not started" +#define D_ZIGBEE_MAPPING_IN_PROGRESS_SEC "Mapping in progress (%d s. remaining)" +#define D_ZIGBEE_MAPPING_NOT_PRESENT "No mapping" +#define D_ZIGBEE_MAP_REFRESH "Zigbee Map Refresh" +#define D_ZIGBEE_MAP "Zigbee Map" +#define D_ZIGBEE_PERMITJOIN "Zigbee Permit Join" +#define D_ZIGBEE_GENERATE_KEY "generating random Zigbee network key" +#define D_ZIGBEE_UNKNOWN_DEVICE "Unknown device" +#define D_ZIGBEE_UNKNOWN_ATTRIBUTE "Unknown attribute" +#define D_ZIGBEE_INVALID_PARAM "Invalid parameter" +#define D_ZIGBEE_MISSING_PARAM "Missing parameters" +#define D_ZIGBEE_UNKNWON_ATTRIBUTE "Unknown attribute name (ignored): %s" +#define D_ZIGBEE_TOO_MANY_CLUSTERS "No more than one cluster id per command" +#define D_ZIGBEE_WRONG_DELIMITER "Wrong delimiter for payload" +#define D_ZIGBEE_UNRECOGNIZED_COMMAND "Unrecognized zigbee command: %s" +#define D_ZIGBEE_TOO_MANY_COMMANDS "Only 1 command allowed (%d)" +#define D_ZIGBEE_NO_ATTRIBUTE "No attribute in list" +#define D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE "Unsupported attribute type" +#define D_ZIGBEE_JSON_REQUIRED "Config requires JSON objects" +#define D_ZIGBEE_RESET_1_OR_2 "1 or 2 to reset" +#define D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS "ZBBridge EEPROM found at address" +#define D_ZIGBEE_RANDOMIZING_ZBCONFIG "Randomizing Zigbee parameters, please check with 'ZbConfig'" + // xdrv_03_energy.ino #define D_ENERGY_TODAY "今日用電量" #define D_ENERGY_YESTERDAY "昨日用電量" diff --git a/tasmota/support.ino b/tasmota/support.ino index 54f7f11c8..b54a15f28 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -2109,9 +2109,8 @@ void AddLogBufferSize(uint32_t loglevel, uint8_t *buffer, uint32_t count, uint32 Unishox compressor; -String Decompress(const char * compressed, size_t uncompressed_size) { - String content(""); - +// New variant where you provide the String object yourself +int32_t DecompressNoAlloc(const char * compressed, size_t uncompressed_size, String & content) { uncompressed_size += 2; // take a security margin // We use a nasty trick here. To avoid allocating twice the buffer, @@ -2126,6 +2125,12 @@ String Decompress(const char * compressed, size_t uncompressed_size) { buffer[len] = 0; // terminate string with NULL content = buffer; // copy in place } + return len; +} + +String Decompress(const char * compressed, size_t uncompressed_size) { + String content(""); + DecompressNoAlloc(compressed, uncompressed_size, content); return content; } diff --git a/tasmota/xdrv_23_zigbee_A_impl.ino b/tasmota/xdrv_23_zigbee_A_impl.ino index 9e35decee..df7b61b8f 100644 --- a/tasmota/xdrv_23_zigbee_A_impl.ino +++ b/tasmota/xdrv_23_zigbee_A_impl.ino @@ -21,6 +21,8 @@ #define XDRV_23 23 +#include "UnishoxStrings.h" + const char kZbCommands[] PROGMEM = D_PRFX_ZB "|" // prefix #ifdef USE_ZIGBEE_ZNP D_CMND_ZIGBEEZNPSEND "|" D_CMND_ZIGBEEZNPRECEIVE "|" @@ -65,7 +67,7 @@ void ZigbeeInit(void) // Check if settings in Flash are set if (PinUsed(GPIO_ZIGBEE_RX) && PinUsed(GPIO_ZIGBEE_TX)) { if (0 == Settings.zb_channel) { - AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "Randomizing Zigbee parameters, please check with 'ZbConfig'")); + AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_ZIGBEE_RANDOMIZING_ZBCONFIG)); uint64_t mac64 = 0; // stuff mac address into 64 bits WiFi.macAddress((uint8_t*) &mac64); uint32_t esp_id = ESP_getChipId(); @@ -101,7 +103,7 @@ void ZigbeeInit(void) Wire.beginTransmission(USE_ZIGBEE_ZBBRIDGE_EEPROM); uint8_t error = Wire.endTransmission(); if (0 == error) { - AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "ZBBridge EEPROM found at address 0x%02X"), USE_ZIGBEE_ZBBRIDGE_EEPROM); + AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_ZIGBEE_EEPROM_FOUND_AT_ADDRESS " 0x%02X"), USE_ZIGBEE_ZBBRIDGE_EEPROM); zigbee.eeprom_present = true; } #endif @@ -149,7 +151,7 @@ void CmndZbReset(void) { #endif // USE_ZIGBEE_EZSP break; default: - ResponseCmndChar_P(PSTR("1 or 2 to reset")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_RESET_1_OR_2)); } } } @@ -315,7 +317,7 @@ bool ZbAppendWriteBuf(SBuffer & buf, const Z_attribute & attr, bool prepend_stat if (res < 0) { // remove the attribute type we just added // buf.setLen(buf.len() - (operation == ZCL_READ_ATTRIBUTES_RESPONSE ? 4 : 3)); - AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "Unsupported attribute type %04X/%04X '0x%02X'"), attr.key.id.cluster, attr.key.id.attr_id, attr.attr_type); + AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE " %04X/%04X '0x%02X'"), attr.key.id.cluster, attr.key.id.attr_id, attr.attr_type); return false; } return true; @@ -347,17 +349,17 @@ void ZbSendReportWrite(class JsonParserToken val_pubwrite, class ZigbeeZCLSendMe if (0xFFFF == packet.cluster) { packet.cluster = attr.key.id.cluster; // set the cluster for this packet } else if (packet.cluster != attr.key.id.cluster) { - ResponseCmndChar_P(PSTR("No more than one cluster id per command")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_TOO_MANY_CLUSTERS)); return; } } else { if (attr.key_is_str) { - Response_P(PSTR("{\"%s\":\"%s'%s'\"}"), XdrvMailbox.command, PSTR("Unknown attribute "), key); + Response_P(PSTR("{\"%s\":\"%s'%s'\"}"), XdrvMailbox.command, PSTR(D_ZIGBEE_UNKNOWN_ATTRIBUTE " "), key); return; } if (Zunk == attr.attr_type) { - Response_P(PSTR("{\"%s\":\"%s'%s'\"}"), XdrvMailbox.command, PSTR("Unknown attribute type for attribute "), key); + Response_P(PSTR("{\"%s\":\"%s'%s'\"}"), XdrvMailbox.command, PSTR(D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE " "), key); return; } } @@ -393,7 +395,7 @@ void ZbSendReportWrite(class JsonParserToken val_pubwrite, class ZigbeeZCLSendMe // //////////////////////////////////////////////////////////////////////////////// // ZCL_CONFIGURE_REPORTING if (!value.isObject()) { - ResponseCmndChar_P(PSTR("Config requires JSON objects")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_JSON_REQUIRED)); return; } JsonParserObject attr_config = value.getObject(); @@ -432,7 +434,7 @@ void ZbSendReportWrite(class JsonParserToken val_pubwrite, class ZigbeeZCLSendMe if (!attr_discrete) { int32_t res = encodeSingleAttribute(buf, val_d, val_str, attr.attr_type); if (res < 0) { - Response_P(PSTR("{\"%s\":\"%s'%s' 0x%02X\"}"), XdrvMailbox.command, PSTR("Unsupported attribute type "), key, attr.attr_type); + Response_P(PSTR("{\"%s\":\"%s'%s' 0x%02X\"}"), XdrvMailbox.command, PSTR(D_ZIGBEE_UNSUPPORTED_ATTRIBUTE_TYPE " "), key, attr.attr_type); return; } } @@ -442,7 +444,7 @@ void ZbSendReportWrite(class JsonParserToken val_pubwrite, class ZigbeeZCLSendMe // did we have any attribute? if (0 == buf.len()) { - ResponseCmndChar_P(PSTR("No attribute in list")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_NO_ATTRIBUTE)); return; } @@ -470,7 +472,7 @@ void ZbSendSend(class JsonParserToken val_cmd, uint16_t device, uint16_t groupad JsonParserObject cmd_obj = val_cmd.getObject(); int32_t cmd_size = cmd_obj.size(); if (cmd_size > 1) { - Response_P(PSTR("Only 1 command allowed (%d)"), cmd_size); + Response_P(PSTR(D_ZIGBEE_TOO_MANY_COMMANDS), cmd_size); return; } else if (1 == cmd_size) { // We have exactly 1 command, parse it @@ -484,14 +486,14 @@ void ZbSendSend(class JsonParserToken val_cmd, uint16_t device, uint16_t groupad if (tasmota_cmd) { cmd_str = tasmota_cmd; } else { - Response_P(PSTR("Unrecognized zigbee command: %s"), key.getStr()); + Response_P(PSTR(D_ZIGBEE_UNRECOGNIZED_COMMAND), key.getStr()); return; } // check cluster if (0xFFFF == cluster) { cluster = local_cluster_id; } else if (cluster != local_cluster_id) { - ResponseCmndChar_P(PSTR("No more than one cluster id per command")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_TOO_MANY_CLUSTERS)); return; } @@ -554,7 +556,7 @@ void ZbSendSend(class JsonParserToken val_cmd, uint16_t device, uint16_t groupad if (0xFFFF == cluster) { cluster = local_cluster_id; } else if (cluster != local_cluster_id) { - ResponseCmndChar_P(PSTR("No more than one cluster id per command")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_TOO_MANY_CLUSTERS)); return; } @@ -563,7 +565,7 @@ void ZbSendSend(class JsonParserToken val_cmd, uint16_t device, uint16_t groupad if ('_' == *data) { clusterSpecific = false; } data++; } else { - ResponseCmndChar_P(PSTR("Wrong delimiter for payload")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_WRONG_DELIMITER)); return; } // parse cmd number @@ -656,7 +658,7 @@ void ZbSendRead(JsonParserToken val_attr, ZigbeeZCLSendMessage & packet) { if (0xFFFF == packet.cluster) { packet.cluster = local_cluster_id; } else if (packet.cluster != local_cluster_id) { - ResponseCmndChar_P(PSTR("No more than one cluster id per command")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_TOO_MANY_CLUSTERS)); if (attrs) { free(attrs); } return; } @@ -664,7 +666,7 @@ void ZbSendRead(JsonParserToken val_attr, ZigbeeZCLSendMessage & packet) { } } if (!found) { - AddLog_P(LOG_LEVEL_INFO, PSTR("ZIG: Unknown attribute name (ignored): %s"), key.getStr()); + AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_ZIGBEE_UNKNWON_ATTRIBUTE), key.getStr()); } } @@ -688,7 +690,7 @@ void ZbSendRead(JsonParserToken val_attr, ZigbeeZCLSendMessage & packet) { ZigbeeZCLSend_Raw(packet); ResponseCmndDone(); } else { - ResponseCmndChar_P(PSTR("Missing parameters")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_MISSING_PARAM)); } if (attrs) { free(attrs); } @@ -735,14 +737,14 @@ void CmndZbSend(void) { JsonParserToken val_device = root[PSTR(D_CMND_ZIGBEE_DEVICE)]; if (val_device) { device = zigbee_devices.parseDeviceFromName(val_device.getStr()).shortaddr; - if (BAD_SHORTADDR == device) { ResponseCmndChar_P(PSTR("Invalid parameter")); return; } + if (BAD_SHORTADDR == device) { ResponseCmndChar_P(PSTR(D_ZIGBEE_INVALID_PARAM)); return; } } if (BAD_SHORTADDR == device) { // if not found, check if we have a group JsonParserToken val_group = root[PSTR(D_CMND_ZIGBEE_GROUP)]; if (val_group) { groupaddr = val_group.getUInt(); } else { // no device nor group - ResponseCmndChar_P(PSTR("Unknown device")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } } @@ -810,7 +812,7 @@ void CmndZbSend(void) { } else if (val_write) { // only KSON object if (!val_write.isObject()) { - ResponseCmndChar_P(PSTR("Missing parameters")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_MISSING_PARAM)); return; } // "Write":{...attributes...} @@ -820,7 +822,7 @@ void CmndZbSend(void) { // "Publish":{...attributes...} // only KSON object if (!val_publish.isObject()) { - ResponseCmndChar_P(PSTR("Missing parameters")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_MISSING_PARAM)); return; } packet.cmd = ZCL_REPORT_ATTRIBUTES; @@ -829,7 +831,7 @@ void CmndZbSend(void) { // "Report":{...attributes...} // only KSON object if (!val_response.isObject()) { - ResponseCmndChar_P(PSTR("Missing parameters")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_MISSING_PARAM)); return; } packet.cmd = ZCL_READ_ATTRIBUTES_RESPONSE; @@ -843,7 +845,7 @@ void CmndZbSend(void) { // "Config":{...attributes...} // only JSON object if (!val_config.isObject()) { - ResponseCmndChar_P(PSTR("Missing parameters")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_MISSING_PARAM)); return; } packet.cmd = ZCL_CONFIGURE_REPORTING; @@ -991,7 +993,7 @@ void CmndZbUnbind(void) { void CmndZbLeave(void) { if (zigbee.init_phase) { ResponseCmndChar_P(PSTR(D_ZIGBEE_NOT_STARTED)); return; } uint16_t shortaddr = zigbee_devices.parseDeviceFromName(XdrvMailbox.data).shortaddr; - if (BAD_SHORTADDR == shortaddr) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (BAD_SHORTADDR == shortaddr) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } #ifdef USE_ZIGBEE_ZNP SBuffer buf(14); @@ -1027,7 +1029,7 @@ void CmndZbBindState_or_Map(bool map) { if ((map) && (parsed_shortaddr != shortaddr)) { shortaddr = parsed_shortaddr; // allow a non-existent address when ZbMap } else { - ResponseCmndChar_P(PSTR("Unknown device")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } } @@ -1099,7 +1101,7 @@ void CmndZbProbe(void) { void CmndZbProbeOrPing(boolean probe) { if (zigbee.init_phase) { ResponseCmndChar_P(PSTR(D_ZIGBEE_NOT_STARTED)); return; } uint16_t shortaddr = zigbee_devices.parseDeviceFromName(XdrvMailbox.data).shortaddr; - if (BAD_SHORTADDR == shortaddr) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (BAD_SHORTADDR == shortaddr) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } // set a timer for Reachable - 2s default value zigbee_devices.setTimer(shortaddr, 0, Z_CAT_REACHABILITY_TIMEOUT, 0, 0, Z_CAT_REACHABILITY, 0 /* value */, &Z_Unreachable); @@ -1137,7 +1139,7 @@ void CmndZbName(void) { // parse first part, Z_Device & device = zigbee_devices.parseDeviceFromName(XdrvMailbox.data); // it's the only case where we create a new device - if (!device.valid()) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (!device.valid()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } if (p == nullptr) { const char * friendlyName = device.friendlyName; @@ -1169,7 +1171,7 @@ void CmndZbModelId(void) { // parse first part, Z_Device & device = zigbee_devices.parseDeviceFromName(XdrvMailbox.data); // in case of short_addr, it must be already registered - if (!device.valid()) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (!device.valid()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } if (p != nullptr) { device.setModelId(p); @@ -1196,7 +1198,7 @@ void CmndZbLight(void) { // parse first part, Z_Device & device = zigbee_devices.parseDeviceFromName(XdrvMailbox.data); // in case of short_addr, it must be already registered - if (!device.valid()) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (!device.valid()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } if (p) { int8_t bulbtype = strtol(p, nullptr, 10); @@ -1240,7 +1242,7 @@ void CmndZbOccupancy(void) { // parse first part, Z_Device & device = zigbee_devices.parseDeviceFromName(XdrvMailbox.data); // in case of short_addr, it must be already registered - if (!device.valid()) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (!device.valid()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } int8_t occupancy_time = -1; if (p) { @@ -1267,13 +1269,13 @@ void CmndZbOccupancy(void) { void CmndZbForget(void) { if (zigbee.init_phase) { ResponseCmndChar_P(PSTR(D_ZIGBEE_NOT_STARTED)); return; } Z_Device & device = zigbee_devices.parseDeviceFromName(XdrvMailbox.data); // in case of short_addr, it must be already registered - if (!device.valid()) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (!device.valid()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } // everything is good, we can send the command if (zigbee_devices.removeDevice(device.shortaddr)) { ResponseCmndDone(); } else { - ResponseCmndChar_P(PSTR("Unknown device")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); } } @@ -1297,7 +1299,7 @@ void CmndZbInfo(void) { } } else { // try JSON Z_Device & device = zigbee_devices.parseDeviceFromName(XdrvMailbox.data); // in case of short_addr, it must be already registered - if (!device.valid()) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (!device.valid()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } // everything is good, we can send the command @@ -1387,7 +1389,7 @@ void CmndZbRestore(void) { } // call restore on a single object } else { - ResponseCmndChar_P(PSTR("Missing parameters")); + ResponseCmndChar_P(PSTR(D_ZIGBEE_MISSING_PARAM)); return; } } else { // try hex @@ -1538,10 +1540,10 @@ void CmndZbStatus(void) { } else { Z_Device & device = zigbee_devices.parseDeviceFromName(XdrvMailbox.data); if (XdrvMailbox.data_len > 0) { - if (!device.valid()) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (!device.valid()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } dump = zigbee_devices.dumpDevice(XdrvMailbox.index, device); } else { - if (XdrvMailbox.index >= 2) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (XdrvMailbox.index >= 2) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } dump = zigbee_devices.dumpDevice(XdrvMailbox.index, *(Z_Device*)nullptr); } } @@ -1569,7 +1571,7 @@ void CmndZbData(void) { // parse first part, Z_Device & device = zigbee_devices.parseDeviceFromName(XdrvMailbox.data); // in case of short_addr, it must be already registered - if (!device.valid()) { ResponseCmndChar_P(PSTR("Unknown device")); return; } + if (!device.valid()) { ResponseCmndChar_P(PSTR(D_ZIGBEE_UNKNOWN_DEVICE)); return; } if (p) { // set ZbData @@ -1618,7 +1620,7 @@ void CmndZbConfig(void) { if (zb_channel > 26) { zb_channel = 26; } // if network key is zero, we generate a truly random key with a hardware generator from ESP if ((0 == zb_precfgkey_l) && (0 == zb_precfgkey_h)) { - AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "generating random Zigbee network key")); + AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE D_ZIGBEE_GENERATE_KEY)); zb_precfgkey_l = (uint64_t)HwRandom() << 32 | HwRandom(); zb_precfgkey_h = (uint64_t)HwRandom() << 32 | HwRandom(); } @@ -1667,6 +1669,193 @@ void CmndZbConfig(void) { * Presentation \*********************************************************************************************/ + +const char ZB_WEB_U[] PROGMEM = + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // index 0 + //=ZB_WEB_CSS + "{t}" // Terminate current two column table and open new table + "" + + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // index 1 + // Visual indicator for PermitJoin Active + //=ZB_WEB_PERMITJOIN_ACTIVE + "

[ %s ]

" + + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // index 2 + // Start of vis.js box + //=ZB_WEB_VIS_JS_BEFORE + "" + "
Unable to load vis.js
" + "" + // "

" + + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // index 4 + // Auto-refresh + //=ZB_WEB_AUTO_REFRESH + "" + + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // index 5 + // Auto-refresh + //=ZB_WEB_MAP_REFRESH + "

" + + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + // index 6 + // Style + //=ZB_WEB_STATUS_LINE + "" + "%s" // name + "%s" // sbatt (Battery Indicator) + "
" // slqi + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + //=ZB_WEB_BATTERY + "" + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + //=ZB_WEB_LAST_SEEN + "🕗%02d%c" + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + //=ZB_WEB_COLOR_RGB + " #%02X%02X%02X" + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + //=ZB_WEB_LINE_START + "┆" + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + //=ZB_WEB_LIGHT_CT + " %dK" + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + //=ZB_WEB_END_STATUS + "
" // Close LQI + "%s{e}" // dhm (Last Seen) + "\0" + // +++++++++++++++++++++++++++++++++++++++++++++++++++++++ + //=ZB_WEB_LINE_END + "" // Close LQI + "%s{e}" // dhm (Last Seen) + "\0" + ; // end of list + +// Use the tool at https://tasmota.hadinger.fr/util and choose "Compress Strings template with Unishox" +// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// ++++++++++++++++++++ DO NOT EDIT BELOW ++++++++++++++++++++ +// ++++++++++++++++++++vvvvvvvvvvvvvvvvvvv++++++++++++++++++++ +enum { + ZB_WEB_CSS=0, + ZB_WEB_PERMITJOIN_ACTIVE=512, + ZB_WEB_VIS_JS_BEFORE=566, + ZB_WEB_VIS_JS_AFTER=1039, + ZB_WEB_AUTO_REFRESH=1103, + ZB_WEB_MAP_REFRESH=1169, + ZB_WEB_STATUS_LINE=1235, + ZB_WEB_BATTERY=1344, + ZB_WEB_LAST_SEEN=1394, + ZB_WEB_COLOR_RGB=1442, + ZB_WEB_LINE_START=1502, + ZB_WEB_LIGHT_CT=1542, + ZB_WEB_END_STATUS=1597, + ZB_WEB_LINE_END=1614, +}; + +// Compressed from 1631 to 1109, -32.0% +const char ZB_WEB[] PROGMEM = "\x00\x66\x3D\x0E\xCA\xB1\xC1\x33\xF0\xF6\xD1\xEE\x3D\x3D\x46\x41\x33\xF0\xE8\x6D" + "\xA1\x15\x08\x79\xF6\x51\xDD\x3C\xCC\x6F\xFD\x47\x58\x62\xB4\x21\x0E\xF1\xED\x1F" + "\xD1\x28\x51\xE6\x72\x99\x0C\x36\x1E\x0C\x67\x51\xD7\xED\x36\xB3\xCC\xE7\x99\xF4" + "\x7D\x1E\xE2\x04\x3C\x40\x2B\x04\x3C\x28\x10\xB0\x93\x99\xA4\x30\xD8\x08\x36\x8E" + "\x83\xA8\xF6\x8D\xBF\x8F\x6F\x1D\x7F\xD1\xE1\x54\x79\x9C\x8C\x86\x1B\x0F\x07\xB8" + "\xE8\x2A\x2B\xBE\x7B\x42\xDE\x67\x58\xA7\xA3\xC2\xA8\xF3\x39\x4C\x86\x1B\x0F\x71" + "\xD0\x71\xB0\xF6\x82\x14\xC3\x93\x08\x61\xB0\xF0\x08\x39\x49\xC9\x84\x30\xD8\x78" + "\x13\x7C\x30\x2B\x32\x3C\xF7\x82\xDE\x67\x58\xE0\xB0\x33\x43\xC0\xEC\xF8\x8F\xE7" + "\x99\xC8\x43\x0D\x8B\xD8\x16\x88\x83\x17\xFF\xBE\xA2\x0F\x02\xCF\x9E\x07\x58\x66" + "\x83\xDF\xC1\x7C\x21\xD6\x1E\x05\x9F\x3C\xCC\xEF\xE7\x74\xEB\x3A\xC3\x08\xEA\x3C" + "\x8C\x18\x30\x77\x8F\x71\xD3\xDE\xD3\xDA\x09\x59\xA1\x80\x99\xB0\xF1\x61\x68\xF7" + "\x1D\x7B\x4C\x6F\x8F\x33\x01\x33\x61\xD6\xF8\x43\xC0\x21\xEE\x87\x34\x86\x1B\x0F" + "\x03\x2C\x41\x37\x87\x8F\x33\x8C\xF7\x1D\x0B\xDE\xD5\xA0\x85\xC2\x91\xCB\x21\x86" + "\xC3\xC0\x24\xF0\x90\x30\xD8\x08\x5C\x2A\x01\x1D\x7F\xB1\x34\x5F\x8F\x33\x96\x43" + "\x0D\x80\x9B\xBA\x1E\x4D\xB0\x41\xC9\x8E\x83\x8E\x32\x04\x3E\x17\x4E\x56\x9F\x47" + "\xD1\x02\x1D\x13\x90\x81\x0E\x89\xCD\x64\x08\xB4\x4E\x51\x02\x1D\x13\x9E\x20\x46" + "\xC1\x8E\x59\x02\x27\x13\x87\x1B\x3E\x8F\xA3\xDC\x74\x2C\x39\x6C\xF6\x96\x0C\xB0" + "\xF6\x8C\x8F\x33\xA1\xCB\x3D\xC7\xA1\xD8\x40\x83\xCA\x4C\xE1\x7C\xF4\x18\x7E\x1E" + "\x83\x8F\xC3\xDE\x47\xA7\x86\x5F\x2F\x51\x90\x4C\xF8\x7D\x82\x16\xD4\x71\xFD\x9E" + "\x0F\xB3\xF0\xFA\x2F\x1E\x87\x67\x86\x5F\x1F\x88\xF7\xCF\x43\xB0\x71\xF8\x7A\x1D" + "\x83\x0F\xC9\xC2\xF9\xE9\xE0\xFF\xA3\x29\x51\x90\xC6\x7C\x3D\x94\xCD\x94\x76\x1A" + "\xEC\xCE\xC1\x06\x91\xEC\x5E\xF8\x67\xC3\xD8\x2A\x2B\xA8\x67\x8F\x33\xB0\xEC\x17" + "\xC3\x0D\x07\x8E\x81\xE0\xD3\xB0\xCF\x7C\x75\xF3\xA1\xFC\xF9\xA1\xD9\xEA\xBE\x12" + "\xC2\xCE\x67\x60\xB1\xA2\x02\x3D\x73\xA0\xDD\xE3\xA1\xAF\xC7\xB0\xFC\x3D\x0E\xC0" + "\x41\xCB\x0F\xC3\xD0\x4D\x33\x5A\x21\xF0\xF6\x0D\x32\x04\x2C\x2A\x01\xF6\x02\x17" + "\x2A\x01\xC7\xB0\x13\x78\x9F\x30\x60\xC1\xE0\x10\xF8\x1C\x38\xD9\x02\x17\x32\xC7" + "\x3E\xD9\x0C\x36\x02\x1F\x22\xC7\x31\xB2\x04\x4E\x3A\xC1\x1B\x98\xF0\xB4\x78\x55" + "\x0F\x7E\xCC\x8F\x1F\x7E\xD3\x6B\x3C\xC7\x65\x0A\x3C\x1E\xC3\xF0\x85\xF5\x8E\x09" + "\xAA\xC4\x16\x58\x88\xCF\x7C\x74\x35\xF8\xF4\x3B\x04\xD3\x33\xF0\x16\x78\x63\x3F" + "\x0C\xEF\xE8\x3C\xEA\xBD\xE7\xF3\xE0\x98\x18\xB1\xAF\xA8\xE8\x3C\xE8\x98\x4C\x6B" + "\xEA\x21\xC6\x45\xA2\x1D\xD0\x46\xE0\xC8\xEF\x1E\x0C\xEF\xEB\x06\x56\xE7\x78\xF8" + "\x7B\x47\xBF\x82\xC6\x78\xF3\x3D\xB8\x79\x9E\xDF\x0A\xB1\x8C\xF3\x3D\x81\xEF\xC3" + "\x09\x9E\xC3\xA8\x10\x78\x3D\x3D\x87\x90\x87\x37\x4F\x61\xEE\x3A\x8B\xE0\x89\x70" + "\x76\x1B\x01\x16\xC9\x81\xC7\x3C\x7B\x0F\x71\xD4\x4C\x11\x2C\xB0\x82\xD1\x9E\x04" + "\x6C\x6A\xC4\x30\x7B\x0F\x71\xEE\x3D\xC7\x83\x3B\xFA\x12\xEA\xCF\x87\xB6\x70\xBE" + "\x08\x32\x41\x0B\x6C\x3E\x73\x1F\x46\x7B\xE3\xA1\x70\x20\xCC\x3B\xA0\x89\xC1\x49" + "\xD4\x25\xD5\x9D\x40\x85\xC0\x29\xDE\x3C\x02\x27\x20\xC0\x87\xCB\xA9\xF9\xE7\x45" + "\x5A\x35\xE0\xBA\x3B\xA6\x05\xF0\x75\xB9\xC7\x74\xEF\x1E\xD0\xB0\x3B\xAD\xCE\x3A" + "\x7D\x85\x96\x21\xDD\x3B\xC7\x83\xDC\x75\x1C\x89\x32\x04\x8C\x78\x61\xF8\x7A\x1D" + "\x83\x0F\xC3\xD0\xC6\x7C\x6A\xB0\xEB\x73\x8F\x87\xD9\xB4\x77\xCF\xB4\x35\xD0\xAC" + "\x10\xF8\x7D\x8F\x3A\x3E\xCF\xC3\xD0\x70\xBA\xAC\xE3\xF0\xFA\xF1\xE8\x76\x02\x14" + "\x73\xD0\xEC\x31\x9F\x1A\x7E\x4E\x17\xCF\x4A\xFA\x0C\x2B\xF7\x8F\x87\xD9\xB6\x84" + "\x42\xAB\xE7\xD9\xF8\x7A\x50\x87\xE1\xE8\x39\x56\xD0\x4C\xF8\x7D\x9C\x64\x6C\x3E" + "\x8E\x3C\x22\x36\x23\xEB\xC8\xEB\x47\xD7\x81\x07\xA0\x7E\x38\xFC\x3D\x0E\xCA\x10" + "\xFC\x3D\x28\x43\xF0\xFA\xF0\x22\x47\x3D\x04\xD3\x30\x43\xC4\x88\x22\x35\x16\xA3" + "\xEB\xC7\xD8\x21\xE7\x1E\xF6\x9F\x67\xE4\xE1\x7C\xF4\xD0\x42\x98\x7B\x07\x51\xEC" + "\x04\x2C\x18\xF6\x1F\x42\x1F\x47\xD0\x22\x73\xFE\x75\x9D\x63\x82\x3C\xCF\xA1\x06" + "\x1B\x0F\x61\xF8\x7A\x1D\x9A\x7E\x4E\x17\xCF\x4A\x10\x10\xEB\x82\x17\x40\x10\xFA" + "\x38\xE8\x8D\x87\xD1\xC7\x44\x6C\x3E\x8E\x3A\x23\x61\xEC\x3F\x0F\xD1\xE4\x6C\x39" + "\x08\x8C\x1C\xDD\xF1\xE0\xFA\x74\x42\x1F\x41\xCE\x17\xD0\x23\x67\xE6\xC0\x46\xCC" + "\x83\x08\xF3\x3C\x8F\xA3\x8E\x88\x8D\x87\xD1\xC7\x44\x46\xC3\xE8\xE3\xA2\x23\x60" + "\x20\xE7\x60\x91\x3C\x11\xF8\x67\x04\x3E\x18\xD0\x78\x17\x86\x5F\x1F\x0F\x61\xCC" + "\x3D\x87\xE1\xFA\x3C\x96\x7B\xE7\x82\x9C\x2F\x82\x17\x45\x6C\x10\xB8\x1B\x20\xCA" + "\x91\xF4\x21\xEC\x3F\x0F\x4F\x0D\xB0\x82\x3F\x0F\xD1\xE4\x71\x7D\x7C\xF0\x77\x0F" + "\x43\xB0\x81\x06\x61\xF4\x21\x1A\x02\x17\x45\xB6\x70\xBE\x08\x5D\x06\x23\xB2\x84" + "\x3F\x0F\xAF\x1E\xD6\x7B\x81\x32\x6C\xE1\x7C"; + +// ++++++++++++++++++++^^^^^^^^^^^^^^^^^^^++++++++++++++++++++ +// ++++++++++++++++++++ DO NOT EDIT ABOVE ++++++++++++++++++++ +// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + extern "C" { // comparator function used to sort Zigbee devices by alphabetical order (if friendlyname) // then by shortaddr if they don't have friendlyname @@ -1710,15 +1899,10 @@ extern "C" { } } // extern "C" -#define WEB_HANDLE_ZB_MAP "Zigbee Map" -#define WEB_HANDLE_ZB_PERMIT_JOIN "Zigbee Permit Join" -#define WEB_HANDLE_ZB_MAP_REFRESH "Zigbee Map Refresh" const char HTTP_BTN_ZB_BUTTONS[] PROGMEM = - "" + "" "

" - "
"; -const char HTTP_AUTO_REFRESH_PAGE[] PROGMEM = ""; -const char HTTP_BTN_ZB_MAP_REFRESH[] PROGMEM = "

"; + "
"; void ZigbeeShow(bool json) { @@ -1726,26 +1910,13 @@ void ZigbeeShow(bool json) return; #ifdef USE_WEBSERVER } else { + UnishoxStrings msg(ZB_WEB); uint32_t zigbee_num = zigbee_devices.devicesSize(); if (!zigbee_num) { return; } if (zigbee_num > 255) { zigbee_num = 255; } - WSContentSend_P(PSTR("{t}")); // Terminate current two column table and open new table - WSContentSend_P(PSTR( - "" - )); + WSContentSend_P(msg[ZB_WEB_CSS]); + // WSContentSend_compressed(ZB_WEB, 0); // sort elements by name, then by id uint8_t sorted_idx[zigbee_num]; @@ -1771,7 +1942,7 @@ void ZigbeeShow(bool json) snprintf_P(sbatt, sizeof(sbatt), PSTR(" ")); if (device.validBatteryPercent()) { snprintf_P(sbatt, sizeof(sbatt), - PSTR(""), + msg[ZB_WEB_BATTERY], device.batterypercent, changeUIntScale(device.batterypercent, 0, 100, 0, 14) ); } @@ -1786,12 +1957,8 @@ void ZigbeeShow(bool json) snprintf_P(slqi, sizeof(slqi), PSTR("%d"), device.lqi); } - WSContentSend_PD(PSTR( - "" - "%s" // name - "%s" // sbatt (Battery Indicator) - "
" // slqi - ), shortaddr, + WSContentSend_PD(msg[ZB_WEB_STATUS_LINE], + shortaddr, device.modelId ? device.modelId : "", device.manufacturerId ? device.manufacturerId : "", name, sbatt, slqi); @@ -1808,15 +1975,12 @@ void ZigbeeShow(bool json) uint8_t color; uint16_t val = convert_seconds_to_dhm(now - device.last_seen, &unit, &color); if (val < 100) { - snprintf_P(dhm, sizeof(dhm), PSTR("🕗%02d%c"), + snprintf_P(dhm, sizeof(dhm), msg[ZB_WEB_LAST_SEEN], color, color, color, val, unit); } } - WSContentSend_PD(PSTR( - "
" // Close LQI - "%s{e}" // dhm (Last Seen) - ), dhm ); + WSContentSend_PD(msg[ZB_WEB_END_STATUS], dhm ); // Sensors const Z_Data_Thermo & thermo = device.data.find(); @@ -1829,7 +1993,7 @@ void ZigbeeShow(bool json) bool validPressure = thermo.validPressure(); if (validTemp || validTempTarget || validThSetpoint || validHumidity || validPressure) { - WSContentSend_P(PSTR("┆")); + WSContentSend_P(msg[ZB_WEB_LINE_START]); if (validTemp) { char buf[12]; dtostrf(thermo.getTemperature() / 100.0f, 3, 1, buf); @@ -1865,7 +2029,7 @@ void ZigbeeShow(bool json) if (onoff_display || light_display || plug_voltage || plug_power) { int8_t channels = device.getLightChannels(); if (channels < 0) { channels = 5; } // if number of channel is unknown, display all known attributes - WSContentSend_P(PSTR("┆")); + WSContentSend_P(msg[ZB_WEB_LINE_START]); if (onoff_display) { WSContentSend_P(PSTR(" %s"), onoff.getPower() ? PSTR(D_ON) : PSTR(D_OFF)); } @@ -1875,17 +2039,17 @@ void ZigbeeShow(bool json) } if (light.validCT() && ((channels == 2) || (channels == 5))) { uint32_t ct_k = (((1000000 / light.getCT()) + 25) / 50) * 50; - WSContentSend_P(PSTR(" %dK"), light.getCT(), ct_k); + WSContentSend_P(msg[ZB_WEB_LIGHT_CT], light.getCT(), ct_k); } if (light.validHue() && light.validSat() && (channels >= 3)) { uint8_t r,g,b; uint8_t sat = changeUIntScale(light.getSat(), 0, 254, 0, 255); // scale to 0..255 LightStateClass::HsToRgb(light.getHue(), sat, &r, &g, &b); - WSContentSend_P(PSTR(" #%02X%02X%02X"), r,g,b,r,g,b); + WSContentSend_P(msg[ZB_WEB_COLOR_RGB], r,g,b,r,g,b); } else if (light.validX() && light.validY() && (channels >= 3)) { uint8_t r,g,b; LightStateClass::XyToRgb(light.getX() / 65535.0f, light.getY() / 65535.0f, &r, &g, &b); - WSContentSend_P(PSTR(" #%02X%02X%02X"), r,g,b,r,g,b); + WSContentSend_P(msg[ZB_WEB_COLOR_RGB], r,g,b,r,g,b); } } if (plug_voltage || plug_power) { @@ -1901,10 +2065,11 @@ void ZigbeeShow(bool json) } } - WSContentSend_P(PSTR("{t}

")); // Terminate current multi column table and open new table + WSContentSend_P(msg[ZB_WEB_LINE_END]); // Terminate current multi column table and open new table if (zigbee.permit_end_time) { // PermitJoin in progress - WSContentSend_P(PSTR("

[ Devices allowed to join ]

")); // Terminate current multi column table and open new table + + WSContentSend_P(msg[ZB_WEB_PERMITJOIN_ACTIVE], D_ZIGBEE_PERMITJOIN_ACTIVE); } #endif } @@ -1928,35 +2093,26 @@ void ZigbeeShowMap(void) { ZigbeeMapAllDevices(); } - WSContentStart_P(PSTR("Tasmota Zigbee Mapping")); + UnishoxStrings msg(ZB_WEB); + WSContentStart_P(PSTR(D_ZIGBEE_MAPPING_TITLE)); WSContentSendStyle(); if (zigbee.init_phase) { - WSContentSend_P(PSTR("Zigbee not started")); + WSContentSend_P(PSTR(D_ZIGBEE_NOT_STARTED)); } else if (zigbee.mapping_in_progress) { int32_t mapping_remaining = 1 + (zigbee.mapping_end_time - millis()) / 1000; if (mapping_remaining < 0) { mapping_remaining = 0; } - WSContentSend_P(PSTR("Mapping in progress (%d s. remaining)"), mapping_remaining); - WSContentSend_P(HTTP_AUTO_REFRESH_PAGE); + WSContentSend_P(PSTR(D_ZIGBEE_MAPPING_IN_PROGRESS_SEC), mapping_remaining); + WSContentSend_P(msg[ZB_WEB_AUTO_REFRESH]); } else if (!zigbee.mapping_ready) { - WSContentSend_P(PSTR("No mapping")); + WSContentSend_P(PSTR(D_ZIGBEE_MAPPING_NOT_PRESENT)); } else { - WSContentSend_P(PSTR( - "" - "
Unable to load vis.js
" - "" - )); - WSContentSend_P(HTTP_BTN_ZB_MAP_REFRESH); + WSContentSend_P(msg[ZB_WEB_VIS_JS_AFTER]); + WSContentSend_P(msg[ZB_WEB_MAP_REFRESH], PSTR(D_ZIGBEE_MAP_REFRESH)); } WSContentSpaceButton(BUTTON_MAIN); WSContentStop();