Is there any good device for sleep that detects dreams?

Yes. An eeg done during sleep can indicate when dreams are taking place. Many people find that the can remember their dreams better if they keep a paper and pen by their bedside and try to write down their dreams as soon as possible.