esphome / esphome/issues

Current Based Cover - malfunction logic triggers on direction change

Open
#3,438 3 comments 0 reactions 0 assignees View on GitHub
not-stale
Dominant language
No language data
Stars
313
Forks
40
PR merge metrics
No merged PRs in 30d

Description

### The problem

Using Shelly 2.5 with current based cover as per https://esphome.io/components/cover/current_based.html

When shutter is going in either direction and either you quickly switch direction using buttons OR you directly change direction in HA, the cover will stop and the following output will show up (
[18:55:45][I][current_based.cover:074]: 'esp-shelly25-5dd41b cover' - Malfunction detected during closing. Current flow detected in open circuit

Based on the error I would guess that it uses the current detection as indicator for a malfunction, however because the update interval is 0.5s and it seems to expect the current value to change instantaneous, it always still detects current in the opposite direction when it receives a command to reverse the direction.

Maybe having a configurable delay that either delays the action until the current sensor shows to be below the threshold
OR that only triggers a malfunction after that time (i.e. immediate action but stop/fail if not "resolved" after delay)

At the moment I have to disable the malfunction detection on the shelly2.5 as it is not usable that way. (still would prefer to have it though)

### Which version of ESPHome has the issue?

2022.6.2

### What type of installation are you using?

Home Assistant Add-on

### Which version of Home Assistant has the issue?

2022.7.3

### What platform are you using?

ESP8266

### Board

_No response_

### Component causing the issue

_No response_

### Example YAML snippet

_No response_

### Anything in the logs that might be useful for us?

```txt
[18:55:44][D][cover:186]: Current Operation: OPENING
[18:55:44][D][sensor:124]: 'esp-shelly25-5dd41b close current': Sending state 0.01773 A with 2 decimals of accuracy
[18:55:44][D][sensor:124]: 'esp-shelly25-5dd41b open current': Sending state 5.07426 A with 2 decimals of accuracy
[18:55:45][D][sensor:124]: 'esp-shelly25-5dd41b close current': Sending state 0.01773 A with 2 decimals of accuracy
[18:55:45][D][sensor:124]: 'esp-shelly25-5dd41b open current': Sending state 5.05657 A with 2 decimals of accuracy
[18:55:45][D][cover:170]: 'esp-shelly25-5dd41b cover' - Publishing:
[18:55:45][D][cover:173]: Position: 60%
[18:55:45][D][cover:186]: Current Operation: OPENING
[18:55:45][D][cover:076]: 'esp-shelly25-5dd41b cover' - Setting
[18:55:45][D][cover:084]: Position: 0%
[18:55:45][D][switch:017]: 'esp-shelly25-5dd41b open relay' Turning OFF.
[18:55:45][D][switch:037]: 'esp-shelly25-5dd41b open relay': Sending state OFF
[18:55:45][D][switch:013]: 'esp-shelly25-5dd41b close relay' Turning ON.
[18:55:45][D][switch:037]: 'esp-shelly25-5dd41b close relay': Sending state ON
[18:55:45][D][switch:017]: 'esp-shelly25-5dd41b close relay' Turning OFF.
[18:55:45][D][switch:037]: 'esp-shelly25-5dd41b close relay': Sending state OFF
[18:55:45][D][switch:017]: 'esp-shelly25-5dd41b open relay' Turning OFF.
[18:55:45][D][cover:170]: 'esp-shelly25-5dd41b cover' - Publishing:
[18:55:45][D][cover:173]: Position: 61%
[18:55:45][D][cover:186]: Current Operation: IDLE
[18:55:45][I][current_based.cover:074]: 'esp-shelly25-5dd41b cover' - Malfunction detected during closing. Current flow detected in open circuit
[18:55:45][D][sensor:124]: 'esp-shelly25-5dd41b close current': Sending state 0.01773 A with 2 decimals of accuracy
[18:55:45][D][sensor:124]: 'esp-shelly25-5dd41b open current': Sending state 1.61742 A with 2 decimals of accuracy
[18:55:46][D][sensor:124]: 'esp-shelly25-5dd41b close current': Sending state 0.01773 A with 2 decimals of accuracy
[18:55:46][D][sensor:124]: 'esp-shelly25-5dd41b open current': Sending state 0.02566 A with 2 decimals of accuracy
[18:55:46][D][sensor:124]: 'esp-shelly25-5dd41b close current': Sending state 0.01773 A with 2 decimals of accuracy
[18:55:46][D][sensor:124]: 'esp-shelly25-5dd41b open current': Sending state 0.02524 A with 2 decimals of accuracy
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.