At some point in the movie Rachel tells Harvey Dent that Bruce's penthouse is the safest place in the city. That should be obvious, since Bruce is Batman, but the thing is that Bruce's penthouse has a state of the art security system, starting with the panic room (where he has access to Batman's gear).
When the Joker gets from the lift to the party, Wertz is showing his badge to the camera (to be granted access). Joker is just hiding behind him. Batman is running software in the batbunker to identify Joker's face (we can see this in a couple scenes, specially after one of the Batman copycats gets killed by the Joker and the video is sent to the TV).
Presumably (since there is no in-movie evidence), Bruce penthouse security system is linked to the batbunker's computer and the software is able to detect the Joker in the elevator. After getting a positive match, the software triggers some kind of alarm that warns Bruce that the Joker is at his gates...
Extra: Information about the movie penthouse can also be found at the Gotham Cable News viral site.
Where does the richest man in Gotham move when his house burns down? For Bruce Wayne, the answer was easy - find the priciest luxury tower in town and buy the entire top two floors.
With seven bedrooms, six baths, marble flown in from Italian rockyards, two ballrooms, and panoramic city views, Wayne's new residence represents the ultimate in city living.
Wayne Industries is using the apartment to test out radical new technologies for home use. It's a "digital home" where your every whim - from music to lighting to video and games -- can be granted via fingertip access points.
Wayne gutted the interior and invested millions in a renovation. And today was the move-in date.
Curiosity seekers and photographers jostled for a view as Bruce Wayne moved his belongings - thinned out from the fire -- into the penthouse suite at Gotham Century Towers.