The city engineer or his or her designee may enter such premises at all reasonable times for the purposes of inspection or to perform any duty imposed by this chapter; provided, that if such premises or portion thereof is occupied, he/she shall first make a reasonable effort to locate the owner or other person having charge or control of the premises or portion thereof and demand entry.