In a significant class of sensor-network applications, the identities of the reporting sensors constitute the bulk of the communicated data, whereas the message itself can be as small as a single bit---for instance, in many cases, sensors are used to detect whether and where a certain interesting condition occurred, or to track incremental environmental changes at fixed locations. In such scenarios, the traditional network-protocol paradigm of separately specifying the source identity and the message in distinct fields leads to inefficient communication. This work addresses the question of how communication should happen in such identity-aware sensor networks. We calculate theoretical performance bounds on the minimum cost required for communication, where cost refers to the number of bits employed. We then develop joint source-identity coding schemes that are close to the optimal bounds, simple to implement, and gracefully adaptable to scenarios frequently encountered in sensor networks---for instance, node failures, or large numbers of nodes where only few are active during each reporting round. We also show that our proposed approach outperforms the traditional source-identity/message separation schemes.