fixed valve 8 bug

The encode command checked that the valve number was from zero to 7.
But the commands are 0 for all off and 1 through 8 for valves.
Fixed command to allow valve 8 as well.