Janina, (what a pretty name)
I'm gonna try to keep this simple...

I'm assuming you do not have your RV plugged into an electrical outlet at your house? If you do not have it plugged in, your batteries will drain down. Plugging into an electrical socket keeps the batteries charged until you are ready to travel. When you travel and have your engine on, the batteries will charge from the alternator in the engine.
If you are not plugged into 120 volt (electrical socket at your house or at a campground) the lights in the RV turn on and work from the house batteries. But if your house batteries are low or almost completely discharged, the lights will dim. The batteries need to be charged fairly often to keep the charge up and keep your lights, refrigerator, CO detector and smoke alarms working. If the CO detector and/or the smoke alarms notice low batteries, they will beep to warn you the batteries are low. That is most likely what is happening.
To keep this from getting too long, I'll note some important info:
*Most RVs have a chassis battery and a house battery. Some RVs have up to 4 or more house batteries. House batteries are different than coach batteries. They are deep cell; whereas chassis batteries are for "quick burst" and are used for starting engines but not for long term use.
*Once a battery has been drained down, it looses lots of it's life and will need to be replaced. Running them down is a bad thing.
*If you keep your RV plugged in, be sure and check the water level in the batteries if they are "wet cell" (meaning you put distilled water in the battery itself)
*Some RVs have a 12 volt shut off switch, which you "shut off" if you are not plugged into an electrical socket and you plan to let the RV sit for longer than 1-2 days.
My gut feeling is that your C0 detector and the smoke alarm are probably fine; but your batteries might need looking at and or replacing if they been drained down too often.
Marsha~