stefanbode / Sonoff-Tasmota

Provide ESP8266 based itead Sonoff with Web, MQTT and OTA firmware using Arduino IDE, enhanced with I2C options
GNU General Public License v3.0
127 stars 41 forks source link

Bad behaviour of shutter support #94

Closed calcipher49 closed 5 years ago

calcipher49 commented 5 years ago

Hi, Maybe I misunderstood how shutter commands works, but the behavior I observe is incorrect. I use Sonoff Dual R2 with Relay1 to open and relay2 to close shutter. Firmware is 6.3.0.2 stb-1.4 compiled with env_default = sonoff

My setup: SETOPTION14 1 SETOPTION80 1 SHUTTERRELAY1 1 -> restart SHUTTEROPENDURATION 24 SHUTTERCLOSEDURATION 24 Then Shutter is closed, SHUTTERPOSITION1 is set to 0 , both relays OFF

If I run: SHUTTERPOSITION1 50 Relay1 is put to ON during 12s, then OFF : correct

But if then I run SHUTTERPOSITION1 25, Both relay are put to ON: Relay1 during 6s and relay2 permanently

This is incorrect as in this case only Relay2 must be enabled, and only during 6s.

Console trace in attachment. trace.txt

Thanks if you can help me.

stefanbode commented 5 years ago

The behavior you are seeing is for the shutter option 3. relay1 up/down and relay 2on/off. this makes sense. Witch setoption14 1 it is totally impossible that you see this result. Please use "setoption14" without parameter and check output.

calcipher49 commented 5 years ago

Hi, SETOPTION14 is 1

I solved this issue with: BUCKETSIZE 2 Now works perfectly (even with BUCKETSIZE reseted to 0 after). No idea about root cause.

You can close this issue