Whenever necessary to make an inspection to enforce any of the provisions of this
code, or whenever the building official has reasonable cause to believe that there
exists in any building or upon any premises any condition or code violation which
makes such building, structure, premises, electrical, gas, mechanical, or plumbing
systems unsafe, dangerous or hazardous, the building official may enter the building,
structure, or premises at all reasonable times to inspect the same or to perform any
duty imposed upon the building official by this code. If such building or premises
are occupied, he shall first present proper credentials and request entry. If such
building, or premises are unoccupied, he shall first make a reasonable effort to locate
the owner or other persons having charge or control of such and request entry. If
entry is refused, the building official shall have recourse to every remedy provided
by law to secure entry.