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

Timers initialized in >B not started in >S when script is not already running and started from Edit Script #19910

Closed
4 tasks
ygelt opened this issue Nov 2, 2023 · 0 comments · Fixed by #19914
Closed
4 tasks

Comments

@ygelt
Copy link

ygelt commented Nov 2, 2023

PROBLEM DESCRIPTION

When a t:xxx variable is initialized in the >B section of a script ran from the WEB UI with "Script enable" checked, the timer is not set when the script is not already running. Example:

>D
t:xxx=0

>B
xxx=5

>S
=>print %xxx%

REQUESTED INFORMATION

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

  • [X ] Read the Contributing Guide and Policy and the Code of Conduct
  • [X ] Searched the problem in issues
  • [X ] Searched the problem in discussions
  • [X ] Searched the problem in the docs
  • Searched the problem in the chat
  • [ X] Device used (e.g., Sonoff Basic): ATHOM Relay_Switch_X2
  • [X ] Tasmota binary firmware version number used: 13.2.0.1
    • Pre-compiled
    • [ X] Self-compiled only with USE_SCRIPT and USE_WEBSEND_RESPONSE
  • [X ] Flashing tools used: WEB UI
  • [X ] Provide the output of command: Backlog Template; Module; GPIO 255:
  16:27:53.003 RSL: RESULT = {"NAME":"Relay_Switch_X2","GPIO":[0,32,0,0,225,224,0,0,0,0,0,0,576,0],"FLAG":0,"BASE":18}
16:27:54.254 RSL: RESULT = {"Module":{"0":"Relay_Switch_X2"}}
16:27:54.508 RSL: RESULT = {"GPIO0":{"0":"None"},"GPIO1":{"32":"Button1"},"GPIO2":{"0":"None"},"GPIO3":{"0":"None"},"GPIO4":{"225":"Relay2"},"GPIO5":{"224":"Relay1"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"0":"None"},"GPIO13":{"0":"None"},"GPIO14":{"0":"None"},"GPIO15":{"0":"None"},"GPIO16":{"576":"LedLink_i"},"GPIO17":{"0":"None"}}
  • If using rules, provide the output of this command: Backlog Rule1; Rule2; Rule3:
  Rules output here:

  • [X ] Provide the output of this command: Status 0:
  STATUS 0 output here:
16:24:43.740 CMD: Status 0
16:24:43.747 RSL: STATUS = {"Status":{"Module":0,"DeviceName":"Tasmota","FriendlyName":["Tasmota","Tasmota2"],"Topic":"tasmota_85B952","ButtonTopic":"0","Power":0,"PowerOnState":3,"LedState":0,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0,"InfoRetain":0,"StateRetain":0,"StatusRetain":0}}
16:24:43.753 RSL: STATUS1 = {"StatusPRM":{"Baudrate":115200,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://ota.tasmota.com/tasmota/release/tasmota.bin.gz","RestartReason":"Software/System restart","Uptime":"1T02:32:30","StartupUTC":"2023-11-01T12:52:13","Sleep":250,"CfgHolder":4617,"BootCount":60,"BCResetTime":"2023-10-26T10:57:18","SaveCount":928,"SaveAddress":"FB000"}}
16:24:43.759 RSL: STATUS2 = {"StatusFWR":{"Version":"13.2.0.1(tasmota)","BuildDateTime":"2023-10-26T17:45:04","Boot":31,"Core":"2_7_4_9","SDK":"2.2.2-dev(38a443e)","CpuFrequency":80,"Hardware":"ESP8266EX","CR":"368/699"}}
16:24:43.764 RSL: STATUS3 = {"StatusLOG":{"SerialLog":2,"WebLog":2,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["VOO-014092",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["00208009","0405C80001000600003C5A0A002800000000","08020080","00006000","00004000","00000000"]}}
16:24:43.776 RSL: STATUS4 = {"StatusMEM":{"ProgramSize":659,"Free":344,"Heap":21,"ProgramFlashSize":1024,"FlashSize":4096,"FlashChipId":"1640EF","FlashFrequency":40,"FlashMode":"DOUT","Features":["00000809","879AC787","043E8001","000000CF","010013C0","C000F981","00004004","00001000","54000020","00000080"],"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,62,68","Sensors":"1,2,3,4,5,6","I2CDriver":"7"}}
16:24:43.783 RSL: STATUS5 = {"StatusNET":{"Hostname":"tasmota-85B952-6482","IPAddress":"192.168.0.37","Gateway":"192.168.0.1","Subnetmask":"255.255.255.0","DNSServer1":"62.197.111.140","DNSServer2":"109.88.203.3","Mac":"BC:DD:C2:85:B9:52","Webserver":2,"HTTP_API":1,"WifiConfig":0,"WifiPower":17.0}}
16:24:43.788 RSL: STATUS6 = {"StatusMQT":{"MqttHost":"","MqttPort":1883,"MqttClientMask":"DVES_%06X","MqttClient":"DVES_85B952","MqttUser":"DVES_USER","MqttCount":0,"MAX_PACKET_SIZE":1200,"KEEPALIVE":30,"SOCKET_TIMEOUT":4}}
16:24:43.794 RSL: STATUS7 = {"StatusTIM":{"UTC":"2023-11-02T15:24:43","Local":"2023-11-02T16:24:43","StartDST":"2023-03-26T02:00:00","EndDST":"2023-10-29T03:00:00","Timezone":"+01:00","Sunrise":"07:38","Sunset":"17:28"}}
16:24:43.800 RSL: STATUS10 = {"StatusSNS":{"Time":"2023-11-02T16:24:43"}}
16:24:43.805 RSL: STATUS11 = {"StatusSTS":{"Time":"2023-11-02T16:24:43","Uptime":"1T02:32:30","UptimeSec":95550,"Heap":21,"SleepMode":"Dynamic","Sleep":250,"LoadAvg":3,"MqttCount":0,"POWER1":"OFF","POWER2":"OFF","Wifi":{"AP":1,"SSId":"VOO-014092","BSSId":"50:09:59:F3:80:01","Channel":6,"Mode":"11n","RSSI":90,"Signal":-55,"LinkCount":1,"Downtime":"0T00:00:06"}}}
  • Set weblog to 4 and then, when you experience your issue, provide the output of the Console log:
  Console output here:

TO REPRODUCE

From console:
script 0
Then from Edit script:
Check "Script enable" then "SAVE" => No count down
"SAVE" again (while script is running) => OK

EXPECTED BEHAVIOUR

Variable initialization in >B, so a count down from 5 to 0 for xxx in all cases.
(Other variables are correctly initialized in all cases, only t: are not)

SCREENSHOTS

16:27:49.452 CMD: script 0
16:27:49.458 RSL: RESULT = {"Script":"OFF","StopOnError":"ON","Free":75}
16:29:08.694 SCR: compressed to 42 bytes = 110 %
16:29:08.697 SCR: nv=1, tv=0, vns=4, vmem=33, smem=2560
16:29:09.106 0.00
16:29:09.869 0.00
16:29:10.870 0.00
16:29:12.095 0.00
16:29:12.871 0.00
16:29:13.870 0.00
16:29:14.847 0.00
16:29:15.868 0.00
16:29:16.871 0.00
16:29:17.871 0.00
16:29:18.872 0.00
16:29:19.891 0.00
16:29:20.896 0.00
16:29:21.904 SCR: compressed to 42 bytes = 110 %
16:29:21.907 SCR: nv=1, tv=0, vns=4, vmem=33, smem=2560
16:29:22.168 3.73
16:29:23.155 2.74
16:29:23.926 1.97
16:29:24.927 0.97
16:29:25.957 0.00
16:29:26.966 0.00
16:29:27.968 0.00

ADDITIONAL CONTEXT

Add any other context about the problem here.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant