mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-27 20:56:35 +00:00
Add experimental ADE7953 (Shelly EM) reset on restart (#14261)
This commit is contained in:
parent
ce17266512
commit
cc7ad4afca
@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file.
|
|||||||
## [Unreleased] - Development
|
## [Unreleased] - Development
|
||||||
|
|
||||||
## [2022.01.1]
|
## [2022.01.1]
|
||||||
|
### Added
|
||||||
|
- Experimental ADE7953 (Shelly EM) reset on restart (#14261)
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- PubSubClient library from v2.8.12 to v2.8.13
|
- PubSubClient library from v2.8.12 to v2.8.13
|
||||||
- From Semantic Versioning (SemVer) to Calendar Versioning (CalVer)
|
- From Semantic Versioning (SemVer) to Calendar Versioning (CalVer)
|
||||||
|
@ -106,6 +106,7 @@ The latter links can be used for OTA upgrades too like ``OtaUrl http://ota.tasmo
|
|||||||
- PWM Dimmer two button support [#13993](https://github.com/arendst/Tasmota/issues/13993)
|
- PWM Dimmer two button support [#13993](https://github.com/arendst/Tasmota/issues/13993)
|
||||||
- Device Group Send full status item [#14045](https://github.com/arendst/Tasmota/issues/14045)
|
- Device Group Send full status item [#14045](https://github.com/arendst/Tasmota/issues/14045)
|
||||||
- Support for MAX7219 Dot Matrix displays [#14091](https://github.com/arendst/Tasmota/issues/14091)
|
- Support for MAX7219 Dot Matrix displays [#14091](https://github.com/arendst/Tasmota/issues/14091)
|
||||||
|
- Experimental ADE7953 (Shelly EM) reset on restart [#14261](https://github.com/arendst/Tasmota/issues/14261)
|
||||||
- ESP32 support for TuyaMcu
|
- ESP32 support for TuyaMcu
|
||||||
- ESP32 Berry features
|
- ESP32 Berry features
|
||||||
|
|
||||||
|
@ -236,7 +236,16 @@ void Ade7953DrvInit(void)
|
|||||||
if (PinUsed(GPIO_ADE7953_IRQ, GPIO_ANY)) { // Irq on GPIO16 is not supported...
|
if (PinUsed(GPIO_ADE7953_IRQ, GPIO_ANY)) { // Irq on GPIO16 is not supported...
|
||||||
uint32_t pin_irq = Pin(GPIO_ADE7953_IRQ, GPIO_ANY);
|
uint32_t pin_irq = Pin(GPIO_ADE7953_IRQ, GPIO_ANY);
|
||||||
pinMode(pin_irq, INPUT); // Related to resetPins() - Must be set to input
|
pinMode(pin_irq, INPUT); // Related to resetPins() - Must be set to input
|
||||||
Ade7953.model = GetPin(pin_irq) - AGPIO(GPIO_ADE7953_IRQ); // 0 .. 1 ;
|
Ade7953.model = GetPin(pin_irq) - AGPIO(GPIO_ADE7953_IRQ); // 0 (Shelly 2.5), 1 (Shelly EM)
|
||||||
|
|
||||||
|
if (1 == Ade7953.model) { // Shelly EM
|
||||||
|
pinMode(16, OUTPUT); // Reset pin ADE7953
|
||||||
|
digitalWrite(16, 0);
|
||||||
|
delay(1);
|
||||||
|
digitalWrite(16, 1);
|
||||||
|
pinMode(16, INPUT);
|
||||||
|
}
|
||||||
|
|
||||||
delay(100); // Need 100mS to init ADE7953
|
delay(100); // Need 100mS to init ADE7953
|
||||||
if (I2cSetDevice(ADE7953_ADDR)) {
|
if (I2cSetDevice(ADE7953_ADDR)) {
|
||||||
if (HLW_PREF_PULSE == Settings->energy_power_calibration) {
|
if (HLW_PREF_PULSE == Settings->energy_power_calibration) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user