Skip to content

Commit 746cdeb

Browse files
authored
Merge branch 'arendst:development' into idf_lib_compile
2 parents 5ad8cc4 + 150d0e6 commit 746cdeb

12 files changed

+370
-102
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ All notable changes to this project will be documented in this file.
1010
- HASPmota `cpicker` and `msgbox` (#22244)
1111
- Support for DALI on ESP8266
1212
- Command ``DaliWeb 1`` to enable light control for DALI broadcast address
13+
- Command ``DaliSend <address>|<address+256>,<command>`` to send command (address+256 is repeat) on DALI bus
14+
- Command ``DaliQuery <address>|<address+256>,<command>`` to send command (address+256 is repeat) on DALI bus and wait up to DALI_TIMEOUT ms for response
15+
- Berry Serial `config` to change parity on-the-fly for RS-485 (#22285)
1316

1417
### Breaking Changed
1518

@@ -27,6 +30,7 @@ All notable changes to this project will be documented in this file.
2730
- DALI received data decoding
2831
- ESP32 Ethernet using EthClockMode 3 (#22248)
2932
- ESP32 disable SPI DMA for uDisplay (broken since esp-idf 5.3 (core 3.1.0)) (#22264)
33+
- Sonoff WTS01 temperature sensor shows incorrect negative temperature (#19373)
3034

3135
### Removed
3236
- Berry Zigbee removed test code (#22263)
@@ -54,6 +58,10 @@ All notable changes to this project will be documented in this file.
5458
- ESP8266 experimental support for second I2C bus
5559
- Berry improve `int64` constructor (#22172)
5660
- MQTT warning if trying to connect without TLS on a port that normally uses TLS (#22175)
61+
- Misubishi Electric HVAC Heat/Dry/Cool ISEE operation mode (#22216)
62+
- Misubishi Electric HVAC Bridge to HomeBridge/Homekit locally (#22236)
63+
- Misubishi Electric HVAC Air Direction Control (#22241)
64+
- Misubishi Electric HVAC prohibit function (#22269)
5765

5866
### Changed
5967
- Refactored I2C drivers HTU21, BH1750, SHT3x, iAQ and HYT

FIRMWARE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ See [CHANGELOG.md](https://github.com/arendst/Tasmota/blob/development/tasmota/C
1818

1919
## Development
2020

21-
[![Dev Version](https://img.shields.io/badge/development%20version-v14.1.x.x-blue.svg)](https://github.com/arendst/Tasmota)
21+
[![Dev Version](https://img.shields.io/badge/development%20version-v14.3.x.x-blue.svg)](https://github.com/arendst/Tasmota)
2222
[![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://ota.tasmota.com/tasmota/)
2323
[![Tasmota CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+CI%22)
2424
[![Tasmota ESP32 CI](https://github.com/arendst/Tasmota/workflows/Tasmota%20ESP32%20CI/badge.svg)](https://github.com/arendst/Tasmota/actions?query=workflow%3A%22Tasmota+ESP32+CI%22)

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Firmware binaries can be downloaded from http://ota.tasmota.com/tasmota/release/
3131

3232
## Development
3333

34-
[![Dev Version](https://img.shields.io/badge/development%20version-v14.1.x.x-blue.svg)](https://github.com/arendst/Tasmota)
34+
[![Dev Version](https://img.shields.io/badge/development%20version-v14.3.x.x-blue.svg)](https://github.com/arendst/Tasmota)
3535
[![Download Dev](https://img.shields.io/badge/download-development-yellow.svg)](http://ota.tasmota.com/tasmota/)
3636
[![Tasmota CI](https://github.com/arendst/Tasmota/actions/workflows/build_all_the_things.yml/badge.svg)](https://github.com/arendst/Tasmota/actions/workflows/build_all_the_things.yml)
3737
[![Build_development](https://github.com/arendst/Tasmota/actions/workflows/Tasmota_build_devel.yml/badge.svg)](https://github.com/arendst/Tasmota/actions/workflows/Tasmota_build_devel.yml)

RELEASENOTES.md

+8
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
118118
### Added
119119
- Command ``SetOption69 1`` to enable Serial Bridge inverted Receive [#22000](https://github.com/arendst/Tasmota/issues/22000)
120120
- Command ``DaliWeb 1`` to enable light control for DALI broadcast address
121+
- Command ``DaliSend <address>|<address+256>,<command>`` to send command (address+256 is repeat) on DALI bus
122+
- Command ``DaliQuery <address>|<address+256>,<command>`` to send command (address+256 is repeat) on DALI bus and wait up to DALI_TIMEOUT ms for response
121123
- HX711 optional calibration precision option on command ``Sensor34 2 <weight in gram> <precision>`` where `<precision>` is 1 to 20 [#13983](https://github.com/arendst/Tasmota/issues/13983)
122124
- ESP8266 support for one-wire M1601 temperature sensor on DS18x20 GPIO [#21376](https://github.com/arendst/Tasmota/issues/21376)
123125
- ESP8266 support for I2C CLK on GPIO16 [#22199](https://github.com/arendst/Tasmota/issues/22199)
@@ -134,10 +136,15 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
134136
- Support nexus protocol and calculation of separation limit to rc-switch library [#21886](https://github.com/arendst/Tasmota/issues/21886)
135137
- KNX additional KnxTx functions and define KNX_USE_DPT9 [#22071](https://github.com/arendst/Tasmota/issues/22071)
136138
- SML multi TRX line [#22056](https://github.com/arendst/Tasmota/issues/22056)
139+
- Misubishi Electric HVAC Heat/Dry/Cool ISEE operation mode [#22216](https://github.com/arendst/Tasmota/issues/22216)
140+
- Misubishi Electric HVAC Bridge to HomeBridge/Homekit locally [#22236](https://github.com/arendst/Tasmota/issues/22236)
141+
- Misubishi Electric HVAC Air Direction Control [#22241](https://github.com/arendst/Tasmota/issues/22241)
142+
- Misubishi Electric HVAC prohibit function [#22269](https://github.com/arendst/Tasmota/issues/22269)
137143
- Zigbee Koenkk firmware 20240710 for Sonoff Zigbee ZBPro [#22076](https://github.com/arendst/Tasmota/issues/22076)
138144
- Berry Zigbee improvements to prepare Matter [#22083](https://github.com/arendst/Tasmota/issues/22083)
139145
- Berry virtual Energy driver [#22134](https://github.com/arendst/Tasmota/issues/22134)
140146
- Berry improve `int64` constructor [#22172](https://github.com/arendst/Tasmota/issues/22172)
147+
- Berry Serial `config` to change parity on-the-fly for RS-485 [#22285](https://github.com/arendst/Tasmota/issues/22285)
141148
- LVGL port `colorwheel` from LVGL 8 [#22244](https://github.com/arendst/Tasmota/issues/22244)
142149
- HASPmota `cpicker` and `msgbox` [#22244](https://github.com/arendst/Tasmota/issues/22244)
143150
- Matter support for Zigbee Temperature, Humidity and Pressure sensors [#22084](https://github.com/arendst/Tasmota/issues/22084)
@@ -172,6 +179,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl https://ota.tasm
172179
- PZEM continue energy monitoring when one phase fails [#21968](https://github.com/arendst/Tasmota/issues/21968)
173180
- BearSSL panic on ESP8266 in rare conditions [#22017](https://github.com/arendst/Tasmota/issues/22017)
174181
- ModbusBridge request and response logic [#22075](https://github.com/arendst/Tasmota/issues/22075)
182+
- Sonoff WTS01 temperature sensor shows incorrect negative temperature [#19373](https://github.com/arendst/Tasmota/issues/19373)
175183
- Autoconf prevent 'init.bat' from stopping on empty lines [#22158](https://github.com/arendst/Tasmota/issues/22158)
176184
- Zigbee extend timeout for MCU reboot from 5s to 10s [#22009](https://github.com/arendst/Tasmota/issues/22009)
177185
- Zigbee avoid disabling console serial on ESP32 and improved log messages [#22082](https://github.com/arendst/Tasmota/issues/22082)

lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.cpp

+36
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,42 @@ size_t TasmotaSerial::write(uint8_t b) {
476476
return size;
477477
}
478478

479+
#ifdef ESP32
480+
// Add ability to change parity on the fly, for RS-485
481+
// See https://github.com/arendst/Tasmota/discussions/22272
482+
int32_t TasmotaSerial::setConfig(uint32_t config) {
483+
484+
uint32_t data_bits_before = (m_config & 0xc) >> 2;
485+
uint32_t parity_before = m_config & 0x3;
486+
uint32_t stop_bits_before = (m_config & 0x30) >> 4;
487+
488+
uint32_t data_bits = (config & 0xc) >> 2;
489+
uint32_t parity = config & 0x3;
490+
uint32_t stop_bits = (config & 0x30) >> 4;
491+
492+
esp_err_t err;
493+
494+
if (data_bits_before != data_bits) {
495+
if (err = uart_set_word_length(m_uart, (uart_word_length_t) data_bits)) {
496+
return (int32_t) err;
497+
}
498+
}
499+
if (parity_before != parity) {
500+
if (err = uart_set_parity(m_uart, (uart_parity_t) parity)) {
501+
return (int32_t) err;
502+
}
503+
}
504+
if (stop_bits_before != stop_bits) {
505+
if (err = uart_set_stop_bits(m_uart, (uart_stop_bits_t) stop_bits)) {
506+
return (int32_t) err;
507+
}
508+
}
509+
510+
m_config = config;
511+
return 0; // no error
512+
}
513+
#endif
514+
479515
#ifdef ESP8266
480516
void IRAM_ATTR TasmotaSerial::rxRead(void) {
481517
if (!m_nwmode) {

lib/default/TasmotaSerial-3.6.0/src/TasmotaSerial.h

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ class TasmotaSerial : public Stream {
7272
#ifdef ESP32
7373
uint32_t getUart(void) const { return m_uart; }
7474
HardwareSerial *getesp32hws(void) { return TSerial; }
75+
int32_t setConfig(uint32_t config);
7576
#endif
7677
bool isValid(void) { return m_valid; }
7778
bool overflow(void);

lib/libesp32/berry_tasmota/src/be_serial_lib.c

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
extern int b_serial_init(bvm *vm);
1212
extern int b_config_tx_en(bvm *vm);
13+
extern int b_serial_config(bvm *vm);
1314
extern int b_serial_deinit(bvm *vm);
1415

1516
extern int b_serial_write(bvm *vm);
@@ -92,5 +93,6 @@ class be_class_serial (scope: global, name: serial) {
9293
read, func(b_serial_read)
9394
available, func(b_serial_available)
9495
flush, func(b_serial_flush)
96+
config, func(b_serial_config)
9597
}
9698
@const_object_info_end */

tasmota/tasmota_xdrv_driver/xdrv_08_serial_bridge.ino

+18-1
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,24 @@ void SerialBridgeInput(void) {
226226
if (9 == SBridge.in_byte_counter) {
227227
uint32_t *header = (uint32_t*)serial_bridge_buffer;
228228
if (0x04010155 == *header) {
229-
SBridge.temperature = (float)serial_bridge_buffer[6] + ((float)serial_bridge_buffer[7] / 100.0f);
229+
/*
230+
14:43:26.718 WTS: buf6 0x01, buf7 0x5d, temp 1, dec 93 1.93
231+
14:43:33.175 WTS: buf6 0x01, buf7 0x12, temp 1, dec 18 1.18
232+
14:43:34.252 WTS: buf6 0x01, buf7 0x06, temp 1, dec 6 1.06
233+
14:43:35.328 WTS: buf6 0x00, buf7 0x5d, temp 0, dec 93 0.93
234+
14:43:42.862 WTS: buf6 0x00, buf7 0x0c, temp 0, dec 12 0.12
235+
14:43:43.938 WTS: buf6 0x00, buf7 0x00, temp 0, dec 0 0.00
236+
14:43:45.015 WTS: buf6 0x80, buf7 0x0c, temp 128, dec 12 -0.12
237+
14:43:53.624 WTS: buf6 0x80, buf7 0x5d, temp 128, dec 93 -0.93
238+
14:43:54.700 WTS: buf6 0x81, buf7 0x06, temp 129, dec 6 -1.06
239+
*/
240+
uint8_t temp = serial_bridge_buffer[6];
241+
int sign = 1;
242+
if (temp > 127) {
243+
temp -= 128;
244+
sign = -1;
245+
}
246+
SBridge.temperature = sign * ((float)temp + ((float)serial_bridge_buffer[7] / 100.0f));
230247
}
231248
}
232249
}

tasmota/tasmota_xdrv_driver/xdrv_13_display.ino

+22-22
Original file line numberDiff line numberDiff line change
@@ -2442,6 +2442,28 @@ void Draw_RGB_Bitmap(char *file, uint16_t xp, uint16_t yp, uint8_t scale, bool i
24422442
#ifdef ESP32
24432443
#ifdef JPEG_PICTS
24442444
#define JPG_DEFSIZE 150000
2445+
void Draw_jpeg(uint8_t *mem, uint16_t jpgsize, uint16_t xp, uint16_t yp, uint8_t scale) {
2446+
if (mem[0] == 0xff && mem[1] == 0xd8) {
2447+
uint16_t xsize;
2448+
uint16_t ysize;
2449+
get_jpeg_size(mem, jpgsize, &xsize, &ysize);
2450+
//AddLog(LOG_LEVEL_INFO, PSTR("Pict size %d - %d - %d"), xsize, ysize, jpgsize);
2451+
scale &= 3;
2452+
uint8_t fac = 1 << scale;
2453+
xsize /= fac;
2454+
ysize /= fac;
2455+
renderer->setAddrWindow(xp, yp, xp + xsize, yp + ysize);
2456+
uint8_t *rgbmem = (uint8_t *)special_malloc(xsize * ysize * 2);
2457+
if (rgbmem) {
2458+
//jpg2rgb565(mem, jpgsize, rgbmem, JPG_SCALE_NONE);
2459+
jpg2rgb565(mem, jpgsize, rgbmem, (jpg_scale_t)scale);
2460+
renderer->pushColors((uint16_t*)rgbmem, xsize * ysize, true);
2461+
free(rgbmem);
2462+
}
2463+
renderer->setAddrWindow(0, 0, 0, 0);
2464+
}
2465+
}
2466+
24452467
void Draw_JPG_from_URL(char *url, uint16_t xp, uint16_t yp, uint8_t scale) {
24462468
uint8_t *mem = 0;
24472469
WiFiClient http_client;
@@ -2484,28 +2506,6 @@ void Draw_JPG_from_URL(char *url, uint16_t xp, uint16_t yp, uint8_t scale) {
24842506
}
24852507
if (mem) free(mem);
24862508
}
2487-
2488-
void Draw_jpeg(uint8_t *mem, uint16_t jpgsize, uint16_t xp, uint16_t yp, uint8_t scale) {
2489-
if (mem[0] == 0xff && mem[1] == 0xd8) {
2490-
uint16_t xsize;
2491-
uint16_t ysize;
2492-
get_jpeg_size(mem, jpgsize, &xsize, &ysize);
2493-
//AddLog(LOG_LEVEL_INFO, PSTR("Pict size %d - %d - %d"), xsize, ysize, jpgsize);
2494-
scale &= 3;
2495-
uint8_t fac = 1 << scale;
2496-
xsize /= fac;
2497-
ysize /= fac;
2498-
renderer->setAddrWindow(xp, yp, xp + xsize, yp + ysize);
2499-
uint8_t *rgbmem = (uint8_t *)special_malloc(xsize * ysize * 2);
2500-
if (rgbmem) {
2501-
//jpg2rgb565(mem, jpgsize, rgbmem, JPG_SCALE_NONE);
2502-
jpg2rgb565(mem, jpgsize, rgbmem, (jpg_scale_t)scale);
2503-
renderer->pushColors((uint16_t*)rgbmem, xsize * ysize, true);
2504-
free(rgbmem);
2505-
}
2506-
renderer->setAddrWindow(0, 0, 0, 0);
2507-
}
2508-
}
25092509
#endif // JPEG_PICTS
25102510
#endif // ESP32
25112511

0 commit comments

Comments
 (0)