From efd4963eb2ed07b83dd1c312f3f8ba8759f4ece3 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 4 Jan 2022 17:02:12 +0100 Subject: [PATCH] dd experimental ADE7953 (Shelly 2.5 and Shelly EM) reset on restart (#14261) --- CHANGELOG.md | 3 +++ RELEASENOTES.md | 1 + tasmota/xnrg_07_ade7953.ino | 6 ++++++ 3 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73cdab574..0e4c473b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development ## [2022.01.1] +### Added +- Experimental ADE7953 (Shelly 2.5 and Shelly EM) reset on restart (#14261) + ### Changed - PubSubClient library from v2.8.12 to v2.8.13 - From Semantic Versioning (SemVer) to Calendar Versioning (CalVer) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 6767ab925..78c669696 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -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) - 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) +- Experimental ADE7953 (Shelly 2.5 and Shelly EM) reset on restart [#14261](https://github.com/arendst/Tasmota/issues/14261) - ESP32 support for TuyaMcu - ESP32 Berry features diff --git a/tasmota/xnrg_07_ade7953.ino b/tasmota/xnrg_07_ade7953.ino index a09e4f257..0271fa336 100644 --- a/tasmota/xnrg_07_ade7953.ino +++ b/tasmota/xnrg_07_ade7953.ino @@ -235,6 +235,12 @@ void Ade7953DrvInit(void) { if (PinUsed(GPIO_ADE7953_IRQ, GPIO_ANY)) { // Irq on GPIO16 is not supported... uint32_t pin_irq = Pin(GPIO_ADE7953_IRQ, GPIO_ANY); + + pinMode(pin_irq, OUTPUT); // Reset pin ADE7953 + digitalWrite(pin_irq, 0); + delay(1); + digitalWrite(pin_irq, 1); + pinMode(pin_irq, INPUT); // Related to resetPins() - Must be set to input Ade7953.model = GetPin(pin_irq) - AGPIO(GPIO_ADE7953_IRQ); // 0 .. 1 ; delay(100); // Need 100mS to init ADE7953