Merge branch 'development' into release-7.1

This commit is contained in:
Theo Arends 2019-11-17 15:14:58 +01:00
commit 2218eef3d0
51 changed files with 751 additions and 1140 deletions

View File

@ -1,24 +0,0 @@
FROM python:2
LABEL author="Eduard Angold"
# Install platformio. To be able to build tasmota <=v6.6.0 (and later)
# we have to use version 3.6.7 of platformio.
RUN pip install --upgrade pip &&\
pip install -U platformio==3.6.7
# Init project
COPY init_pio_tasmota /init_pio_tasmota
# Install project dependencies using a init project.
RUN cd /init_pio_tasmota &&\
pio run &&\
cd ../ &&\
rm -fr init_pio_tasmota &&\
cp -r /root/.platformio / &&\
chmod -R 777 /.platformio
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/bin/bash", "/entrypoint.sh"]

View File

@ -1,26 +0,0 @@
# Docker container for tasmota builds
This Container will setup a proper build environment for [Tasmota](https://github.com/arendst/Tasmota)
## Create container
`docker build -t mytasmota:latest .`
## Use a ready container from docker hub
Use instead of the container `mytasmota:latest` the published container `eddyhub/docker-tasmota:latest` from docker hub.
## Build all development binaries
`git clone https://github.com/arendst/Tasmota.git`
`docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID mytasmota:latest`
## Build a specific binary with custom options
Checkout Tasmota: `git clone https://github.com/arendst/Tasmota.git`
Mount the source as volume in `/tasmota`. **Prefix** any parameter available in `Tasmota/sonoff/my_user_config.h` with `TASMOTA_` as a environment variable for the container. **Also don't forget to escape what needs to be escaped in your shell.** **Strings** should be in **double quotes**. My config example:
`docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -e TASMOTA_STA_SSID1='"my-wifi"' -e TASMOTA_STA_PASS1='"my-wifi-password"' -e TASMOTA_MQTT_HOST='my-mqtt-host' -e TASMOTA_MQTT_USER='"my-mqtt-user"' -e TASMOTA_MQTT_PASS='"my-mqtt-password"' -e TASMOTA_WEB_PASSWORD='"my-web-password"' -u $UID:$GID mytasmota:latest --environment sonoff-DE`
Now you should have the file Tasmota/.pioenvs/sonoff-DE/firmware.bin which can be flashed on your device.
## Build a specific version of tasmota
Checkout out the needed version before using the build instructions above:
- `git clone https://github.com/arendst/Tasmota.git`
- `git -C Tasmota checkout v6.6.0`
Build it:
- `docker run -ti --rm -v $(pwd)/Tasmota:/tasmota -u $UID:$GID mytasmota:latest`

View File

@ -1,35 +0,0 @@
# configure build via environment
#!/bin/bash
TASMOTA_VOLUME='/tasmota'
USER_CONFIG_OVERRIDE="${TASMOTA_VOLUME}/tasmota/user_config_override.h"
if [ -d $TASMOTA_VOLUME ]; then
cd $TASMOTA_VOLUME
if [ -n "$(env | grep ^TASMOTA_)" ]; then
echo "Removing $USER_CONFIG_OVERRIDE and creating a new one."
rm "$USER_CONFIG_OVERRIDE"
#export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE'
sed -i 's/^; *-DUSE_CONFIG_OVERRIDE/ -DUSE_CONFIG_OVERRIDE/' platformio.ini
echo '#ifndef _USER_CONFIG_OVERRIDE_H_' >> $USER_CONFIG_OVERRIDE
echo '#define _USER_CONFIG_OVERRIDE_H_' >> $USER_CONFIG_OVERRIDE
echo '#warning **** user_config_override.h: Using Settings from this File ****' >> $USER_CONFIG_OVERRIDE
echo '#undef CFG_HOLDER' >> $USER_CONFIG_OVERRIDE
echo '#define CFG_HOLDER 1' >> $USER_CONFIG_OVERRIDE
for i in $(env | grep ^TASMOTA_); do
config=${i#TASMOTA_}
key=$(echo $config | cut -d '=' -f 1)
value=$(echo $config | cut -d '=' -f 2)
echo "#undef ${key}" >> $USER_CONFIG_OVERRIDE
echo "#define ${key} ${value}" >> $USER_CONFIG_OVERRIDE
done
echo '#endif' >> $USER_CONFIG_OVERRIDE
fi
echo "Compiling..."
#pio run -t clean
pio run $@
echo "Everything done you find your builds in .pioenvs/<build-flavour>/firmware.bin"
else
echo ">>> NO TASMOTA VOLUME MOUNTED --> EXITING"
exit 0;
fi

View File

@ -1,30 +0,0 @@
[env:core_2_3_0]
; *** Esp8266 core for Arduino version 2.3.0
platform = espressif8266@1.5.0
framework = arduino
board = esp01_1m
[env:core_2_4_2]
; *** Esp8266 core for Arduino version 2.4.2
platform = espressif8266@1.8.0
framework = arduino
board = esp01_1m
[env:core_2_5_2]
; *** Esp8266 core for Arduino version 2.5.2
platform = espressif8266@~2.2.2
framework = arduino
board = esp01_1m
[env:core_stage]
; *** Esp8266 core for Arduino version latest beta
platform = https://github.com/platformio/platform-espressif8266.git#feature/stage
framework = arduino
board = esp01_1m
[env:core_pre]
; *** Arduino Esp8266 core pre 2.6.x for Tasmota (mqtt reconnects fixed)
platform = https://github.com/Jason2866/platform-espressif8266.git#Tasmota
framework = arduino
board = esp01_1m

View File

@ -1,3 +0,0 @@
#include <Arduino.h>
void setup() {}
void loop() {}

View File

@ -6,7 +6,7 @@
* @license MIT
*/
#include <HPMA115S0.h>
#include <hpma115S0.h>
#include <SoftwareSerial.h>
//Create an instance of software serial

View File

@ -45,7 +45,7 @@ void HPMA115S0::Init() {
* @param size of buffer
* @return void
*/
void HPMA115S0::SendCmd(unsigned char * cmdBuf, unsigned int cmdSize) {
void HPMA115S0::SendCmd(const char * cmdBuf, unsigned int cmdSize) {
//Clear RX
while (_serial.available())
_serial.read();
@ -114,18 +114,28 @@ int HPMA115S0::ReadCmdResp(unsigned char * dataBuf, unsigned int dataBufSize, un
* @return returns true if valid measurements were read from sensor
*/
boolean HPMA115S0::ReadParticleMeasurement(unsigned int * pm2_5, unsigned int * pm10) {
unsigned char cmdBuf[] = {0x68, 0x01, 0x04, 0x93};
static unsigned char dataBuf[HPM_READ_PARTICLE_MEASURMENT_LEN - 1];
const char cmdBuf[] = {0x68, 0x01, 0x04, 0x93};
static unsigned char dataBuf[HPM_READ_PARTICLE_MEASURMENT_LEN_C - 1];
int len;
//Serial.println("PS- Reading Particle Measurements..." );
// Serial.println("PS- Reading Particle Measurements..." );
//Send command
SendCmd(cmdBuf, 4);
//Read response
if (ReadCmdResp(dataBuf, sizeof(dataBuf), READ_PARTICLE_MEASURMENT) == (HPM_READ_PARTICLE_MEASURMENT_LEN - 1)) {
_pm2_5 = dataBuf[0] * 256 + dataBuf[1];
_pm10 = dataBuf[2] * 256 + dataBuf[3];
len = ReadCmdResp(dataBuf, sizeof(dataBuf), READ_PARTICLE_MEASURMENT);
if ((len == (HPM_READ_PARTICLE_MEASURMENT_LEN - 1)) || (len == (HPM_READ_PARTICLE_MEASURMENT_LEN_C - 1))) {
if (len == (HPM_READ_PARTICLE_MEASURMENT_LEN - 1)) {
// HPMA115S0 Standard devices
_pm2_5 = dataBuf[0] * 256 + dataBuf[1];
_pm10 = dataBuf[2] * 256 + dataBuf[3];
} else {
// HPMA115C0 Compact devices
_pm2_5 = dataBuf[2] * 256 + dataBuf[3];
_pm10 = dataBuf[6] * 256 + dataBuf[7];
}
*pm2_5 = _pm2_5;
*pm10 = _pm10;
// Serial.println("PS- PM 2.5: " + String(_pm2_5) + " ug/m3" );
@ -140,7 +150,7 @@ boolean HPMA115S0::ReadParticleMeasurement(unsigned int * pm2_5, unsigned int *
* @return void
*/
void HPMA115S0::StartParticleMeasurement() {
unsigned char cmd[] = {0x68, 0x01, 0x01, 0x96};
const char cmd[] = {0x68, 0x01, 0x01, 0x96};
SendCmd(cmd, 4);
}
@ -149,7 +159,7 @@ void HPMA115S0::StartParticleMeasurement() {
* @return void
*/
void HPMA115S0::StopParticleMeasurement() {
unsigned char cmd[] = {0x68, 0x01, 0x02, 0x95};
const char cmd[] = {0x68, 0x01, 0x02, 0x95};
SendCmd(cmd, 4);
}
@ -158,7 +168,7 @@ void HPMA115S0::StopParticleMeasurement() {
* @return void
*/
void HPMA115S0::EnableAutoSend() {
unsigned char cmd[] = {0x68, 0x01, 0x40, 0x57};
const char cmd[] = {0x68, 0x01, 0x40, 0x57};
SendCmd(cmd, 4);
}
@ -167,7 +177,7 @@ void HPMA115S0::EnableAutoSend() {
* @return void
*/
void HPMA115S0::DisableAutoSend() {
unsigned char cmd[] = {0x68, 0x01, 0x20, 0x77};
const char cmd[] = {0x68, 0x01, 0x20, 0x77};
SendCmd(cmd, 4);
}

View File

@ -13,8 +13,9 @@
#include "Arduino.h"
#define HPM_CMD_RESP_HEAD 0x40
#define HPM_MAX_RESP_SIZE 8 // max command response size is 8 bytes
#define HPM_MAX_RESP_SIZE 16 // max command response size is 16 bytes
#define HPM_READ_PARTICLE_MEASURMENT_LEN 5
#define HPM_READ_PARTICLE_MEASURMENT_LEN_C 13
enum CMD_TYPE_T {
READ_PARTICLE_MEASURMENT = 0x04,
@ -53,8 +54,8 @@ public:
/**
* @brief Function that sends a read command to sensor
* @return returns true if valid measurements were read from sensor
*/boolean ReadParticleMeasurement(unsigned int * pm2_5, unsigned int * pm10)
;
*/
boolean ReadParticleMeasurement(unsigned int * pm2_5, unsigned int * pm10);
/**
* @brief Function that starts sensor measurement
@ -108,7 +109,7 @@ private:
* @param size of buffer
* @return void
*/
void SendCmd(unsigned char * command, unsigned int size);
void SendCmd(const char * command, unsigned int size);
/**
* @brief Function that reads command response from sensor

33
pio/name-firmware.py Normal file
View File

@ -0,0 +1,33 @@
Import('env')
import os
import shutil
OUTPUT_DIR = "build_output{}".format(os.path.sep)
def bin_map_copy(source, target, env):
variant = str(target[0]).split(os.path.sep)[1]
# check if output directories exist and create if necessary
if not os.path.isdir(OUTPUT_DIR):
os.mkdir(OUTPUT_DIR)
for d in ['firmware', 'map']:
if not os.path.isdir("{}{}".format(OUTPUT_DIR, d)):
os.mkdir("{}{}".format(OUTPUT_DIR, d))
# create string with location and file names based on variant
map_file = "{}map{}{}.map".format(OUTPUT_DIR, os.path.sep, variant)
bin_file = "{}firmware{}{}.bin".format(OUTPUT_DIR, os.path.sep, variant)
# check if new target files exist and remove if necessary
for f in [map_file, bin_file]:
if os.path.isfile(f):
os.remove(f)
# copy firmware.bin to firmware/<variant>.bin
shutil.copy(str(target[0]), bin_file)
# copy firmware.map to map/<variant>.map
shutil.copy("firmware.map", map_file)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [bin_map_copy])

View File

@ -1,12 +0,0 @@
Import('env')
import os
def obj_ren_after_bin(source, target, env):
# print("Rename firmware.bin")
base_dir = os.path.dirname(str(target[0]))
new_file = "{}{}{}.bin".format(base_dir, os.path.sep, str(target[0]).split(os.path.sep)[1])
if os.path.isfile(new_file):
os.remove(new_file)
os.rename(str(target[0]), new_file)
env.AddPostAction("$BUILD_DIR/${PROGNAME}.bin", [obj_ren_after_bin])

View File

@ -86,8 +86,8 @@ upload_resetmethod = nodemcu
; *** Upload Serial reset method for Wemos and NodeMCU
upload_port = COM5
extra_scripts = pio/strip-floats.py
pio/rename-firmware.py
pio/obj-dump.py
pio/name-firmware.py
; pio/obj-dump.py
; *** Upload file to OTA server using SCP
;upload_port = user@host:/path
@ -99,18 +99,14 @@ extra_scripts = pio/strip-floats.py
[core_active]
; Select one core set for platform and build_flags
;platform = ${core_2_3_0.platform}
;build_flags = ${core_2_3_0.build_flags}
;platform = ${core_2_4_2.platform}
;build_flags = ${core_2_4_2.build_flags}
platform = ${core_2_6_0.platform}
build_flags = ${core_2_6_0.build_flags}
;platform = ${core_pre.platform}
;build_flags = ${core_pre.build_flags}
;platform = ${core_pre_ipv6.platform}
;build_flags = ${core_pre_ipv6.build_flags}
;platform = ${core_2_6_0.platform}
;build_flags = ${core_2_6_0.build_flags}
platform = ${core_2_6_1.platform}
build_flags = ${core_2_6_1.build_flags}
;platform = ${core_stage.platform}
;build_flags = ${core_stage.build_flags}
;platform = ${core_cstage.platform}
;build_flags = ${core_cstage.build_flags}
; *********************************************************************
@ -118,29 +114,7 @@ build_flags = ${core_2_6_0.build_flags}
build_flags = -D NDEBUG
-mtarget-align
-Wl,-Map,firmware.map
[core_2_3_0]
; *** Esp8266 core for Arduino version 2.3.0
; *** W A R N I N G ! *** old outdated Arduino Esp8266 core with many security issues! NOT recommended to use. NO SUPPORT!
platform = espressif8266@1.5.0
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Tesp8266.flash.1m0.ld
[core_2_4_2]
; *** Esp8266 core for Arduino version 2.4.2
; *** W A R N I N G ! *** old outdated Arduino Esp8266 core with security issues. NOT recommended to use. NO SUPPORT!
platform = espressif8266@1.8.0
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Teagle.flash.1m0.ld
-lstdc++ -lsupc++
; lwIP 1.4
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth (Tasmota default)
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
-DVTABLES_IN_FLASH
[core_2_6_0]
; *** Esp8266 core for Arduino version 2.6.0 (for Windows, most Linux variants and Mac)
; *** custom setup until the core 2.6.0 version is official released from PlatformIO crew
@ -171,6 +145,8 @@ build_flags = ${esp82xx_defaults.build_flags}
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwidth no Features (Tasmota default)
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; lwIP 2 - Higher Bandwidth IPv6 (use ONLY if you need IPv6, experimental!)
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH
; VTABLES in Flash (Tasmota default)
-DVTABLES_IN_FLASH
; VTABLES in Heap
@ -185,18 +161,25 @@ build_flags = ${esp82xx_defaults.build_flags}
; -fexceptions
; -lstdc++-exc
[core_pre]
; *** Arduino Esp8266 core pre 2.6.x for Tasmota (recommended version, no known issues)
platform = https://github.com/Jason2866/platform-espressif8266.git#Tasmota
[core_2_6_1]
; *** Esp8266 core for Arduino version 2.6.1 (for Windows, most Linux variants and Mac)
; *** custom setup until the core 2.6.0 version is official released from PlatformIO crew
platform = https://github.com/Jason2866/platform-espressif8266.git#core_2_6_1
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Tesp8266.flash.1m.ld
-Wl,-Teagle.flash.1m.ld
-O2
-DBEARSSL_SSL_BASIC
; nonos-sdk 22y
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22y
; nonos-sdk 22x
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x
; nonos-sdk-pre-v3
; NONOSDK221
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221
; NONOSDK22x_190313
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190313
; NONOSDK22x_190703
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
; NONOSDK22x_191024
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191024
; NONOSDK22x_191105 (Tasmota default)
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191105
; NONOSDK3V0 (known issues)
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3
; lwIP 1.4
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
@ -208,7 +191,9 @@ build_flags = ${esp82xx_defaults.build_flags}
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwidth no Features (Tasmota default)
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; VTABLES in Flash (default)
; lwIP 2 - Higher Bandwidth IPv6 (use ONLY if you need IPv6, experimental!)
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH
; VTABLES in Flash (Tasmota default)
-DVTABLES_IN_FLASH
; VTABLES in Heap
; -DVTABLES_IN_DRAM
@ -218,46 +203,7 @@ build_flags = ${esp82xx_defaults.build_flags}
; No exception code in firmware
-fno-exceptions
-lstdc++
; Exception code in firmware /needs much space!
; -fexceptions
; -lstdc++-exc
[core_pre_ipv6]
; *** Arduino Esp8266 core pre 2.6.x IPv6 for Tasmota (use ONLY if you need IPv6, experimental!)
platform = https://github.com/Jason2866/platform-espressif8266.git#Tasmota
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Tesp8266.flash.1m.ld
-O2
-DBEARSSL_SSL_BASIC
; nonos-sdk 22y
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22y
; nonos-sdk 22x
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x
; nonos-sdk-pre-v3
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3
; lwIP 1.4
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwidth Low Memory no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwidth no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; lwIP 2 - Higher Bandwidth IPv6
-DPIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_HIGHER_BANDWIDTH
; VTABLES in Flash (default)
-DVTABLES_IN_FLASH
; VTABLES in Heap
; -DVTABLES_IN_DRAM
; VTABLES in IRAM
; -DVTABLES_IN_IRAM
; enable one option set -> No exception recommended
; No exception code in firmware
-fno-exceptions
-lstdc++
; Exception code in firmware /needs much space!
; Exception code in firmware /needs much space! 90k
; -fexceptions
; -lstdc++-exc
@ -305,6 +251,49 @@ build_flags = ${esp82xx_defaults.build_flags}
; -fexceptions
; -lstdc++-exc
[core_cstage]
; *** Arduino Esp8266 -> Stage with Xtensa build chain 2.5.0.4 and Esptoolpy 2.8
platform = https://github.com/Jason2866/platform-espressif8266.git#feature/stage
build_flags = ${esp82xx_defaults.build_flags}
-Wl,-Tesp8266.flash.1m.ld
-O2
-DBEARSSL_SSL_BASIC
; NONOSDK221
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK221
; NONOSDK22x_190313
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190313
; NONOSDK22x_190703
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
; NONOSDK22x_191024
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191024
; NONOSDK22x_191105
-DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_191105
; NONOSDK3V0 (known issues)
; -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK3
; lwIP 1.4
; -DPIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH
; lwIP 2 - Low Memory
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
; lwIP 2 - Higher Bandwidth
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH
; lwIP 2 - Higher Bandwidth Low Memory no Features
; -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY_LOW_FLASH
; lwIP 2 - Higher Bandwidth no Features
-DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
; VTABLES in Flash (default)
-DVTABLES_IN_FLASH
; VTABLES in Heap
; -DVTABLES_IN_DRAM
; VTABLES in IRAM
; -DVTABLES_IN_IRAM
; enable one option set -> No exception recommended
; No exception code in firmware
-fno-exceptions
-lstdc++
; Exception code in firmware /needs much space! 90k
; -fexceptions
; -lstdc++-exc
[env:tasmota]
platform = ${common.platform}
framework = ${common.framework}

View File

@ -7,6 +7,9 @@
* Add Keep last channels values when Color command end with '=' (#6799)
* Add support for I2C sensor TLS2591 Light Intensity sensor (#6873)
* Change Kept only NEC/RC5/RC6/HASH IR protocols in standard Tasmota, all other protocols require Tasmota-IR, saving 4K
* Add command SetOption76 0/1 to enable incrementing bootcount when deepsleep is enabled (#6930)
* Change Reset erase end address from as seen by SDK (getFlashChipSize) to full flash size (getFlashChipRealSize)
* Change Zigbee log verbosity reduction
*
* 7.0.0.3 20191103
* Add command I2cDriver for I2C driver runtime control using document I2CDEVICES.md

View File

@ -491,6 +491,36 @@
/********************************************************************************************/
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_HRE "HRE: "
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_KNX "KNX: "
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
#define D_LOG_ZIGBEE "ZIG: " // Zigbee
/********************************************************************************************/
#define D_ASTERISK_PWD "****"
#ifndef MY_LANGUAGE

View File

@ -427,7 +427,6 @@
#define D_DELETE "Изтриване"
#define D_REPLY "Отговор"
#define D_KNX_GROUP_ADDRESS_TO_READ "Групови адреси за получаване на данни"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Получен от"
#define D_KNX_COMMAND_WRITE "Писане"
#define D_KNX_COMMAND_READ "Четене"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "Ю"
#define D_TX20_WEST "З"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Няма"
#define D_SENSOR_USER "Потребит."
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Фазов ъгъл"
#define D_IMPORT_ACTIVE "Входна активна мощност"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Smaž"
#define D_REPLY "Odpověď"
#define D_KNX_GROUP_ADDRESS_TO_READ "Skupinové adresy pro příjem dat z"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Přijato z"
#define D_KNX_COMMAND_WRITE "Zapiš"
#define D_KNX_COMMAND_READ "Čti"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "J"
#define D_TX20_WEST "Z"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Není"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Löschen"
#define D_REPLY "Antworten"
#define D_KNX_GROUP_ADDRESS_TO_READ "Gruppenadresse zum Emfang von Daten"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Empfangen von"
#define D_KNX_COMMAND_WRITE "Schreiben"
#define D_KNX_COMMAND_READ "Lesen"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "None"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phasenwinkel"
#define D_IMPORT_ACTIVE "Importiere Wirk"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Διαγραφή"
#define D_REPLY "Επανάληψη"
#define D_KNX_GROUP_ADDRESS_TO_READ "Ομάδα Διευθύνσεων που θα λάβει τα Δεδομένα"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Στάλθηκε από"
#define D_KNX_COMMAND_WRITE "Εγγραφή"
#define D_KNX_COMMAND_READ "Ανάγνωση"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "Ν"
#define D_TX20_WEST "Δ"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Κανένα"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Delete"
#define D_REPLY "Reply"
#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Received from"
#define D_KNX_COMMAND_WRITE "Write"
#define D_KNX_COMMAND_READ "Read"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "None"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Eliminar"
#define D_REPLY "Responder"
#define D_KNX_GROUP_ADDRESS_TO_READ "Direcciones de Grupo para Recibir Datos"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Recibido desde"
#define D_KNX_COMMAND_WRITE "Escribir"
#define D_KNX_COMMAND_READ "Leer"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "O"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Ninguno"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Ángulo de Fase"
#define D_IMPORT_ACTIVE "P. Activa Entrante"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Supprimer"
#define D_REPLY "Répondre"
#define D_KNX_GROUP_ADDRESS_TO_READ "Données à recevoir des Adresses de Groupe"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Reçu de"
#define D_KNX_COMMAND_WRITE "Écrire"
#define D_KNX_COMMAND_READ "Lire"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "O"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Aucun"
#define D_SENSOR_USER "Utilisateur"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Angle de phase"
#define D_IMPORT_ACTIVE "Énergie act conso"

View File

@ -427,7 +427,6 @@
#define D_DELETE "מחק"
#define D_REPLY "השב"
#define D_KNX_GROUP_ADDRESS_TO_READ "כתובות קבוצתיות לקבלת נתונים מ"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "התקבל מאת"
#define D_KNX_COMMAND_WRITE "כתיבה"
#define D_KNX_COMMAND_READ "קריאה"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "None"
#define D_SENSOR_USER "משתמש"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Törlés"
#define D_REPLY "Válasz"
#define D_KNX_GROUP_ADDRESS_TO_READ "Fogadáshoz használt csoportcímek"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Fogadva tőle:"
#define D_KNX_COMMAND_WRITE "Írás"
#define D_KNX_COMMAND_READ "Olvasás"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "D"
#define D_TX20_WEST "NY"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Nincs"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Fázisszög"
#define D_IMPORT_ACTIVE "Bejövő aktív"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Elimina"
#define D_REPLY "Rispondi"
#define D_KNX_GROUP_ADDRESS_TO_READ "Gruppo di Indirizzi da cui Ricevere Dati"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Ricevuto Da"
#define D_KNX_COMMAND_WRITE "Scrivi"
#define D_KNX_COMMAND_READ "Leggi"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "O"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Nessuno"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Angolo Fase"
#define D_IMPORT_ACTIVE "Potenza Attiva Importata"

View File

@ -427,7 +427,6 @@
#define D_DELETE "삭제"
#define D_REPLY "응답"
#define D_KNX_GROUP_ADDRESS_TO_READ "받은 데이터의 그룹 주소"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "다음에서 받음"
#define D_KNX_COMMAND_WRITE "쓰기"
#define D_KNX_COMMAND_READ "읽기"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "없음"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Verwijder"
#define D_REPLY "Antwoord"
#define D_KNX_GROUP_ADDRESS_TO_READ "Ontvang gegevens van groep adressen"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Ontvangen van"
#define D_KNX_COMMAND_WRITE "Schrijven"
#define D_KNX_COMMAND_READ "Lezen"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Geen"
#define D_SENSOR_USER "Gebruiker"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Fase hoek"
#define D_IMPORT_ACTIVE "Import werkelijk"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Usuń"
#define D_REPLY "Odpowiedz"
#define D_KNX_GROUP_ADDRESS_TO_READ "Adresy grupowe do odbioru danych z"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Otrzymane od"
#define D_KNX_COMMAND_WRITE "Zapisz"
#define D_KNX_COMMAND_READ "Czytaj"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Brak"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Remover"
#define D_REPLY "Responder"
#define D_KNX_GROUP_ADDRESS_TO_READ "Endereço do grupo para receber"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Recebido de"
#define D_KNX_COMMAND_WRITE "Escrever"
#define D_KNX_COMMAND_READ "Ler"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "O"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Nenhum"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "W/h"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Ângulo de Fase"
#define D_IMPORT_ACTIVE "Importar Ativo"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Remover"
#define D_REPLY "Responder"
#define D_KNX_GROUP_ADDRESS_TO_READ "Endereços de Grupo de onde receber dados"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Recebido de"
#define D_KNX_COMMAND_WRITE "Escrever"
#define D_KNX_COMMAND_READ "Ler"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "O"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Nenhum"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Ângulo de fase"
#define D_IMPORT_ACTIVE "Ativo importado"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Delete"
#define D_REPLY "Reply"
#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Received from"
#define D_KNX_COMMAND_WRITE "Write"
#define D_KNX_COMMAND_READ "Read"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "-нет-"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "ВтЧ"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Угол фазы"
#define D_IMPORT_ACTIVE "Импорт активной мощности"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Zmazať"
#define D_REPLY "Odpoveď"
#define D_KNX_GROUP_ADDRESS_TO_READ "Skupinové adresy pre príjem dát z"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Prijaté z"
#define D_KNX_COMMAND_WRITE "Zapíš"
#define D_KNX_COMMAND_READ "Čítaj"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "J"
#define D_TX20_WEST "Z"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Žiaden"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Ta bort"
#define D_REPLY "Svara"
#define D_KNX_GROUP_ADDRESS_TO_READ "Gruppadresser att ta emot data från"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Mottagen från"
#define D_KNX_COMMAND_WRITE "Skriv"
#define D_KNX_COMMAND_READ "Läs"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "V"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Ingen"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Fasvinkel"
#define D_IMPORT_ACTIVE "Import aktiv"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Sil"
#define D_REPLY "Cevapla"
#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Received from"
#define D_KNX_COMMAND_WRITE "Yaz"
#define D_KNX_COMMAND_READ "Oku"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "None"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Wh"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Видалити"
#define D_REPLY "Повторити"
#define D_KNX_GROUP_ADDRESS_TO_READ "Дані для читання групових адрес"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Отримати з"
#define D_KNX_COMMAND_WRITE "Записати"
#define D_KNX_COMMAND_READ "Читати"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "Пд"
#define D_TX20_WEST "Зх"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "Немає"
#define D_SENSOR_USER "Користувач"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "Вт/Год"
#define D_UNIT_WATT_METER_QUADRAT "Вт/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Кут фази"
#define D_IMPORT_ACTIVE "Активна вхід"

View File

@ -427,7 +427,6 @@
#define D_DELETE "删除"
#define D_REPLY "回复"
#define D_KNX_GROUP_ADDRESS_TO_READ "用来接收数据的组地址"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "接收自"
#define D_KNX_COMMAND_WRITE "写"
#define D_KNX_COMMAND_READ "读"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "南"
#define D_TX20_WEST "西"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "无"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "瓦时"
#define D_UNIT_WATT_METER_QUADRAT "瓦/平米"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "相位角"
#define D_IMPORT_ACTIVE "有功输入"

View File

@ -427,7 +427,6 @@
#define D_DELETE "Delete"
#define D_REPLY "Reply"
#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from"
#define D_LOG_KNX "KNX: "
#define D_RECEIVED_FROM "Received from"
#define D_KNX_COMMAND_WRITE "Write"
#define D_KNX_COMMAND_READ "Read"
@ -508,9 +507,6 @@
#define D_TX20_SOUTH "S"
#define D_TX20_WEST "W"
//xsns_43_hre.ino
#define D_LOG_HRE "HRE: "
// tasmota_template.h - keep them as short as possible to be able to fit them in GUI drop down box
#define D_SENSOR_NONE "None"
#define D_SENSOR_USER "User"
@ -552,8 +548,8 @@
#define D_SENSOR_HPMA_TX "HPMA Tx"
#define D_SENSOR_SBR_RX "SerBr Rx"
#define D_SENSOR_SBR_TX "SerBr Tx"
#define D_SENSOR_SR04_TRIG "SR04 Tri"
#define D_SENSOR_SR04_ECHO "SR04 Ech"
#define D_SENSOR_SR04_TRIG "SR04 Tri/TX"
#define D_SENSOR_SR04_ECHO "SR04 Ech/RX"
#define D_SENSOR_SDM120_TX "SDMx20 Tx"
#define D_SENSOR_SDM120_RX "SDMx20 Rx"
#define D_SENSOR_SDM630_TX "SDM630 Tx"
@ -667,31 +663,6 @@
#define D_UNIT_WATTHOUR "瓦時"
#define D_UNIT_WATT_METER_QUADRAT "W/m²"
// Log message prefix
#define D_LOG_APPLICATION "APP: " // Application
#define D_LOG_BRIDGE "BRG: " // Bridge
#define D_LOG_CONFIG "CFG: " // Settings
#define D_LOG_COMMAND "CMD: " // Command
#define D_LOG_DEBUG "DBG: " // Debug
#define D_LOG_DHT "DHT: " // DHT sensor
#define D_LOG_DOMOTICZ "DOM: " // Domoticz
#define D_LOG_DSB "DSB: " // DS18xB20 sensor
#define D_LOG_HTTP "HTP: " // HTTP webserver
#define D_LOG_I2C "I2C: " // I2C
#define D_LOG_IRR "IRR: " // Infra Red Received
#define D_LOG_LOG "LOG: " // Logging
#define D_LOG_MODULE "MOD: " // Module
#define D_LOG_MDNS "DNS: " // mDNS
#define D_LOG_MQTT "MQT: " // MQTT
#define D_LOG_OTHER "OTH: " // Other
#define D_LOG_RESULT "RSL: " // Result
#define D_LOG_RFR "RFR: " // RF Received
#define D_LOG_SERIAL "SER: " // Serial
#define D_LOG_SHT1 "SHT: " // SHT1x sensor
#define D_LOG_UPLOAD "UPL: " // Upload
#define D_LOG_UPNP "UPP: " // UPnP
#define D_LOG_WIFI "WIF: " // Wifi
//SDM220
#define D_PHASE_ANGLE "Phase Angle"
#define D_IMPORT_ACTIVE "Import Active"

View File

@ -89,7 +89,7 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
uint32_t cors_enabled : 1; // bit 23 (v7.0.0.1) - SetOption73 - Enable HTTP CORS
uint32_t ds18x20_internal_pullup : 1; // bit 24 (v7.0.0.1) - SetOption74 - Enable internal pullup for single DS18x20 sensor
uint32_t grouptopic_mode : 1; // bit 25 (v7.0.0.1) - SetOption75 - GroupTopic replaces %topic% (0) or fixed topic cmnd/grouptopic (1)
uint32_t spare26 : 1;
uint32_t bootcount_update : 1; // bit 26 (v7.0.0.4) - SetOption76 - Enable incrementing bootcount when deepsleep is enabled
uint32_t spare27 : 1;
uint32_t spare28 : 1;
uint32_t spare29 : 1;

View File

@ -231,6 +231,12 @@ void RtcRebootSave(void)
}
}
void RtcRebootReset(void)
{
RtcReboot.fast_reboot_count = 0;
RtcRebootSave();
}
void RtcRebootLoad(void)
{
ESP.rtcUserMemoryRead(100 - sizeof(RTCRBT), (uint32_t*)&RtcReboot, sizeof(RTCRBT)); // 0x280
@ -533,65 +539,68 @@ void SettingsLoad(void)
RtcSettingsLoad();
}
void SettingsErase(uint8_t type)
void EspErase(uint32_t start_sector, uint32_t end_sector)
{
/*
0 = Erase from program end until end of physical flash
1 = Erase SDK parameter area at end of linker memory model (0x0FDxxx - 0x0FFFFF) solving possible wifi errors
2 = Erase Tasmota settings
*/
bool serial_output = (LOG_LEVEL_DEBUG_MORE <= seriallog_level);
for (uint32_t sector = start_sector; sector < end_sector; sector++) {
#ifndef FIRMWARE_MINIMAL
uint32_t _sectorStart = (ESP.getSketchSize() / SPI_FLASH_SEC_SIZE) + 1;
uint32_t _sectorEnd = ESP.getFlashChipRealSize() / SPI_FLASH_SEC_SIZE;
if (1 == type) {
_sectorStart = SETTINGS_LOCATION +2; // SDK parameter area above EEPROM area (0x0FDxxx - 0x0FFFFF)
_sectorEnd = SETTINGS_LOCATION +5;
}
else if (2 == type) {
_sectorStart = SETTINGS_LOCATION - CFG_ROTATES; // Tasmota parameter area (0x0F4xxx - 0x0FBFFF)
_sectorEnd = SETTINGS_LOCATION +1;
}
bool result = ESP.flashEraseSector(sector); // Arduino core - erases flash as seen by SDK
// bool result = !SPIEraseSector(sector); // SDK - erases flash as seen by SDK
// bool result = EsptoolEraseSector(sector); // Esptool - erases flash completely (slow)
bool _serialoutput = (LOG_LEVEL_DEBUG_MORE <= seriallog_level);
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION D_ERASE " %d " D_UNIT_SECTORS), _sectorEnd - _sectorStart);
for (uint32_t _sector = _sectorStart; _sector < _sectorEnd; _sector++) {
bool result = ESP.flashEraseSector(_sector);
if (_serialoutput) {
Serial.print(F(D_LOG_APPLICATION D_ERASED_SECTOR " "));
Serial.print(_sector);
if (result) {
Serial.println(F(" " D_OK));
} else {
Serial.println(F(" " D_ERROR));
}
if (serial_output) {
Serial.printf_P(PSTR(D_LOG_APPLICATION D_ERASED_SECTOR " %d %s\n"), sector, (result) ? D_OK : D_ERROR);
delay(10);
} else {
yield();
}
OsWatchLoop();
}
#endif // FIRMWARE_MINIMAL
}
// Copied from 2.4.0 as 2.3.0 is incomplete
bool SettingsEraseConfig(void) {
const size_t cfgSize = 0x4000;
size_t cfgAddr = ESP.getFlashChipSize() - cfgSize;
void SettingsErase(uint8_t type)
{
/*
For Arduino core and SDK:
Erase only works from flash start address to SDK recognized flash end address (flashchip->chip_size = ESP.getFlashChipSize).
Addresses above SDK recognized size (up to ESP.getFlashChipRealSize) are not accessable.
For Esptool:
The only way to erase whole flash is esptool which uses direct SPI writes to flash.
for (size_t offset = 0; offset < cfgSize; offset += SPI_FLASH_SEC_SIZE) {
if (!ESP.flashEraseSector((cfgAddr + offset) / SPI_FLASH_SEC_SIZE)) {
return false;
}
The default erase function is EspTool (EsptoolErase)
0 = Erase from program end until end of flash as seen by SDK
1 = Erase 16k SDK parameter area near end of flash as seen by SDK (0x0xFCxxx - 0x0xFFFFF) solving possible wifi errors
2 = Erase Tasmota settings (0x0xF3xxx - 0x0xFBFFF)
*/
#ifndef FIRMWARE_MINIMAL
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("SDK: Flash size 0x%08X"), flashchip->chip_size);
uint32_t _sectorStart = (ESP.getSketchSize() / SPI_FLASH_SEC_SIZE) + 1;
uint32_t _sectorEnd = ESP.getFlashChipRealSize() / SPI_FLASH_SEC_SIZE;
// uint32_t _sectorEnd = ESP.getFlashChipSize() / SPI_FLASH_SEC_SIZE;
if (1 == type) {
// source Esp.cpp and core_esp8266_phy.cpp
_sectorStart = (ESP.getFlashChipSize() / SPI_FLASH_SEC_SIZE) - 4;
}
return true;
else if (2 == type) {
_sectorStart = SETTINGS_LOCATION - CFG_ROTATES; // Tasmota parameter area (0x0F3xxx - 0x0FBFFF)
_sectorEnd = SETTINGS_LOCATION +1;
}
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION D_ERASE " %d " D_UNIT_SECTORS), _sectorEnd - _sectorStart);
// EspErase(_sectorStart, _sectorEnd); // Arduino core and SDK - erases flash as seen by SDK
EsptoolErase(_sectorStart, _sectorEnd); // Esptool - erases flash completely
#endif // FIRMWARE_MINIMAL
}
void SettingsSdkErase(void)
{
WiFi.disconnect(true); // Delete SDK wifi config
SettingsErase(1);
SettingsEraseConfig();
delay(1000);
}
@ -1141,6 +1150,7 @@ void SettingsDelta(void)
if (Settings.version < 0x07000004) {
Settings.wifi_output_power = 170;
}
Settings.version = VERSION;
SettingsSave(1);
}

View File

@ -87,127 +87,11 @@ bool OsWatchBlockedLoop(void)
{
return oswatch_blocked_loop;
}
/*********************************************************************************************\
* Miscellaneous
\*********************************************************************************************/
#ifdef ARDUINO_ESP8266_RELEASE_2_3_0
// Functions not available in 2.3.0
// http://clc-wiki.net/wiki/C_standard_library:string.h:memchr
void* memchr(const void* ptr, int value, size_t num)
{
unsigned char *p = (unsigned char*)ptr;
while (num--) {
if (*p != (unsigned char)value) {
p++;
} else {
return p;
}
}
return 0;
}
// http://clc-wiki.net/wiki/C_standard_library:string.h:strcspn
// Get span until any character in string
size_t strcspn(const char *str1, const char *str2)
{
size_t ret = 0;
while (*str1) {
if (strchr(str2, *str1)) { // Slow
return ret;
} else {
str1++;
ret++;
}
}
return ret;
}
// https://clc-wiki.net/wiki/C_standard_library:string.h:strpbrk
// Locate the first occurrence in the string pointed to by s1 of any character from the string pointed to by s2
char* strpbrk(const char *s1, const char *s2)
{
while(*s1) {
if (strchr(s2, *s1++)) {
return (char*)--s1;
}
}
return 0;
}
// https://opensource.apple.com/source/Libc/Libc-583/stdlib/FreeBSD/strtoull.c
// Convert a string to an unsigned long long integer
#ifndef __LONG_LONG_MAX__
#define __LONG_LONG_MAX__ 9223372036854775807LL
#endif
#ifndef ULLONG_MAX
#define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1)
#endif
unsigned long long strtoull(const char *__restrict nptr, char **__restrict endptr, int base)
{
const char *s = nptr;
char c;
do { c = *s++; } while (isspace((unsigned char)c)); // Trim leading spaces
int neg = 0;
if (c == '-') { // Set minus flag and/or skip sign
neg = 1;
c = *s++;
} else {
if (c == '+') {
c = *s++;
}
}
if ((base == 0 || base == 16) && (c == '0') && (*s == 'x' || *s == 'X')) { // Set Hexadecimal
c = s[1];
s += 2;
base = 16;
}
if (base == 0) { base = (c == '0') ? 8 : 10; } // Set Octal or Decimal
unsigned long long acc = 0;
int any = 0;
if (base > 1 && base < 37) {
unsigned long long cutoff = ULLONG_MAX / base;
int cutlim = ULLONG_MAX % base;
for ( ; ; c = *s++) {
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A' - 10;
else if (c >= 'a' && c <= 'z')
c -= 'a' - 10;
else
break;
if (c >= base)
break;
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
acc *= base;
acc += c;
}
}
if (any < 0) {
acc = ULLONG_MAX; // Range error
}
else if (any && neg) {
acc = -acc;
}
}
if (endptr != nullptr) { *endptr = (char *)(any ? s - 1 : nptr); }
return acc;
}
#endif // ARDUINO_ESP8266_RELEASE_2_3_0
// Get span until single character in string
size_t strchrspn(const char *str1, int character)
{
@ -612,6 +496,20 @@ char* GetPowerDevice(char* dest, uint32_t idx, size_t size)
return GetPowerDevice(dest, idx, size, 0);
}
String GetDeviceHardware(void)
{
// esptool.py get_efuses
uint32_t efuse1 = *(uint32_t*)(0x3FF00050);
uint32_t efuse2 = *(uint32_t*)(0x3FF00054);
// uint32_t efuse3 = *(uint32_t*)(0x3FF00058);
// uint32_t efuse4 = *(uint32_t*)(0x3FF0005C);
// AddLog_P2(LOG_LEVEL_DEBUG, PSTR("FUS: efuses 0x%08X 0x%08X, name %s"), efuse1, efuse2);
bool is_8285 = ( (efuse1 & (1 << 4)) || (efuse2 & (1 << 16)) );
return String((is_8285) ? F("ESP8285") : F("ESP8266EX"));
}
float ConvertTemp(float c)
{
float result = c;

View File

@ -369,9 +369,10 @@ void CmndStatus(void)
if ((0 == payload) || (2 == payload)) {
Response_P(PSTR("{\"" D_CMND_STATUS D_STATUS2_FIRMWARE "\":{\"" D_JSON_VERSION "\":\"%s%s\",\"" D_JSON_BUILDDATETIME "\":\"%s\",\""
D_JSON_BOOTVERSION "\":%d,\"" D_JSON_COREVERSION "\":\"" ARDUINO_ESP8266_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\"}}"),
D_JSON_BOOTVERSION "\":%d,\"" D_JSON_COREVERSION "\":\"" ARDUINO_ESP8266_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\","
"\"Hardware\":\"%s\"}}"),
my_version, my_image, GetBuildDateAndTime().c_str(),
ESP.getBootVersion(), ESP.getSdkVersion());
ESP.getBootVersion(), ESP.getSdkVersion(), GetDeviceHardware().c_str());
MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "2"));
}

123
tasmota/support_esptool.ino Normal file
View File

@ -0,0 +1,123 @@
/*
support_esptool.ino - esptool support for Tasmota
Copyright (C) 2019 Theo Arends
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/>.
*/
#define USE_ESPTOOL
#ifdef USE_ESPTOOL
/*********************************************************************************************\
* EspTool Erase function based on Version 2.8
*
* Source: https://github.com/espressif/esptool/blob/master/flasher_stub
\*********************************************************************************************/
// *** flasher_stub/include/soc_support.h
#define READ_REG(REG) (*((volatile uint32_t *)(REG)))
#define WRITE_REG(REG, VAL) *((volatile uint32_t *)(REG)) = (VAL)
#define REG_SET_MASK(reg, mask) WRITE_REG((reg), (READ_REG(reg)|(mask)))
#define SPI_BASE_REG 0x60000200 // SPI peripheral 0
#define SPI_CMD_REG (SPI_BASE_REG + 0x00)
#define SPI_FLASH_RDSR (1<<27)
#define SPI_FLASH_SE (1<<24)
#define SPI_FLASH_BE (1<<23)
#define SPI_FLASH_WREN (1<<30)
#define SPI_ADDR_REG (SPI_BASE_REG + 0x04)
#define SPI_CTRL_REG (SPI_BASE_REG + 0x08)
#define SPI_RD_STATUS_REG (SPI_BASE_REG + 0x10)
#define SPI_W0_REG (SPI_BASE_REG + 0x40)
#define SPI_EXT2_REG (SPI_BASE_REG + 0xF8)
#define SPI_ST 0x7 // Done state value
// *** flasher_stub/include/stub_flasher.h
#define SECTORS_PER_BLOCK (FLASH_BLOCK_SIZE / SPI_FLASH_SEC_SIZE)
// *** flasher_stub/stub_write_flash.c
static const uint32_t STATUS_WIP_BIT = (1 << 0); // SPI status bits
// Wait for the SPI state machine to be ready, ie no command in progress in the internal host.
inline static void spi_wait_ready(void)
{
while((READ_REG(SPI_EXT2_REG) & SPI_ST)) { } // Wait for SPI state machine ready
}
// Returns true if the spiflash is ready for its next write operation.
// Doesn't block, except for the SPI state machine to finish any previous SPI host operation.
static bool spiflash_is_ready(void)
{
spi_wait_ready();
WRITE_REG(SPI_RD_STATUS_REG, 0);
WRITE_REG(SPI_CMD_REG, SPI_FLASH_RDSR); // Issue read status command
while(READ_REG(SPI_CMD_REG) != 0) { }
uint32_t status_value = READ_REG(SPI_RD_STATUS_REG);
return (status_value & STATUS_WIP_BIT) == 0;
}
static void spi_write_enable(void)
{
while(!spiflash_is_ready()) { }
WRITE_REG(SPI_CMD_REG, SPI_FLASH_WREN);
while(READ_REG(SPI_CMD_REG) != 0) { }
}
bool EsptoolEraseSector(uint32_t sector)
{
spi_write_enable();
spi_wait_ready();
WRITE_REG(SPI_ADDR_REG, (sector * SPI_FLASH_SEC_SIZE) & 0xffffff);
WRITE_REG(SPI_CMD_REG, SPI_FLASH_SE); // Sector erase, 4KB
while(READ_REG(SPI_CMD_REG) != 0) { }
while(!spiflash_is_ready()) { }
return true;
}
void EsptoolErase(uint32_t start_sector, uint32_t end_sector)
{
int next_erase_sector = start_sector;
int remaining_erase_sector = end_sector - start_sector;
while (remaining_erase_sector > 0) {
spi_write_enable();
uint32_t command = SPI_FLASH_SE; // Sector erase, 4kB
uint32_t sectors_to_erase = 1;
if (remaining_erase_sector >= SECTORS_PER_BLOCK &&
next_erase_sector % SECTORS_PER_BLOCK == 0) {
command = SPI_FLASH_BE; // Block erase 64kB if we have space for it
sectors_to_erase = SECTORS_PER_BLOCK;
}
uint32_t addr = next_erase_sector * SPI_FLASH_SEC_SIZE;
spi_wait_ready();
WRITE_REG(SPI_ADDR_REG, addr & 0xffffff);
WRITE_REG(SPI_CMD_REG, command); // Perform erase, 4kB or 65kB
while(READ_REG(SPI_CMD_REG) != 0) { }
remaining_erase_sector -= sectors_to_erase;
next_erase_sector += sectors_to_erase;
while (!spiflash_is_ready()) { }
yield();
OsWatchLoop();
}
}
#endif // USE_ESPTOOL

View File

@ -0,0 +1,153 @@
/*
support_legacy_cores.ino - Legacy arduino core support for Tasmota
Copyright (C) 2019 Theo Arends
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/>.
*/
#ifdef ARDUINO_ESP8266_RELEASE_2_3_0
/*********************************************************************************************\
* Functions not available in core 2.3.0
\*********************************************************************************************/
// Functions not available in 2.3.0
// http://clc-wiki.net/wiki/C_standard_library:string.h:memchr
void* memchr(const void* ptr, int value, size_t num)
{
unsigned char *p = (unsigned char*)ptr;
while (num--) {
if (*p != (unsigned char)value) {
p++;
} else {
return p;
}
}
return 0;
}
// http://clc-wiki.net/wiki/C_standard_library:string.h:strcspn
// Get span until any character in string
size_t strcspn(const char *str1, const char *str2)
{
size_t ret = 0;
while (*str1) {
if (strchr(str2, *str1)) { // Slow
return ret;
} else {
str1++;
ret++;
}
}
return ret;
}
// https://clc-wiki.net/wiki/C_standard_library:string.h:strpbrk
// Locate the first occurrence in the string pointed to by s1 of any character from the string pointed to by s2
char* strpbrk(const char *s1, const char *s2)
{
while(*s1) {
if (strchr(s2, *s1++)) {
return (char*)--s1;
}
}
return 0;
}
// https://opensource.apple.com/source/Libc/Libc-583/stdlib/FreeBSD/strtoull.c
// Convert a string to an unsigned long long integer
#ifndef __LONG_LONG_MAX__
#define __LONG_LONG_MAX__ 9223372036854775807LL
#endif
#ifndef ULLONG_MAX
#define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1)
#endif
unsigned long long strtoull(const char *__restrict nptr, char **__restrict endptr, int base)
{
const char *s = nptr;
char c;
do { c = *s++; } while (isspace((unsigned char)c)); // Trim leading spaces
int neg = 0;
if (c == '-') { // Set minus flag and/or skip sign
neg = 1;
c = *s++;
} else {
if (c == '+') {
c = *s++;
}
}
if ((base == 0 || base == 16) && (c == '0') && (*s == 'x' || *s == 'X')) { // Set Hexadecimal
c = s[1];
s += 2;
base = 16;
}
if (base == 0) { base = (c == '0') ? 8 : 10; } // Set Octal or Decimal
unsigned long long acc = 0;
int any = 0;
if (base > 1 && base < 37) {
unsigned long long cutoff = ULLONG_MAX / base;
int cutlim = ULLONG_MAX % base;
for ( ; ; c = *s++) {
if (c >= '0' && c <= '9')
c -= '0';
else if (c >= 'A' && c <= 'Z')
c -= 'A' - 10;
else if (c >= 'a' && c <= 'z')
c -= 'a' - 10;
else
break;
if (c >= base)
break;
if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
any = -1;
else {
any = 1;
acc *= base;
acc += c;
}
}
if (any < 0) {
acc = ULLONG_MAX; // Range error
}
else if (any && neg) {
acc = -acc;
}
}
if (endptr != nullptr) { *endptr = (char *)(any ? s - 1 : nptr); }
return acc;
}
// https://github.com/arendst/Tasmota/issues/6856#issuecomment-554258914
void* memmove_P(void *dest, const void *src, size_t n)
{
if (src > (void*)0x40000000) {
return memcpy_P(dest, src, n);
} else {
return memmove(dest, src, n);
}
}
#endif // ARDUINO_ESP8266_RELEASE_2_3_0
/*********************************************************************************************\
*
\*********************************************************************************************/

View File

@ -615,9 +615,7 @@ void WifiShutdown(void)
void EspRestart(void)
{
WifiShutdown();
RtcRebootReset();
// ESP.restart(); // This results in exception 3 on restarts on core 2.3.0
ESP.reset();
}

View File

@ -816,11 +816,16 @@ void PerformEverySecond(void)
}
if (BOOT_LOOP_TIME == uptime) {
RtcReboot.fast_reboot_count = 0;
RtcRebootSave();
RtcRebootReset();
Settings.bootcount++; // Moved to here to stop flash writes during start-up
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION D_BOOT_COUNT " %d"), Settings.bootcount);
#ifdef USE_DEEPSLEEP
if (!(DeepSleepEnabled() && !Settings.flag3.bootcount_update)) {
#endif
Settings.bootcount++; // Moved to here to stop flash writes during start-up
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_APPLICATION D_BOOT_COUNT " %d"), Settings.bootcount);
#ifdef USE_DEEPSLEEP
}
#endif
}
if (seriallog_timer) {

View File

@ -97,8 +97,8 @@ enum UserSelectablePins {
GPIO_SDS0X1_RX, // Nova Fitness SDS011 Serial interface
GPIO_SBR_TX, // Serial Bridge Serial interface
GPIO_SBR_RX, // Serial Bridge Serial interface
GPIO_SR04_TRIG, // SR04 Trigger pin
GPIO_SR04_ECHO, // SR04 Echo pin
GPIO_SR04_TRIG, // SR04 Trigger/TX pin
GPIO_SR04_ECHO, // SR04 Echo/RX pin
GPIO_SDM120_TX, // SDM120 Serial interface
GPIO_SDM120_RX, // SDM120 Serial interface
GPIO_SDM630_TX, // SDM630 Serial interface
@ -603,8 +603,8 @@ const uint8_t kGpioNiceList[] PROGMEM = {
GPIO_RF_SENSOR, // Rf receiver with sensor decoding
#endif
#ifdef USE_SR04
GPIO_SR04_TRIG, // SR04 Trigger pin
GPIO_SR04_ECHO, // SR04 Echo pin
GPIO_SR04_TRIG, // SR04 Tri/TXgger pin
GPIO_SR04_ECHO, // SR04 Ech/RXo pin
#endif
#ifdef USE_TM1638
GPIO_TM16CLK, // TM1638 Clock

View File

@ -34,18 +34,23 @@ const char HASS_DISCOVER_RELAY[] PROGMEM =
const char HASS_DISCOVER_BUTTON_SWITCH[] PROGMEM =
"{\"name\":\"%s\"," // dualr2 1 BTN
"\"stat_t\":\"%s\"," // stat/RESULT/ (implies "\"optimistic\":\"false\",")
"\"value_template\":\"{{value_json.%s}}\"," // BUTTON1
"\"pl_on\":\"%s\"," // ON
"\"stat_t\":\"%s\"," // dualr2/stat/BUTTON1/ (implies "\"optimistic\":\"false\",")
"\"avty_t\":\"%s\"," // tele/dualr2/LWT
"\"pl_avail\":\"" D_ONLINE "\"," // Online
"\"pl_not_avail\":\"" D_OFFLINE "\""; // Offline
const char HASS_DISCOVER_BUTTON_SWITCH_TOGGLE[] PROGMEM =
",\"off_delay\":1"; // Hass has no support for TOGGLE, fake it by resetting to OFF after 1s
const char HASS_DISCOVER_BUTTON_TOGGLE[] PROGMEM =
",\"value_template\":\"{{value_json.%s}}\"," // STATE
"\"pl_on\":\"%s\"," // TOGGLE
"\"off_delay\":1"; // Hass has no support for TOGGLE, fake it by resetting to OFF after 1s
const char HASS_DISCOVER_SWITCH_TOGGLE[] PROGMEM =
",\"value_template\":\"{%%if is_state(entity_id,\\\"on\\\")-%%}OFF{%%-else-%%}ON{%%-endif%%}\""; // A switch must maintain his state until the next update
const char HASS_DISCOVER_BUTTON_SWITCH_ONOFF[] PROGMEM =
",\"frc_upd\":true," // In ON/OFF case, enable force_update to make automations work
",\"value_template\":\"{{value_json.%s}}\"," // STATE
"\"frc_upd\":true," // In ON/OFF case, enable force_update to make automations work
"\"pl_on\":\"%s\"," // ON
"\"pl_off\":\"%s\""; // OFF
const char HASS_DISCOVER_LIGHT_DIMMER[] PROGMEM =
@ -319,21 +324,25 @@ void HAssAnnounceButtonSwitch(uint8_t device, char* topic, uint8_t present, uint
char jsoname[8];
snprintf_P(name, sizeof(name), PSTR("%s %s%d"), Settings.friendlyname[0], key?"Switch":"Button", device+1);
snprintf_P(jsoname, sizeof(jsoname), PSTR("%s%d"), key?"SWITCH":"BUTTON", device+1);
GetPowerDevice(value_template, device+1, sizeof(value_template),
key + Settings.flag.device_index_enable); // Force index for Switch 1, Index on Button1 is controlled by SetOption26 - Switch between POWER or POWER1
//GetTopic_P(state_topic, CMND, topic, value_template); // State of button is sent as CMND TOGGLE, state of switch is sent as ON/OFF
GetTopic_P(state_topic, STAT, mqtt_topic, PSTR(D_RSLT_RESULT));
GetTopic_P(state_topic, STAT, mqtt_topic, (PSTR("/'%s'"), jsoname));
GetTopic_P(availability_topic, TELE, mqtt_topic, S_LWT);
FindPrefix(state_topic, availability_topic, prefix);
Shorten(&state_topic, prefix);
Shorten(&availability_topic, prefix);
snprintf_P(jsoname, sizeof(jsoname), PSTR("%s%d"), key?"SWITCH":"BUTTON", device+1);
Response_P(HASS_DISCOVER_BUTTON_SWITCH, name, state_topic, jsoname, Settings.state_text[toggle?2:1], availability_topic);
Response_P(HASS_DISCOVER_BUTTON_SWITCH, name, state_topic, availability_topic);
TryResponseAppend_P(HASS_DISCOVER_DEVICE_INFO_SHORT, unique_id, ESP.getChipId(), WiFi.macAddress().c_str());
if (strlen(prefix) > 0 ) TryResponseAppend_P(HASS_DISCOVER_TOPIC_PREFIX, prefix);
if (toggle) TryResponseAppend_P(HASS_DISCOVER_BUTTON_SWITCH_TOGGLE);
else TryResponseAppend_P(HASS_DISCOVER_BUTTON_SWITCH_ONOFF, Settings.state_text[0]);
if (toggle) {
if (!key) {
TryResponseAppend_P(HASS_DISCOVER_BUTTON_TOGGLE, PSTR(D_RSLT_STATE), Settings.state_text[toggle?2:1]);
} else {TryResponseAppend_P(HASS_DISCOVER_SWITCH_TOGGLE);}
}
else TryResponseAppend_P(HASS_DISCOVER_BUTTON_SWITCH_ONOFF, PSTR(D_RSLT_STATE), Settings.state_text[toggle?2:1], Settings.state_text[0]);
TryResponseAppend_P(PSTR("}"));
}
@ -620,8 +629,10 @@ void HAssAnyKey(void)
char scommand[CMDSZ];
snprintf_P(scommand, sizeof(scommand), PSTR("%s%d"), (key) ? "SWITCH" : "BUTTON", device);
char stopic[TOPSZ];
GetTopic_P(stopic, STAT, mqtt_topic, (Settings.flag.mqtt_response) ? scommand : S_RSLT_RESULT); // SetOption4 - Switch between MQTT RESULT or COMMAND
Response_P(S_JSON_COMMAND_SVALUE, scommand, GetStateText(state));
//GetTopic_P(stopic, STAT, mqtt_topic, (Settings.flag.mqtt_response) ? scommand : S_RSLT_RESULT); // SetOption4 - Switch between MQTT RESULT or COMMAND
//Response_P(S_JSON_COMMAND_SVALUE, scommand, GetStateText(state));
GetTopic_P(stopic, STAT, mqtt_topic, scommand);
Response_P(S_JSON_COMMAND_SVALUE, PSTR(D_RSLT_STATE), GetStateText(state));
MqttPublish(stopic);
}

View File

@ -388,7 +388,7 @@ uint32_t parseSingleAttribute(JsonObject& json, char *attrid_str, class SBuffer
// String pp; // pretty print
// json[attrid_str].prettyPrintTo(pp);
// // now store the attribute
// AddLog_P2(LOG_LEVEL_INFO, PSTR("ZIG: ZCL attribute decoded, id %s, type 0x%02X, val=%s"),
// AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "ZCL attribute decoded, id %s, type 0x%02X, val=%s"),
// attrid_str, attrtype, pp.c_str());
return i - offset; // how much have we increased the index
}

View File

@ -323,11 +323,11 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = {
ZI_ON_ERROR_GOTO(50)
//ZI_MQTT_STATE(ZIGBEE_STATUS_BOOT, "Booting")
//ZI_LOG(LOG_LEVEL_INFO, "ZIG: rebooting device")
//ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "rebooting device")
ZI_SEND(ZBS_RESET) // reboot cc2530 just in case we rebooted ESP8266 but not cc2530
ZI_WAIT_RECV_FUNC(5000, ZBR_RESET, &Z_Reboot) // timeout 5s
ZI_WAIT(100)
ZI_LOG(LOG_LEVEL_INFO, "ZIG: checking device configuration")
ZI_LOG(LOG_LEVEL_DEBUG, D_LOG_ZIGBEE "checking device configuration")
ZI_SEND(ZBS_ZNPHC) // check value of ZNP Has Configured
ZI_WAIT_RECV(2000, ZBR_ZNPHC)
ZI_SEND(ZBS_VERSION) // check ZNP software version
@ -342,7 +342,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = {
ZI_WAIT_RECV(1000, ZBR_PFGK)
ZI_SEND(ZBS_PFGKEN) // check PFGKEN
ZI_WAIT_RECV(1000, ZBR_PFGKEN)
//ZI_LOG(LOG_LEVEL_INFO, "ZIG: zigbee configuration ok")
//ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "zigbee configuration ok")
// all is good, we can start
ZI_LABEL(ZIGBEE_LABEL_START) // START ZNP App
@ -350,7 +350,7 @@ static const Zigbee_Instruction zb_prog[] PROGMEM = {
//ZI_CALL(&Z_State_Ready, 1) // Now accept incoming messages
ZI_ON_ERROR_GOTO(ZIGBEE_LABEL_ABORT)
// Z_ZDO:startupFromApp
//ZI_LOG(LOG_LEVEL_INFO, "ZIG: starting zigbee coordinator")
//ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "starting zigbee coordinator")
ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator
ZI_WAIT_RECV(2000, ZBR_STARTUPFROMAPP) // wait for sync ack of command
ZI_WAIT_UNTIL(5000, AREQ_STARTUPFROMAPP) // wait for async message that coordinator started
@ -383,7 +383,7 @@ ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator
ZI_LABEL(ZIGBEE_LABEL_READY)
ZI_MQTT_STATE(ZIGBEE_STATUS_OK, "Started")
ZI_LOG(LOG_LEVEL_INFO, "ZIG: zigbee device ready, listening...")
ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "Zigbee started")
ZI_CALL(&Z_State_Ready, 1) // Now accept incoming messages
ZI_LABEL(ZIGBEE_LABEL_MAIN_LOOP)
ZI_WAIT_FOREVER()
@ -415,7 +415,7 @@ ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator
ZI_LABEL(50) // reformat device
ZI_MQTT_STATE(ZIGBEE_STATUS_RESET_CONF, "Reseting configuration")
//ZI_LOG(LOG_LEVEL_INFO, "ZIG: zigbee bad configuration of device, doing a factory reset")
//ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "zigbee bad configuration of device, doing a factory reset")
ZI_ON_ERROR_GOTO(ZIGBEE_LABEL_ABORT)
ZI_SEND(ZBS_FACTRES) // factory reset
ZI_WAIT_RECV(1000, ZBR_W_OK)
@ -443,7 +443,7 @@ ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator
ZI_SEND(ZBS_WNV_ZNPHC) // Write NV ZNP Has Configured
ZI_WAIT_RECV(1000, ZBR_WNV_OK)
//ZI_LOG(LOG_LEVEL_INFO, "ZIG: zigbee device reconfigured")
//ZI_LOG(LOG_LEVEL_INFO, D_LOG_ZIGBEE "zigbee device reconfigured")
ZI_GOTO(ZIGBEE_LABEL_START)
ZI_LABEL(ZIGBEE_LABEL_UNSUPPORTED_VERSION)
@ -452,7 +452,7 @@ ZI_SEND(ZBS_STARTUPFROMAPP) // start coordinator
ZI_LABEL(ZIGBEE_LABEL_ABORT) // Label 99: abort
ZI_MQTT_STATE(ZIGBEE_STATUS_ABORT, "Abort")
ZI_LOG(LOG_LEVEL_ERROR, "ZIG: Abort")
ZI_LOG(LOG_LEVEL_ERROR, D_LOG_ZIGBEE "Abort")
ZI_STOP(ZIGBEE_LABEL_ABORT)
};
@ -480,7 +480,7 @@ void ZigbeeGotoLabel(uint8_t label) {
//AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("ZGB GOTO: pc %d instr %d"), i, cur_instr);
if (ZGB_INSTR_LABEL == cur_instr) {
//AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("ZIG: found label %d at pc %d"), cur_d8, i);
//AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "found label %d at pc %d"), cur_d8, i);
if (label == cur_d8) {
// label found, goto to this pc
zigbee.pc = i;
@ -494,12 +494,12 @@ void ZigbeeGotoLabel(uint8_t label) {
}
// no label found, abort
AddLog_P2(LOG_LEVEL_ERROR, PSTR("ZIG: Goto label not found, label=%d pc=%d"), label, zigbee.pc);
AddLog_P2(LOG_LEVEL_ERROR, PSTR(D_LOG_ZIGBEE "Goto label not found, label=%d pc=%d"), label, zigbee.pc);
if (ZIGBEE_LABEL_ABORT != label) {
// if not already looking for ZIGBEE_LABEL_ABORT, goto ZIGBEE_LABEL_ABORT
ZigbeeGotoLabel(ZIGBEE_LABEL_ABORT);
} else {
AddLog_P2(LOG_LEVEL_ERROR, PSTR("ZIG: Label Abort (%d) not present, aborting Zigbee"), ZIGBEE_LABEL_ABORT);
AddLog_P2(LOG_LEVEL_ERROR, PSTR(D_LOG_ZIGBEE "Label Abort (%d) not present, aborting Zigbee"), ZIGBEE_LABEL_ABORT);
zigbee.state_machine = false;
zigbee.active = false;
}
@ -516,9 +516,9 @@ void ZigbeeStateMachine_Run(void) {
if (zigbee.state_waiting) { // state machine is waiting for external event or timeout
// checking if timeout expired
if ((zigbee.next_timeout) && (now > zigbee.next_timeout)) { // if next_timeout == 0 then wait forever
//AddLog_P2(LOG_LEVEL_INFO, PSTR("ZIG: timeout occured pc=%d"), zigbee.pc);
//AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "timeout occured pc=%d"), zigbee.pc);
if (!zigbee.state_no_timeout) {
AddLog_P2(LOG_LEVEL_INFO, PSTR("ZIG: timeout, goto label %d"), zigbee.on_timeout_goto);
AddLog_P2(LOG_LEVEL_INFO, PSTR(D_LOG_ZIGBEE "timeout, goto label %d"), zigbee.on_timeout_goto);
ZigbeeGotoLabel(zigbee.on_timeout_goto);
} else {
zigbee.state_waiting = false; // simply stop waiting
@ -534,7 +534,7 @@ void ZigbeeStateMachine_Run(void) {
zigbee.state_no_timeout = false; // reset the no_timeout for next instruction
if (zigbee.pc > (sizeof(zb_prog)/sizeof(zb_prog[0]))) {
AddLog_P2(LOG_LEVEL_ERROR, PSTR("ZIG: Invalid pc: %d, aborting"), zigbee.pc);
AddLog_P2(LOG_LEVEL_ERROR, PSTR(D_LOG_ZIGBEE "Invalid pc: %d, aborting"), zigbee.pc);
zigbee.pc = -1;
}
if (zigbee.pc < 0) {
@ -543,7 +543,7 @@ void ZigbeeStateMachine_Run(void) {
}
// load current instruction details
AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR("ZIG: Executing instruction pc=%d"), zigbee.pc);
AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "Executing instruction pc=%d"), zigbee.pc);
const Zigbee_Instruction *cur_instr_line = &zb_prog[zigbee.pc];
cur_instr = pgm_read_byte(&cur_instr_line->i.i);
cur_d8 = pgm_read_byte(&cur_instr_line->i.d8);
@ -585,7 +585,7 @@ void ZigbeeStateMachine_Run(void) {
case ZGB_INSTR_STOP:
zigbee.state_machine = false;
if (cur_d8) {
AddLog_P2(LOG_LEVEL_ERROR, PSTR("ZIG: Stopping (%d)"), cur_d8);
AddLog_P2(LOG_LEVEL_ERROR, PSTR(D_LOG_ZIGBEE "Stopping (%d)"), cur_d8);
}
break;
case ZGB_INSTR_CALL:

View File

@ -435,7 +435,6 @@ const Z_Dispatcher Z_DispatchTable[] PROGMEM = {
int32_t Z_Recv_Default(int32_t res, const class SBuffer &buf) {
// Default message handler for new messages
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("ZIG: Z_Recv_Default"));
if (zigbee.init_phase) {
// if still during initialization phase, ignore any unexpected message
return -1; // ignore message

View File

@ -66,7 +66,7 @@ int32_t ZigbeeProcessInput(class SBuffer &buf) {
}
}
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("ZIG: ZigbeeProcessInput: recv_prefix_match = %d, recv_filter_match = %d"), recv_prefix_match, recv_filter_match);
AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "ZigbeeProcessInput: recv_prefix_match = %d, recv_filter_match = %d"), recv_prefix_match, recv_filter_match);
}
// if there is a recv_callback, call it now
@ -105,7 +105,7 @@ int32_t ZigbeeProcessInput(class SBuffer &buf) {
res = (*zigbee.recv_unexpected)(res, buf);
}
}
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("ZIG: ZigbeeProcessInput: res = %d"), res);
AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "ZigbeeProcessInput: res = %d"), res);
// change state accordingly
if (0 == res) {
@ -184,7 +184,7 @@ void ZigbeeInput(void)
ToHex_P((unsigned char*)zigbee_buffer->getBuffer(), zigbee_buffer->len(), hex_char, sizeof(hex_char));
#ifndef Z_USE_SOFTWARE_SERIAL
AddLog_P2(LOG_LEVEL_DEBUG, PSTR("ZIG: Bytes follor_read_metric = %0d"), ZigbeeSerial->getLoopReadMetric());
AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_LOG_ZIGBEE "Bytes follow_read_metric = %0d"), ZigbeeSerial->getLoopReadMetric());
#endif
// buffer received, now check integrity
if (zigbee_buffer->len() != zigbee_frame_len) {
@ -195,15 +195,17 @@ void ZigbeeInput(void)
AddLog_P2(LOG_LEVEL_INFO, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received bad FCS frame %s, %d"), hex_char, fcs);
} else {
// frame is correct
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received correct frame %s"), hex_char);
//AddLog_P2(LOG_LEVEL_DEBUG_MORE, PSTR(D_JSON_ZIGBEEZNPRECEIVED ": received correct frame %s"), hex_char);
SBuffer znp_buffer = zigbee_buffer->subBuffer(2, zigbee_frame_len - 3); // remove SOF, LEN and FCS
#ifdef ZIGBEE_VERBOSE
ToHex_P((unsigned char*)znp_buffer.getBuffer(), znp_buffer.len(), hex_char, sizeof(hex_char));
Response_P(PSTR("{\"" D_JSON_ZIGBEEZNPRECEIVED "\":\"%s\"}"), hex_char);
MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_ZIGBEEZNPRECEIVED));
XdrvRulesProcess();
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZNPRECEIVED " %s"),
hex_char);
// Response_P(PSTR("{\"" D_JSON_ZIGBEEZNPRECEIVED "\":\"%s\"}"), hex_char);
// MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_ZIGBEEZNPRECEIVED));
// XdrvRulesProcess();
#endif
// now process the message
@ -333,10 +335,8 @@ void ZigbeeZNPSend(const uint8_t *msg, size_t len) {
#ifdef ZIGBEE_VERBOSE
// Now send a MQTT message to report the sent message
char hex_char[(len * 2) + 2];
Response_P(PSTR("{\"" D_JSON_ZIGBEEZNPSENT "\":\"%s\"}"),
ToHex_P(msg, len, hex_char, sizeof(hex_char)));
MqttPublishPrefixTopic_P(RESULT_OR_TELE, PSTR(D_JSON_ZIGBEEZNPSENT));
XdrvRulesProcess();
AddLog_P2(LOG_LEVEL_DEBUG, PSTR(D_LOG_ZIGBEE D_JSON_ZIGBEEZNPSENT " %s"),
ToHex_P(msg, len, hex_char, sizeof(hex_char)));
#endif
}

View File

@ -62,8 +62,7 @@ bool DeepSleepEnabled(void)
void DeepSleepInit(void)
{
if (DeepSleepEnabled()) {
RtcReboot.fast_reboot_count = 0;
RtcRebootSave();
RtcRebootReset();
if ((RtcSettings.ultradeepsleep > MAX_DEEPSLEEP_CYCLE) && (RtcSettings.ultradeepsleep < 1700000000)) {
// Go back to sleep after 60 minutes if requested deepsleep has not been reached
RtcSettings.ultradeepsleep = RtcSettings.ultradeepsleep - MAX_DEEPSLEEP_CYCLE;

View File

@ -20,6 +20,7 @@
#ifdef USE_SR04
#include <NewPing.h>
#include <TasmotaSerial.h>
/*********************************************************************************************\
* HC-SR04, HC-SR04+, JSN-SR04T - Ultrasonic distance sensor
*
@ -30,17 +31,129 @@
#define XSNS_22 22
uint8_t sr04_echo_pin = 0;
uint8_t sr04_trig_pin = 0;
uint8_t sr04_type = 1;
int sr04_echo_pin = 0;
int sr04_trig_pin = 0;
real64_t distance;
NewPing* sonar = nullptr;
TasmotaSerial* sonar_serial = nullptr;
uint8_t Sr04TModeDetect(void)
{
sr04_type = 0;
if (pin[GPIO_SR04_ECHO]>=99) return sr04_type;
void Sr04Init(void)
{
sr04_echo_pin = pin[GPIO_SR04_ECHO];
sr04_trig_pin = pin[GPIO_SR04_TRIG];
sonar = new NewPing(sr04_trig_pin, sr04_echo_pin, 300);
sr04_trig_pin = (pin[GPIO_SR04_TRIG] < 99) ? pin[GPIO_SR04_TRIG] : -1;
sonar_serial = new TasmotaSerial(sr04_echo_pin, sr04_trig_pin, 1);
if (sonar_serial->begin(9600,1)) {
DEBUG_SENSOR_LOG(PSTR("SR04: Detect mode"));
if (sr04_trig_pin!=-1) {
sr04_type = (Sr04TMiddleValue(Sr04TMode3Distance(),Sr04TMode3Distance(),Sr04TMode3Distance())!=NO_ECHO)?3:1;
} else {
sr04_type = 2;
}
} else {
sr04_type = 1;
}
if (sr04_type < 2) {
delete sonar_serial;
sonar_serial = nullptr;
sonar = new NewPing(sr04_trig_pin, sr04_echo_pin, 300);
} else {
if (sonar_serial->hardwareSerial()) {
ClaimSerial();
}
}
AddLog_P2(LOG_LEVEL_INFO,PSTR("SR04: Mode %d"), sr04_type);
return sr04_type;
}
uint16_t Sr04TMiddleValue(uint16_t first, uint16_t second, uint16_t third)
{
uint16_t ret = first;
if (first > second) {
first = second;
second = ret;
}
if (third < first) {
return first;
} else if (third > second) {
return second;
} else {
return third;
}
}
uint16_t Sr04TMode3Distance() {
sonar_serial->write(0x55);
sonar_serial->flush();
return Sr04TMode2Distance();
}
uint16_t Sr04TMode2Distance(void)
{
sonar_serial->setTimeout(300);
const char startByte = 0xff;
if (!sonar_serial->find(startByte)) {
//DEBUG_SENSOR_LOG(PSTR("SR04: No start byte"));
return NO_ECHO;
}
delay(5);
uint8_t crc = sonar_serial->read();
//read high byte
uint16_t distance = ((uint16_t)crc) << 8;
//read low byte
distance += sonar_serial->read();
crc += distance & 0x00ff;
crc += 0x00FF;
//check crc sum
if (crc != sonar_serial->read()) {
AddLog_P2(LOG_LEVEL_ERROR,PSTR("SR04: Reading CRC error."));
return NO_ECHO;
}
//DEBUG_SENSOR_LOG(PSTR("SR04: Distance: %d"), distance);
return distance;
}
void Sr04TReading(void) {
if (sonar_serial==nullptr && sonar==nullptr) {
Sr04TModeDetect();
}
switch (sr04_type) {
case 3:
distance = (real64_t)(Sr04TMiddleValue(Sr04TMode3Distance(),Sr04TMode3Distance(),Sr04TMode3Distance()))/ 10; //convert to cm
break;
case 2:
//empty input buffer first
while(sonar_serial->available()) sonar_serial->read();
distance = (real64_t)(Sr04TMiddleValue(Sr04TMode2Distance(),Sr04TMode2Distance(),Sr04TMode2Distance()))/10;
break;
case 1:
distance = (real64_t)(sonar->ping_median(5))/ US_ROUNDTRIP_CM;
break;
default:
distance = NO_ECHO;
}
return;
}
#ifdef USE_WEBSERVER
@ -49,8 +162,7 @@ const char HTTP_SNS_DISTANCE[] PROGMEM =
#endif // USE_WEBSERVER
void Sr04Show(bool json)
{
distance = (real64_t)(sonar->ping_median(5))/ US_ROUNDTRIP_CM;
{
if (distance != 0) { // Check if read failed
char distance_chr[33];
@ -79,10 +191,14 @@ bool Xsns22(uint8_t function)
{
bool result = false;
if ((pin[GPIO_SR04_ECHO] < 99) && (pin[GPIO_SR04_TRIG] < 99)) {
if (sr04_type) {
switch (function) {
case FUNC_INIT:
Sr04Init();
result = (pin[GPIO_SR04_ECHO]<99);
break;
case FUNC_EVERY_SECOND:
Sr04TReading();
result = true;
break;
case FUNC_JSON_APPEND:
Sr04Show(1);