Photovoltaic cell detection and replacement