Sure, no problem. I looked at the perl module but on the rpi it took too long to load, not the authors fault just the lag in the pi. So I wrote that not to use any modules.
Yeah, as you wrote I poll the ISY for the status of the lights and then I perform the opposite command on the light itself. Goes nice and fast:
$ time ~/lights.pl '20 32 1E 1'
real 0m0.362s
user 0m0.140s
sys 0m0.080s