changed code to only set variables on the ccu when they are differrent to the current ccu state. Retest if variables need to be set on ccu every maximum count loops.