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

Wall momentary buttons bug #126

Closed B1G1 closed 5 years ago

B1G1 commented 5 years ago

I still have the problem reported here https://github.com/stefanbode/Sonoff-Tasmota/issues/89 I push up or down button (momentary buttons) to move the shutter and when I want to stop it I push the same button a second time, then the shutter stops but after few seconds it starts to move itself again until it's completely open if I was opening it or until it's completely closed if I was closing it.

here a log, in this case I was trying to calibrate the shutter but I could not do it.

10:48:55 CMD: shutterclose
10:48:55 SRC: WebConsole from 192.168.1.50
10:48:55 RSL: Group 0, Index 1, Command SHUTTERCLOSE, Data 
10:48:55 shutterposition in: payload 0, index 1, source 7
10:48:55 lastsource 7:, realpos 47200, target 0, payload 0
10:48:55 Start shutter in right direction -1
10:48:56 SRC: Shutter
10:48:56 MQT: stat/tapparellaStudio/RESULT = {"POWER2":"ON"}
10:48:56 MQT: stat/tapparellaStudio/POWER2 = ON (retained)
10:48:56 Delay6 5s, xdrv 21
10:48:56 MQT: stat/tapparellaStudio/RESULT = {"shutterclose1":0}
10:48:57 SRC: PulseTimer
10:48:57 MQT: stat/tapparellaStudio/RESULT = {"POWER2":"OFF"}
10:48:57 MQT: stat/tapparellaStudio/POWER2 = OFF (retained)
10:48:57 Shutter 0: Real Pos: 44475, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 1.3  [s]
10:48:58 Shutter 0: Real Pos: 42295, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 2.2  [s]
10:48:59 Shutter 0: Real Pos: 40115, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 3.2  [s]
10:49:00 Shutter 0: Real Pos: 37935, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 4.2  [s]
10:49:01 Shutter 0: Real Pos: 35755, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 5.2  [s]
10:49:02 Shutter 0: Real Pos: 33575, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 6.2  [s]
10:49:03 Shutter 0: Real Pos: 31395, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 7.2  [s]
10:49:04 Shutter 0: Real Pos: 29215, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 8.3  [s]
10:49:05 Shutter 0: Real Pos: 27035, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 9.3  [s]
10:49:06 Shutter 0: Real Pos: 24855, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 10.3  [s]
10:49:07 Shutter 0: Real Pos: 22675, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 11.3  [s]
10:49:08 Shutter 0: Real Pos: 20495, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 12.2  [s]
10:49:09 Shutter 0: Real Pos: 18315, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 13.3  [s]
10:49:10 Shutter 0: Real Pos: 16135, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 14.3  [s]
10:49:11 Shutter 0: Real Pos: 14064, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 15.2  [s]
10:49:12 Shutter 0: Real Pos: 11884, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 16.2  [s]
10:49:13 Shutter 0: Real Pos: 9704, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 17.2  [s]
10:49:14 Shutter 0: Real Pos: 7524, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 18.2  [s]
10:49:15 Shutter 0: Real Pos: 5344, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 19.2  [s]
10:49:16 Shutter 0: Real Pos: 3164, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 20.2  [s]
10:49:17 Shutter 0: Real Pos: 984, Target 0, source: PulseTimer, start-pos: 100 %, direction: -1, rtcshutter: 21.2  [s]
10:49:17 Shutter 0: Real Pos. 0, Stoppos: 0, relay: 1, direction -1, pulsetimer: 5, rtcshutter: 21.8 [s], operationtime 0
10:49:17 MQT: stat/tapparellaStudio/SHUTTER1 = 0 (retained)
10:49:17 SRC: Shutter
10:49:17 MQT: stat/tapparellaStudio/RESULT = {"POWER2":"ON"}
10:49:17 MQT: stat/tapparellaStudio/POWER2 = ON (retained)
10:49:17 MQT: tele/tapparellaStudio/RESULT = {"SHUTTER-1":{"position":0, "direction":0}}
10:49:18 SRC: PulseTimer
10:49:18 MQT: stat/tapparellaStudio/RESULT = {"POWER2":"OFF"}
10:49:18 MQT: stat/tapparellaStudio/POWER2 = OFF (retained)
10:49:18 CFG: Saved to flash at FB, Count 46, Bytes 3824
10:49:22 CMD: SHUTTER50PERCENT 50
10:49:22 SRC: WebConsole from 192.168.1.50
10:49:22 RSL: Group 0, Index 1, Command SHUTTER50PERCENT, Data 50
10:49:22 Shutter accuracy digits: 1
10:49:22 Shutter 0 (Relay:1): Init. Pos: 0 [0 %], Open Vel.: 100 Close Vel.: 109 , Max Way: 47200, Opentime 23.6 [s], Closetime 21.5 [s], CoedffCalc: c0: 0, c1 472, c2: 472, c3: 0, c4: 0, binmask 3, is inverted 0, shuttermode 2
10:49:22 MQT: stat/tapparellaStudio/RESULT = {"shutter50percent1":50}
10:49:23 CFG: Saved to flash at FA, Count 47, Bytes 3824
10:49:47 APP: Button1 multi-press 1
10:49:48 SRC: Button
10:49:48 Delay2 5s
10:49:48 Shutter 0: Target: 47200, powerstatelocal 1
10:49:48 MQT: stat/tapparellaStudio/RESULT = {"POWER1":"ON"}
10:49:48 MQT: stat/tapparellaStudio/POWER1 = ON (retained)
10:49:49 SRC: PulseTimer
10:49:49 MQT: stat/tapparellaStudio/RESULT = {"POWER1":"OFF"}
10:49:49 MQT: stat/tapparellaStudio/POWER1 = OFF (retained)
10:49:49 Shutter 0: Real Pos: 1300, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 0.7  [s]
10:49:50 Shutter 0: Real Pos: 3200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 1.6  [s]
10:49:51 Shutter 0: Real Pos: 5200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 2.6  [s]
10:49:52 Shutter 0: Real Pos: 7200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 3.6  [s]
10:49:53 Shutter 0: Real Pos: 9200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 4.6  [s]
10:49:54 Shutter 0: Real Pos: 11200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 5.6  [s]
10:49:55 Shutter 0: Real Pos: 13200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 6.6  [s]
10:49:56 Shutter 0: Real Pos: 15200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 7.6  [s]
10:49:57 Shutter 0: Real Pos: 17200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 8.6  [s]
10:49:58 Shutter 0: Real Pos: 19200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 9.6  [s]
10:49:59 Shutter 0: Real Pos: 21200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 10.6  [s]
10:50:00 Shutter 0: Real Pos: 23200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 11.6  [s]
10:50:01 Shutter 0: Real Pos: 25200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 12.6  [s]
10:50:02 Shutter 0: Real Pos: 27200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 13.6  [s]
10:50:03 APP: Button1 multi-press 1
10:50:03 Shutter 0: Real Pos: 29200, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 14.6  [s]
10:50:03 SRC: Button
10:50:03 Delay2 5s
10:50:04 Shutter 0: Target: 47200, powerstatelocal 1
10:50:04 MQT: stat/tapparellaStudio/RESULT = {"POWER1":"ON"}
10:50:04 MQT: stat/tapparellaStudio/POWER1 = ON (retained)
10:50:04 SRC: PulseTimer
10:50:04 MQT: stat/tapparellaStudio/RESULT = {"POWER1":"OFF"}
10:50:04 MQT: stat/tapparellaStudio/POWER1 = OFF (retained)
10:50:04 Shutter 0: Real Pos: 30600, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 0.6  [s]
10:50:05 Shutter 0: Real Pos: 32600, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 1.6  [s]
10:50:06 Shutter 0: Real Pos: 34600, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 2.6  [s]
10:50:07 Shutter 0: Real Pos: 36700, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 3.6  [s]
10:50:08 Shutter 0: Real Pos: 38700, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 4.7  [s]
10:50:09 Shutter 0: Real Pos: 40700, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 5.7  [s]
10:50:10 Shutter 0: Real Pos: 42700, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 6.7  [s]
10:50:11 Shutter 0: Real Pos: 44700, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 7.7  [s]
10:50:12 Shutter 0: Real Pos: 46700, Target 47200, source: PulseTimer, start-pos: 0 %, direction: 1, rtcshutter: 8.7  [s]
10:50:12 Shutter 0: Real Pos. 47200, Stoppos: 100, relay: 0, direction 1, pulsetimer: 5, rtcshutter: 8.9 [s], operationtime 0
10:50:13 MQT: stat/tapparellaStudio/SHUTTER1 = 100 (retained)
10:50:13 SRC: Shutter
10:50:13 MQT: stat/tapparellaStudio/RESULT = {"POWER1":"ON"}
10:50:13 MQT: stat/tapparellaStudio/POWER1 = ON (retained)
10:50:13 MQT: tele/tapparellaStudio/RESULT = {"SHUTTER-1":{"position":100, "direction":0}}
10:50:13 CFG: Saved to flash at F9, Count 48, Bytes 3824
10:50:13 SRC: PulseTimer
10:50:13 MQT: stat/tapparellaStudio/RESULT = {"POWER1":"OFF"}
10:50:13 MQT: stat/tapparellaStudio/POWER1 = OFF (retained)
10:53:11 MQT: tele/tapparellaStudio/STATE = {"Time":"2019-02-18T10:53:11","Uptime":"0T00:10:24","Vcc":3.156,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"FRITZ2.4","BSSId":"C8:0E:14:1E:C4:9C","Channel":1,"RSSI":100},"DeepSleep":0,"Heap":18360}
10:53:11 MQT: tele/tapparellaStudio/SENSOR = {"Time":"2019-02-18T10:53:11","SHUTTER-1":{"position":100, "direction":0}}

Also, make sure these boxes are checked [x] before submitting your issue - Thank you!

To Reproduce Push wall buttons one time to move the shutter and a second time to stop it.

Expected behavior The shutter should remain in the position where it was stopped with the second push of the button

B1G1 commented 5 years ago

@stefanbode any chanche to get this bug fixed?

stefanbode commented 5 years ago

Hi Bigi, I'm now back and will take a look into it now. Maybe I can find a root cause in the log files you shared perfectly

B1G1 commented 5 years ago

thank you, it's ok now!