This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

"Pause" function in a script
#1
Hi, I have a Sonos system and a Homelynk, and I want to control a large script, so that I can pause it.

I wrote the following script:

1-General structure:

if value_n then
-play sonos
-do some knx
-Every X orders, I call to stop the function and check if I pressed the button.
end

I have 15 if like this in 8k lines.

2- Function stop (), where I compare in a group address and I pause Sonos if a button is pushed. I do os.sleep (1) until the button is released.

When I run the script without interruptions it works, but when I try it with the stop function the homelynk starts to work slow.

I am doing something wrong? (Sure I am xD)

Thank you for your help.
Reply
#2
You probably have infinite loop.
------------------------------
Ctrl+F5
Reply
#3
(23.11.2020, 16:13)Daniel. Wrote: You probably have infinite loop.

Perhaps, I was wondering if this was the problem. Today I will try with a simple script to see if I get it.

Thanks!
Reply


Forum Jump: