Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Dynamic commands and devices... a coupe of tips

Learned the hard way...

Dynamic devices:

If you are using a variable on the panel page to replace a device it seems to propagate it across all of the pages at the time you set it.  So, if you cut & paste a button or something it might not have the device variable set on it.  If you drill into the command you will see the device variable on it.  If it isn't working and you want all of your commands on the panel to use the dynamic (variable driven) device you need to go back to the panel page and set the variable to something random and then back to what you really want.  Oh, and you must use the long number not the name.  So, basically the panel device substitution is a "point in time" propagation across the pages. 

I'm open to feedback if you think I'm wrong!

Dynamic commands:

If you use a dynamically built command name, the calculated command must exist somewhere in the handset.  So, I created a hidden panel will all of the commands on it that my handset calculates dynamically.  In case you are curious why I'm doing this...  This is how I control my HDMI switch...  I have one variable which is the TV and another variable which is the source and then I concatenate them together to calculate the appropriate command to send to the switch.

Again, please post if you think I'm wrong.

I love iRule, and hopefully these tips will help somebody else love it too.
2 people like
this idea