Commit Graph

983 Commits

Author SHA1 Message Date
Theo Arends dd877972be Phase 1 support C2/C6 2023-08-21 17:10:06 +02:00
Theo Arends 37a527696a Phase 1 support C2/C6 2023-08-21 16:18:21 +02:00
stefanbode 7927c989c4
fix shutterinvert (#19341)
* fix shutterinvert

* fix shutterinvert
2023-08-18 09:02:17 +02:00
Theo Arends b8804cf2a8 Add variables to rules
Add variables ``%power<1..28>%`` and  ``%switch<1..28>%`` to rules (#19331)
2023-08-17 15:34:13 +02:00
Paul Blacknell aa097e9034
add: shutdown command for PID controller (#19318) 2023-08-16 11:17:54 +02:00
Paul Blacknell be88e701d9
Add commands to allow setting of timeprop parameters (#19310)
* add: commands to set timeprop settings

* Update my_user_config.h

* fix: properly generated json response to commands
2023-08-15 09:43:55 +02:00
Christian Baars b5cc48dd64
ESP32: pass flashmode at build time to macro definition (#19299)
* pass flashmode at build time to macro definition

* fix 8266 builds
2023-08-12 11:31:06 +02:00
Paul Blacknell 9eb184c30e
Improvements to PID controller driver (#19285)
* add: update DEBUG_THERMOSTAT to only control the virtual switch

Also, debug output is still generated but end user can control this debug level 3

* add: debug output of main controller parameters when thermostat enabled

Also, add units for debug outputs added to make them more intelligible

* Update xdrv_39_thermostat.ino

* add: debug message when sensor is detected as not alive

fix: display thermostat number in debug messages

* add: log message prefix string for thermostat

* Update xdrv_39_thermostat.ino

fix: typos in comments
add: debug messages

* add: debug prefix for thermostat

* add: debug prefix added to output lines

* fix: comment typos and small grammatical changes for clarity

* add: debug prefix 'THE' added to debug output

* add:  display PID status and key info on web output

* fix: remove extraneous comments that included unused code fragments

* add: local sensor handling improvements

add: define a local sensor name
add: define the local sensor measurement parameter
add: limit sensor not seen error message to every 60 seconds to avoid flooding the logs
add: include interval since which sensor data was last updated
fix: properly update the maximum interval time so missing sensor data is properly alerted

* Update xdrv_49_pid.ino
2023-08-10 16:20:06 +02:00
Paul Blacknell c3fadde3e8
Improvements to thermostat debug output (#19279)
* add: update DEBUG_THERMOSTAT to only control the virtual switch

Also, debug output is still generated but end user can control this debug level 3

* add: debug output of main controller parameters when thermostat enabled

Also, add units for debug outputs added to make them more intelligible

* Update xdrv_39_thermostat.ino

* add: debug message when sensor is detected as not alive

fix: display thermostat number in debug messages

* add: log message prefix string for thermostat

* Update xdrv_39_thermostat.ino

fix: typos in comments
add: debug messages

* add: debug prefix for thermostat

* add: debug prefix added to output lines

* fix: comment typos and small grammatical changes for clarity

* add: debug prefix 'THE' added to debug output
2023-08-08 10:55:05 +02:00
Christian Baars 76aa6747a5
more idf5.1 preps: Berry SPI (#19273) 2023-08-06 21:10:36 +02:00
s-hadinger 0b3d6fd146
Prepare for Arduino v3 / esp-idf v5 2nd batch (#19265) 2023-08-05 20:34:24 +02:00
s-hadinger 5c8c7cdfca
Prepare for Arduino v3 / esp-idf v5 (#19264) 2023-08-05 15:11:10 +02:00
stefanbode 959d105413
Change shutterbutton hold behavior with grouptopic (#19263)
* skip stop on hold if grouptopic

If shutterbutton is defined with a grouptopic send on HOLD, there is no stop on releasing the button. All shutters will move to defined position

* do not stop on hold release if group submitt

If mqtt broadcast is defined on hold then release the hold button will not anymore stop the local shutter. All shutter will move to defined position
2023-08-05 14:51:56 +02:00
Theo Arends 7c3c3855c4 Fix console Firefox layout 2023-08-05 12:35:03 +02:00
Theo Arends fc798540b7 Fix console min height 2023-08-05 11:56:06 +02:00
s-hadinger 362326f004
Zigbee Berry minor fix and cleaning (#19257)
* Zigbee Berry minor fix and cleaning

* Fix compilation
2023-08-05 09:50:39 +02:00
Theo Arends e2c79b45e4 Save some more code bytes 2023-08-04 17:24:05 +02:00
Theo Arends 7736ba8af1 Change console height
Change console height from default 318 pixels to viewport (#19241)
2023-08-04 16:11:58 +02:00
stefanbode 6572f0ed39
Fixing SHUTTERINVERT issues (#19243)
* fix wrong inverted shutter

* fix inverted shutter for esp32
2023-08-03 11:55:20 +02:00
s-hadinger df50a56c25
Fade would fail when the difference between start and target would be too small (#19246) 2023-08-02 17:48:12 +02:00
stefanbode 355b1e3b74
unsigned overflow fixed (#19221)
fixed overflow on negative value with dimmer 100%
2023-07-30 15:01:21 +02:00
msedv fb45e73384
Four files which used #ifdef EPS8266 instead of #ifdef ESP8266 - which e.g. broke the MFRC522 functionality between 12.5 and 13.x. (#19209) 2023-07-29 16:50:27 +02:00
s-hadinger f2ab3b36a9
Zigbee decode Aqara 0000/FF01 attribute 03 as Temperature (#19210)
* Zigbee decode Aqara 0000/FF01 attribute 03 as Temperature

* Changed to AqaraTemperature
2023-07-29 14:19:15 +02:00
stefanbode de3b0a4b00
ensure minimum interrupt time (#19211)
prevent interrupts <30 micro seconds because sometimes see crashes on esp8266.
esp32 stop of interrupt >30microseconds and < 105microseconds
2023-07-29 14:15:00 +02:00
s-hadinger 11f056040e
Make TCPStart ip filter more IPv6 friendly (#19199) 2023-07-26 22:52:48 +02:00
s-hadinger 1a91dc441b
Berry improve tasmota.scale_uint() (#19197) 2023-07-26 22:31:22 +02:00
s-hadinger 9f16f09f29
Berry `mqtt.publish` now distinguishes between `string` and `bytes` (#19196) 2023-07-26 19:54:14 +02:00
Theo Arends 0ddcea9905 Add alternative for PCA9685
Add alternative for PCA9685 as define PCA9685_V2 (#18805)
2023-07-24 15:11:20 +02:00
gemu 994c105bda
fix empty line problem (#19171) 2023-07-23 11:55:01 +02:00
s-hadinger 6d3aedcafe
Berry SK6812_GRBW crash (#19166) 2023-07-22 21:51:37 +02:00
Theo Arends 973ce106e7 Fix compilation (#19134) 2023-07-22 11:28:23 +02:00
Theo Arends b149443691 Fix default battery level
- Fix default battery level (#19160)
- Bump version to v13.0.0.3
2023-07-21 14:35:22 +02:00
s-hadinger 758b0237b4
Matter latency improvement for single attribute reads and single commands (#19158) 2023-07-20 21:26:55 +02:00
stefanbode d1a4296867
New DEEPSLEEP topic for HA + Battery Level % support (#19134)
* New LWT on deepsleep

To allow better integration into HA LWT topic will report details of sleep status:
16:54:04.388 MQT: hm/tele/ESP_3284D1/LWT =
{"Sleep":{"Time":"2023-07-17T16:55:03","Sleep":1689612844,"Wakeup":1689612903}}

* Revert LWT back to non JSON

Send DeelSleep on LWT
Send Deepsleep parameters on topic DeepSleep

* Setting default for batteryLevel

* Enable BatteryPercentSet

Changing the battery level e.g. by rule

* Added Battery % to status message

* added battery_level_percent

* Added battery % support in STATE message

* Enable setting battery level

101 is reserved for power-plug. No battery Level reported

* Setting default for battery Level

101 is reserved for power plug
0..100 normal battery values

* Revert back LWT to Offline

Removed "DeepSleep" LWT status until further decision is made. Current implementation is technical sufficient for HA to detect a battery powered device

* Added discovery message after deepsleep change

* Added discovery for battery and deepsleep
2023-07-20 09:51:08 +02:00
s-hadinger 3da5124348
Berry add AES CCM decrypting in a single call to avoid any object allocation (#19153) 2023-07-19 21:15:08 +02:00
s-hadinger 2a3690b866
Berry `tasmota.loglevel()` and `tasmota.rtc_utc()` for faster performance (#19152) 2023-07-19 20:58:50 +02:00
s-hadinger ada754c582
Berry add `energy.update_total()` to call `EnergyUpdateTotal()` from energy driver (#19117) 2023-07-15 17:06:10 +02:00
stefanbode ebca2f0a07
Zero-Cross Dimmer fixes (#19109)
* Fix Zero-Cross flickering on Savedata

* Fix reboot on DIMMER usage with Zero-Cross

* Fix Flickering on dimmer 0
2023-07-14 09:10:20 +02:00
Theo Arends 5b6a25a7a0 Fix driver config backup and restore
Fix driver config backup and restore (#18295)
2023-07-12 10:52:58 +02:00
Theo Arends 889e6ea54d Fix driver config restore 2023-07-11 16:12:04 +02:00
Theo Arends 258976c014 Verify correct functionality 2023-07-10 18:14:23 +02:00
Theo Arends 43bc81010f Configuration file save and restore .xdrvsetXXX
Configuration file save and restore now backup and restore ``.xdrvsetXXX`` files too (#18295)
2023-07-10 16:03:32 +02:00
btsimonh b1cc87d24f
File UI changes (#19014)
* Remove recursion into folders on Manage Files.  May be enabled with UFILESYS_RECURSEFOLDERS_GUI.  On Edit of a file, Save and Magane btuttons return to the folder containgint the file being edited.  On delete file, UI returns to the folder that the deleted file was in.

* Make newfile put in in the current folder, and return to current folder on save of manage button.

* Add folderOnly and FileOnly functions to reduce code duplication.
Enable folder delete.
Enable folder listing to be aborted (x in browser)
Disbale ESP32 Download Task.  Needs attention.
Allow folder create from newfile name.
2023-07-10 10:27:20 +02:00
Theo Arends f726c904ab Enable ESP32 shutter driver
Enable ESP32 shutter driver (#18295)
2023-07-08 17:21:06 +02:00
stefanbode 8ce7cb4ccd
Enhance ZC-Dimmer for falling and leading edge dimmer (#19054)
* Update tasmota_types.h

* Update xdrv_68_zerocrossDimmer.ino
2023-07-07 19:50:36 +02:00
s-hadinger 57c4825ccd
`BrRestart` now supports web handlers to work after Berry restart (#19057) 2023-07-06 21:37:46 +02:00
xsp1989 862edddb56
Fix BUG: Zigbee devices cannot be added through routing nodes (#19036) 2023-07-06 21:10:57 +02:00
Theo Arends fc9065d4c8 Fix miel_hvac
Fix miel_hvac (#18923)
2023-07-03 11:55:21 +02:00
s-hadinger d72f3b9978
Command ``BrRestart`` to restart the Berry VM (experimental) (#19003)
* Command ``BrRestart`` to restart the Berry VM (experimental)

* Add web button for Berry Restart
2023-07-02 21:52:01 +02:00
Theo Arends 85aed3a17d Remove phase_count_virtual 2023-07-01 14:31:03 +02:00
Theo Arends 6dd8aabeef Cleanup scripter logging 2023-07-01 14:04:27 +02:00
Theo Arends 3edb5bb096 Move SD card init up
Move SD card init up (#18934)
2023-07-01 12:48:33 +02:00
Jacek Ziółkowski 2705374160
add Energy.phase_count_virtual to berry energy module (#19004)
* add Energy.phase_count_virtual to berry energy module

* Update xdrv_52_3_berry_energy.ino

* Update xdrv_52_3_berry_energy.ino
2023-06-30 22:19:59 +02:00
Theo Arends 1e3b41dd2d Fix PCF8574 mode2 init using scripts
Fix PCF8574 mode2 init using scripts (#18934)
2023-06-30 11:37:20 +02:00
Theo Arends 58e13edea0 Change loglevel message 2023-06-30 11:31:59 +02:00
Theo Arends ca452c5e43 Add Energy->phase_count_virtual 2023-06-30 11:14:37 +02:00
jonschz a51096e400
update light when `VirtualCT` is invoked (#18972)
Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2023-06-27 14:23:44 +02:00
Paul Blacknell 7892a38795
add HybridControllerPhase to json payload (#18842) 2023-06-26 21:56:07 +02:00
gemu 3642d8ef37
fixes TS_FLOAT (#18961) 2023-06-25 12:08:42 +02:00
s-hadinger 36de007909
Berry replace `string.format`with `format` (#18945)
* Berry replace `string.format`with `format`

* remove import.string
2023-06-23 18:33:31 +02:00
Norbert 04521e5542
Change format of KNX Group address (#18928)
"%d.%d.%d" -> "%d/%d/%d"

Co-authored-by: Norbert <Noschvie@users.noreply.github.com>
2023-06-22 21:56:55 +02:00
s-hadinger 28861821a6
Zigbee fixed regression with SetOption101 (#18884) 2023-06-14 22:46:18 +02:00
stefanbode 156a3551b0
Repair SHUTTER Shelly 2.5 with manual relay change on switches (#18877)
* Repair manual relay change

* Repair manual relay change
2023-06-14 16:14:10 +02:00
stefanbode 0e3b32e848
Readded up/down/open/close commands (#18864)
* Update xdrv_27_shutter.ino

* fix shutterposition with up/down/open/close
2023-06-12 19:09:19 +02:00
Subhash Chandra 2f616eef2c
make IRHVAC send incremental changes. (#18310)
This change will allow mqtt messages simpler by allowing something like
`publish cmnd/ir-bridge/IRHVAC {"Power": "On"}`.
The simpler format is required for working with mqtt clients like
iotMQTTPanel or similar on android.

Limitations:
- Requires full message be sent at-least once. I work around this with
   a `system#boot` rule
- Gets messy with multiple devices. I have only one AC per room, and
  this doesn't doesn't interfere with other IR devices.

TODO:
- [ ] Change the build flag `INCREMENTAL_IRAC`to a `SetOption`
- [ ] Persist `irac_prev_state` across reboots.
- [ ] Support multiple devices.
2023-06-10 14:53:02 +02:00
btsimonh 63cc575c8b
Berry Webclient: Change StreamBytes to StreamBeBytesWriter, and improve wc_getbytes (#18837)
This reduces allocation to a single allocaiton, but also theroetically allows the Bytes object to grow if content-length was unset.

(cherry picked from commit 936477f5977dd1a4f899498cc7cc0baf05b34a89)
2023-06-10 11:28:31 +02:00
Barbudor 6aed929e17
fix #18817 http response for status with retain (#18819)
* fix http response for status with retain

* take 2

* add a failsafe when JSONlen reach zero
2023-06-09 07:59:24 +00:00
btsimonh fc92dc0995
Add wcclient.get_bytes() to Berry (#18829)
(cherry picked from commit 5903b21448a3f088b12bd47a04996ff84e467a3a)
2023-06-09 08:56:05 +02:00
blakadder 676165f3f6
better way to support LSBJ (#18827) 2023-06-08 20:39:02 +02:00
blakadder ae67c6cfa1
Add support for INMP441 MEMS microphone (#18823)
* Add INMP441 MEMS mic support

* add I2S audio defines as preview
2023-06-08 16:24:44 +02:00
blakadder 5a8f13d57f
Pdm_mic (#18807)
* add I2S LSB flag

* add support for PDM microphones
2023-06-07 12:34:44 +02:00
blakadder 24233924c5
add I2S LSB flag (#18793) 2023-06-04 23:01:46 +02:00
s-hadinger f8df9e5f00
Berry `webclient.url_encode()` is now a static class method, no change required to existing code (#18775) 2023-06-02 13:29:57 +02:00
jonschz 9d57a19be3
Fix interaction of `SO92`, `VirtualCT`, and `RGBWWTable` (#18768)
* remove unused variable

* Relocate SO92 implementation
This way, SO92 does not ignore SO106

* Relocate RGBWWTable implementation
This fixes a bug related to RGBWWTable and SO92.
Also, the code is tidier this way

* Cleanup: Reduce code duplication

* more consistent behaviour for SO92 and free_cw

---------

Co-authored-by: jonschz <jonschz@users.noreply.github.com>
2023-06-01 22:12:57 +02:00
s-hadinger b9d855ef79
Berry RS256 crypto algorithm (RSASSA-MCKS1_v1-5 with SHA256) used for JWT (#18763) 2023-06-01 10:02:23 +02:00
s-hadinger 3c75bc92a2
Zigbee Berry mapping fix attributes (#18747) 2023-05-29 23:05:45 +02:00
Theo Arends 07b7a7ee9a Fix initial ESP32 Energy kWh total time 2023-05-29 16:19:55 +02:00
s-hadinger fe570a1b26
Matter Border Router for ESP8266 (experimental) (#18734) 2023-05-29 10:40:24 +02:00
Theo Arends d91e1e8bcc Fix berry scheme select 2023-05-27 12:33:50 +02:00
Theo Arends e87714dbcd Add TODO 2023-05-26 17:51:20 +02:00
Theo Arends fcf3477165 Initial support for WS2812 scheme 14 2023-05-26 17:47:57 +02:00
s-hadinger 6fa22aae6b
adjust neopixel busy time (#18723)
* adjust neopixel busy time

* Adjust time for Berry
2023-05-25 19:21:18 +02:00
Theo Arends e05d75248e Add undocumented feature 2023-05-25 17:13:31 +02:00
Theo Arends d0e88c9dae Fix BusyDelay WS2812 2023-05-24 17:24:48 +02:00
Theo Arends fc67cca8b4 Add generic SystemWaitIfBusy() to fix WS2812 led flicker
Add generic SystemWaitIfBusy() to fix WS2812 led flicker
2023-05-24 16:21:59 +02:00
gemu 242eb3074a
fixes and enhancements (#18718)
* onewire fixes, webui radiobuttons

* fix regression
2023-05-23 11:30:59 +02:00
Theo Arends 22abc8ad99 Fix ESP32 InfluxDb initial connection delays
Fix ESP32 InfluxDb initial connection delays using HTTPClient (#18015)
2023-05-21 16:21:43 +02:00
Theo Arends ae518424bc Add IPv4 DNS lookup to influxdb
- Add IPv4 DNS lookup to influxdb (#18015)
- Add response to influxdb send
2023-05-21 15:34:36 +02:00
stefanbode a76ebaae48
Shutter continuous improvement (#18701)
* Update xdrv_27_esp32_shutter.ino

* Update xdrv_27_shutter.ino

* Update xdrv_01_9_webserver.ino

* Update xdrv_12_discovery.ino

* shutterinvert

removed slider display to driver
fix wrong invert display

* codereduction+refactor slider

removed webui slider into driver
optimized code

* update slide, fix invert shutters

- refactor sliders into driver
- fix percent calculation on iverted shutters

* fix on realpercent if inverted shutter

* fix ShutterPercentToRealPosition

fix on inverted shutter

* added shutter to bootloop reset

* bugfix integration

* bugfix
2023-05-21 12:25:11 +02:00
Bernhard Urban-Forster d5ad79985b
haas: sync shutter discovery and fix for more than 4 shutter (#18694)
* discovery: hoist shutter computation out of loop

* haas: sync shutter discovery and fix for more than 4 shutter
2023-05-20 09:06:56 +02:00
Theo Arends 4afcdc11d6 Simplify Berry Mute option 2023-05-19 16:30:48 +02:00
s-hadinger 043ea2986b
Berry `tasmota.wifi()` would wrongly report wifi as up (#18687)
* Berry `tasmota.wifi()` would wrongly report wifi as up

* Fix ESP8266 compile

* Fix display of IP in wifiman

* Improve wifiman IP handling for IPv6
2023-05-18 11:23:09 +02:00
stefanbode 4d131fd543
zero-cross dimmer cleanup (#18674)
removed zero cross dimmer initialize
2023-05-17 08:54:22 +02:00
stefanbode adff41f962
bugfix (#18673) 2023-05-16 22:34:07 +02:00
btsimonh f8b26a90f6
Add mutex to many camera functions. (#18655)
* Add mutex to many camera functions.

* Allow stream to continue after wcinit command (and other commands which reconfigure).

* Adust retries on camera init, specifically log success if it retried.
Shorten messages to save rom.
I have seen fail of 0x103 and 0x20002 succeed on second try.
2023-05-16 12:21:25 +02:00
s-hadinger 81d7785f66
LED PWM ac_dimmer curve was wrongly applied instead of Gamma (#18666) 2023-05-15 22:51:14 +02:00
s-hadinger 98bfc172c1
Zigbee support for air sensors (#18665)
* Zigbee support for air sensors

* ppm
2023-05-15 22:04:13 +02:00
Theo Arends f1a9a0b45b Add support for PCA9557
Add support for PCA9557 8-bit I/O expander (#18632)
2023-05-14 15:08:09 +02:00
Theo Arends 26508e55fc Merge branch 'development' of https://github.com/arendst/Tasmota into development 2023-05-14 14:42:23 +02:00
Theo Arends 7cad4f95b6 Enable I2c on webcam 2023-05-14 14:42:11 +02:00
CCTweaker 885737a1fd
Add support for PCA9557 8-bit IO expander (#18632)
* add PCA9557 driver

* text correction

* added switches and buttons

* update max devices to 8

* cleanup
2023-05-14 14:19:39 +02:00
Jeroen f860722eba
Added Endianess Parameter (#18650)
https://github.com/arendst/Tasmota/discussions/18244

Co-authored-by: JeroenSt <nospam@nospam.org>
2023-05-14 14:18:45 +02:00
Jason2866 0bf27e70fe
fix logic when init cam was successful (#18653) 2023-05-14 14:08:53 +02:00
Theo Arends 86979646ff Energy power delta report delayed
Energy power delta report delayed by two seconds allowing hardware to stabilize (#17751)
2023-05-11 18:10:52 +02:00
Christian Baars 79a826a206
Update xdrv_81_esp32_webcam.ino (#18637) 2023-05-11 09:28:33 +02:00
f-reiling 3a6cd9b63c
start modus tcp bridge automatically (#18634)
* added default port for modbus tcp bridge to start automatically

* updated ifdef style

* renamed define for modbus default port
2023-05-10 14:38:52 +02:00
Jason2866 3c951d7751
fix GT911 crash in LVGL firmware (#18633)
* fix GT911 crash

* remove wrong frag when using GT911
2023-05-10 14:02:51 +02:00
Mateusz Bronk 6a7b2b0c6e
IR: Extended the A/C protocol with Command/iFeel/SensorTemp (#18612)
* IR: Added support for new A/C protocol fields

New fields introduced in IRremoteESP8266 v2.8.5:
1. Command (one of: [Control | Config | iFeel | Timer], default: Control) - allows to set IR command type (e.g. iFeel for no-beep ambient sensor report)
2. iFeel (boolean, default: false) - configures whether iFeel (ambient sensor temp. is used by the A/C unit)
3. SensorTemp - the ambient sensor temperature reading to send

Note:
 - Fan setting via int is now 6-value (breaking change -> 6 is the new max)

* IR A/C: Model now pretty-printed to JSON

Model string is the default (falls back to int if n/a)

* IR A/C: Added separate JSON resp. per command type

* No change for "kControlCommand" (default/legacy).
* SensorReport/Timer/Config commands only contain relevant JSON nodes

Additionally:
 Clock has time semantics (input: minutes, output: HH:MM), except for "config" mode,
 where state.clock is used as ConfigKey and state.sleep is used as ConfigValue.

---------

Co-authored-by: Mateusz Bronk <2566147+mbronk@users.noreply.github.com>
2023-05-09 21:35:56 +02:00
Christian Baars cf60e34578
fix webcam init for some cases (#18606)
Co-authored-by: Christian Baars <christianbaars@MacBook-Pro-von-Christian.local>
2023-05-08 09:57:00 +02:00
Theo Arends da5396a080 Add filesystem size to esp8266 GUI 2023-05-07 17:25:18 +02:00
Jason2866 eccc1af0a2
disable SHT pig on i2c / add missing GT911 defines (#18595)
* disable SHT pig on i2c / add missing GT911

* GT911 missing in config
2023-05-07 15:32:15 +02:00
Theo Arends e9d1e8c725 Change command FileUpload binary index 2023-05-06 18:09:11 +02:00
stefanbode 25e55ae073
#18548 fix shuttersetup (#18586)
- code optimization
- shuttersetup reluctant on relay to energy measure relation
2023-05-06 15:46:29 +02:00
s-hadinger 069278f966
Berry add `tcpclientasync` class for non-blocking TCP client (#18584) 2023-05-05 15:13:22 +02:00
gemu 687b26ad13
Scripter update (#18578)
* add ds2480b library

* add onewire support

* reset on error

* call to get esp32 HWS

* DS2480 serial invert option
2023-05-05 09:17:17 +02:00
s-hadinger c26ec44407
Matter POC for remote Relay (#18575) 2023-05-03 23:03:01 +02:00
stefanbode 9097f508fd
BugFix Garage + new shutterbuttons options (#18572)
* Fix GarageMode movements

* BugFix Garage + new shutterbuttons options

- Removed logging
- shutterbuttons support incremental change
- garage mode, fix #18539 and fix #18442
2023-05-03 21:44:09 +02:00
stefanbode c498995f79
Update xdrv_68_zerocrossDimmer.ino (#18556)
* Update xdrv_68_zerocrossDimmer.ino

* Address IRAM issue report

removed some IRAM from ESP8266. Further improvement to ESP32 as soon as measurement is available.
2023-05-02 15:53:17 +02:00
Jeroen 616652ea22
Added support for Dingtian Relay Board v3.6.10 (#18535)
* Added support for Dingtian Relay Board v3.6.10

* Output OE was never initialized

* Removed white spaces trying to fix language builds

* Fix for https://github.com/arendst/Tasmota/pull/18535#pullrequestreview-1406978097

* Fixed language builds

---------

Co-authored-by: JeroenSt <nospam@nospam.org>
2023-05-01 14:51:02 +02:00
Jeroen c5612a50fb
Fix for https://github.com/arendst/Tasmota/discussions/15703#discussioncomment-5713294 (#18534)
Added and fixed comments

Co-authored-by: JeroenSt <nospam@nospam.org>
2023-04-29 14:46:38 +02:00
stefanbode 17d1d7f5fa
Update xdrv_68_zerocrossDimmer.ino (#18532) 2023-04-28 17:33:12 +02:00
stefanbode 60855bf367
Enabled ZCDimmerSet for ESP8266 (#18518)
* Enabled ZCDimmerSet for ESP8266

- Increased interrupts time to get stablity. Savedata issue is gone. 
- Increased accuracy to trigger an on sinus curve.
- Enabled high resolution trigger ZCDimmerSet for ESP8266

* Update xdrv_68_zerocrossDimmer.ino
2023-04-27 08:03:00 +02:00
s-hadinger 6702321784
Matter shutter with tilt (#18525) 2023-04-26 22:53:26 +02:00
Jeroen ee9d086aba
Solved: ModbusBridge reading int16 returns uint16 (#18524)
https://github.com/arendst/Tasmota/issues/18522

Co-authored-by: JeroenSt <nospam@nospam.org>
2023-04-26 22:27:53 +02:00
stefanbode afbdb3d54f
Added TILTCONFIG to status13 message for MATTER support (#18512) 2023-04-26 11:39:59 +02:00
stefanbode bec24baa75
Changes JSON message to actual position and not outdated (#18502)
* Report actual position in JSON

* Update xdrv_27_shutter.ino

* Update xdrv_27_esp32_shutter.ino

* copy&paste error
2023-04-26 08:39:49 +02:00
Christian Baars f6763eb37b
Berry: add BLE server/advertiser (#18494) 2023-04-26 08:39:29 +02:00
stefanbode 39abde2583
Worked on ESP32 dimmer with Zero cross (#18481)
* Worked on ESP32 dimmer with Zero cross

Until now the ESP32 does not support zero-cross dimmer. I take a sneak how they did in in ESPhome and adapted the approach to TASMOTA. At the end it works that smooth that likely i will change ESP8266 either so we have a common code. Currently ESP8266 is not touched.
There is a minor issue with savedata == default. When changing the dimmer value the interrupts get stopped during write of the config data to flash.

* ESP8266 Dimmer added

Worked all so well and the code is much smaller. There is no need for reconfiguration on existing users. But there are settings not needed anymore. Will work on the documentation. Anyhow existing installations can upgrade without hickup

* Optimized endpoints at dimmer 0 and 100

* Removed debug stuff

* Fix Issue at dimmer = 0

* Small bugfix

* Final checked Version

* Update xsns_01_counter.ino

* Add missing func

* Update xsns_01_counter.ino

* Moved out of the house of counter and build my own one

* New ZeroCross Driver

* Update xdrv_91_zerocrossDimmer.ino

* evolving

* Delete xdrv_91_zerocrossDimmer.ino

* Add files via upload

* Changed drv number from 1 to 68

* Commit to merge
2023-04-25 13:46:19 +02:00
gemu 799ba675eb
add xpt2046 option for spi bus 2 (#18480)
* allow spi bus 2

* xpt spi bus 2

* xpt option bus

* xpt option spi bus 2

* exclude c3

* exclude s2

* fix s3

* typo
2023-04-23 10:19:31 +02:00
Jason2866 11a43ea99b
Tasmota Core 208 (#18460)
* Tasmota Core 2.0.8
* Fix Linker errors
2023-04-20 20:01:35 +02:00
Theo Arends 2684141722 Fix ESP8266 Energy Export Active
Fix ESP8266 Energy Export Active no update regression from v12.3.1.3
2023-04-18 15:34:19 +02:00
s-hadinger e2e142f289
Zigbee fix compilation for future core (#18432)
* Zigbee fix compilation for future core

* More fixes for ESP32
2023-04-16 23:16:28 +02:00
Theo Arends 96f6f69f13 Increase TasmotaClient receive buffer
Increase TasmotaClient receive buffer from 100 to 250 (#18427)
2023-04-16 14:39:29 +02:00
ferix98 2a8b859e37
Added I2SRtttl command (#18423) 2023-04-16 12:04:22 +02:00
Theo Arends c2a6dd81e8 Fix ESP32 energy monitoring set StartTotalTime
Fix ESP32 energy monitoring set StartTotalTime regression from v12.3.1.5 (#18385)
2023-04-14 17:42:31 +02:00
stefanbode 3da96a55d5
Fixes and enhancements autosetup from testbench (#18405) 2023-04-13 21:56:35 +02:00
stefanbode 6d9beb5d79
autosetup of shutters for shelly devices (#18393)
* New autocallibration and setup for shelly devices

* setup command
2023-04-12 09:39:48 +02:00
stefanbode 1c0936c6d5
fix setting migration issue (#18383)
* fix setting migration issue

* next try to fix migration issue

@arendst: I saw you made also some changes to the xdrv122. I copied this and it looks like setting the crc32 was the root of the issue. You removed it and I do the same now. Looks much better.
2023-04-11 08:17:55 +02:00
s-hadinger 6007f2d970
Berry `webserver.html_escape()` reusing the internal HTML escaping function (#18381) 2023-04-10 19:16:01 +02:00
s-hadinger 3354e2acbf
Matter log unknown opcodes (#18379) 2023-04-10 16:20:11 +02:00
gemu f06104b0b7
Scripter update (#18374)
* bug fixes and enhancements

* tcp reconnect
2023-04-10 10:04:00 +02:00
stefanbode 86be6c8a3d
Additional limit check on tilt changes (#18364)
* limit check on tilt position

* limit check on tilt changes
2023-04-08 09:40:38 +02:00
Paul Blacknell 1be4d15f65
add: include EmergencyState in Thermostat sensor json payload (#18344) 2023-04-06 09:50:37 +02:00
Theo Arends 9c6fdc7027 Sync discoveries 2023-04-05 14:06:43 +02:00
stefanbode afd22b5b42
fix #18331 (Wrong discovery on ESP32_shutter (#18334)
* fix ESP32_shutter wrong discovery

* fix wrong discovers on ESP32 shutter

* fix wrong discovers on ESP32_shutter

* Update xdrv_12_discovery.ino
2023-04-05 13:47:12 +02:00
stefanbode b287d05098
Enable motordelay for tilt operations (#18330)
* implement motordelay also for tilt operations

* enable motordelay for tilt operations

* Update xdrv_27_esp32_shutter.ino
2023-04-04 17:45:33 +02:00
stefanbode f109d6ff72
Ensure Shuttermotorstop even on direct relay operation (#18329)
* Ensure motorstoptime also on direct relay change

When relay is triggered with button or switches it did not take the motorstoptime into account

* Ensure motorstoptime also on direct relay change

When relay is triggered with button or switches it did not take the motorstoptime into account

* Ensure motorstoptime also on direct relay change

When relay is triggered with button or switches it did not take the motorstoptime into account
2023-04-04 16:17:12 +02:00
Theo Arends 542eca3154 Global fix http(s) connect issues 2023-04-03 16:12:29 +02:00
Theo Arends 6b2efa16dc Fix ESP32 WebQuery and WebGetConfig 2023-04-03 14:55:47 +02:00
stefanbode efa7ae492e
Fix webpage, when ESP32 driver used (#18305)
* Fix to enable ESP32 shutter

* required changes for dual operation with ESP32 shutter

* fix

* Fix missing information on webpage
2023-04-01 14:53:01 +02:00
stefanbode d8f9a920ce
refactoring shutterbuttons completed (#18303)
* added support to set tilt with the shutterposition

Documentation will be changed.
OLD: shutterposition <position>
NEW: shutterposition <position>(optional)/<tilt>

e.g. shutterposition 50,-90

* refactoring of shutterbuttons completed

moved away from bitmatrix to struct Typedef to enable further development and functionality.
Added support to define tiltposition with shutterbuttons
2023-03-31 09:46:36 +02:00
Theo Arends 3cbe3dbf8b Create xdrv_27_esp32_shutter.ino 2023-03-29 15:58:46 +02:00
Theo Arends 2630c8e097 Delete xdrv_27_ESP32_shutter.ino 2023-03-29 15:58:26 +02:00
stefanbode 5c14a3169b
Shutter esp32 support up to 16 shutters (#18295)
* Updates to support ESP32 shutter compiler option

* New ESP32 shutter driver

* Update xdrv_27_ESP32_shutter.ino

* Update xdrv_27_shutter.ino

* Update support_command.ino

* Update xdrv_27_shutter.ino

Fix compile error

* Update xdrv_27_ESP32_shutter.ino

Fix compile error

* Update xdrv_27_shutter.ino

Fix compile error

---------

Co-authored-by: Theo Arends <11044339+arendst@users.noreply.github.com>
2023-03-29 15:43:19 +02:00
Theo Arends b321fab868 Refactor PCF8574 driver 2023-03-27 15:42:40 +02:00
s-hadinger 2afa863e54
Berry fix `light.set()` (#18268) 2023-03-26 15:59:18 +02:00
Theo Arends 0f08a07658 Fix PCF8574 input mode (#18232) 2023-03-26 15:05:16 +02:00
Theo Arends 215c9cc30f Simplify base modes 2023-03-26 11:39:30 +02:00
Theo Arends ebe308acfc refactor button/switch code 2023-03-25 18:15:24 +01:00
Theo Arends 4645af038c Add BASE 2 for absolute relays 2023-03-25 17:50:23 +01:00
Theo Arends 1e1c536a50 Consolidate Energy Column Gui 2023-03-25 15:16:06 +01:00
Theo Arends 9ae7b86efc Save some bytes 2023-03-25 11:59:42 +01:00
Theo Arends 56b3fbe917 Add MCP23xxx absolute buttons and switches 2023-03-24 18:00:24 +01:00
Theo Arends 938399e086 Add absolute button/switch support
Add absolute button/switch support (#18232)
2023-03-24 17:20:28 +01:00
stegerfa 0081022543
fixes building the sensor names in case of multiple channel thermostat function (#18248)
now it will follow SetOption64 (hyphen vs underscore)
hyphen is the standard - underscore the much safer option in my cases
as many user user underscore the mistake was not detected till now

Co-authored-by: Fabian Steger <git@fabian-steger.de>
2023-03-24 14:54:23 +01:00
SteWers ab03654e02
[Thermostat] Enhancement publishing of control method (#18235)
Enhancement publishing of control method. Independent, if hybrid mode is used or not.
2023-03-22 10:41:53 +01:00
s-hadinger a36edadc0f
Berry fix `tasmota.get_power(index)` (#18237) 2023-03-21 22:30:50 +01:00
Jeroen a68bc49cab
Added option to output TCP requested modbus data to MQTT (#18231)
https://github.com/arendst/Tasmota/discussions/17369

Co-authored-by: JeroenSt <nospam@nospam.org>
2023-03-21 09:39:32 +01:00
Jeroen fbbb4eaf84
Fix for issue: https://github.com/arendst/Tasmota/issues/18088 (#18228)
Co-authored-by: JeroenSt <nospam@nospam.org>
2023-03-20 21:26:38 +01:00
gemu daa64f098c
Scripter update (#18226)
* fix failure with negative values in >D

* Create Powerwall.h
2023-03-20 12:13:36 +01:00
Barbudor 948a82d75e
Add virtual Buttons & Switches in Digtian driver (#18223)
* add support for virtual buttons or switches

* remove DINGTIAN key from SENSOR when using buttons-switches
2023-03-19 20:19:48 +01:00
Theo Arends 115105bf7c Consolidate energy messages 2023-03-18 18:26:43 +01:00
Theo Arends 9a3a479c4f Reduce heap fragmentation 2023-03-17 21:17:53 +01:00
Theo Arends 54a2688cbf Bump v12.4.0.3
- Bump v12.4.0.3
- Refactor energy monitoring reducing stack usage and solve inherent exceptions and watchdogs (#18164)
2023-03-17 21:05:51 +01:00
stefanbode d0f4637611
Fix #18198 (#18204)
* Fix #18198

Fix wrong movement with tilt if additional endstop defined

* simplify
2023-03-16 14:38:04 +01:00
Paul Blacknell 52227b0294
add: controller control method added to MQTT and Web UI (#18189) 2023-03-14 12:32:36 +01:00
Theo Arends bda32739a8 Support for reset settings on filesystem 2023-03-13 15:41:21 +01:00
s-hadinger 0bc48d16c2
Berry add `web_get_arg` event to drivers when `FUNC_WEB_GET_ARG` event is processed (#18175) 2023-03-12 19:01:08 +01:00
Gabriele Lauricella 7f64b6e04b
Enhanced TM1650 with 7-Segment commands like TM1637 (#18109)
* Enhanced TM1650 with 7-Segment commands like TM1637

* Fix point for display type 2
2023-03-12 09:22:40 +01:00
s-hadinger 34bf941cd2
Berry add `webclient` `collect_headers()` and `set_headers` (#18166) 2023-03-11 21:46:08 +01:00
s-hadinger 4aa9aebae3
Berry add `wc.set_follow_redirects(bool)` (#18165) 2023-03-11 19:48:39 +01:00
Theo Arends c74c92baed Add wifi current channel to GUI info screen (#18153) 2023-03-11 17:20:56 +01:00
Theo Arends 8a3546e5c4 Fix ESP32 energy period
Fix ESP32 energy period shows kWh value instead of Wh regression from v12.3.1.5 (#15856)
2023-03-11 17:01:43 +01:00
Theo Arends 2b89b7a134 Fix init order of device drivers (#18124) 2023-03-11 15:52:02 +01:00
Christian Baars 52d341f87c
TFL: bugfix uninitialized pointer, some cleanups (#18161)
Co-authored-by: Christian Baars <christianbaars@MacBook-Pro-von-Christian.local>
2023-03-11 10:55:57 +01:00
benderl d25ef165b9
remove absolute url (#18148)
Co-authored-by: Lutz Bender <lutz@lutz-bender.de>
2023-03-10 15:04:13 +01:00
s-hadinger d7d23c7b9a
Zigbee send Tuya 'magic spell' to unlock devices when pairing (#18144) 2023-03-09 21:34:32 +01:00
s-hadinger 513b0fece1
Berry tasmota.cmd() can mute logs (#18143) 2023-03-09 21:29:18 +01:00
s-hadinger ba1475f8cd
Berry refactor rule matcher (#18138) 2023-03-09 08:48:41 +01:00
s-hadinger 77c654fcdc
Fix parameter for `wire.endtransmission()` (#18131) 2023-03-07 19:01:42 +01:00
s-hadinger 6bd73fc883
Refactored Berry rule engine and support for arrays (#18121) 2023-03-05 21:50:32 +01:00
Christian Baars 83f039cdf7
Berry: add tensorflow lite for microcontrollers (#18119)
Co-authored-by: Christian Baars <christianbaars@MacBook-Pro-von-Christian.local>
2023-03-05 16:46:18 +01:00
Barbudor 0f9bece011
fix topic comparison (#18114) 2023-03-05 07:52:30 +01:00
Barbudor 0dc39e0470
Tariff command variant to force tariff - take 2 (#18112)
* tariff command variant to force tariff

* move to Settings + add esp8266

* added tariff-forced to changelog
2023-03-04 21:58:03 +01:00
Theo Arends ccdab295e7 Refactor PCF8574 driver 2023-03-04 15:06:52 +01:00
Barbudor 6b016eb860
tariff command variant to force tariff (#18102) 2023-03-03 18:43:26 +01:00
Theo Arends 747ebae670 Add support for multiple PCF8574 as switch/button/relay 2023-03-03 17:40:27 +01:00
Theo Arends cb988edba8 Prep PCF8574 virtual switch/button/relay 2023-03-03 16:54:57 +01:00
Theo Arends 2e5501e9ab Add support for multiple MCP23008 as switch/button/relay 2023-03-03 10:44:35 +01:00
Theo Arends 453f0abad1 Revert "Update changelogs"
This reverts commit d07d4b06c9.
2023-03-03 10:31:31 +01:00
Theo Arends d07d4b06c9 Update changelogs
- Add MCP23008 virtual switch/button/relay support
2023-03-03 10:28:22 +01:00
Barbudor edb2fad6c1
Tuya sequence fix (#18085)
* no additional command while waiting for response

* send wifi state 4 when mqtt is disabled
2023-03-03 08:42:27 +01:00
Theo Arends a72bbbe30a Add interrupt control to MCP23xxx driver
- Add interrupt control to MCP23xxx driver
- Enable ADE7880 in tasmota32.bin
2023-03-02 11:24:54 +01:00
Theo Arends 3cd8839b6d Fix ESP8266 compilation 2023-03-01 17:59:22 +01:00
Theo Arends 159d1ae312 Breaking change Shelly Pro 4PM
- Add support for multiple MCP23017/MCP23S17 as switch/button/relay
- Breaking change Shelly Pro 4PM using standard MCP23xxx driver
2023-03-01 16:52:34 +01:00
Theo Arends 9f30836854 Add support for multiple MCP23017 as switch/button/relay 2023-03-01 10:12:47 +01:00
Theo Arends 10cc10742f Extent virtual switch/button/relay support
Extent virtual switch/button/relay support using MCP23017. Can be used along side of current MCP23017 sensor driver,
2023-02-28 17:54:43 +01:00
Theo Arends 5cdd9791f4 Fix invalid apparent and reactive power 2023-02-28 10:17:30 +01:00
Barbudor 39fd0cb0c4
add lt and gt signs is missing (#18064) 2023-02-27 16:33:31 +01:00
Theo Arends e927e3307e Add DevicesPresent limit check
- Increase supported relays and buttons to 32
2023-02-25 16:44:04 +01:00
gemu 0aaa616881
support for double and intergers (#18039) 2023-02-25 09:58:47 +01:00
Theo Arends 3ce011c2ce Attempt to stabilize Shelly Pro 4PM values 2023-02-20 18:02:43 +01:00
Theo Arends 692e9090c8 Attempt to stabilize Shelly Pro 4PM values 2023-02-20 11:31:12 +01:00
AleXSR700 2d83c335bc
Update xdrv_79_esp32_ble.ino (#17990)
Increase maximum length of Alias as the short MaxAlias is not in line with name length and limits the user (e.g. if sensors have room names as appendix like "_master_bathroom").
2023-02-20 10:51:44 +01:00
s-hadinger dcbf50a918
Matter automatic ifdefs (#18002) 2023-02-19 22:25:29 +01:00
Theo Arends a994c71de4 Refactor device_present calculation 2023-02-19 15:28:20 +01:00
Theo Arends 4c59b5b8d1 Fix Energytotals cannot be set to negative values
Fix Energytotals cannot be set to negative values (#17965)
2023-02-17 10:53:07 +01:00
Theo Arends e1b11a6fe7 Fix Tuya Exception 3 (#17941) 2023-02-15 16:33:29 +01:00
Theo Arends 31f5b79bf8 Fix adding virtual switches 2023-02-15 11:06:53 +01:00
Theo Arends e0584b2157 Refactor switches and buttons
- Fix Tuya switches
2023-02-12 16:09:28 +01:00
Theo Arends ec56473631 Refactor XxxSet and XxxCal energy commands 2023-02-12 14:05:33 +01:00
Theo Arends dbffcac195 Shelly Pro 4PM reduce number of SPI updates 2023-02-12 12:19:02 +01:00
Theo Arends 5d3f2cc316 ESP8266 increase number of discovery relays 2023-02-09 16:02:06 +01:00
Theo Arends 8cbb62d8c9 Simplify virtual buttons/switches 2023-02-09 14:46:54 +01:00
Theo Arends d029d8bcbc Fix Shelly Pro 4PM switch states 2023-02-08 17:08:13 +01:00
Theo Arends f76d7ee8cf Tune TM1638 key/leds 2023-02-06 18:07:05 +01:00
Theo Arends 055331d2ab Breaking change TM1638 button and led support
Breaking change TM1638 button and led support are handled as virtual switches and relays (#11031)
2023-02-06 15:57:27 +01:00
Theo Arends ce29bc38d7 Extent ESP8266 virtual button support 2023-02-06 12:03:32 +01:00
Theo Arends 9673cca8b0 Extent ESP8266 virtual switch support 2023-02-06 11:45:28 +01:00
Theo Arends 9517677fb2 Fix initial displaydimmer state 2023-02-05 16:54:25 +01:00
Theo Arends c699131103 Add Shelly Pro 4PM to lvgl binary 2023-02-05 16:22:18 +01:00
Theo Arends 8bc03bbc06 Bump version v12.3.1.6
- Add ESP32 preliminary support for Matter protocol, milestone 1 (commissioning) by Stephan Hadinger
- Add basic support for Shelly Pro 4PM
2023-02-05 14:29:42 +01:00
Theo Arends 9bf1bd93c0 Add some display safeguards fixing power issues at restart 2023-02-05 12:52:21 +01:00
Theo Arends 36b9e4ab78 Fix universal display driver too early power control 2023-02-04 18:24:21 +01:00
Theo Arends cfd34aa02c Fix Shelly Pro 4PM issues
- Fix random ADE7935 measurements
- Fix relay 1 toggle on restart
- Add Shelly Pro 4PM display.ini
2023-02-04 17:48:53 +01:00
s-hadinger a483991ba3
ESP32 preliminary support for Matter protocol, milestone 1 (commissioning) (#17871)
* ESP32 preliminary support for Matter protocol, milestone 1 (commissioning)

* Fix case
2023-02-04 00:00:21 +01:00
David Gwynne 052b5c2926
reset recv parser if it takes too long for the message to arrive. (#17845)
i have a tuyamcu based device that occasionally gets a flipped bit in
messages it receives from the muc. those usually show up as checksum
failures, but if the bit flips in the length field then we wait for
bytes that just arent going to arrive, so we don't get to the cksum
field for that test to fail. instead, add a timeout that the tick
checks, and reset the recv state machine on a timeout.

if the message that was corrupted was a dp update, we'll end up with
an inconsistent view of the state of the DPs. maybe we should send a
request for all datapoint values when this or a cksum failure happens?
2023-02-01 11:48:07 +01:00
s-hadinger 293ae8064d
Berry webserver raw content (#17844) 2023-01-31 23:23:52 +01:00
s-hadinger 5ea9a95660
Berry add `tasmota.locale()` (#17843) 2023-01-31 23:23:36 +01:00
Theo Arends db581b15c7 Add SetOption150
Add SetOption150 - (Energy) Force no voltage/frequency common allowing individual voltage channel calibration.
2023-01-31 22:30:50 +01:00
gemu ae8041140f
Webcam fix (#17840)
* Update xdrv_81_esp32_webcam.ino

* fix single picture fetch

* delay not needed
2023-01-31 22:22:28 +01:00
Jason2866 b8677ce0d6
revert PR Olimex fix (#17841) 2023-01-31 14:46:09 +01:00
Barbudor 3d39efaf4a
isTuya optionnal arg to validpin (#17835) 2023-01-30 22:35:38 +01:00
gemu f09a083777
Sml ams (#17828)
* sml ams crypto support

* add ams library

* fix crc names

* fix TLS dependency

* Update library.properties

* Update xsns_53_sml.ino
2023-01-30 15:03:46 +01:00
Theo Arends 9e9afe88f1 Fix ESP32 energy monitoring over 3 phases 2023-01-30 14:16:13 +01:00
Theo Arends 5b0ee76173 Fix ESP32 energy monitoring migration 2023-01-30 13:14:02 +01:00
Theo Arends db3fdc5118 Add ESP32 support for eigth energy phases/channels
- ESP32 support for eigth energy phases/channels
- ESP32 command ``EnergyCols 1..8`` to change number of GUI columns
- ESP32 command ``EnergyDisplay 1..3`` to change GUI column presentation
- support for SEN5X gas and air quality sensor by Tyeth Gundry (#17736)
2023-01-29 16:09:13 +01:00
s-hadinger 03815d827a
Berry energy_ctypes fixed accordingly (#17820) 2023-01-29 12:09:29 +01:00
s-hadinger b98b2838e8
Zigbee extend plug-in modifiers to 16 bits (#17817) 2023-01-29 10:46:06 +01:00
David Gwynne 9e522e8fa3
fix determination of the current weekday. (#17812)
the result of c logical expressions is 0 or 1, not the values of the
operands.
2023-01-29 07:58:20 +01:00
Theo Arends 76a1c00917 Add more energy verbosity at restart 2023-01-28 11:30:42 +01:00
Theo Arends e77154f406 Enable ESP32 energy driver 2023-01-28 11:03:14 +01:00
Barbudor 4dd97a9e82
non-breaking fix year in DS3231 (#17803) 2023-01-28 08:04:34 +01:00
Theo Arends 0b81236110 Prep ESP32 energy expansion 2023-01-27 16:41:55 +01:00
Theo Arends 5b977bf4e4 Merge branch 'development' into dev-energy 2023-01-27 16:00:44 +01:00
Theo Arends f6827590f3 Prep new energy driver 2023-01-27 15:53:40 +01:00
gemu 103e3f616a
refactoring and bug fixes (#17798) 2023-01-27 11:10:43 +01:00
Theo Arends 9f538e9986 Add ESP32 support for four channels 2023-01-26 17:27:49 +01:00
Theo Arends d70dbe979e Prep ESP32 energy for four+ phases 2023-01-26 15:26:10 +01:00
thkaiser 8d782caf15
Support ESPC3 and ESPS3 (#17791)
* Support ESPC3 and ESPS3

* remove debug comment

Co-authored-by: Jason2866 <24528715+Jason2866@users.noreply.github.com>
2023-01-26 09:58:59 +01:00
Theo Arends 2529759974 Prep energy for four+ phase support 2023-01-25 17:05:48 +01:00
Barbudor 973e4693c2
possibly fix sleep problem (#17786) 2023-01-25 08:36:14 +01:00
Theo Arends e891830545 Prep ESP32 energy 2023-01-24 16:54:03 +01:00
Theo Arends e81d59f658 Fix Shelly Pro 4PM initial button state 2023-01-24 16:34:24 +01:00
Theo Arends ecac466e23 Fix Shelly Pro 4PM power on reset 2023-01-24 12:04:30 +01:00
Barbudor 95dee75b0b
use dB value, not quality (#17777) 2023-01-24 08:55:44 +01:00
David Gwynne 1c39ff6cef
add tuyamcubr_web_sensor to do a simple display of the dp values. (#17776)
the format shows the type+dpid on the left hand side (eg, Bool1,
Value2, Enum3, etc), and the value with %u on the right hand side.
2023-01-24 08:55:28 +01:00
David Gwynne 36fd8358d6
TuyaMCUBr: support on/true/off/false/toggle in the tuyamcubool command. (#17775)
* support on/true/off/false/toggle in the tuyamcubool command.

i wanted a tasmotized wall switch to be able to blindly send "toggle" to
a fan/light and have it do the right thing. the dp value is kept by the
driver, so it can easily read, modify, and write it.

* "on"/"off"/"toggle" etc are parsed when XdrvMailbox is set up

so i don't have to do it, i just have to use the payload.
2023-01-24 08:54:19 +01:00
Barbudor db0532de5f
ds3231 temperature sensor (#17778) 2023-01-24 08:52:43 +01:00
Theo Arends 4297fa3f3e Add Shelly Pro 4 input interrupt support 2023-01-23 12:51:02 +01:00
Theo Arends 88dd5f7f50 Fix Shelly Pro 4PM auto reset 2023-01-22 16:41:25 +01:00
yvesdm3000 3f73d5a49d
Implement Zigbee tuya_time sync. (#17765) 2023-01-22 11:50:52 +01:00
gemu d38a0c799c
Epaper deep sleep support (#17766)
* allow descriptor reload

* restart reason rrsn, database rewrite

* support for deep sleep

* revert

* restart reason
2023-01-22 10:56:06 +01:00
Theo Arends c85003c67d Prep Shelly Pro 4PM 2023-01-21 14:30:35 +01:00
s-hadinger 0743b7d2b6
Berry add up flag to ``tasmota.wifi()`` and ``tasmota.eth()``, always return MAC (#17759) 2023-01-21 13:41:36 +01:00
Benjamin Nestler 498b0e55b8
Add tuya commands CMD_GET_NETWORK_STATUS and CMD_TEST_WIFI (#17745)
* Add tuya commands CMD_GET_NETWORK_STATUS  and CMD_TEST_WIFI

* Assuming that nobody uses the tuya test wifi ssid, the payload is hardcoded.
2023-01-20 13:20:03 +01:00
Jason2866 6b4171fef9
Shelly has label `fs_1` for spiffs (#17753)
* Shelly has label `fs_1` for spiffs
2023-01-20 13:19:38 +01:00
David Gwynne 51866026d5
TuyaMCUBr: Handle "Get local time" requests from the MCU (#17750)
* handle get local time requests from the MCU.

from what i can tell from the tuya serial communication protocol
documentation, we only have to send the time if MCU requests it. this is
unlike how TUYA_SET_TIME is implementing in xdrv_16, where if
USE_TUYA_TIME is enabled it will send unsolicited time updates every
minute as well as in response to a request from the MCU.

i couldn't find an easy to check flag to see if tasmota was synced to a
real clock, so this blindly tells the MCU that our time is valid and
copies it over, the same as xdrv_16.

the tuya doco also describes a "Get system time in GMT" request and
response structure which would be mostly a copy of this code if i knew
if and where tasmota keeps track of UTC/GMT.

lastly, i'm not convinced RtcTime.day_of_week is right. it's friday
here which should be 6 if you start counting sunday as 1, but i read 2

* local time sync is implemented, but not gmtime
2023-01-20 10:07:42 +01:00
s-hadinger 61be95841f
Berry crypto.EC_P256 ECDSA signature ASN.1 (#17740) 2023-01-18 20:50:01 +01:00
Barbudor d904e0aa7f
Tuya - WIFI_STRENGTH + Save check on MCU_CONF (#17724)
* adding response to command 36 Get Wifi Strength

* more logs

* poperly check and warn if Mode 2 provide bad GPIOs

* final test on gpio
2023-01-17 04:46:00 +01:00
s-hadinger 457f706d17
Berry ``crypto.EC_P256`` ECDSA signature (required by Matter protocol) (#17723) 2023-01-16 21:48:28 +01:00
Barbudor 2d1d49504b
fix free() too early (#17710) 2023-01-15 16:20:35 +01:00
Theo Arends e0b17af307 Fix first sensor in case GlobalTemp is set wrong
Fix first of two sensors in case GlobalTemp is set wrong (#17694)
2023-01-14 16:11:08 +01:00
Theo Arends f71465a182 Repurpose SO39 for import active bandwidth
Repurpose SO39 for import active bandwidth (#17659)
2023-01-14 15:39:54 +01:00
Theo Arends 6c04cf7076 Update xdrv_122_file_settings_demo.ino 2023-01-13 17:19:46 +01:00
Theo Arends 13c16fd37b Fix xdrv_122_file_settings_demo (#17692) 2023-01-13 17:19:14 +01:00
Theo Arends 1a9e86a6b3 Fix ESP32 safeboot propagating upload 2023-01-13 11:30:30 +01:00
Theo Arends 9f8c8efac1 Delete .xdrv_65_tuyamcubr.ino.swp 2023-01-08 17:37:23 +01:00
David Gwynne 17d68750d9
WIP Tuya MCU Bridge driver alternative to the TuyaMCU driver (#17626)
* WIP Tuya MCU Bridge driver alternative to the TuyaMCU driver

The main difference is this driver does not try and wire MCU data points
(Dps) into the tasmota power/light/etc controls. Instead each Dp ends up
being relayed directly to MQTT and the rules subsystem. If you want to
change the state of something wired up to the MCU, you send tuyamcu
specific commands to manipulate the Dp.

Each Dp gets a type and id specific topic that is sent to MQTT. eg, Dp
id 1 type bool looks like tele/%topic%/TUYAMCUBOOL1. To change state you
send a TuyaMCUBool1 command (ie, the command index value is used as the
DpId, which is nice and symmetrical) with the new value.

Currently Rules operate on TuyaMCU#TypeDpid things, eg, "rule1 on
TuyaMCU#Bool1 do power %value% endon" toggle the power on the tasmota
device when the state of the thing on the MCU changes too.

The most obviously missing stuff at the moment is:

- better relaying of the wifi/mqtt status to the MCU
- handling wifi reset requests from the MCU
- low power stuff?
- support for sending status updates and device info queries.
- restarting the tuya mcu state machine?
- restarting the rx state machine when no bytes are rxed for a period of
  time
- time sync

* shorten the log prefix to TYB (3 chars).

requested by arendst

* use the local definition for the SET_DP command.

reaching back to the existing tuyamcu code isnt reliable.

pointed out by arendst

* put the todo list in the code so it can be tracked

* check the wifi/mqtt state every second and update the mcu if it changes.

* fix rule processing when Dp state is changed from a cmnd.

rule processing was done as part of publishing the state, but publishing
the state when it was updated by a command only happened if So59 was
set. split rule processing out of publish and call them separately as
needed.

publish is now called from teleperiod, status updates from the MCU,
and from cmnds if so59 is set. rules are called from status updates from
the MCU and from cmnds.

Co-authored-by: David Gwynne <dlg@defeat.lan.animata.net>
2023-01-08 17:35:45 +01:00
Theo Arends 12d7651758 Fix shutter JSON responses 2023-01-08 14:35:09 +01:00
Theo Arends 95690ab1b9 Add recursive rule MQTT subscribe support (#16943) 2023-01-07 17:31:10 +01:00
Theo Arends dad059737d Change PID temperature update (#17636) 2023-01-07 16:11:30 +01:00
Theo Arends 2e7496a052 Keep webserver enabled on command ``upload`` 2023-01-07 15:37:52 +01:00
Theo Arends 0b3c237627 Change strtod() into CharToFloat() saving 8k code
Change strtod() into CharToFloat() saving 8k code
2023-01-06 15:28:44 +01:00
Theo Arends af733afbe5 Fix PID-Control parameter destruction
Fix PID-Control parameter destruction and replace all atof() by CharToFloat() saving 8k code size (#17618)
2023-01-06 14:58:19 +01:00
s-hadinger 33d6dbed3d
No IP address shown when in AP moode (#17599) (#17619) 2023-01-06 14:03:16 +01:00
Theo Arends 8275cb776e Fix rule mqtt subscribe payload size
Increase rule event buffer from 100 to 256 characters (#16943)
2023-01-05 15:02:55 +01:00
Jason2866 6b5f0e4e7c
Prepare support for JL1101 PHY (#17607) 2023-01-05 13:04:06 +01:00
Theo Arends cd182a5814 Add TfsLoadString() 2023-01-04 12:00:09 +01:00
s-hadinger d59caa7203
Berry ``crypto.AES_CCM`` (required by Matter protocol) (#17586) 2023-01-03 20:26:46 +01:00