mirror of https://github.com/arendst/Tasmota.git
Merge branch 'development' of github.com:arendst/Tasmota into pr_tm1638
This commit is contained in:
commit
c7f2030540
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -4,16 +4,22 @@ All notable changes to this project will be documented in this file.
|
|||
## [Unreleased] - Development
|
||||
|
||||
## [9.3.0.1]
|
||||
### Added
|
||||
- Animate PWM dimmer brightness LEDs during transitions and with variable brightness (#11076)
|
||||
- Commands ``StateRetain`` and ``InfoRetain`` (#11084)
|
||||
|
||||
### Changed
|
||||
- Remove the need to start filenames with a slash (/) in Ufs commands
|
||||
- Removed command ``VirtualCT`` as synonym for ``SetOption106`` (#11049)
|
||||
|
||||
### Fixed
|
||||
- Ili1942 driver (#11046)
|
||||
- Shutter driver (#11055)
|
||||
- ESP32 Mi32 driver (#11048)
|
||||
- TM1637 driver now needs ``TM1637 CLK`` and ``TM1637 DIO`` to enable (#11057)
|
||||
- Web request accepts wrong password (#11039)
|
||||
- Ili1942 driver (#11046)
|
||||
- ESP32 Mi32 driver (#11048)
|
||||
- Shutter driver (#11055)
|
||||
- TM1637 driver now needs ``TM1637 CLK`` and ``TM1637 DIO`` to enable (#11057)
|
||||
- Sml driver (#11082)
|
||||
- Ezo drivers (#11083)
|
||||
|
||||
## [Released]
|
||||
|
||||
|
|
|
@ -79,13 +79,19 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota
|
|||
[Complete list](BUILDS.md) of available feature and sensors.
|
||||
|
||||
## Changelog v9.3.0.1
|
||||
### Added
|
||||
- Animate PWM dimmer brightness LEDs during transitions and with variable brightness [#11076](https://github.com/arendst/Tasmota/issues/11076)
|
||||
- Commands ``StateRetain`` and ``InfoRetain`` [#11084](https://github.com/arendst/Tasmota/issues/11084)
|
||||
|
||||
### Changed
|
||||
- Remove the need to start filenames with a slash (/) in Ufs commands
|
||||
- Removed command ``VirtualCT`` as synonym for ``SetOption106`` [#11049](https://github.com/arendst/Tasmota/issues/11049)
|
||||
|
||||
### Fixed
|
||||
- Ili1942 driver [#11046](https://github.com/arendst/Tasmota/issues/11046)
|
||||
- Shutter driver [#11055](https://github.com/arendst/Tasmota/issues/11055)
|
||||
- ESP32 Mi32 driver [#11048](https://github.com/arendst/Tasmota/issues/11048)
|
||||
- TM1637 driver now needs ``TM1637 CLK`` and ``TM1637 DIO`` to enable [#11057](https://github.com/arendst/Tasmota/issues/11057)
|
||||
- Web request accepts wrong password [#11039](https://github.com/arendst/Tasmota/issues/11039)
|
||||
- Ili1942 driver [#11046](https://github.com/arendst/Tasmota/issues/11046)
|
||||
- ESP32 Mi32 driver [#11048](https://github.com/arendst/Tasmota/issues/11048)
|
||||
- Shutter driver [#11055](https://github.com/arendst/Tasmota/issues/11055)
|
||||
- TM1637 driver now needs ``TM1637 CLK`` and ``TM1637 DIO`` to enable [#11057](https://github.com/arendst/Tasmota/issues/11057)
|
||||
- Sml driver [#11082](https://github.com/arendst/Tasmota/issues/11082)
|
||||
- Ezo drivers [#11083](https://github.com/arendst/Tasmota/issues/11083)
|
||||
|
|
|
@ -380,6 +380,8 @@
|
|||
#define D_CMND_SWITCHRETAIN "SwitchRetain"
|
||||
#define D_CMND_POWERRETAIN "PowerRetain"
|
||||
#define D_CMND_SENSORRETAIN "SensorRetain"
|
||||
#define D_CMND_INFORETAIN "InfoRetain"
|
||||
#define D_CMND_STATERETAIN "StateRetain"
|
||||
#define D_CMND_PUBLISH "Publish"
|
||||
|
||||
// Commands xdrv_01_webserver.ino
|
||||
|
@ -829,7 +831,7 @@ const char HTTP_SNS_EC[] PROGMEM = "{s}%s " D_EC "{
|
|||
const char HTTP_SNS_O2[] PROGMEM = "{s}%s " D_O2 "{m}%s " D_UNIT_PERCENT "{e}";
|
||||
const char HTTP_SNS_LITERS[] PROGMEM = "{s}%s " D_VOLUME "{m}%s " D_UNIT_LITERS "{e}";
|
||||
const char HTTP_SNS_LPM[] PROGMEM = "{s}%s " D_FLOW_RATE "{m}%s " D_UNIT_LITERS_PER_MIN "{e}";
|
||||
const char HTTP_SNS_DO[] PROGMEM = "{s}%s " D_DO "{m}%s " D_UNIT_PARTS_PER_MILLION "{e}";
|
||||
const char HTTP_SNS_DO[] PROGMEM = "{s}%s " D_DO "{m}%s " D_UNIT_MILIGRAMS_PER_LITER "{e}";
|
||||
const char HTTP_SNS_COLOR_RED[] PROGMEM = "{s}%s " D_COLOR_RED "{m}%u " "{e}";
|
||||
const char HTTP_SNS_COLOR_GREEN[] PROGMEM = "{s}%s " D_COLOR_GREEN "{m}%u " "{e}";
|
||||
const char HTTP_SNS_COLOR_BLUE[] PROGMEM = "{s}%s " D_COLOR_BLUE "{m}%u " "{e}";
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -826,6 +826,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "s"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "s"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
@ -876,7 +877,7 @@
|
|||
#define D_SOLAX_ERROR_8 "Other Device Fault"
|
||||
|
||||
//xdrv_10_scripter.ino
|
||||
#define D_CONFIGURE_SCRIPT "Edit script"
|
||||
#define D_CONFIGURE_SCRIPT "Edit Script"
|
||||
#define D_SCRIPT "edit script"
|
||||
#define D_SDCARD_UPLOAD "file upload"
|
||||
#define D_UFSDIR "ufs directory"
|
||||
|
@ -884,7 +885,7 @@
|
|||
#define D_SCRIPT_CHARS_LEFT "chars left"
|
||||
#define D_SCRIPT_CHARS_NO_MORE "no more chars"
|
||||
#define D_SCRIPT_DOWNLOAD "Download"
|
||||
#define D_SCRIPT_ENABLE "script enable"
|
||||
#define D_SCRIPT_ENABLE "Script enable"
|
||||
#define D_SCRIPT_UPLOAD "Upload"
|
||||
#define D_SCRIPT_UPLOAD_FILES "Upload files"
|
||||
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "seg"
|
||||
|
|
|
@ -823,6 +823,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "s"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "s"
|
||||
|
|
|
@ -826,6 +826,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "초"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "s"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "гПа"
|
||||
#define D_UNIT_SECOND "сек"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sek"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sek"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "млрд⁻¹"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "децилітр⁻¹"
|
||||
#define D_UNIT_PARTS_PER_MILLION "млн⁻¹"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "гПа"
|
||||
#define D_UNIT_SECOND "сек"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "ppd"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "hPa"
|
||||
#define D_UNIT_SECOND "sec"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "每分升"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "百帕"
|
||||
#define D_UNIT_SECOND "秒"
|
||||
|
|
|
@ -827,6 +827,7 @@
|
|||
#define D_UNIT_PARTS_PER_BILLION "ppb"
|
||||
#define D_UNIT_PARTS_PER_DECILITER "每分升"
|
||||
#define D_UNIT_PARTS_PER_MILLION "ppm"
|
||||
#define D_UNIT_MILIGRAMS_PER_LITER "mg/L"
|
||||
#define D_UNIT_PERCENT "%%"
|
||||
#define D_UNIT_PRESSURE "百帕"
|
||||
#define D_UNIT_SECOND "秒"
|
||||
|
|
|
@ -112,6 +112,8 @@
|
|||
#define MQTT_POWER_RETAIN false // [PowerRetain] Power status message may send retain flag (false = off, true = on)
|
||||
#define MQTT_SWITCH_RETAIN false // [SwitchRetain] Switch may send retain flag (false = off, true = on)
|
||||
#define MQTT_SENSOR_RETAIN false // [SensorRetain] Sensor may send retain flag (false = off, true = on)
|
||||
#define MQTT_INFO_RETAIN false // [InfoRetain] Info may send retain flag (false = off, true = on)
|
||||
#define MQTT_STATE_RETAIN false // [StateRetain] State may send retain flag (false = off, true = on)
|
||||
#define MQTT_NO_HOLD_RETAIN false // [SetOption62] Disable retain flag on HOLD messages
|
||||
#define MQTT_NO_RETAIN false // [SetOption104] No Retain - disable all MQTT retained messages, some brokers don't support it: AWS IoT, Losant
|
||||
|
||||
|
|
|
@ -146,8 +146,8 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu
|
|||
uint32_t zb_received_as_subtopic : 1; // bit 4 (v9.2.0.3) - SetOption118 - (Zigbee) Move ZbReceived from JSON message and into the subtopic replacing "SENSOR" default
|
||||
uint32_t zb_omit_json_addr : 1; // bit 5 (v9.2.0.3) - SetOption119 - (Zigbee) Remove the device addr from json payload, can be used with zb_topic_fname where the addr is already known from the topic
|
||||
uint32_t zb_topic_endpoint : 1; // bit 6 (v9.2.0.4) - SetOption120 - (Zigbee) Append endpoint number to topic if device dependent (use with SetOption89)
|
||||
uint32_t spare07 : 1; // bit 7
|
||||
uint32_t spare08 : 1; // bit 8
|
||||
uint32_t mqtt_state_retain : 1; // bit 7 (v9.3.0.1) - CMND_STATERETAIN
|
||||
uint32_t mqtt_info_retain : 1; // bit 8 (v9.3.0.1) - CMND_INFORETAIN
|
||||
uint32_t spare09 : 1; // bit 9
|
||||
uint32_t spare10 : 1; // bit 10
|
||||
uint32_t spare11 : 1; // bit 11
|
||||
|
|
|
@ -831,6 +831,8 @@ void SettingsDefaultSet2(void) {
|
|||
flag.mqtt_button_retain |= MQTT_BUTTON_RETAIN;
|
||||
flag.mqtt_switch_retain |= MQTT_SWITCH_RETAIN;
|
||||
flag.mqtt_sensor_retain |= MQTT_SENSOR_RETAIN;
|
||||
flag5.mqtt_info_retain |= MQTT_INFO_RETAIN;
|
||||
flag5.mqtt_state_retain |= MQTT_STATE_RETAIN;
|
||||
// flag.mqtt_serial |= 0;
|
||||
flag.device_index_enable |= MQTT_POWER_FORMAT;
|
||||
flag3.time_append_timezone |= MQTT_APPEND_TIMEZONE;
|
||||
|
|
|
@ -426,7 +426,8 @@ void CmndStatus(void)
|
|||
Response_P(PSTR("{\"" D_CMND_STATUS "\":{\"" D_CMND_MODULE "\":%d,\"" D_CMND_DEVICENAME "\":\"%s\",\"" D_CMND_FRIENDLYNAME "\":[%s],\"" D_CMND_TOPIC "\":\"%s\",\""
|
||||
D_CMND_BUTTONTOPIC "\":\"%s\",\"" D_CMND_POWER "\":%d,\"" D_CMND_POWERONSTATE "\":%d,\"" D_CMND_LEDSTATE "\":%d,\""
|
||||
D_CMND_LEDMASK "\":\"%04X\",\"" D_CMND_SAVEDATA "\":%d,\"" D_JSON_SAVESTATE "\":%d,\"" D_CMND_SWITCHTOPIC "\":\"%s\",\""
|
||||
D_CMND_SWITCHMODE "\":[%s],\"" D_CMND_BUTTONRETAIN "\":%d,\"" D_CMND_SWITCHRETAIN "\":%d,\"" D_CMND_SENSORRETAIN "\":%d,\"" D_CMND_POWERRETAIN "\":%d}}"),
|
||||
D_CMND_SWITCHMODE "\":[%s],\"" D_CMND_BUTTONRETAIN "\":%d,\"" D_CMND_SWITCHRETAIN "\":%d,\"" D_CMND_SENSORRETAIN "\":%d,\"" D_CMND_POWERRETAIN "\":%d,\""
|
||||
D_CMND_INFORETAIN "\":%d,\"" D_CMND_STATERETAIN "\":%d}}"),
|
||||
ModuleNr(), EscapeJSONString(SettingsText(SET_DEVICENAME)).c_str(), stemp, TasmotaGlobal.mqtt_topic,
|
||||
SettingsText(SET_MQTT_BUTTON_TOPIC), TasmotaGlobal.power, Settings.poweronstate, Settings.ledstate,
|
||||
Settings.ledmask, Settings.save_data,
|
||||
|
@ -436,7 +437,9 @@ void CmndStatus(void)
|
|||
Settings.flag.mqtt_button_retain, // CMND_BUTTONRETAIN
|
||||
Settings.flag.mqtt_switch_retain, // CMND_SWITCHRETAIN
|
||||
Settings.flag.mqtt_sensor_retain, // CMND_SENSORRETAIN
|
||||
Settings.flag.mqtt_power_retain); // CMND_POWERRETAIN
|
||||
Settings.flag.mqtt_power_retain, // CMND_POWERRETAIN
|
||||
Settings.flag5.mqtt_info_retain, // CMND_INFORETAIN
|
||||
Settings.flag5.mqtt_state_retain); // CMND_STATERETAIN
|
||||
MqttPublishPrefixTopic_P(STAT, PSTR(D_CMND_STATUS));
|
||||
}
|
||||
|
||||
|
@ -629,7 +632,7 @@ void CmndState(void)
|
|||
ResponseClear();
|
||||
MqttShowState();
|
||||
if (Settings.flag3.hass_tele_on_power) { // SetOption59 - Send tele/%topic%/STATE in addition to stat/%topic%/RESULT
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), MQTT_TELE_RETAIN);
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), Settings.flag5.mqtt_state_retain);
|
||||
}
|
||||
#ifdef USE_HOME_ASSISTANT
|
||||
if (Settings.flag.hass_discovery) { // SetOption19 - Control Home Assistantautomatic discovery (See SetOption59)
|
||||
|
|
|
@ -715,7 +715,7 @@ void MqttPublishTeleState(void)
|
|||
{
|
||||
ResponseClear();
|
||||
MqttShowState();
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), MQTT_TELE_RETAIN);
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), Settings.flag5.mqtt_state_retain);
|
||||
|
||||
#ifdef USE_DT_VARS
|
||||
DTVarsTeleperiod();
|
||||
|
|
|
@ -48,7 +48,8 @@ const char kMqttCommands[] PROGMEM = "|" // No prefix
|
|||
#endif
|
||||
D_CMND_MQTTHOST "|" D_CMND_MQTTPORT "|" D_CMND_MQTTRETRY "|" D_CMND_STATETEXT "|" D_CMND_MQTTCLIENT "|"
|
||||
D_CMND_FULLTOPIC "|" D_CMND_PREFIX "|" D_CMND_GROUPTOPIC "|" D_CMND_TOPIC "|" D_CMND_PUBLISH "|" D_CMND_MQTTLOG "|"
|
||||
D_CMND_BUTTONTOPIC "|" D_CMND_SWITCHTOPIC "|" D_CMND_BUTTONRETAIN "|" D_CMND_SWITCHRETAIN "|" D_CMND_POWERRETAIN "|" D_CMND_SENSORRETAIN ;
|
||||
D_CMND_BUTTONTOPIC "|" D_CMND_SWITCHTOPIC "|" D_CMND_BUTTONRETAIN "|" D_CMND_SWITCHRETAIN "|" D_CMND_POWERRETAIN "|"
|
||||
D_CMND_SENSORRETAIN "|" D_CMND_INFORETAIN "|" D_CMND_STATERETAIN ;
|
||||
|
||||
SO_SYNONYMS(kMqttSynonyms,
|
||||
90,
|
||||
|
@ -73,7 +74,8 @@ void (* const MqttCommand[])(void) PROGMEM = {
|
|||
#endif
|
||||
&CmndMqttHost, &CmndMqttPort, &CmndMqttRetry, &CmndStateText, &CmndMqttClient,
|
||||
&CmndFullTopic, &CmndPrefix, &CmndGroupTopic, &CmndTopic, &CmndPublish, &CmndMqttlog,
|
||||
&CmndButtonTopic, &CmndSwitchTopic, &CmndButtonRetain, &CmndSwitchRetain, &CmndPowerRetain, &CmndSensorRetain };
|
||||
&CmndButtonTopic, &CmndSwitchTopic, &CmndButtonRetain, &CmndSwitchRetain, &CmndPowerRetain, &CmndSensorRetain,
|
||||
&CmndInfoRetain, &CmndStateRetain };
|
||||
|
||||
struct MQTT {
|
||||
uint16_t connect_count = 0; // MQTT re-connect count
|
||||
|
@ -542,17 +544,17 @@ void MqttConnected(void) {
|
|||
char stopic2[TOPSZ];
|
||||
Response_P(PSTR("{\"" D_CMND_MODULE "\":\"%s\",\"" D_JSON_VERSION "\":\"%s%s\",\"" D_JSON_FALLBACKTOPIC "\":\"%s\",\"" D_CMND_GROUPTOPIC "\":\"%s\"}"),
|
||||
ModuleName().c_str(), TasmotaGlobal.version, TasmotaGlobal.image_name, GetFallbackTopic_P(stopic, ""), GetGroupTopic_P(stopic2, "", SET_MQTT_GRP_TOPIC));
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO "1"));
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO "1"), Settings.flag5.mqtt_info_retain);
|
||||
#ifdef USE_WEBSERVER
|
||||
if (Settings.webserver) {
|
||||
#if LWIP_IPV6
|
||||
Response_P(PSTR("{\"" D_JSON_WEBSERVER_MODE "\":\"%s\",\"" D_CMND_HOSTNAME "\":\"%s\",\"" D_CMND_IPADDRESS "\":\"%s\",\"IPv6Address\":\"%s\"}"),
|
||||
(2 == Settings.webserver) ? PSTR(D_ADMIN) : PSTR(D_USER), NetworkHostname(), NetworkAddress().toString().c_str(), WifiGetIPv6().c_str());
|
||||
(2 == Settings.webserver) ? PSTR(D_ADMIN) : PSTR(D_USER), NetworkHostname(), NetworkAddress().toString().c_str(), WifiGetIPv6().c_str(), Settings.flag5.mqtt_info_retain);
|
||||
#else
|
||||
Response_P(PSTR("{\"" D_JSON_WEBSERVER_MODE "\":\"%s\",\"" D_CMND_HOSTNAME "\":\"%s\",\"" D_CMND_IPADDRESS "\":\"%s\"}"),
|
||||
(2 == Settings.webserver) ? PSTR(D_ADMIN) : PSTR(D_USER), NetworkHostname(), NetworkAddress().toString().c_str());
|
||||
(2 == Settings.webserver) ? PSTR(D_ADMIN) : PSTR(D_USER), NetworkHostname(), NetworkAddress().toString().c_str(), Settings.flag5.mqtt_info_retain);
|
||||
#endif // LWIP_IPV6 = 1
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO "2"));
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO "2"), Settings.flag5.mqtt_info_retain);
|
||||
}
|
||||
#endif // USE_WEBSERVER
|
||||
Response_P(PSTR("{\"" D_JSON_RESTARTREASON "\":"));
|
||||
|
@ -562,7 +564,7 @@ void MqttConnected(void) {
|
|||
ResponseAppend_P(PSTR("\"%s\""), GetResetReason().c_str());
|
||||
}
|
||||
ResponseJsonEnd();
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO "3"));
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO "3"), Settings.flag5.mqtt_info_retain);
|
||||
}
|
||||
|
||||
MqttPublishAllPowerState();
|
||||
|
@ -1080,6 +1082,28 @@ void CmndSensorRetain(void) {
|
|||
ResponseCmndStateText(Settings.flag.mqtt_sensor_retain); // CMND_SENSORRETAIN
|
||||
}
|
||||
|
||||
void CmndInfoRetain(void) {
|
||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) {
|
||||
if (!XdrvMailbox.payload) {
|
||||
ResponseClear();
|
||||
MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_INFO), Settings.flag5.mqtt_info_retain); // CMND_INFORETAIN
|
||||
}
|
||||
Settings.flag5.mqtt_info_retain = XdrvMailbox.payload; // CMND_INFORETAIN
|
||||
}
|
||||
ResponseCmndStateText(Settings.flag5.mqtt_info_retain); // CMND_INFORETAIN
|
||||
}
|
||||
|
||||
void CmndStateRetain(void) {
|
||||
if ((XdrvMailbox.payload >= 0) && (XdrvMailbox.payload <= 1)) {
|
||||
if (!XdrvMailbox.payload) {
|
||||
ResponseClear();
|
||||
MqttPublishPrefixTopic_P(STAT, PSTR(D_RSLT_STATE), Settings.flag5.mqtt_state_retain); // CMND_STATERETAIN
|
||||
}
|
||||
Settings.flag5.mqtt_state_retain = XdrvMailbox.payload; // CMND_STATERETAIN
|
||||
}
|
||||
ResponseCmndStateText(Settings.flag5.mqtt_state_retain); // CMND_STATERETAIN
|
||||
}
|
||||
|
||||
/*********************************************************************************************\
|
||||
* TLS private key and certificate - store into Flash
|
||||
\*********************************************************************************************/
|
||||
|
|
|
@ -41,9 +41,8 @@ struct EZOCO2 : public EZOStruct {
|
|||
{
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_CO2 "\":%d}" ), name, CO2);
|
||||
}
|
||||
#ifdef USE_WEBSERVER
|
||||
else {
|
||||
}else {
|
||||
WSContentSend_PD(HTTP_SNS_CO2, name, CO2);
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#define EZO_DO_READ_LATENCY 600
|
||||
|
||||
struct EZODO : public EZOStruct {
|
||||
EZODO(uint32_t addr) : EZOStruct(addr), DO(0) {}
|
||||
EZODO(uint32_t addr) : EZOStruct(addr), DO(NAN) {}
|
||||
|
||||
virtual void ProcessMeasurement(void)
|
||||
{
|
||||
|
@ -39,10 +39,11 @@ struct EZODO : public EZOStruct {
|
|||
dtostrfd(DO, 2, str);
|
||||
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_DO "\":%d}" ), name, str);
|
||||
}
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_DO "\":%s" ), name, str);
|
||||
ResponseJsonEnd();
|
||||
|
||||
#ifdef USE_WEBSERVER
|
||||
else {
|
||||
}else {
|
||||
WSContentSend_PD(HTTP_SNS_DO, name, str);
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
|
@ -54,7 +55,7 @@ private:
|
|||
float DO;
|
||||
};
|
||||
|
||||
const char EZODO::id[] PROGMEM = "D.O.";
|
||||
const char EZODO::id[] PROGMEM = "DO";
|
||||
|
||||
#endif // USE_EZODO
|
||||
#endif // USE_I2C
|
||||
|
|
|
@ -40,9 +40,8 @@ struct EZOEC : public EZOStruct {
|
|||
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_EC "\":%s}" ), name, str);
|
||||
}
|
||||
#ifdef USE_WEBSERVER
|
||||
else {
|
||||
}else {
|
||||
WSContentSend_PD(HTTP_SNS_EC, name, str);
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
|
|
|
@ -40,9 +40,8 @@ struct EZOO2 : public EZOStruct {
|
|||
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_O2 "\":%d}" ), name, str);
|
||||
}
|
||||
#ifdef USE_WEBSERVER
|
||||
else {
|
||||
}else {
|
||||
WSContentSend_PD(HTTP_SNS_O2, name, str);
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
|
|
|
@ -40,9 +40,8 @@ struct EZOORP : public EZOStruct {
|
|||
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_ORP "\":%s}" ), name, str);
|
||||
}
|
||||
#ifdef USE_WEBSERVER
|
||||
else {
|
||||
}else {
|
||||
WSContentSend_PD(HTTP_SNS_ORP, name, str);
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
|
|
|
@ -40,9 +40,8 @@ struct EZOPH : public EZOStruct {
|
|||
|
||||
if (json) {
|
||||
ResponseAppend_P(PSTR(",\"%s\":{\"" D_JSON_PH "\":%s}" ), name, str);
|
||||
}
|
||||
#ifdef USE_WEBSERVER
|
||||
else {
|
||||
}else {
|
||||
WSContentSend_PD(HTTP_SNS_PH, name, str);
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
|
|
|
@ -46,9 +46,8 @@ struct EZOPRS : public EZOStruct {
|
|||
ResponseAppend_P(PSTR(",\"" D_JSON_PRESSUREATSEALEVEL "\":%s"), sealevelstr);
|
||||
}
|
||||
ResponseJsonEnd();
|
||||
}
|
||||
#ifdef USE_WEBSERVER
|
||||
else {
|
||||
}else {
|
||||
WSContentSend_PD(HTTP_SNS_PRESSURE, name, str, PressureUnit().c_str());
|
||||
if (Settings.altitude != 0) {
|
||||
WSContentSend_PD(HTTP_SNS_SEAPRESSURE, name, sealevelstr, PressureUnit().c_str());
|
||||
|
|
|
@ -39,9 +39,8 @@ struct EZORTD : public EZOStruct {
|
|||
|
||||
if (json) {
|
||||
ResponseAppend_P(JSON_SNS_F_TEMP, name, Settings.flag2.temperature_resolution, &temp);
|
||||
}
|
||||
#ifdef USE_WEBSERVER
|
||||
else {
|
||||
}else {
|
||||
WSContentSend_Temp(name, temp);
|
||||
#endif // USE_WEBSERVER
|
||||
}
|
||||
|
|
|
@ -174,8 +174,10 @@ a_setoption = [[
|
|||
"(Light) run fading at fixed duration instead of fixed slew rate",
|
||||
"(Zigbee) Move ZbReceived from JSON message and into the subtopic replacing SENSOR default",
|
||||
"(Zigbee) Remove the device addr from json payload, can be used with zb_topic_fname where the addr is already known from the topic",
|
||||
"","",
|
||||
"","","","",
|
||||
"(Zigbee) Append endpoint number to topic if device dependent (use with SetOption89)",
|
||||
"(MQTT) Retain on State",
|
||||
"(MQTT) Retain on Info",
|
||||
"","","",
|
||||
"","","","",
|
||||
"","","","",
|
||||
"","","","",
|
||||
|
@ -282,7 +284,7 @@ else:
|
|||
obj = json.load(fp)
|
||||
|
||||
def StartDecode():
|
||||
print ("\n*** decode-status.py v20210217 by Theo Arends and Jacek Ziolkowski ***")
|
||||
print ("\n*** decode-status.py v20210222 by Theo Arends and Jacek Ziolkowski ***")
|
||||
|
||||
# print("Decoding\n{}".format(obj))
|
||||
|
||||
|
|
Loading…
Reference in New Issue