Hi,
I'm very new to all this and I've just been toying around with my first set of jeenodes and plugs.
Experimenting with the Rooms plug I found that if you switch on a light the current version of the code does not pickup on the result very fast, also, the moving average is initialized as 0 (actually not initialized at all) so I changed the getLight() to do the following before the avgLight calculation:
if ( avgLight == 0 || avgLight > light + 50 || avgLight < light - 50 )
avgLight = light;
This seems to work, the initial value does not 'fade' to the right level, and if a light is switched on (significant change (+ / - 50)) it picks up on that new level faster.
Maybe I'm missing the point, but with a slightly faster checking system (5 seconds instead of 30) it gives better results.
