Skip to content

Commit

Permalink
Add command SetOption46 0..255
Browse files Browse the repository at this point in the history
Add command ``SetOption46 0..255`` to add 0..255 * 10 milliseconds power on delay before initializing I/O (#15438)
  • Loading branch information
arendst committed Sep 15, 2022
1 parent 1f01ca0 commit 971b06c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All notable changes to this project will be documented in this file.
- Berry has persistent MQTT subscriptions: auto-subscribe at (re)connection
- Berry automated solidification of code
- Support of optional file calib.dat on ADE7953 based energy monitors like Shelly EM (#16486)
- Command ``SetOption46 0..255`` to add 0..255 * 10 milliseconds power on delay before initializing I/O (#15438)

### Changed
- ESP32 Increase number of button GPIOs from 8 to 28 (#16518)
Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo

## Changelog v12.1.1.2
### Added
- Command ``SetOption46 0..255`` to add 0..255 * 10 milliseconds power on delay before initializing I/O [#15438](https://github.com/arendst/Tasmota/issues/15438)
- Command ``SetOption146 1`` to enable display of ESP32 internal temperature
- Command ``StatusRetain`` [#11109](https://github.com/arendst/Tasmota/issues/11109)
- Command ``DspSpeed 2..127`` to control message rotation speed on display of POWR3xxD and THR3xxD
Expand Down
2 changes: 1 addition & 1 deletion tasmota/include/tasmota.h
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ enum SO32_49Index { P_HOLD_TIME, // SetOption32 - (Button/Switch) K
P_ROTARY_MAX_STEP, // SetOption43 - (Rotary) Rotary step boundary (default 10)
P_IR_TOLERANCE, // SetOption44 - (IR) Base tolerance percentage for matching incoming IR messages (default 25, max 100)
P_BISTABLE_PULSE, // SetOption45 - (Bistable) Pulse time for two coil bistable latching relays (default 40)
P_SO46_FREE, // SetOption46
P_POWER_ON_DELAY, // SetOption46 - (PowerOn) Add delay of 10 x value milliseconds at power on
P_SO47_FREE, // SetOption47
P_SO48_FREE, // SetOption48
P_SO49_FREE // SetOption49
Expand Down
4 changes: 4 additions & 0 deletions tasmota/tasmota_support/support_tasmota.ino
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,8 @@ void SetPowerOnState(void)
}
}

// AddLog(LOG_LEVEL_DEBUG, PSTR("PWR: PowerOnState %d restored"), Settings->poweronstate);

// Issue #526 and #909
uint32_t port = 0;
for (uint32_t i = 0; i < TasmotaGlobal.devices_present; i++) {
Expand Down Expand Up @@ -2160,6 +2162,8 @@ void GpioInit(void)
}
}

delay(Settings->param[P_POWER_ON_DELAY] * 10); // SetOption46 - Allow Wemos D1 power to stabilize before starting I2C polling for devices powered locally

#ifdef USE_I2C
TasmotaGlobal.i2c_enabled = (PinUsed(GPIO_I2C_SCL) && PinUsed(GPIO_I2C_SDA));
if (TasmotaGlobal.i2c_enabled) {
Expand Down

0 comments on commit 971b06c

Please sign in to comment.