With the increased realisation of the benefits of studying environmental data, sensor networks are rapidly scaling in size, heterogeneity of data, and applications. In this paper, we present a State-based Publish/Subscribe (SPS) framework for sensor systems with many distributed and independent application clients. SPS provides a state-based information deduction model that is suited to many classes of sensor network applications. State Maintenance Components (SMCs) are introduced that are simple in operation, flexible in placement, and decomposable for distributed processing. Publish/Subscribe communication forms the core messaging component of the framework. SPS uses the decoupling feature of Pub/Sub and extends this across the SMCs to support a more flexible and dynamic system structure. Our evaluation, using real sensor data, shows that SPS is expressive in capturing conditions, and scalable in performance. Categories and Subject Descriptors C.2.4 [Computer-Communication Networ...