RavenSystem / esp-homekit-devices

Advanced firmware to add native Apple HomeKit and custom configurations, compatible with any SoC based on ESP32, ESP32-S, ESP32-C and ESP8266 series. (Shelly, Sonoff, Electrodragon, Tuya...)
Other
2.67k stars 357 forks source link

Window Covering with Shelly 2.5 triggering relay on reboot #1275

Closed morphix9 closed 3 years ago

morphix9 commented 3 years ago

Hey guys,

I'm experimenting with the Window covering and a Shelly 2.5.

I'm using this HAA config (basically from the wiki example):

{ "c": { "0": { "r": [ { "g": 16 } ] }, "l": 0, "b": [ { "g": 2, "p": 0, "t": 5 } ] }, "a": [ { "0": { "r": [ { "g": 15, "v": 1 }, { "g": 4 } ] }, "1": { "r": [ { "g": 15 }, { "g": 4, "v": 1 } ] }, "2": { "r": [ { "g": 15 }, { "g": 4 } ] }, "3": { "r": [ { "g": 15, "i": 0.2 }, { "g": 4 } ] }, "4": { "r": [ { "g": 15 }, { "g": 4, "i": 0.2 } ] }, "t": 45, "o": 18, "c": 14, "f": 70, "xa": 0, "f0": [ { "g": 5, "i": 1, "p": 0, "t": 0 } ], "f1": [ { "g": 13, "i": 1, "p": 0, "t": 0 } ], "f2": [ { "g": 5 }, { "g": 13 } ] } ] }

As you see I'm using the "xa": 0 parameter, but the opening relay is getting triggered every time I reboot the device. It's turned on, until an action is triggered. This means the window covering is opening on every restart (electricity outage for example).

Do you have an idea what's wrong?

WojtekWro commented 3 years ago

Hi, I’ve just realised that all my sonoff devices with more than one relay do this same.

I’m pretty sure that behaviour is quite new. I’m wondering if this is a feature or a bug.

@RavenSystem what do you think about it?

RavenSystem commented 3 years ago

Feature. I updated device-database but not Wiki example. Now I have updated Wiki too.

WojtekWro commented 3 years ago

Feature. I updated device-database but not Wiki example. Now I have updated Wiki too.

@RavenSystem could you point out the exact place where it’s explained? I could not find it in the Wiki. To be exact, my sonoff 4ch after connecting to the electricity send state high to a GPIO 15 (relay 4) for a second. I’m wondering why?

In my case I’m going to use this relay to the garage door. But with this feature it is unacceptable. It will open the door every time after lack of electricity.

morphix9 commented 3 years ago

@RavenSystem is this related to my issue: https://github.com/RavenSystem/esp-homekit-devices/issues/1253 ?

morphix9 commented 3 years ago

Feature. I updated device-database but not Wiki example. Now I have updated Wiki too.

@RavenSystem could you point out the exact place where it’s explained? I could not find it in the Wiki. To be exact, my sonoff 4ch after connecting to the electricity send state high to a GPIO 15 (relay 4) for a second. I’m wondering why?

In my case I’m going to use this relay to the garage door. But with this feature it is unacceptable. It will open the door every time after lack of electricity.

Check out the revisions. The window covering example has been changed:

Screen Shot 2020-12-30 at 12 40 51

But not documented what this new "cd": 2 argument is meaning.

WojtekWro commented 3 years ago

But not documented what this new "cd": 2 argument is meaning.

This is a 2 sec delay in starting accessory. But it doesn't change anything.

shanghaix commented 3 years ago

I have the same issue, updated to the latest version, using shelly 2.5 for my blinds. Now when the electricity restarts the blinds move for a second or less meaning some power goes through.

EDIT: Using the "cd" argument solves the issue. The code has also been updated in the device database in case anybody is having the same issue.