Glad you had some success.
Something else I have observed, once the light is dimmed to any level the ON command has no affect, I had to make a small script and issue an Off then On before I can do some more DIM testing.
This makes sense, since a Dimmed light is ON.
In your second code example this is an old version of X10 library that does not support reading from the device, although I didn't get to this yet the example code does not work because I have the newer version of the library.
Can you give a LINK to the library you have?
Did you try BRIGHT?