??????????????????????????????????????????????????????????????????????????????????????????
He became a fire truck after arriving on Earth because if you remember in the 1st film, all Transformers that came to Earth have no vehicle form until they scanned a certain vehicle they desire to transform into to disguise. Sentinel Prime has no vehicle form until Sentinel scanned a big airport fire truck which suits him because he's big. All Transformers have no vehicle form before arriving towards Earth.
I would first try installing a fresh battery. If that doesn't work, see if the smoke detector has a date code somewhere on it. Smoke detectors need to be replaced after a certain number of year (like 7-10). Some detectors, when they reach the limit, will chirp to alert you. If you need to replace it and it is wired in, it is easiest to get a detector of the same brand and style. That way you can just plug it in and don't have to mess with rewiring. Also, it will work with the smoke detector interconnect system.