Community discussions

 
Airis777
just joined
Topic Author
Posts: 5
Joined: Wed Jul 11, 2018 8:34 am

Run script by Mode Button on Hap ac^2

Wed Jul 11, 2018 9:02 am

I faced with the problem of running script by Mode button on Hap ac^2.
When I push the button, script executes but with big delay. Sometimes it takes about 1-1.5 min. Sometimes script performs instantly.
When I run script manually from /system/script window it always executes instantly.
I think the problem probably in priority of the hardware interrupt.

Anybody faced with this problem? Maybe someone have experience using this feature in the RB750Gr3 router?
 
Tester007
just joined
Posts: 9
Joined: Mon Apr 08, 2013 5:58 pm

Thu Jul 12, 2018 4:28 am

I will duplicate my answer from another thread here:

Yes, I'm facing the delays too. Sometimes it looks like my hap lite just don't recognize I pressed a button on it, and some time later (~ 5-30 sec) it will recognize it and react to it.
Also today it seemed like the script on the button was running twice: enabling wireless interface for a short period of time, then disabling it after ~10 sec. I added comment to the start of it, so now I will see for sure if script is running twice for one press or it's something else.

I'm using next script for the button to disable/enable wireless interface:
:log info message=("mode button was pressed");
:local i
:if ( [/int wir get 0 disabled ] = true ) do={
:foreach i in= [ /int wir find ] do={ :int wir enable $i };
} else={
:foreach i in= [ /int wir find ] do={ :int wir disable $i };
}
 
Airis777
just joined
Topic Author
Posts: 5
Joined: Wed Jul 11, 2018 8:34 am

Re: Run script by Mode Button on Hap ac^2

Thu Jul 12, 2018 9:43 am

I also use mode button for disabling/enabling wireless interfaces and indicate the current status on the user's LED.
I use software version 6.43rc42, but 6.42.5 doesn't work correctly for this feature either.
May be someone know how to debug this case and find the reason for this behaviour?
 
Tester007
just joined
Posts: 9
Joined: Mon Apr 08, 2013 5:58 pm

Re: Run script by Mode Button on Hap ac^2

Sun Sep 16, 2018 3:50 pm

Seems like this is now fixed in 6.43 (Stable), at least for my hap lite.
 
Airis777
just joined
Topic Author
Posts: 5
Joined: Wed Jul 11, 2018 8:34 am

Re: Run script by Mode Button on Hap ac^2

Mon Sep 17, 2018 10:51 am

Thanks, I'll try.

Who is online

Users browsing this forum: No registered users and 5 guests