Get a 1.5 volt battery and use this trick. When the woofer pushes out, the positive of the battery is connecting to the positive of the speaker. If the woofer pulls in, then the positive of the battery is connecting to the negative of the speaker.
https://m.youtube.com/watch?v=u_C9M-rvbWA