Try going into single switch test mode, then seating and reseating the connector to the opto pair a few times, pressing the connectors together, seeing if the switch opens and closes. Could be a loose pin in the connector that is sometimes connecting and sometimes not.