I used residential grade, battery operated smoke detectors and CO detectors. I had poor results, overall, with those models. Approximately every 1.5-2 seasons, I would need to replace both for 'false-positives'. For example, in the middle of winter, sitting in the yard under shrink-wrap. I get a call from the yard "Your boat is 'beeping', do you want us to go onboard and look around?"
replacing batteries wasn't sufficient. Only replacing the units solved the issue.
I recently spent the money on a hard-wired Fireboy-Xintex CO detector and three hardwired smoke detectors. The only source of CO is the Main and the Generator, so I place the CO detector in the saloon. There is a smoke detector in the saloon along with one in both staterooms. I haven't had any false positives so far (2 seasons).