Check with your local building department and ask for an answer, in writing, before representing anything as "legal". Most Massachusetts towns have differing views of "inlaw" apartments. Some towns, like my local town of Bridgewater, have specific bylaws covering size, means of egress and other factors which differentiate these additions from two family homes (which are not allowed in many residential zones). Other towns treat inlaws as simply "added living space" governed by who is living there as opposed to the space in general, There is no rule against having two kitchens, or three living rooms, or five baths; the difficulty lies when people feel they can rent this space or create separate utility bills.
Also, how the fire department treats the matter has no reflection on zoning. The smoke / Co 2 certificate solely addresses compliance with smoke detector / carbon monoxide detector laws. Many people assume that town / city departments are all connected. This is not true ! Each department handles only their scope of responsibility. For example, many make the mistake of using assessors cards to determine zoning. They list properties as two families if they are taxed that way. Assessors will evaluate properties based upon their current usuage, irrelevant to zoning compliance.
In short, whenever any legal use question arises, go to the source. Usually, the building inspector, who in most towns also serves as the zoning enforcement offficer and request a zoning compliance determination. Better safe than sorry .. I echo the "better have an inlaw who is a lawyer" comment