Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shutters: The ShutterStop command triggers a reverse run of the shutter in certain situations #10166

Closed
10 of 14 tasks
Bascht74 opened this issue Dec 17, 2020 · 3 comments · Fixed by #10170
Closed
10 of 14 tasks
Labels
Shutter related Type - Issue specific to Shutters

Comments

@Bascht74
Copy link

Bascht74 commented Dec 17, 2020

PROBLEM DESCRIPTION

A clear and concise description of what the problem is.
I use the shutter function of Tasmota in conjunction with Shelly 2.5 and the latest DEV firmware.
In certain situations the ShutterStop command triggers a reverse run of the shutter motor instead of simply stopping. Normally this should not happen according to @stefanbode, but the shutter should simply stop with some "inaccuracy".

REQUESTED INFORMATION

Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!

  • Read the Contributing Guide and Policy and the Code of Conduct
  • Searched the problem in issues
  • Searched the problem in the docs
  • Searched the problem in the forum
  • Searched the problem in the chat
  • Device used (e.g., Sonoff Basic): Shelly2.5
  • Tasmota binary firmware version number used: 9.2.0.1(tasmota) 2020.12.17 15:44:44 2_7_4_9/2.2.2-dev(38a443e)
    • Pre-compiled
    • Self-compiled
      • IDE / Compiler used: _____
  • [] Flashing tools used: _____
  • Provide the output of command: Backlog Template; Module; GPIO 255:
  Configuration output here:
19:26:46.772 CMD: Backlog Template; Module; GPIO 255
19:26:46.857 MQT: stat/tasmota_FB1089/RESULT = {"NAME":"Shelly 2.5 (buttons)","GPIO":[320,0,34,0,224,129,0,0,640,128,608,225,3456,4736],"FLAG":0,"BASE":18}
19:26:47.098 MQT: stat/tasmota_FB1089/RESULT = {"Module":{"0":"Shelly 2.5 (buttons)"}}
19:26:47.308 MQT: stat/tasmota_FB1089/RESULT = {"GPIO0":{"320":"Led_i1"},"GPIO1":{"0":"None"},"GPIO2":{"34":"Button3"},"GPIO3":{"0":"None"},"GPIO4":{"224":"Relay1"},"GPIO5":{"129":"Button_in2"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"640":"I2C SDA"},"GPIO13":{"128":"Button_in1"},"GPIO14":{"608":"I2C SCL"},"GPIO15":{"225":"Relay2"},"GPIO16":{"3456":"ADE7953 IRQ"},"GPIO17":{"4736":"ADC Temp"}}}

  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:
19:27:06.061 CMD: Backlog Rule1; Rule2; Rule3
19:27:06.142 MQT: stat/tasmota_FB1089/RESULT = {"Rule1":"ON","Once":"OFF","StopOnError":"OFF","Length":168,"Free":343,"Rules":"ON Clock#Timer=1 DO ShutterOpen1 ENDON ON Clock#Timer=2 DO ShutterClose1 ENDON ON Clock#Timer=3 DO ShutterPosition 10 ENDON ON Clock#Timer=4 DO ShutterPosition 50 ENDON"}
19:27:06.379 MQT: stat/tasmota_FB1089/RESULT = {"Rule2":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}
19:27:06.591 MQT: stat/tasmota_FB1089/RESULT = {"Rule3":"OFF","Once":"OFF","StopOnError":"OFF","Length":0,"Free":511,"Rules":""}

  • Provide the output of this command: Status 0:
  STATUS 0 output here:
19:27:30.410 CMD: Status 0
19:27:30.422 MQT: stat/tasmota_FB1089/STATUS = {"Status":{"Module":0,"DeviceName":"ShellySwitch25-Rollo.EG.Wohnzimmer.Terrasse","FriendlyName":["Rollo.EG.Wohnzimmer.Terrasse","Tasmota2"],"Topic":"tasmota_FB1089","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
19:27:30.432 MQT: stat/tasmota_FB1089/STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota/tasmota-DE.bin.gz","RestartReason":"Software/System restart","Uptime":"0T00:51:42","StartupUTC":"2020-12-17T17:35:48","Sleep":50,"CfgHolder":4617,"BootCount":1,"BCResetTime":"2020-12-17T18:34:59","SaveCount":597,"SaveAddress":"F8000"}}
19:27:30.440 MQT: stat/tasmota_FB1089/STATUS2 = {"StatusFWR":{"Version":"9.2.0.1(tasmota)","BuildDateTime":"2020.12.17 15:44:44","Boot":31,"Core":"2_7_4_9","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8266EX","CR":"582/699"}}
19:27:30.445 MQT: stat/tasmota_FB1089/STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":2,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["Qar5tz09e589mn05a0",""],"TelePeriod":300,"Resolution":"558180F0","SetOption":["0000C009","0105C80001000600003C5A00000000000000","400000C1","00006000","00000000"]}}
19:27:30.457 MQT: stat/tasmota_FB1089/STATUS4 = {"StatusMEM":{"ProgramSize":587,"Free":416,"Heap":23,"ProgramFlashSize":1024,"FlashSize":2048,"FlashChipId":"1540C8","FlashFrequency":40,"FlashMode":3,"Features":["00000407","8FDAC787","04368001","000000CF","010013C0","C000F981","00004004","00001000"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,27,29,30,35,37,45","Sensors":"1,2,3,4,5,6"}}
19:27:30.469 MQT: stat/tasmota_FB1089/STATUS5 = {"StatusNET":{"Hostname":"Rollo.EG.Wohnzimmer.Terrasse","IPAddress":"192.168.175.42","Gateway":"192.168.175.1","Subnetmask":"255.255.255.0","DNSServer":"192.168.175.1","Mac":"68:C6:3A:FB:10:89","Webserver":2,"WifiConfig":4,"WifiPower":17.0}}
19:27:30.477 MQT: stat/tasmota_FB1089/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.175.214","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_FB1089","MqttUser":"mqtt","MqttCount":4,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30}}
19:27:30.486 MQT: stat/tasmota_FB1089/STATUS7 = {"StatusTIM":{"UTC":"2020-12-17T18:27:30","Local":"2020-12-17T19:27:30","StartDST":"2020-03-29T02:00:00","EndDST":"2020-10-25T03:00:00","Timezone":"+01:00","Sunrise":"08:16","Sunset":"16:18"}}
19:27:30.493 MQT: stat/tasmota_FB1089/STATUS9 = {"StatusPTH":{"PowerDelta":[0,0,0],"PowerLow":0,"PowerHigh":0,"VoltageLow":0,"VoltageHigh":0,"CurrentLow":0,"CurrentHigh":0}}
19:27:30.507 MQT: stat/tasmota_FB1089/STATUS10 = {"StatusSNS":{"Time":"2020-12-17T19:27:30.499","ANALOG":{"Temperature":62.0},"ENERGY":{"TotalStartTime":"2020-12-09T09:59:34","Total":0.021,"Yesterday":0.006,"Today":0.006,"Power":[0,0],"ApparentPower":[0,0],"ReactivePower":[0,0],"Factor":[0.00,0.00],"Frequency":0,"Voltage":0,"Current":[0.000,0.000]},"Shutter1":{"Position":49,"Direction":0,"Target":49},"TempUnit":"C"}}
19:27:30.519 MQT: stat/tasmota_FB1089/STATUS11 = {"StatusSTS":{"Time":"2020-12-17T19:27:30.514","Uptime":"0T00:51:42","UptimeSec":3102,"Heap":24,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"MqttCount":4,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"Qar5tz09e589mn05a0","BSSId":"E0:63:DA:53:3C:3E","Channel":6,"RSSI":98,"Signal":-51,"LinkCount":4,"Downtime":"0T00:01:25"}}}
19:27:30.528 MQT: stat/tasmota_FB1089/STATUS13 = {"StatusSHT":{"SHT0":{"Relay1":1,"Relay2":2,"Open":304,"Close":282,"50perc":65,"Delay":0,"Opt":"0100","Calib":[1830,425,4085,900,1000],"Mode":"0"}}}

  • Provide the output of the Console log output when you experience your issue; if applicable:
    (Please use weblog 4 for more debug information)
  Console output here:
20:15:18.496 CMD: weblog 4
20:15:18.507 MQT: stat/tasmota_FB1089/RESULT = {"WebLog":4}
20:15:18.724 CFG: in Flash gespeichert am F4, zählen 601, Bytes 4096
20:15:19.408 ADE: 6136484, 4478, [1773, -44, 648, 24], [1773, -21, 648, -4]
20:15:19.410 ADE: U 6136484, C 4478, I 0 + 0 = 0, P 0 + 0 = 0
20:15:19.931 WIF: Prüfe Verbindung...
20:15:20.408 ADE: 6135047, 4478, [1773, 6, 648, 88], [1773, 16, 648, -7]
20:15:20.410 ADE: U 6135047, C 4478, I 0 + 0 = 0, P 0 + 0 = 0
20:15:21.408 ADE: 6134957, 4479, [1773, 5, 648, 29], [1773, 1, 648, 19]
20:15:21.410 ADE: U 6134957, C 4479, I 0 + 0 = 0, P 0 + 0 = 0
20:15:22.408 ADE: 6135794, 4478, [1773, -14, 648, 52], [1773, 6, 648, 5]
20:15:22.410 ADE: U 6135794, C 4478, I 0 + 0 = 0, P 0 + 0 = 0
20:15:23.408 ADE: 6137311, 4479, [1773, 22, 648, 34], [1773, -2, 648, -7]
20:15:23.411 ADE: U 6137311, C 4479, I 0 + 0 = 0, P 0 + 0 = 0
20:15:24.408 ADE: 6141599, 4479, [1773, -54, 648, 13], [1773, -2, 648, -1]
20:15:24.410 ADE: U 6141599, C 4479, I 0 + 0 = 0, P 0 + 0 = 0
20:15:24.438 CMD: shutteropen
20:15:24.443 SRC: WebConsole from 192.168.175.172
20:15:24.446 CMD: Gruppe 0, Index 1, Befehl "SHUTTEROPEN", Daten ""
20:15:24.450 SHT: Pos. in: payload  (0), payload 100, idx 1, src 7
20:15:24.452 SHT: lastsource 7:, real 0, target 608000, payload 100
20:15:24.455 SHT: Delay Start. var0 <99>=<>, max10s?
20:15:24.474 SHT: Delay Start. Done
20:15:24.476 SRC: Shutter
20:15:24.479 SHT: Switched relay: 1 by Shutter
20:15:24.482 SHT: Shutter 1: source: Shutter, powerstate_local 1, ShutterGlobal.RelayCurrentMask 1, manual change 0
20:15:24.488 MQT: stat/tasmota_FB1089/RESULT = {"POWER1":"ON"}
20:15:24.495 MQT: stat/tasmota_FB1089/POWER1 = ON (beibehalten)
20:15:24.502 MQT: stat/tasmota_FB1089/RESULT = {"ShutterOpen1":100}
20:15:25.763 SHT: Shutter 1 Real 25000, Start 0, Stop 628000, Dir 1, Delay 0, Rtc 1.30 [s], Freq 0, PWM 0
20:15:25.769 MQT: stat/tasmota_FB1089/RESULT = {"Shutter1":{"Position":1,"Direction":1,"Target":105}}
20:15:25.825 SHT: time: 27, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 26000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:25.862 SHT: time: 28, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 27000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:25.912 SHT: time: 29, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 28000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:25.964 SHT: time: 31, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 30000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.015 SHT: time: 32, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 31000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.066 SHT: time: 33, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 32000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.118 SHT: time: 34, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 33000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.169 SHT: time: 35, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 34000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.221 SHT: time: 36, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 35000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.272 SHT: time: 37, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 36000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.323 SHT: time: 38, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 37000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.376 SHT: time: 39, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 38000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.408 ADE: 6115901, 4479, [45391, -16095, 16529, -3829], [1773, 13, 645, 11]
20:15:26.410 ADE: U 6115901, C 4479, I 45391 + 0 = 45391, P 16095 + 0 = 16095
20:15:26.441 SHT: time: 40, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 39000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.492 SHT: time: 41, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 40000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.543 SHT: time: 42, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 41000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.595 SHT: time: 43, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 42000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.646 SHT: time: 44, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 43000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.699 SHT: time: 45, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 44000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:26.750 SHT: time: 46, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 45000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.193 SHT: time: 75, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 74000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.246 SHT: time: 76, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 75000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.297 SHT: time: 77, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 76000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.348 SHT: time: 78, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 77000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.399 SHT: time: 79, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 78000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.411 ADE: 6117025, 4478, [45057, -16047, 16416, -3434], [1773, 9, 646, -4]
20:15:28.413 ADE: U 6117025, C 4478, I 45057 + 0 = 45057, P 16047 + 0 = 16047
20:15:28.450 SHT: time: 80, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 79000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.501 SHT: time: 81, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 80000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.552 SHT: time: 82, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 81000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.604 SHT: time: 83, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 82000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.656 SHT: time: 84, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 83000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.706 SHT: time: 85, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 84000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.758 SHT: time: 86, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 85000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.762 SHT: Shutter 1 Real 85000, Start 0, Stop 628000, Dir 1, Delay 0, Rtc 4.30 [s], Freq 0, PWM 0
20:15:28.767 MQT: stat/tasmota_FB1089/RESULT = {"Shutter1":{"Position":2,"Direction":1,"Target":105}}
20:15:28.824 SHT: time: 87, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 86000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.861 SHT: time: 88, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 87000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.911 SHT: time: 89, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 88000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:28.963 SHT: time: 91, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 90000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:29.014 SHT: time: 92, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 91000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:29.066 SHT: time: 93, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 92000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:29.117 SHT: time: 94, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 93000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.543 SHT: time: 122, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 121000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.594 SHT: time: 123, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 122000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.645 SHT: time: 124, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 123000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.696 SHT: time: 125, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 124000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.748 SHT: time: 126, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 125000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.800 SHT: time: 127, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 126000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.818 SHT: Shutter 1 Real 126000, Start 0, Stop 628000, Dir 1, Delay 0, Rtc 6.35 [s], Freq 0, PWM 0
20:15:30.824 MQT: stat/tasmota_FB1089/RESULT = {"Shutter1":{"Position":3,"Direction":1,"Target":105}}
20:15:30.866 SHT: time: 128, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 127000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.902 SHT: time: 129, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 128000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:30.953 SHT: time: 130, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 129000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.007 SHT: time: 131, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 130000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.058 SHT: time: 132, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 131000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.110 SHT: time: 133, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 132000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.162 SHT: time: 134, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 133000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.213 SHT: time: 136, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 135000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.266 SHT: time: 137, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 136000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.317 SHT: time: 138, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 137000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.369 SHT: time: 139, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 138000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.408 ADE: 6114156, 4478, [44842, -16012, 16357, -3131], [1773, -5, 645, -18]
20:15:31.410 ADE: U 6114156, C 4478, I 44842 + 0 = 44842, P 16012 + 0 = 16012
20:15:31.435 SHT: time: 140, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 139000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.584 SHT: time: 143, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 142000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.661 SHT: time: 144, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 143000, next_stop 0, target: 628000,  max_vel_change 0, dir: 1
20:15:31.720 CMD: shutterstop
20:15:31.725 SRC: WebConsole from 192.168.175.172
20:15:31.728 CMD: Gruppe 0, Index 1, Befehl "SHUTTERSTOP", Daten ""
20:15:31.732 SHT: Stop moving 1: dir: 1
20:15:31.735 SHT: Pos. in: payload  (0), payload 3, idx 1, src 7
20:15:31.737 SHT: lastsource 7:, real 145000, target 122550, payload 3
20:15:31.739 SHT: Stop Shutter 0. Switchmode 0
20:15:31.742 SRC: Shutter
20:15:31.744 SHT: Switched relay: 1 by Shutter
20:15:31.747 SHT: Shutter 1: source: Shutter, powerstate_local 0, ShutterGlobal.RelayCurrentMask 1, manual change 0
20:15:31.754 MQT: stat/tasmota_FB1089/RESULT = {"POWER1":"OFF"}
20:15:31.761 MQT: stat/tasmota_FB1089/POWER1 = OFF (beibehalten)
20:15:32.266 SHT: Delay Start. var0 <99>=<>, max10s?
20:15:32.272 RUL: No valid JSON (OFF)
20:15:32.277 RUL: No valid JSON (OFF)
20:15:32.283 RUL: No valid JSON (OFF)
20:15:32.288 RUL: No valid JSON (OFF)
20:15:32.290 SHT: Delay Start. Done
20:15:32.293 SRC: Shutter
20:15:32.296 SHT: Switched relay: 2 by Shutter
20:15:32.298 SHT: Shutter 1: source: Shutter, powerstate_local 2, ShutterGlobal.RelayCurrentMask 2, manual change 0
20:15:32.304 MQT: stat/tasmota_FB1089/RESULT = {"POWER2":"ON"}
20:15:32.308 MQT: stat/tasmota_FB1089/POWER2 = ON (beibehalten)
20:15:32.315 MQT: stat/tasmota_FB1089/RESULT = {"ShutterStop1":3}
20:15:32.704 SHT: time: 8, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 138454, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:32.755 SHT: time: 9, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 137376, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:32.773 SHT: Shutter 1 Real 137376, Start 146000, Stop 122550, Dir -1, Delay 0, Rtc 0.45 [s], Freq 0, PWM 0
20:15:32.779 MQT: stat/tasmota_FB1089/RESULT = {"Shutter1":{"Position":3,"Direction":-1,"Target":3}}
20:15:32.820 SHT: time: 10, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 136298, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:32.856 SHT: time: 11, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 135220, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:32.905 SHT: time: 12, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 134142, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:32.957 SHT: time: 13, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 133064, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.008 SHT: time: 14, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 131986, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.059 SHT: time: 15, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 130908, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.110 SHT: time: 16, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 129830, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.162 SHT: time: 17, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 128752, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.213 SHT: time: 19, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 126596, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.267 SHT: time: 20, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 125518, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.318 SHT: time: 21, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 124440, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.370 SHT: time: 22, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 123362, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.408 ADE: 6113479, 4479, [1881, -80, 685, 26], [45697, 16140, 16656, 4077]
20:15:33.411 ADE: U 6113479, C 4479, I 0 + 45697 = 45697, P 0 + 16140 = 16140
20:15:33.435 SHT: time: 23, toBeAcc 0, current_stop_way 0,vel_cur 0, vel_max 0, act_vel_change 1000, min_runtime_ms 0, act.pos 122284, next_stop 0, target: 122550,  max_vel_change 0, dir: -1
20:15:33.438 SHT: Stop Shutter 0. Switchmode 0
20:15:33.441 SRC: Shutter
20:15:33.443 SHT: Switched relay: 2 by Shutter
20:15:33.446 SHT: Shutter 1: source: Shutter, powerstate_local 0, ShutterGlobal.RelayCurrentMask 2, manual change 0
20:15:33.453 MQT: stat/tasmota_FB1089/RESULT = {"POWER2":"OFF"}
20:15:33.458 MQT: stat/tasmota_FB1089/POWER2 = OFF (beibehalten)
20:15:33.962 SHT: Shutter 1 Real 122284, Start 122284, Stop 122550, Dir 0, Delay 0, Rtc 1.15 [s], Freq 0, PWM 0
20:15:33.967 MQT: stat/tasmota_FB1089/SHUTTER1 = 3 (beibehalten)
20:15:33.973 MQT: stat/tasmota_FB1089/RESULT = {"Shutter1":{"Position":3,"Direction":0,"Target":3}}
20:15:34.077 CFG: in Flash gespeichert am F9, zählen 604, Bytes 4096
20:15:34.399 ADE: 6129424, 4479, [1805, 13, 658, 19], [1773, 26, 647, -19]
20:15:34.402 ADE: U 6129424, C 4479, I 0 + 0 = 0, P 0 + 0 = 0
20:15:35.408 ADE: 6133850, 4480, [1805, -36, 659, 5], [1773, 3, 647, -4Q20:15:35.410 ADE: U 6133850, C 4480, I 0 + 0 = 0, P 0 + 0 = 0
20:15:36.408 ADE: 6126977, 4480, [1805, -34, 658, 7], [1773, 21, 647, 6]
20:15:36.411 ADE: U 6126977, C 4480, I 0 + 0 = 0, P 0 + 0 = 0
20:15:37.161 CMD: weblog 2
20:15:37.165 SRC: WebConsole from 192.168.175.172
20:15:37.168 CMD: Gruppe 0, Index 1, Befehl "WEBLOG", Daten "2"
20:15:37.175 MQT: stat/tasmota_FB1089/RESULT = {"WebLog":2}

TO REPRODUCE

Steps to reproduce the behavior:

SetOption80 1
Interlock 1,2
ShutterOpenDuration1 30.4
ShutterCloseDuration1 28.2
ShutterSetHalfway1 65
ShutterRelay1 1
ShutterMotorDelay1 0.00
ShutterEnableEndStopTime1 1 (german shutters :-)
PowerRetain 1
19:46:27.616 CMD: status13
19:46:27.626 MQT: stat/tasmota_FB1089/STATUS = {"Status":{"Module":0,"DeviceName":"ShellySwitch25-Rollo.EG.Wohnzimmer.Terrasse","FriendlyName":["Rollo.EG.Wohnzimmer.Terrasse","Tasmota2"],"Topic":"tasmota_FB1089","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":1}}

EXPECTED BEHAVIOUR

A clear and concise description of what you expected to happen.
I expected the shutter to stop when the ShutterStop command is entered, rather than briefly moving backwards a bit.

SCREENSHOTS

If applicable, add screenshots to help explain your problem.
./.

ADDITIONAL CONTEXT

Add any other context about the problem here.

@stefanbode I first suspected timing problems (milliseconds in the log :-), but it seems to me rather to come from the way ShutterStop is implemented. Some code for CmndShutterStop

void CmndShutterStop(void)
{
  [...]
        int32_t temp_realpos = ShutterCalculatePosition(i);
        XdrvMailbox.payload = ShutterRealToPercentPosition(temp_realpos, i)-Shutter[i].direction;
        TasmotaGlobal.last_source = SRC_WEBGUI;
        CmndShutterPosition();
[...]
}

I think it might be because (if I observe this correctly in the log and understand the code correctly) ShutterRealToPercentPosition returns an absolute percentage. But for certain positions in the lower third (0-30%), shutterset50percent makes this range larger than in the range (31-100%). This results in values that deviate more from the current position and thus trigger these backward movements in some cases.

Possibly (I am not a programmer) it would be interesting to accept internally at XdrvMailbox.payload also a number with one decimal place (10.5 instead of 11) and to let ShutterRealToPercentPosition determine accordingly also a more exact position with one decimal place. This would then be "better" processed by CmndShutterPosition(), so that no more backward movement takes place.

By the way, this would eliminate another problem:
In the lower area the shutter is mostly stopped a little bit delayed, because it has to run a little bit further in this area because of the larger steps due to shutterset50percent, since the real positions are much further apart. This is especially noticeable when you also press a button and the shutter reacts much more delayed than in the upper area. If you use a long-push, it is also slightly annoying, because you think that the command arrives delayed (WAF :-)
... and you could set the shutter with the shutterposition command more precisely in lower areas... (eg. shutterposition 1.5)

I also think that without shutterset50percent the problem does not occur or occurs extremely rarely.

I hope you get what I mean.
My mother language is German as yours, but I try to keep it in English, even it is difficult for me to write my thoughts...

P.S.
I looked at the log an the theoretical runtime:
If I got it right, it should run (theory 50ms * (144 - 27) = ) 5.850 ms and it did (see log) 5.836 ms, even with weblog 4.
So pretty accurate stuff!

(Please, remember to close the issue when the problem has been addressed)

@ascillato2 ascillato2 added the Shutter related Type - Issue specific to Shutters label Dec 17, 2020
@stefanbode
Copy link
Contributor

@Bascht74 , yes, great and excellent analysis. There is no more investigation required on my side. Thx. I have an idea, how to change the shutterstop function to make it work. Will submit it later today.

stefanbode added a commit to stefanbode/Sonoff-Tasmota that referenced this issue Dec 18, 2020
improved stop procedure to avoid overrun due to rounding issues between % and the real_position
arendst added a commit that referenced this issue Dec 18, 2020
@Bascht74
Copy link
Author

@stefanbode Thanks! This is a very elegant way to solve it :-) I got the idea, much easier...
I will try it out after the dev firmware files are updated!

@Bascht74
Copy link
Author

Bascht74 commented Dec 18, 2020

Hi @stefanbode I tried it, and it worked! Great! Shutterstop / remote commands / Buttons are now much more responsive as well...

Sebastian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Shutter related Type - Issue specific to Shutters
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants