I currently can't investigate this but could you help me understand what happened here? I believe $sample just picks one of the stations and gets the program id from it. If this is the case, I assume you changed it because of a master valve. However, master valve doesn't have to be valve 0 on the OpenSprinkler (can be any of the first 8). Maybe we should compare to the master station ID and ensure we don't select that one?