TP Password-Protected buttons
jrodriguez15
Junior Member
Hi,
I need to program a system that sequencially starts some devices in specific time intervals. this project is pretty standard, and it has some particular things:
1) the main page should only contain 2 Password-Protected Buttons: ON and OFF.
2) while the devices are starting, both of these buttons should be blocked (greyed out), so the user cannot push them while starting/stopping.
i have some questions:
1) how can i set these buttons to be Password-protected? i read that i should use the Setup port/advanced channel code/Panel setup/password # Set , but i haven't used this before and i don't know how to do it this way.
2) how can i set these buttons to be Greyed out until the system finishes the sequence?
Thanks in advance for the help.
I need to program a system that sequencially starts some devices in specific time intervals. this project is pretty standard, and it has some particular things:
1) the main page should only contain 2 Password-Protected Buttons: ON and OFF.
2) while the devices are starting, both of these buttons should be blocked (greyed out), so the user cannot push them while starting/stopping.
i have some questions:
1) how can i set these buttons to be Password-protected? i read that i should use the Setup port/advanced channel code/Panel setup/password # Set , but i haven't used this before and i don't know how to do it this way.
2) how can i set these buttons to be Greyed out until the system finishes the sequence?
Thanks in advance for the help.
Comments
-
there are quite a few things to unpack here. Firstly, I would probably do all of it from code myself, not TP design. (That's just my preference) I would create a tracking variable that would tell the program when it is okay for the user to hit the button or not. I would then encase all the code that does something when the button is pressed within an IF statement with the "Can they hit the button" variable - thus making the program ignore the button hit during those times when they aren't supposed to hit it.
Next, I'd have the button hit bring up the keypad/keyboard for the user to enter the password. I'd create another flag variable to indicate that the user is going to enter a password. then when I get the string from the panel with the proper pasword, I'd check against the flag, and if the flag is high, I'd do whatever the button press is supposed to do. (power on/off/etc...) Then reset the flag to zero.
Thirdly, I'd also send the ^BMF command to make the button greyed out. (Perhaps Opacity to 50% or change the color) when the tracking variable is set to "don't allow user to hit" then set it back to normal when it goes to "safe to hit the button" -
Roughly soumething like this is what I would have done
button event dvTP
{
integer i = button.iput.channel
send_command dvTP "Open keypad"
}
data event dvTP
string:
{
IF(find:string(data.text, 1234))
{
powersequence()
send_command dvTP, "set button i = opacity 50%
send_command dvTP, "set button i = disabled"
wait 600
{
send_command dvTP, "set button i = opacity 100%
send_command dvTP, "set button i = enabled"
}
}
} -
ok, makes sense. i am using a timeline event for the ON and OFF sequences, i think i will use the opacity and disable/enable commands inside it.
i like This password method. maybe i can make a popup page to appear in case the user does not use the correct password.
Thanks guys
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums