You may need a permit for the electrical work on both of the units. There is no structural work needed if it is on the roof, it sits on a raised pad. You might need a permit if you hang it on the side of the building.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.